Das Datei "frontend/src/app/admin/admin-sidebar.tsx" wurde geändert und befindet sich in einer Verzeichnisstruktur unter "frontend". Es ist möglich, dass diese Änderung mit einem neuen Feature oder einer Verbesserung im Admin-Sidebar-Bereich zusammenhängt. Die Datei könnte Teil eines größeren Commits sein, das sich auf mehrere Files erstreckt und
This commit is contained in:
parent
d3e50c64cc
commit
b3961214b2
16
backend/app/node_modules/.bin/autoprefixer
generated
vendored
16
backend/app/node_modules/.bin/autoprefixer
generated
vendored
@ -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/../autoprefixer/bin/autoprefixer" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/autoprefixer.cmd
generated
vendored
17
backend/app/node_modules/.bin/autoprefixer.cmd
generated
vendored
@ -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%\..\autoprefixer\bin\autoprefixer" %*
|
|
28
backend/app/node_modules/.bin/autoprefixer.ps1
generated
vendored
28
backend/app/node_modules/.bin/autoprefixer.ps1
generated
vendored
@ -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/../autoprefixer/bin/autoprefixer" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/browserslist
generated
vendored
16
backend/app/node_modules/.bin/browserslist
generated
vendored
@ -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/../browserslist/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../browserslist/cli.js" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/browserslist.cmd
generated
vendored
17
backend/app/node_modules/.bin/browserslist.cmd
generated
vendored
@ -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%\..\browserslist\cli.js" %*
|
|
28
backend/app/node_modules/.bin/browserslist.ps1
generated
vendored
28
backend/app/node_modules/.bin/browserslist.ps1
generated
vendored
@ -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/../browserslist/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../browserslist/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../browserslist/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/cssesc
generated
vendored
16
backend/app/node_modules/.bin/cssesc
generated
vendored
@ -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/../cssesc/bin/cssesc" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../cssesc/bin/cssesc" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/cssesc.cmd
generated
vendored
17
backend/app/node_modules/.bin/cssesc.cmd
generated
vendored
@ -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%\..\cssesc\bin\cssesc" %*
|
|
28
backend/app/node_modules/.bin/cssesc.ps1
generated
vendored
28
backend/app/node_modules/.bin/cssesc.ps1
generated
vendored
@ -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/../cssesc/bin/cssesc" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../cssesc/bin/cssesc" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../cssesc/bin/cssesc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/glob
generated
vendored
16
backend/app/node_modules/.bin/glob
generated
vendored
@ -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/../glob/dist/esm/bin.mjs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../glob/dist/esm/bin.mjs" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/glob.cmd
generated
vendored
17
backend/app/node_modules/.bin/glob.cmd
generated
vendored
@ -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%\..\glob\dist\esm\bin.mjs" %*
|
|
28
backend/app/node_modules/.bin/glob.ps1
generated
vendored
28
backend/app/node_modules/.bin/glob.ps1
generated
vendored
@ -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/../glob/dist/esm/bin.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/jiti
generated
vendored
16
backend/app/node_modules/.bin/jiti
generated
vendored
@ -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/../jiti/bin/jiti.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../jiti/bin/jiti.js" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/jiti.cmd
generated
vendored
17
backend/app/node_modules/.bin/jiti.cmd
generated
vendored
@ -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%\..\jiti\bin\jiti.js" %*
|
|
28
backend/app/node_modules/.bin/jiti.ps1
generated
vendored
28
backend/app/node_modules/.bin/jiti.ps1
generated
vendored
@ -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/../jiti/bin/jiti.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../jiti/bin/jiti.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../jiti/bin/jiti.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../jiti/bin/jiti.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/nanoid
generated
vendored
16
backend/app/node_modules/.bin/nanoid
generated
vendored
@ -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/../nanoid/bin/nanoid.cjs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/nanoid.cmd
generated
vendored
17
backend/app/node_modules/.bin/nanoid.cmd
generated
vendored
@ -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%\..\nanoid\bin\nanoid.cjs" %*
|
|
28
backend/app/node_modules/.bin/nanoid.ps1
generated
vendored
28
backend/app/node_modules/.bin/nanoid.ps1
generated
vendored
@ -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/../nanoid/bin/nanoid.cjs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/node-which
generated
vendored
16
backend/app/node_modules/.bin/node-which
generated
vendored
@ -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/../which/bin/node-which" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../which/bin/node-which" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/node-which.cmd
generated
vendored
17
backend/app/node_modules/.bin/node-which.cmd
generated
vendored
@ -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%\..\which\bin\node-which" %*
|
|
28
backend/app/node_modules/.bin/node-which.ps1
generated
vendored
28
backend/app/node_modules/.bin/node-which.ps1
generated
vendored
@ -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/../which/bin/node-which" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../which/bin/node-which" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../which/bin/node-which" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/resolve
generated
vendored
16
backend/app/node_modules/.bin/resolve
generated
vendored
@ -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/../resolve/bin/resolve" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../resolve/bin/resolve" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/resolve.cmd
generated
vendored
17
backend/app/node_modules/.bin/resolve.cmd
generated
vendored
@ -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%\..\resolve\bin\resolve" %*
|
|
28
backend/app/node_modules/.bin/resolve.ps1
generated
vendored
28
backend/app/node_modules/.bin/resolve.ps1
generated
vendored
@ -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/../resolve/bin/resolve" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../resolve/bin/resolve" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../resolve/bin/resolve" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../resolve/bin/resolve" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/sucrase
generated
vendored
16
backend/app/node_modules/.bin/sucrase
generated
vendored
@ -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/../sucrase/bin/sucrase" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../sucrase/bin/sucrase" "$@"
|
|
||||||
fi
|
|
16
backend/app/node_modules/.bin/sucrase-node
generated
vendored
16
backend/app/node_modules/.bin/sucrase-node
generated
vendored
@ -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/../sucrase/bin/sucrase-node" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../sucrase/bin/sucrase-node" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/sucrase-node.cmd
generated
vendored
17
backend/app/node_modules/.bin/sucrase-node.cmd
generated
vendored
@ -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%\..\sucrase\bin\sucrase-node" %*
|
|
28
backend/app/node_modules/.bin/sucrase-node.ps1
generated
vendored
28
backend/app/node_modules/.bin/sucrase-node.ps1
generated
vendored
@ -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/../sucrase/bin/sucrase-node" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase-node" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../sucrase/bin/sucrase-node" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../sucrase/bin/sucrase-node" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
17
backend/app/node_modules/.bin/sucrase.cmd
generated
vendored
17
backend/app/node_modules/.bin/sucrase.cmd
generated
vendored
@ -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%\..\sucrase\bin\sucrase" %*
|
|
28
backend/app/node_modules/.bin/sucrase.ps1
generated
vendored
28
backend/app/node_modules/.bin/sucrase.ps1
generated
vendored
@ -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/../sucrase/bin/sucrase" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../sucrase/bin/sucrase" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../sucrase/bin/sucrase" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../sucrase/bin/sucrase" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/tailwind
generated
vendored
16
backend/app/node_modules/.bin/tailwind
generated
vendored
@ -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/../tailwindcss/lib/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/tailwind.cmd
generated
vendored
17
backend/app/node_modules/.bin/tailwind.cmd
generated
vendored
@ -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%\..\tailwindcss\lib\cli.js" %*
|
|
28
backend/app/node_modules/.bin/tailwind.ps1
generated
vendored
28
backend/app/node_modules/.bin/tailwind.ps1
generated
vendored
@ -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/../tailwindcss/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/tailwindcss
generated
vendored
16
backend/app/node_modules/.bin/tailwindcss
generated
vendored
@ -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/../tailwindcss/lib/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../tailwindcss/lib/cli.js" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/tailwindcss.cmd
generated
vendored
17
backend/app/node_modules/.bin/tailwindcss.cmd
generated
vendored
@ -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%\..\tailwindcss\lib\cli.js" %*
|
|
28
backend/app/node_modules/.bin/tailwindcss.ps1
generated
vendored
28
backend/app/node_modules/.bin/tailwindcss.ps1
generated
vendored
@ -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/../tailwindcss/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../tailwindcss/lib/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/update-browserslist-db
generated
vendored
16
backend/app/node_modules/.bin/update-browserslist-db
generated
vendored
@ -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/../update-browserslist-db/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../update-browserslist-db/cli.js" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/update-browserslist-db.cmd
generated
vendored
17
backend/app/node_modules/.bin/update-browserslist-db.cmd
generated
vendored
@ -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%\..\update-browserslist-db\cli.js" %*
|
|
28
backend/app/node_modules/.bin/update-browserslist-db.ps1
generated
vendored
28
backend/app/node_modules/.bin/update-browserslist-db.ps1
generated
vendored
@ -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/../update-browserslist-db/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
16
backend/app/node_modules/.bin/yaml
generated
vendored
16
backend/app/node_modules/.bin/yaml
generated
vendored
@ -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/../yaml/bin.mjs" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../yaml/bin.mjs" "$@"
|
|
||||||
fi
|
|
17
backend/app/node_modules/.bin/yaml.cmd
generated
vendored
17
backend/app/node_modules/.bin/yaml.cmd
generated
vendored
@ -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%\..\yaml\bin.mjs" %*
|
|
28
backend/app/node_modules/.bin/yaml.ps1
generated
vendored
28
backend/app/node_modules/.bin/yaml.ps1
generated
vendored
@ -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/../yaml/bin.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../yaml/bin.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../yaml/bin.mjs" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../yaml/bin.mjs" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
exit $ret
|
|
1524
backend/app/node_modules/.package-lock.json
generated
vendored
1524
backend/app/node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
128
backend/app/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
128
backend/app/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
@ -1,128 +0,0 @@
|
|||||||
declare namespace QuickLRU {
|
|
||||||
interface Options<KeyType, ValueType> {
|
|
||||||
/**
|
|
||||||
The maximum number of milliseconds an item should remain in the cache.
|
|
||||||
|
|
||||||
@default Infinity
|
|
||||||
|
|
||||||
By default, `maxAge` will be `Infinity`, which means that items will never expire.
|
|
||||||
Lazy expiration upon the next write or read call.
|
|
||||||
|
|
||||||
Individual expiration of an item can be specified by the `set(key, value, maxAge)` method.
|
|
||||||
*/
|
|
||||||
readonly maxAge?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
The maximum number of items before evicting the least recently used items.
|
|
||||||
*/
|
|
||||||
readonly maxSize: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Called right before an item is evicted from the cache.
|
|
||||||
|
|
||||||
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
|
||||||
*/
|
|
||||||
onEviction?: (key: KeyType, value: ValueType) => void;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
declare class QuickLRU<KeyType, ValueType>
|
|
||||||
implements Iterable<[KeyType, ValueType]> {
|
|
||||||
/**
|
|
||||||
The stored item count.
|
|
||||||
*/
|
|
||||||
readonly size: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
|
|
||||||
|
|
||||||
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
|
||||||
|
|
||||||
@example
|
|
||||||
```
|
|
||||||
import QuickLRU = require('quick-lru');
|
|
||||||
|
|
||||||
const lru = new QuickLRU({maxSize: 1000});
|
|
||||||
|
|
||||||
lru.set('🦄', '🌈');
|
|
||||||
|
|
||||||
lru.has('🦄');
|
|
||||||
//=> true
|
|
||||||
|
|
||||||
lru.get('🦄');
|
|
||||||
//=> '🌈'
|
|
||||||
```
|
|
||||||
*/
|
|
||||||
constructor(options: QuickLRU.Options<KeyType, ValueType>);
|
|
||||||
|
|
||||||
[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Set an item. Returns the instance.
|
|
||||||
|
|
||||||
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire.
|
|
||||||
|
|
||||||
@returns The list instance.
|
|
||||||
*/
|
|
||||||
set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Get an item.
|
|
||||||
|
|
||||||
@returns The stored item or `undefined`.
|
|
||||||
*/
|
|
||||||
get(key: KeyType): ValueType | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Check if an item exists.
|
|
||||||
*/
|
|
||||||
has(key: KeyType): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Get an item without marking it as recently used.
|
|
||||||
|
|
||||||
@returns The stored item or `undefined`.
|
|
||||||
*/
|
|
||||||
peek(key: KeyType): ValueType | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Delete an item.
|
|
||||||
|
|
||||||
@returns `true` if the item is removed or `false` if the item doesn't exist.
|
|
||||||
*/
|
|
||||||
delete(key: KeyType): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Delete all items.
|
|
||||||
*/
|
|
||||||
clear(): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
|
||||||
|
|
||||||
Useful for on-the-fly tuning of cache sizes in live systems.
|
|
||||||
*/
|
|
||||||
resize(maxSize: number): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Iterable for all the keys.
|
|
||||||
*/
|
|
||||||
keys(): IterableIterator<KeyType>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Iterable for all the values.
|
|
||||||
*/
|
|
||||||
values(): IterableIterator<ValueType>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Iterable for all entries, starting with the oldest (ascending in recency).
|
|
||||||
*/
|
|
||||||
entriesAscending(): IterableIterator<[KeyType, ValueType]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Iterable for all entries, starting with the newest (descending in recency).
|
|
||||||
*/
|
|
||||||
entriesDescending(): IterableIterator<[KeyType, ValueType]>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export = QuickLRU;
|
|
263
backend/app/node_modules/@alloc/quick-lru/index.js
generated
vendored
263
backend/app/node_modules/@alloc/quick-lru/index.js
generated
vendored
@ -1,263 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
class QuickLRU {
|
|
||||||
constructor(options = {}) {
|
|
||||||
if (!(options.maxSize && options.maxSize > 0)) {
|
|
||||||
throw new TypeError('`maxSize` must be a number greater than 0');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof options.maxAge === 'number' && options.maxAge === 0) {
|
|
||||||
throw new TypeError('`maxAge` must be a number greater than 0');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.maxSize = options.maxSize;
|
|
||||||
this.maxAge = options.maxAge || Infinity;
|
|
||||||
this.onEviction = options.onEviction;
|
|
||||||
this.cache = new Map();
|
|
||||||
this.oldCache = new Map();
|
|
||||||
this._size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_emitEvictions(cache) {
|
|
||||||
if (typeof this.onEviction !== 'function') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const [key, item] of cache) {
|
|
||||||
this.onEviction(key, item.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_deleteIfExpired(key, item) {
|
|
||||||
if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
|
|
||||||
if (typeof this.onEviction === 'function') {
|
|
||||||
this.onEviction(key, item.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.delete(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_getOrDeleteIfExpired(key, item) {
|
|
||||||
const deleted = this._deleteIfExpired(key, item);
|
|
||||||
if (deleted === false) {
|
|
||||||
return item.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_getItemValue(key, item) {
|
|
||||||
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
_peek(key, cache) {
|
|
||||||
const item = cache.get(key);
|
|
||||||
|
|
||||||
return this._getItemValue(key, item);
|
|
||||||
}
|
|
||||||
|
|
||||||
_set(key, value) {
|
|
||||||
this.cache.set(key, value);
|
|
||||||
this._size++;
|
|
||||||
|
|
||||||
if (this._size >= this.maxSize) {
|
|
||||||
this._size = 0;
|
|
||||||
this._emitEvictions(this.oldCache);
|
|
||||||
this.oldCache = this.cache;
|
|
||||||
this.cache = new Map();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_moveToRecent(key, item) {
|
|
||||||
this.oldCache.delete(key);
|
|
||||||
this._set(key, item);
|
|
||||||
}
|
|
||||||
|
|
||||||
* _entriesAscending() {
|
|
||||||
for (const item of this.oldCache) {
|
|
||||||
const [key, value] = item;
|
|
||||||
if (!this.cache.has(key)) {
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const item of this.cache) {
|
|
||||||
const [key, value] = item;
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get(key) {
|
|
||||||
if (this.cache.has(key)) {
|
|
||||||
const item = this.cache.get(key);
|
|
||||||
|
|
||||||
return this._getItemValue(key, item);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.oldCache.has(key)) {
|
|
||||||
const item = this.oldCache.get(key);
|
|
||||||
if (this._deleteIfExpired(key, item) === false) {
|
|
||||||
this._moveToRecent(key, item);
|
|
||||||
return item.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
set(key, value, {maxAge = this.maxAge === Infinity ? undefined : Date.now() + this.maxAge} = {}) {
|
|
||||||
if (this.cache.has(key)) {
|
|
||||||
this.cache.set(key, {
|
|
||||||
value,
|
|
||||||
maxAge
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this._set(key, {value, expiry: maxAge});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
has(key) {
|
|
||||||
if (this.cache.has(key)) {
|
|
||||||
return !this._deleteIfExpired(key, this.cache.get(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.oldCache.has(key)) {
|
|
||||||
return !this._deleteIfExpired(key, this.oldCache.get(key));
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
peek(key) {
|
|
||||||
if (this.cache.has(key)) {
|
|
||||||
return this._peek(key, this.cache);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.oldCache.has(key)) {
|
|
||||||
return this._peek(key, this.oldCache);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delete(key) {
|
|
||||||
const deleted = this.cache.delete(key);
|
|
||||||
if (deleted) {
|
|
||||||
this._size--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.oldCache.delete(key) || deleted;
|
|
||||||
}
|
|
||||||
|
|
||||||
clear() {
|
|
||||||
this.cache.clear();
|
|
||||||
this.oldCache.clear();
|
|
||||||
this._size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
resize(newSize) {
|
|
||||||
if (!(newSize && newSize > 0)) {
|
|
||||||
throw new TypeError('`maxSize` must be a number greater than 0');
|
|
||||||
}
|
|
||||||
|
|
||||||
const items = [...this._entriesAscending()];
|
|
||||||
const removeCount = items.length - newSize;
|
|
||||||
if (removeCount < 0) {
|
|
||||||
this.cache = new Map(items);
|
|
||||||
this.oldCache = new Map();
|
|
||||||
this._size = items.length;
|
|
||||||
} else {
|
|
||||||
if (removeCount > 0) {
|
|
||||||
this._emitEvictions(items.slice(0, removeCount));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.oldCache = new Map(items.slice(removeCount));
|
|
||||||
this.cache = new Map();
|
|
||||||
this._size = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.maxSize = newSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
* keys() {
|
|
||||||
for (const [key] of this) {
|
|
||||||
yield key;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
* values() {
|
|
||||||
for (const [, value] of this) {
|
|
||||||
yield value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
* [Symbol.iterator]() {
|
|
||||||
for (const item of this.cache) {
|
|
||||||
const [key, value] = item;
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield [key, value.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const item of this.oldCache) {
|
|
||||||
const [key, value] = item;
|
|
||||||
if (!this.cache.has(key)) {
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield [key, value.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
* entriesDescending() {
|
|
||||||
let items = [...this.cache];
|
|
||||||
for (let i = items.length - 1; i >= 0; --i) {
|
|
||||||
const item = items[i];
|
|
||||||
const [key, value] = item;
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield [key, value.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
items = [...this.oldCache];
|
|
||||||
for (let i = items.length - 1; i >= 0; --i) {
|
|
||||||
const item = items[i];
|
|
||||||
const [key, value] = item;
|
|
||||||
if (!this.cache.has(key)) {
|
|
||||||
const deleted = this._deleteIfExpired(key, value);
|
|
||||||
if (deleted === false) {
|
|
||||||
yield [key, value.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
* entriesAscending() {
|
|
||||||
for (const [key, value] of this._entriesAscending()) {
|
|
||||||
yield [key, value.value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get size() {
|
|
||||||
if (!this._size) {
|
|
||||||
return this.oldCache.size;
|
|
||||||
}
|
|
||||||
|
|
||||||
let oldCacheSize = 0;
|
|
||||||
for (const key of this.oldCache.keys()) {
|
|
||||||
if (!this.cache.has(key)) {
|
|
||||||
oldCacheSize++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.min(this._size + oldCacheSize, this.maxSize);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = QuickLRU;
|
|
9
backend/app/node_modules/@alloc/quick-lru/license
generated
vendored
9
backend/app/node_modules/@alloc/quick-lru/license
generated
vendored
@ -1,9 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
|
43
backend/app/node_modules/@alloc/quick-lru/package.json
generated
vendored
43
backend/app/node_modules/@alloc/quick-lru/package.json
generated
vendored
@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@alloc/quick-lru",
|
|
||||||
"version": "5.2.0",
|
|
||||||
"description": "Simple “Least Recently Used” (LRU) cache",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "sindresorhus/quick-lru",
|
|
||||||
"funding": "https://github.com/sponsors/sindresorhus",
|
|
||||||
"author": {
|
|
||||||
"name": "Sindre Sorhus",
|
|
||||||
"email": "sindresorhus@gmail.com",
|
|
||||||
"url": "https://sindresorhus.com"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "xo && nyc ava && tsd"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"index.d.ts"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"lru",
|
|
||||||
"quick",
|
|
||||||
"cache",
|
|
||||||
"caching",
|
|
||||||
"least",
|
|
||||||
"recently",
|
|
||||||
"used",
|
|
||||||
"fast",
|
|
||||||
"map",
|
|
||||||
"hash",
|
|
||||||
"buffer"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"ava": "^2.0.0",
|
|
||||||
"coveralls": "^3.0.3",
|
|
||||||
"nyc": "^15.0.0",
|
|
||||||
"tsd": "^0.11.0",
|
|
||||||
"xo": "^0.26.0"
|
|
||||||
}
|
|
||||||
}
|
|
139
backend/app/node_modules/@alloc/quick-lru/readme.md
generated
vendored
139
backend/app/node_modules/@alloc/quick-lru/readme.md
generated
vendored
@ -1,139 +0,0 @@
|
|||||||
# quick-lru [](https://travis-ci.org/sindresorhus/quick-lru) [](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
|
|
||||||
|
|
||||||
> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
|
|
||||||
|
|
||||||
Useful when you need to cache something and limit memory usage.
|
|
||||||
|
|
||||||
Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```
|
|
||||||
$ npm install quick-lru
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
const QuickLRU = require('quick-lru');
|
|
||||||
|
|
||||||
const lru = new QuickLRU({maxSize: 1000});
|
|
||||||
|
|
||||||
lru.set('🦄', '🌈');
|
|
||||||
|
|
||||||
lru.has('🦄');
|
|
||||||
//=> true
|
|
||||||
|
|
||||||
lru.get('🦄');
|
|
||||||
//=> '🌈'
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### new QuickLRU(options?)
|
|
||||||
|
|
||||||
Returns a new instance.
|
|
||||||
|
|
||||||
### options
|
|
||||||
|
|
||||||
Type: `object`
|
|
||||||
|
|
||||||
#### maxSize
|
|
||||||
|
|
||||||
*Required*\
|
|
||||||
Type: `number`
|
|
||||||
|
|
||||||
The maximum number of items before evicting the least recently used items.
|
|
||||||
|
|
||||||
#### maxAge
|
|
||||||
|
|
||||||
Type: `number`\
|
|
||||||
Default: `Infinity`
|
|
||||||
|
|
||||||
The maximum number of milliseconds an item should remain in cache.
|
|
||||||
By default maxAge will be Infinity, which means that items will never expire.
|
|
||||||
|
|
||||||
Lazy expiration happens upon the next `write` or `read` call.
|
|
||||||
|
|
||||||
Individual expiration of an item can be specified by the `set(key, value, options)` method.
|
|
||||||
|
|
||||||
#### onEviction
|
|
||||||
|
|
||||||
*Optional*\
|
|
||||||
Type: `(key, value) => void`
|
|
||||||
|
|
||||||
Called right before an item is evicted from the cache.
|
|
||||||
|
|
||||||
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
|
||||||
|
|
||||||
### Instance
|
|
||||||
|
|
||||||
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
|
||||||
|
|
||||||
Both `key` and `value` can be of any type.
|
|
||||||
|
|
||||||
#### .set(key, value, options?)
|
|
||||||
|
|
||||||
Set an item. Returns the instance.
|
|
||||||
|
|
||||||
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire.
|
|
||||||
|
|
||||||
#### .get(key)
|
|
||||||
|
|
||||||
Get an item.
|
|
||||||
|
|
||||||
#### .has(key)
|
|
||||||
|
|
||||||
Check if an item exists.
|
|
||||||
|
|
||||||
#### .peek(key)
|
|
||||||
|
|
||||||
Get an item without marking it as recently used.
|
|
||||||
|
|
||||||
#### .delete(key)
|
|
||||||
|
|
||||||
Delete an item.
|
|
||||||
|
|
||||||
Returns `true` if the item is removed or `false` if the item doesn't exist.
|
|
||||||
|
|
||||||
#### .clear()
|
|
||||||
|
|
||||||
Delete all items.
|
|
||||||
|
|
||||||
#### .resize(maxSize)
|
|
||||||
|
|
||||||
Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
|
||||||
|
|
||||||
Useful for on-the-fly tuning of cache sizes in live systems.
|
|
||||||
|
|
||||||
#### .keys()
|
|
||||||
|
|
||||||
Iterable for all the keys.
|
|
||||||
|
|
||||||
#### .values()
|
|
||||||
|
|
||||||
Iterable for all the values.
|
|
||||||
|
|
||||||
#### .entriesAscending()
|
|
||||||
|
|
||||||
Iterable for all entries, starting with the oldest (ascending in recency).
|
|
||||||
|
|
||||||
#### .entriesDescending()
|
|
||||||
|
|
||||||
Iterable for all entries, starting with the newest (descending in recency).
|
|
||||||
|
|
||||||
#### .size
|
|
||||||
|
|
||||||
The stored item count.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
<b>
|
|
||||||
<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
||||||
</b>
|
|
||||||
<br>
|
|
||||||
<sub>
|
|
||||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
||||||
</sub>
|
|
||||||
</div>
|
|
14
backend/app/node_modules/@isaacs/cliui/LICENSE.txt
generated
vendored
14
backend/app/node_modules/@isaacs/cliui/LICENSE.txt
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
Copyright (c) 2015, 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.
|
|
143
backend/app/node_modules/@isaacs/cliui/README.md
generated
vendored
143
backend/app/node_modules/@isaacs/cliui/README.md
generated
vendored
@ -1,143 +0,0 @@
|
|||||||
# @isaacs/cliui
|
|
||||||
|
|
||||||
Temporary fork of [cliui](http://npm.im/cliui).
|
|
||||||
|
|
||||||

|
|
||||||
[](https://www.npmjs.com/package/cliui)
|
|
||||||
[](https://conventionalcommits.org)
|
|
||||||

|
|
||||||
|
|
||||||
easily create complex multi-column command-line-interfaces.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```js
|
|
||||||
const ui = require('cliui')()
|
|
||||||
|
|
||||||
ui.div('Usage: $0 [command] [options]')
|
|
||||||
|
|
||||||
ui.div({
|
|
||||||
text: 'Options:',
|
|
||||||
padding: [2, 0, 1, 0]
|
|
||||||
})
|
|
||||||
|
|
||||||
ui.div(
|
|
||||||
{
|
|
||||||
text: "-f, --file",
|
|
||||||
width: 20,
|
|
||||||
padding: [0, 4, 0, 4]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "the file to load." +
|
|
||||||
chalk.green("(if this description is long it wraps).")
|
|
||||||
,
|
|
||||||
width: 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: chalk.red("[required]"),
|
|
||||||
align: 'right'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
console.log(ui.toString())
|
|
||||||
```
|
|
||||||
|
|
||||||
## Deno/ESM Support
|
|
||||||
|
|
||||||
As of `v7` `cliui` supports [Deno](https://github.com/denoland/deno) and
|
|
||||||
[ESM](https://nodejs.org/api/esm.html#esm_ecmascript_modules):
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import cliui from "https://deno.land/x/cliui/deno.ts";
|
|
||||||
|
|
||||||
const ui = cliui({})
|
|
||||||
|
|
||||||
ui.div('Usage: $0 [command] [options]')
|
|
||||||
|
|
||||||
ui.div({
|
|
||||||
text: 'Options:',
|
|
||||||
padding: [2, 0, 1, 0]
|
|
||||||
})
|
|
||||||
|
|
||||||
ui.div({
|
|
||||||
text: "-f, --file",
|
|
||||||
width: 20,
|
|
||||||
padding: [0, 4, 0, 4]
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log(ui.toString())
|
|
||||||
```
|
|
||||||
|
|
||||||
<img width="500" src="screenshot.png">
|
|
||||||
|
|
||||||
## Layout DSL
|
|
||||||
|
|
||||||
cliui exposes a simple layout DSL:
|
|
||||||
|
|
||||||
If you create a single `ui.div`, passing a string rather than an
|
|
||||||
object:
|
|
||||||
|
|
||||||
* `\n`: characters will be interpreted as new rows.
|
|
||||||
* `\t`: characters will be interpreted as new columns.
|
|
||||||
* `\s`: characters will be interpreted as padding.
|
|
||||||
|
|
||||||
**as an example...**
|
|
||||||
|
|
||||||
```js
|
|
||||||
var ui = require('./')({
|
|
||||||
width: 60
|
|
||||||
})
|
|
||||||
|
|
||||||
ui.div(
|
|
||||||
'Usage: node ./bin/foo.js\n' +
|
|
||||||
' <regex>\t provide a regex\n' +
|
|
||||||
' <glob>\t provide a glob\t [required]'
|
|
||||||
)
|
|
||||||
|
|
||||||
console.log(ui.toString())
|
|
||||||
```
|
|
||||||
|
|
||||||
**will output:**
|
|
||||||
|
|
||||||
```shell
|
|
||||||
Usage: node ./bin/foo.js
|
|
||||||
<regex> provide a regex
|
|
||||||
<glob> provide a glob [required]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
```js
|
|
||||||
cliui = require('cliui')
|
|
||||||
```
|
|
||||||
|
|
||||||
### cliui({width: integer})
|
|
||||||
|
|
||||||
Specify the maximum width of the UI being generated.
|
|
||||||
If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`.
|
|
||||||
|
|
||||||
### cliui({wrap: boolean})
|
|
||||||
|
|
||||||
Enable or disable the wrapping of text in a column.
|
|
||||||
|
|
||||||
### cliui.div(column, column, column)
|
|
||||||
|
|
||||||
Create a row with any number of columns, a column
|
|
||||||
can either be a string, or an object with the following
|
|
||||||
options:
|
|
||||||
|
|
||||||
* **text:** some text to place in the column.
|
|
||||||
* **width:** the width of a column.
|
|
||||||
* **align:** alignment, `right` or `center`.
|
|
||||||
* **padding:** `[top, right, bottom, left]`.
|
|
||||||
* **border:** should a border be placed around the div?
|
|
||||||
|
|
||||||
### cliui.span(column, column, column)
|
|
||||||
|
|
||||||
Similar to `div`, except the next row will be appended without
|
|
||||||
a new line being created.
|
|
||||||
|
|
||||||
### cliui.resetOutput()
|
|
||||||
|
|
||||||
Resets the UI elements of the current cliui instance, maintaining the values
|
|
||||||
set for `width` and `wrap`.
|
|
14
backend/app/node_modules/@isaacs/cliui/index.mjs
generated
vendored
14
backend/app/node_modules/@isaacs/cliui/index.mjs
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
// Bootstrap cliui with ESM dependencies:
|
|
||||||
import { cliui } from './build/lib/index.js'
|
|
||||||
|
|
||||||
import stringWidth from 'string-width'
|
|
||||||
import stripAnsi from 'strip-ansi'
|
|
||||||
import wrap from 'wrap-ansi'
|
|
||||||
|
|
||||||
export default function ui (opts) {
|
|
||||||
return cliui(opts, {
|
|
||||||
stringWidth,
|
|
||||||
stripAnsi,
|
|
||||||
wrap
|
|
||||||
})
|
|
||||||
}
|
|
86
backend/app/node_modules/@isaacs/cliui/package.json
generated
vendored
86
backend/app/node_modules/@isaacs/cliui/package.json
generated
vendored
@ -1,86 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@isaacs/cliui",
|
|
||||||
"version": "8.0.2",
|
|
||||||
"description": "easily create complex multi-column command-line-interfaces",
|
|
||||||
"main": "build/index.cjs",
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"import": "./index.mjs",
|
|
||||||
"require": "./build/index.cjs"
|
|
||||||
},
|
|
||||||
"./build/index.cjs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"type": "module",
|
|
||||||
"module": "./index.mjs",
|
|
||||||
"scripts": {
|
|
||||||
"check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'",
|
|
||||||
"fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
|
|
||||||
"pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
|
|
||||||
"test": "c8 mocha ./test/*.cjs",
|
|
||||||
"test:esm": "c8 mocha ./test/**/*.mjs",
|
|
||||||
"postest": "check",
|
|
||||||
"coverage": "c8 report --check-coverage",
|
|
||||||
"precompile": "rimraf build",
|
|
||||||
"compile": "tsc",
|
|
||||||
"postcompile": "npm run build:cjs",
|
|
||||||
"build:cjs": "rollup -c",
|
|
||||||
"prepare": "npm run compile"
|
|
||||||
},
|
|
||||||
"repository": "yargs/cliui",
|
|
||||||
"standard": {
|
|
||||||
"ignore": [
|
|
||||||
"**/example/**"
|
|
||||||
],
|
|
||||||
"globals": [
|
|
||||||
"it"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"cli",
|
|
||||||
"command-line",
|
|
||||||
"layout",
|
|
||||||
"design",
|
|
||||||
"console",
|
|
||||||
"wrap",
|
|
||||||
"table"
|
|
||||||
],
|
|
||||||
"author": "Ben Coe <ben@npmjs.com>",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"string-width": "^5.1.2",
|
|
||||||
"string-width-cjs": "npm:string-width@^4.2.0",
|
|
||||||
"strip-ansi": "^7.0.1",
|
|
||||||
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
|
|
||||||
"wrap-ansi": "^8.1.0",
|
|
||||||
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/node": "^14.0.27",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^4.0.0",
|
|
||||||
"@typescript-eslint/parser": "^4.0.0",
|
|
||||||
"c8": "^7.3.0",
|
|
||||||
"chai": "^4.2.0",
|
|
||||||
"chalk": "^4.1.0",
|
|
||||||
"cross-env": "^7.0.2",
|
|
||||||
"eslint": "^7.6.0",
|
|
||||||
"eslint-plugin-import": "^2.22.0",
|
|
||||||
"eslint-plugin-node": "^11.1.0",
|
|
||||||
"gts": "^3.0.0",
|
|
||||||
"mocha": "^10.0.0",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"rollup": "^2.23.1",
|
|
||||||
"rollup-plugin-ts": "^3.0.2",
|
|
||||||
"standardx": "^7.0.0",
|
|
||||||
"typescript": "^4.0.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"build",
|
|
||||||
"index.mjs",
|
|
||||||
"!*.d.ts"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
}
|
|
19
backend/app/node_modules/@jridgewell/gen-mapping/LICENSE
generated
vendored
19
backend/app/node_modules/@jridgewell/gen-mapping/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2022 Justin Ridgewell <jridgewell@google.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.
|
|
227
backend/app/node_modules/@jridgewell/gen-mapping/README.md
generated
vendored
227
backend/app/node_modules/@jridgewell/gen-mapping/README.md
generated
vendored
@ -1,227 +0,0 @@
|
|||||||
# @jridgewell/gen-mapping
|
|
||||||
|
|
||||||
> Generate source maps
|
|
||||||
|
|
||||||
`gen-mapping` allows you to generate a source map during transpilation or minification.
|
|
||||||
With a source map, you're able to trace the original location in the source file, either in Chrome's
|
|
||||||
DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping].
|
|
||||||
|
|
||||||
You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This
|
|
||||||
provides the same `addMapping` and `setSourceContent` API.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install @jridgewell/gen-mapping
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping';
|
|
||||||
|
|
||||||
const map = new GenMapping({
|
|
||||||
file: 'output.js',
|
|
||||||
sourceRoot: 'https://example.com/',
|
|
||||||
});
|
|
||||||
|
|
||||||
setSourceContent(map, 'input.js', `function foo() {}`);
|
|
||||||
|
|
||||||
addMapping(map, {
|
|
||||||
// Lines start at line 1, columns at column 0.
|
|
||||||
generated: { line: 1, column: 0 },
|
|
||||||
source: 'input.js',
|
|
||||||
original: { line: 1, column: 0 },
|
|
||||||
});
|
|
||||||
|
|
||||||
addMapping(map, {
|
|
||||||
generated: { line: 1, column: 9 },
|
|
||||||
source: 'input.js',
|
|
||||||
original: { line: 1, column: 9 },
|
|
||||||
name: 'foo',
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(toDecodedMap(map), {
|
|
||||||
version: 3,
|
|
||||||
file: 'output.js',
|
|
||||||
names: ['foo'],
|
|
||||||
sourceRoot: 'https://example.com/',
|
|
||||||
sources: ['input.js'],
|
|
||||||
sourcesContent: ['function foo() {}'],
|
|
||||||
mappings: [
|
|
||||||
[ [0, 0, 0, 0], [9, 0, 0, 9, 0] ]
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(toEncodedMap(map), {
|
|
||||||
version: 3,
|
|
||||||
file: 'output.js',
|
|
||||||
names: ['foo'],
|
|
||||||
sourceRoot: 'https://example.com/',
|
|
||||||
sources: ['input.js'],
|
|
||||||
sourcesContent: ['function foo() {}'],
|
|
||||||
mappings: 'AAAA,SAASA',
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
### Smaller Sourcemaps
|
|
||||||
|
|
||||||
Not everything needs to be added to a sourcemap, and needless markings can cause signficantly
|
|
||||||
larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will
|
|
||||||
intelligently determine if this marking adds useful information. If not, the marking will be
|
|
||||||
skipped.
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { maybeAddMapping } from '@jridgewell/gen-mapping';
|
|
||||||
|
|
||||||
const map = new GenMapping();
|
|
||||||
|
|
||||||
// Adding a sourceless marking at the beginning of a line isn't useful.
|
|
||||||
maybeAddMapping(map, {
|
|
||||||
generated: { line: 1, column: 0 },
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adding a new source marking is useful.
|
|
||||||
maybeAddMapping(map, {
|
|
||||||
generated: { line: 1, column: 0 },
|
|
||||||
source: 'input.js',
|
|
||||||
original: { line: 1, column: 0 },
|
|
||||||
});
|
|
||||||
|
|
||||||
// But adding another marking pointing to the exact same original location isn't, even if the
|
|
||||||
// generated column changed.
|
|
||||||
maybeAddMapping(map, {
|
|
||||||
generated: { line: 1, column: 9 },
|
|
||||||
source: 'input.js',
|
|
||||||
original: { line: 1, column: 0 },
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(toEncodedMap(map), {
|
|
||||||
version: 3,
|
|
||||||
names: [],
|
|
||||||
sources: ['input.js'],
|
|
||||||
sourcesContent: [null],
|
|
||||||
mappings: 'AAAA',
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## Benchmarks
|
|
||||||
|
|
||||||
```
|
|
||||||
node v18.0.0
|
|
||||||
|
|
||||||
amp.js.map
|
|
||||||
Memory Usage:
|
|
||||||
gen-mapping: addSegment 5852872 bytes
|
|
||||||
gen-mapping: addMapping 7716042 bytes
|
|
||||||
source-map-js 6143250 bytes
|
|
||||||
source-map-0.6.1 6124102 bytes
|
|
||||||
source-map-0.8.0 6121173 bytes
|
|
||||||
Smallest memory usage is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Adding speed:
|
|
||||||
gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled)
|
|
||||||
gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled)
|
|
||||||
source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled)
|
|
||||||
source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled)
|
|
||||||
source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled)
|
|
||||||
Fastest is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Generate speed:
|
|
||||||
gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled)
|
|
||||||
gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled)
|
|
||||||
source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled)
|
|
||||||
source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled)
|
|
||||||
source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled)
|
|
||||||
Fastest is gen-mapping: decoded output
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
babel.min.js.map
|
|
||||||
Memory Usage:
|
|
||||||
gen-mapping: addSegment 37578063 bytes
|
|
||||||
gen-mapping: addMapping 37212897 bytes
|
|
||||||
source-map-js 47638527 bytes
|
|
||||||
source-map-0.6.1 47690503 bytes
|
|
||||||
source-map-0.8.0 47470188 bytes
|
|
||||||
Smallest memory usage is gen-mapping: addMapping
|
|
||||||
|
|
||||||
Adding speed:
|
|
||||||
gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled)
|
|
||||||
gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled)
|
|
||||||
source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled)
|
|
||||||
source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled)
|
|
||||||
source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled)
|
|
||||||
Fastest is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Generate speed:
|
|
||||||
gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled)
|
|
||||||
gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled)
|
|
||||||
source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled)
|
|
||||||
source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled)
|
|
||||||
source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled)
|
|
||||||
Fastest is gen-mapping: decoded output
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
preact.js.map
|
|
||||||
Memory Usage:
|
|
||||||
gen-mapping: addSegment 416247 bytes
|
|
||||||
gen-mapping: addMapping 419824 bytes
|
|
||||||
source-map-js 1024619 bytes
|
|
||||||
source-map-0.6.1 1146004 bytes
|
|
||||||
source-map-0.8.0 1113250 bytes
|
|
||||||
Smallest memory usage is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Adding speed:
|
|
||||||
gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled)
|
|
||||||
gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled)
|
|
||||||
source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled)
|
|
||||||
source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled)
|
|
||||||
source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled)
|
|
||||||
Fastest is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Generate speed:
|
|
||||||
gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled)
|
|
||||||
gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled)
|
|
||||||
source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled)
|
|
||||||
source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled)
|
|
||||||
source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled)
|
|
||||||
Fastest is gen-mapping: decoded output
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
react.js.map
|
|
||||||
Memory Usage:
|
|
||||||
gen-mapping: addSegment 975096 bytes
|
|
||||||
gen-mapping: addMapping 1102981 bytes
|
|
||||||
source-map-js 2918836 bytes
|
|
||||||
source-map-0.6.1 2885435 bytes
|
|
||||||
source-map-0.8.0 2874336 bytes
|
|
||||||
Smallest memory usage is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Adding speed:
|
|
||||||
gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled)
|
|
||||||
gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled)
|
|
||||||
source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled)
|
|
||||||
source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled)
|
|
||||||
source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled)
|
|
||||||
Fastest is gen-mapping: addSegment
|
|
||||||
|
|
||||||
Generate speed:
|
|
||||||
gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled)
|
|
||||||
gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled)
|
|
||||||
source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled)
|
|
||||||
source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled)
|
|
||||||
source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled)
|
|
||||||
Fastest is gen-mapping: decoded output
|
|
||||||
```
|
|
||||||
|
|
||||||
[source-map]: https://www.npmjs.com/package/source-map
|
|
||||||
[trace-mapping]: https://github.com/jridgewell/trace-mapping
|
|
76
backend/app/node_modules/@jridgewell/gen-mapping/package.json
generated
vendored
76
backend/app/node_modules/@jridgewell/gen-mapping/package.json
generated
vendored
@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/gen-mapping",
|
|
||||||
"version": "0.3.8",
|
|
||||||
"description": "Generate source maps",
|
|
||||||
"keywords": [
|
|
||||||
"source",
|
|
||||||
"map"
|
|
||||||
],
|
|
||||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/jridgewell/gen-mapping",
|
|
||||||
"main": "dist/gen-mapping.umd.js",
|
|
||||||
"module": "dist/gen-mapping.mjs",
|
|
||||||
"types": "dist/types/gen-mapping.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/gen-mapping.d.ts",
|
|
||||||
"browser": "./dist/gen-mapping.umd.js",
|
|
||||||
"require": "./dist/gen-mapping.umd.js",
|
|
||||||
"import": "./dist/gen-mapping.mjs"
|
|
||||||
},
|
|
||||||
"./dist/gen-mapping.umd.js"
|
|
||||||
],
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"benchmark": "run-s build:rollup benchmark:*",
|
|
||||||
"benchmark:install": "cd benchmark && npm install",
|
|
||||||
"benchmark:only": "node benchmark/index.mjs",
|
|
||||||
"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",
|
|
||||||
"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": "c8 mocha",
|
|
||||||
"test:watch": "mocha --watch",
|
|
||||||
"prepublishOnly": "npm run preversion",
|
|
||||||
"preversion": "run-s test build"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@rollup/plugin-typescript": "8.3.2",
|
|
||||||
"@types/mocha": "9.1.1",
|
|
||||||
"@types/node": "17.0.29",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.21.0",
|
|
||||||
"@typescript-eslint/parser": "5.21.0",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"c8": "7.11.2",
|
|
||||||
"eslint": "8.14.0",
|
|
||||||
"eslint-config-prettier": "8.5.0",
|
|
||||||
"mocha": "9.2.2",
|
|
||||||
"npm-run-all": "4.1.5",
|
|
||||||
"prettier": "2.6.2",
|
|
||||||
"rollup": "2.70.2",
|
|
||||||
"tsx": "4.7.1",
|
|
||||||
"typescript": "4.6.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@jridgewell/set-array": "^1.2.1",
|
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.10",
|
|
||||||
"@jridgewell/trace-mapping": "^0.3.24"
|
|
||||||
}
|
|
||||||
}
|
|
19
backend/app/node_modules/@jridgewell/resolve-uri/LICENSE
generated
vendored
19
backend/app/node_modules/@jridgewell/resolve-uri/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2019 Justin Ridgewell <jridgewell@google.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.
|
|
40
backend/app/node_modules/@jridgewell/resolve-uri/README.md
generated
vendored
40
backend/app/node_modules/@jridgewell/resolve-uri/README.md
generated
vendored
@ -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 |
|
|
69
backend/app/node_modules/@jridgewell/resolve-uri/package.json
generated
vendored
69
backend/app/node_modules/@jridgewell/resolve-uri/package.json
generated
vendored
@ -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 <justin@ridgewell.name>",
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
19
backend/app/node_modules/@jridgewell/set-array/LICENSE
generated
vendored
19
backend/app/node_modules/@jridgewell/set-array/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2022 Justin Ridgewell <jridgewell@google.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.
|
|
37
backend/app/node_modules/@jridgewell/set-array/README.md
generated
vendored
37
backend/app/node_modules/@jridgewell/set-array/README.md
generated
vendored
@ -1,37 +0,0 @@
|
|||||||
# @jridgewell/set-array
|
|
||||||
|
|
||||||
> Like a Set, but provides the index of the `key` in the backing array
|
|
||||||
|
|
||||||
This is designed to allow synchronizing a second array with the contents of the backing array, like
|
|
||||||
how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, and there
|
|
||||||
are never duplicates.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install @jridgewell/set-array
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
import { SetArray, get, put, pop } from '@jridgewell/set-array';
|
|
||||||
|
|
||||||
const sa = new SetArray();
|
|
||||||
|
|
||||||
let index = put(sa, 'first');
|
|
||||||
assert.strictEqual(index, 0);
|
|
||||||
|
|
||||||
index = put(sa, 'second');
|
|
||||||
assert.strictEqual(index, 1);
|
|
||||||
|
|
||||||
assert.deepEqual(sa.array, [ 'first', 'second' ]);
|
|
||||||
|
|
||||||
index = get(sa, 'first');
|
|
||||||
assert.strictEqual(index, 0);
|
|
||||||
|
|
||||||
pop(sa);
|
|
||||||
index = get(sa, 'second');
|
|
||||||
assert.strictEqual(index, undefined);
|
|
||||||
assert.deepEqual(sa.array, [ 'first' ]);
|
|
||||||
```
|
|
65
backend/app/node_modules/@jridgewell/set-array/package.json
generated
vendored
65
backend/app/node_modules/@jridgewell/set-array/package.json
generated
vendored
@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/set-array",
|
|
||||||
"version": "1.2.1",
|
|
||||||
"description": "Like a Set, but provides the index of the `key` in the backing array",
|
|
||||||
"keywords": [],
|
|
||||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/jridgewell/set-array",
|
|
||||||
"main": "dist/set-array.umd.js",
|
|
||||||
"module": "dist/set-array.mjs",
|
|
||||||
"typings": "dist/types/set-array.d.ts",
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/set-array.d.ts",
|
|
||||||
"browser": "./dist/set-array.umd.js",
|
|
||||||
"require": "./dist/set-array.umd.js",
|
|
||||||
"import": "./dist/set-array.mjs"
|
|
||||||
},
|
|
||||||
"./dist/set-array.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",
|
|
||||||
"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": {
|
|
||||||
"@rollup/plugin-typescript": "8.3.0",
|
|
||||||
"@types/mocha": "9.1.1",
|
|
||||||
"@types/node": "17.0.29",
|
|
||||||
"@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",
|
|
||||||
"tsx": "4.7.1",
|
|
||||||
"typescript": "4.5.5"
|
|
||||||
}
|
|
||||||
}
|
|
21
backend/app/node_modules/@jridgewell/sourcemap-codec/LICENSE
generated
vendored
21
backend/app/node_modules/@jridgewell/sourcemap-codec/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2015 Rich Harris
|
|
||||||
|
|
||||||
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.
|
|
264
backend/app/node_modules/@jridgewell/sourcemap-codec/README.md
generated
vendored
264
backend/app/node_modules/@jridgewell/sourcemap-codec/README.md
generated
vendored
@ -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
|
|
75
backend/app/node_modules/@jridgewell/sourcemap-codec/package.json
generated
vendored
75
backend/app/node_modules/@jridgewell/sourcemap-codec/package.json
generated
vendored
@ -1,75 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/sourcemap-codec",
|
|
||||||
"version": "1.5.0",
|
|
||||||
"description": "Encode/decode sourcemap mappings",
|
|
||||||
"keywords": [
|
|
||||||
"sourcemap",
|
|
||||||
"vlq"
|
|
||||||
],
|
|
||||||
"main": "dist/sourcemap-codec.umd.js",
|
|
||||||
"module": "dist/sourcemap-codec.mjs",
|
|
||||||
"types": "dist/types/sourcemap-codec.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/sourcemap-codec.d.ts",
|
|
||||||
"browser": "./dist/sourcemap-codec.umd.js",
|
|
||||||
"require": "./dist/sourcemap-codec.umd.js",
|
|
||||||
"import": "./dist/sourcemap-codec.mjs"
|
|
||||||
},
|
|
||||||
"./dist/sourcemap-codec.umd.js"
|
|
||||||
],
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"benchmark": "run-s build:rollup benchmark:*",
|
|
||||||
"benchmark:install": "cd benchmark && npm install",
|
|
||||||
"benchmark:only": "node --expose-gc benchmark/index.js",
|
|
||||||
"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": "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"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/jridgewell/sourcemap-codec.git"
|
|
||||||
},
|
|
||||||
"author": "Rich Harris",
|
|
||||||
"license": "MIT",
|
|
||||||
"devDependencies": {
|
|
||||||
"@rollup/plugin-typescript": "8.3.0",
|
|
||||||
"@types/mocha": "10.0.6",
|
|
||||||
"@types/node": "17.0.15",
|
|
||||||
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
||||||
"@typescript-eslint/parser": "5.10.0",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"c8": "7.11.2",
|
|
||||||
"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.64.0",
|
|
||||||
"source-map": "0.6.1",
|
|
||||||
"source-map-js": "1.0.2",
|
|
||||||
"sourcemap-codec": "1.4.8",
|
|
||||||
"tsx": "4.7.1",
|
|
||||||
"typescript": "4.5.4"
|
|
||||||
}
|
|
||||||
}
|
|
19
backend/app/node_modules/@jridgewell/trace-mapping/LICENSE
generated
vendored
19
backend/app/node_modules/@jridgewell/trace-mapping/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
|||||||
Copyright 2022 Justin Ridgewell <justin@ridgewell.name>
|
|
||||||
|
|
||||||
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.
|
|
257
backend/app/node_modules/@jridgewell/trace-mapping/README.md
generated
vendored
257
backend/app/node_modules/@jridgewell/trace-mapping/README.md
generated
vendored
@ -1,257 +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,
|
|
||||||
sourceContentFor,
|
|
||||||
isIgnored,
|
|
||||||
} from '@jridgewell/trace-mapping';
|
|
||||||
|
|
||||||
const tracer = new TraceMap({
|
|
||||||
version: 3,
|
|
||||||
sources: ['input.js'],
|
|
||||||
sourcesContent: ['content of input.js'],
|
|
||||||
names: ['foo'],
|
|
||||||
mappings: 'KAyCIA',
|
|
||||||
ignoreList: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
// 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 content = sourceContentFor(tracer, traced.source);
|
|
||||||
assert.strictEqual(content, 'content for input.js');
|
|
||||||
|
|
||||||
const generated = generatedPositionFor(tracer, {
|
|
||||||
source: 'input.js',
|
|
||||||
line: 42,
|
|
||||||
column: 4,
|
|
||||||
});
|
|
||||||
assert.deepEqual(generated, {
|
|
||||||
line: 1,
|
|
||||||
column: 5,
|
|
||||||
});
|
|
||||||
|
|
||||||
const ignored = isIgnored(tracer, 'input.js');
|
|
||||||
assert.equal(ignored, false);
|
|
||||||
```
|
|
||||||
|
|
||||||
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 - 45120 segments
|
|
||||||
|
|
||||||
Memory Usage:
|
|
||||||
trace-mapping decoded 562400 bytes
|
|
||||||
trace-mapping encoded 5706544 bytes
|
|
||||||
source-map-js 10717664 bytes
|
|
||||||
source-map-0.6.1 17446384 bytes
|
|
||||||
source-map-0.8.0 9701757 bytes
|
|
||||||
Smallest memory usage is trace-mapping decoded
|
|
||||||
|
|
||||||
Init speed:
|
|
||||||
trace-mapping: decoded JSON input x 180 ops/sec ±0.34% (85 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 364 ops/sec ±1.77% (89 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 3,116 ops/sec ±0.50% (96 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 410 ops/sec ±2.62% (85 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 84.23 ops/sec ±0.91% (73 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 37.21 ops/sec ±2.08% (51 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
Trace speed:
|
|
||||||
trace-mapping: decoded originalPositionFor x 3,952,212 ops/sec ±0.17% (98 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 3,487,468 ops/sec ±1.58% (90 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 827,730 ops/sec ±0.78% (97 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 748,991 ops/sec ±0.53% (94 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 2,532,894 ops/sec ±0.57% (95 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
babel.min.js.map - 347793 segments
|
|
||||||
|
|
||||||
Memory Usage:
|
|
||||||
trace-mapping decoded 89832 bytes
|
|
||||||
trace-mapping encoded 35474640 bytes
|
|
||||||
source-map-js 51257176 bytes
|
|
||||||
source-map-0.6.1 63515664 bytes
|
|
||||||
source-map-0.8.0 42933752 bytes
|
|
||||||
Smallest memory usage is trace-mapping decoded
|
|
||||||
|
|
||||||
Init speed:
|
|
||||||
trace-mapping: decoded JSON input x 15.41 ops/sec ±8.65% (34 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 28.20 ops/sec ±12.87% (42 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 964 ops/sec ±0.36% (99 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 31.77 ops/sec ±13.79% (45 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 6.45 ops/sec ±5.16% (21 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 4.07 ops/sec ±5.24% (15 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
Trace speed:
|
|
||||||
trace-mapping: decoded originalPositionFor x 7,183,038 ops/sec ±0.58% (95 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 5,192,185 ops/sec ±0.41% (100 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 4,259,489 ops/sec ±0.79% (94 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 3,742,629 ops/sec ±0.71% (95 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 6,270,211 ops/sec ±0.64% (94 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
preact.js.map - 1992 segments
|
|
||||||
|
|
||||||
Memory Usage:
|
|
||||||
trace-mapping decoded 37128 bytes
|
|
||||||
trace-mapping encoded 247280 bytes
|
|
||||||
source-map-js 1143536 bytes
|
|
||||||
source-map-0.6.1 1290992 bytes
|
|
||||||
source-map-0.8.0 96544 bytes
|
|
||||||
Smallest memory usage is trace-mapping decoded
|
|
||||||
|
|
||||||
Init speed:
|
|
||||||
trace-mapping: decoded JSON input x 3,483 ops/sec ±0.30% (98 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 6,092 ops/sec ±0.18% (97 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 249,076 ops/sec ±0.24% (98 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 14,555 ops/sec ±0.48% (100 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 2,447 ops/sec ±0.36% (99 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 1,201 ops/sec ±0.57% (96 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
Trace speed:
|
|
||||||
trace-mapping: decoded originalPositionFor x 7,620,192 ops/sec ±0.09% (99 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 6,872,554 ops/sec ±0.30% (97 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 2,489,570 ops/sec ±0.35% (94 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 1,698,633 ops/sec ±0.28% (98 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 4,015,644 ops/sec ±0.22% (98 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
|
|
||||||
react.js.map - 5726 segments
|
|
||||||
|
|
||||||
Memory Usage:
|
|
||||||
trace-mapping decoded 16176 bytes
|
|
||||||
trace-mapping encoded 681552 bytes
|
|
||||||
source-map-js 2418352 bytes
|
|
||||||
source-map-0.6.1 2443672 bytes
|
|
||||||
source-map-0.8.0 111768 bytes
|
|
||||||
Smallest memory usage is trace-mapping decoded
|
|
||||||
|
|
||||||
Init speed:
|
|
||||||
trace-mapping: decoded JSON input x 1,720 ops/sec ±0.34% (98 runs sampled)
|
|
||||||
trace-mapping: encoded JSON input x 4,406 ops/sec ±0.35% (100 runs sampled)
|
|
||||||
trace-mapping: decoded Object input x 92,122 ops/sec ±0.10% (99 runs sampled)
|
|
||||||
trace-mapping: encoded Object input x 5,385 ops/sec ±0.37% (99 runs sampled)
|
|
||||||
source-map-js: encoded Object input x 794 ops/sec ±0.40% (98 runs sampled)
|
|
||||||
source-map-0.6.1: encoded Object input x 416 ops/sec ±0.54% (91 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded Object input
|
|
||||||
|
|
||||||
Trace speed:
|
|
||||||
trace-mapping: decoded originalPositionFor x 32,759,519 ops/sec ±0.33% (100 runs sampled)
|
|
||||||
trace-mapping: encoded originalPositionFor x 31,116,306 ops/sec ±0.33% (97 runs sampled)
|
|
||||||
source-map-js: encoded originalPositionFor x 17,458,435 ops/sec ±0.44% (97 runs sampled)
|
|
||||||
source-map-0.6.1: encoded originalPositionFor x 12,687,097 ops/sec ±0.43% (95 runs sampled)
|
|
||||||
source-map-0.8.0: encoded originalPositionFor x 23,538,275 ops/sec ±0.38% (95 runs sampled)
|
|
||||||
Fastest is trace-mapping: decoded originalPositionFor
|
|
||||||
```
|
|
||||||
|
|
||||||
[source-map]: https://www.npmjs.com/package/source-map
|
|
77
backend/app/node_modules/@jridgewell/trace-mapping/package.json
generated
vendored
77
backend/app/node_modules/@jridgewell/trace-mapping/package.json
generated
vendored
@ -1,77 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@jridgewell/trace-mapping",
|
|
||||||
"version": "0.3.25",
|
|
||||||
"description": "Trace the original position through a source map",
|
|
||||||
"keywords": [
|
|
||||||
"source",
|
|
||||||
"map"
|
|
||||||
],
|
|
||||||
"main": "dist/trace-mapping.umd.js",
|
|
||||||
"module": "dist/trace-mapping.mjs",
|
|
||||||
"types": "dist/types/trace-mapping.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"exports": {
|
|
||||||
".": [
|
|
||||||
{
|
|
||||||
"types": "./dist/types/trace-mapping.d.ts",
|
|
||||||
"browser": "./dist/trace-mapping.umd.js",
|
|
||||||
"require": "./dist/trace-mapping.umd.js",
|
|
||||||
"import": "./dist/trace-mapping.mjs"
|
|
||||||
},
|
|
||||||
"./dist/trace-mapping.umd.js"
|
|
||||||
],
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"author": "Justin Ridgewell <justin@ridgewell.name>",
|
|
||||||
"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 --expose-gc benchmark/index.mjs",
|
|
||||||
"build": "run-s -n build:*",
|
|
||||||
"build:rollup": "rollup -c rollup.config.mjs",
|
|
||||||
"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": "mocha --inspect-brk",
|
|
||||||
"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 mocha",
|
|
||||||
"test:watch": "mocha --watch"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@rollup/plugin-typescript": "11.1.6",
|
|
||||||
"@types/mocha": "10.0.6",
|
|
||||||
"@types/node": "20.11.20",
|
|
||||||
"@typescript-eslint/eslint-plugin": "6.18.1",
|
|
||||||
"@typescript-eslint/parser": "6.18.1",
|
|
||||||
"benchmark": "2.1.4",
|
|
||||||
"c8": "9.0.0",
|
|
||||||
"esbuild": "0.19.11",
|
|
||||||
"eslint": "8.56.0",
|
|
||||||
"eslint-config-prettier": "9.1.0",
|
|
||||||
"eslint-plugin-no-only-tests": "3.1.0",
|
|
||||||
"mocha": "10.3.0",
|
|
||||||
"npm-run-all": "4.1.5",
|
|
||||||
"prettier": "3.1.1",
|
|
||||||
"rollup": "4.9.4",
|
|
||||||
"tsx": "4.7.0",
|
|
||||||
"typescript": "5.3.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@jridgewell/resolve-uri": "^3.1.0",
|
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
|
||||||
}
|
|
||||||
}
|
|
21
backend/app/node_modules/@nodelib/fs.scandir/LICENSE
generated
vendored
21
backend/app/node_modules/@nodelib/fs.scandir/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) Denis Malinochkin
|
|
||||||
|
|
||||||
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.
|
|
171
backend/app/node_modules/@nodelib/fs.scandir/README.md
generated
vendored
171
backend/app/node_modules/@nodelib/fs.scandir/README.md
generated
vendored
@ -1,171 +0,0 @@
|
|||||||
# @nodelib/fs.scandir
|
|
||||||
|
|
||||||
> List files and directories inside the specified directory.
|
|
||||||
|
|
||||||
## :bulb: Highlights
|
|
||||||
|
|
||||||
The package is aimed at obtaining information about entries in the directory.
|
|
||||||
|
|
||||||
* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
|
|
||||||
* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
|
|
||||||
* :link: Can safely work with broken symbolic links.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```console
|
|
||||||
npm install @nodelib/fs.scandir
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import * as fsScandir from '@nodelib/fs.scandir';
|
|
||||||
|
|
||||||
fsScandir.scandir('path', (error, stats) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### .scandir(path, [optionsOrSettings], callback)
|
|
||||||
|
|
||||||
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
fsScandir.scandir('path', (error, entries) => { /* … */ });
|
|
||||||
fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
|
|
||||||
fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
### .scandirSync(path, [optionsOrSettings])
|
|
||||||
|
|
||||||
Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const entries = fsScandir.scandirSync('path');
|
|
||||||
const entries = fsScandir.scandirSync('path', {});
|
|
||||||
const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
|
|
||||||
```
|
|
||||||
|
|
||||||
#### path
|
|
||||||
|
|
||||||
* Required: `true`
|
|
||||||
* Type: `string | Buffer | URL`
|
|
||||||
|
|
||||||
A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
||||||
|
|
||||||
#### optionsOrSettings
|
|
||||||
|
|
||||||
* Required: `false`
|
|
||||||
* Type: `Options | Settings`
|
|
||||||
* Default: An instance of `Settings` class
|
|
||||||
|
|
||||||
An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
|
|
||||||
|
|
||||||
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
|
|
||||||
|
|
||||||
### Settings([options])
|
|
||||||
|
|
||||||
A class of full settings of the package.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const settings = new fsScandir.Settings({ followSymbolicLinks: false });
|
|
||||||
|
|
||||||
const entries = fsScandir.scandirSync('path', settings);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Entry
|
|
||||||
|
|
||||||
* `name` — The name of the entry (`unknown.txt`).
|
|
||||||
* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
|
|
||||||
* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
|
|
||||||
* `stats` (optional) — An instance of `fs.Stats` class.
|
|
||||||
|
|
||||||
For example, the `scandir` call for `tools` directory with one directory inside:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
{
|
|
||||||
dirent: Dirent { name: 'typedoc', /* … */ },
|
|
||||||
name: 'typedoc',
|
|
||||||
path: 'tools/typedoc'
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
### stats
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `false`
|
|
||||||
|
|
||||||
Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
|
|
||||||
|
|
||||||
> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
|
|
||||||
|
|
||||||
### followSymbolicLinks
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `false`
|
|
||||||
|
|
||||||
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
|
|
||||||
|
|
||||||
### `throwErrorOnBrokenSymbolicLink`
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `true`
|
|
||||||
|
|
||||||
Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
|
|
||||||
|
|
||||||
### `pathSegmentSeparator`
|
|
||||||
|
|
||||||
* Type: `string`
|
|
||||||
* Default: `path.sep`
|
|
||||||
|
|
||||||
By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
|
|
||||||
|
|
||||||
### `fs`
|
|
||||||
|
|
||||||
* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
|
|
||||||
* Default: A default FS methods
|
|
||||||
|
|
||||||
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
interface FileSystemAdapter {
|
|
||||||
lstat?: typeof fs.lstat;
|
|
||||||
stat?: typeof fs.stat;
|
|
||||||
lstatSync?: typeof fs.lstatSync;
|
|
||||||
statSync?: typeof fs.statSync;
|
|
||||||
readdir?: typeof fs.readdir;
|
|
||||||
readdirSync?: typeof fs.readdirSync;
|
|
||||||
}
|
|
||||||
|
|
||||||
const settings = new fsScandir.Settings({
|
|
||||||
fs: { lstat: fakeLstat }
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## `old` and `modern` mode
|
|
||||||
|
|
||||||
This package has two modes that are used depending on the environment and parameters of use.
|
|
||||||
|
|
||||||
### old
|
|
||||||
|
|
||||||
* Node.js below `10.10` or when the `stats` option is enabled
|
|
||||||
|
|
||||||
When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
|
|
||||||
|
|
||||||
### modern
|
|
||||||
|
|
||||||
* Node.js 10.10+ and the `stats` option is disabled
|
|
||||||
|
|
||||||
In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
|
|
||||||
|
|
||||||
This mode makes fewer calls to the file system. It's faster.
|
|
||||||
|
|
||||||
## Changelog
|
|
||||||
|
|
||||||
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This software is released under the terms of the MIT license.
|
|
44
backend/app/node_modules/@nodelib/fs.scandir/package.json
generated
vendored
44
backend/app/node_modules/@nodelib/fs.scandir/package.json
generated
vendored
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@nodelib/fs.scandir",
|
|
||||||
"version": "2.1.5",
|
|
||||||
"description": "List files and directories inside the specified directory",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir",
|
|
||||||
"keywords": [
|
|
||||||
"NodeLib",
|
|
||||||
"fs",
|
|
||||||
"FileSystem",
|
|
||||||
"file system",
|
|
||||||
"scandir",
|
|
||||||
"readdir",
|
|
||||||
"dirent"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"out/**",
|
|
||||||
"!out/**/*.map",
|
|
||||||
"!out/**/*.spec.*"
|
|
||||||
],
|
|
||||||
"main": "out/index.js",
|
|
||||||
"typings": "out/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
|
|
||||||
"lint": "eslint \"src/**/*.ts\" --cache",
|
|
||||||
"compile": "tsc -b .",
|
|
||||||
"compile:watch": "tsc -p . --watch --sourceMap",
|
|
||||||
"test": "mocha \"out/**/*.spec.js\" -s 0",
|
|
||||||
"build": "npm run clean && npm run compile && npm run lint && npm test",
|
|
||||||
"watch": "npm run clean && npm run compile:watch"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@nodelib/fs.stat": "2.0.5",
|
|
||||||
"run-parallel": "^1.1.9"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@nodelib/fs.macchiato": "1.0.4",
|
|
||||||
"@types/run-parallel": "^1.1.0"
|
|
||||||
},
|
|
||||||
"gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562"
|
|
||||||
}
|
|
21
backend/app/node_modules/@nodelib/fs.stat/LICENSE
generated
vendored
21
backend/app/node_modules/@nodelib/fs.stat/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) Denis Malinochkin
|
|
||||||
|
|
||||||
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.
|
|
126
backend/app/node_modules/@nodelib/fs.stat/README.md
generated
vendored
126
backend/app/node_modules/@nodelib/fs.stat/README.md
generated
vendored
@ -1,126 +0,0 @@
|
|||||||
# @nodelib/fs.stat
|
|
||||||
|
|
||||||
> Get the status of a file with some features.
|
|
||||||
|
|
||||||
## :bulb: Highlights
|
|
||||||
|
|
||||||
Wrapper around standard method `fs.lstat` and `fs.stat` with some features.
|
|
||||||
|
|
||||||
* :beginner: Normally follows symbolic link.
|
|
||||||
* :gear: Can safely work with broken symbolic link.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```console
|
|
||||||
npm install @nodelib/fs.stat
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import * as fsStat from '@nodelib/fs.stat';
|
|
||||||
|
|
||||||
fsStat.stat('path', (error, stats) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### .stat(path, [optionsOrSettings], callback)
|
|
||||||
|
|
||||||
Returns an instance of `fs.Stats` class for provided path with standard callback-style.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
fsStat.stat('path', (error, stats) => { /* … */ });
|
|
||||||
fsStat.stat('path', {}, (error, stats) => { /* … */ });
|
|
||||||
fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
### .statSync(path, [optionsOrSettings])
|
|
||||||
|
|
||||||
Returns an instance of `fs.Stats` class for provided path.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const stats = fsStat.stat('path');
|
|
||||||
const stats = fsStat.stat('path', {});
|
|
||||||
const stats = fsStat.stat('path', new fsStat.Settings());
|
|
||||||
```
|
|
||||||
|
|
||||||
#### path
|
|
||||||
|
|
||||||
* Required: `true`
|
|
||||||
* Type: `string | Buffer | URL`
|
|
||||||
|
|
||||||
A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
||||||
|
|
||||||
#### optionsOrSettings
|
|
||||||
|
|
||||||
* Required: `false`
|
|
||||||
* Type: `Options | Settings`
|
|
||||||
* Default: An instance of `Settings` class
|
|
||||||
|
|
||||||
An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
|
|
||||||
|
|
||||||
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
|
|
||||||
|
|
||||||
### Settings([options])
|
|
||||||
|
|
||||||
A class of full settings of the package.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const settings = new fsStat.Settings({ followSymbolicLink: false });
|
|
||||||
|
|
||||||
const stats = fsStat.stat('path', settings);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
### `followSymbolicLink`
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `true`
|
|
||||||
|
|
||||||
Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`.
|
|
||||||
|
|
||||||
### `markSymbolicLink`
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `false`
|
|
||||||
|
|
||||||
Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`).
|
|
||||||
|
|
||||||
> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link.
|
|
||||||
|
|
||||||
### `throwErrorOnBrokenSymbolicLink`
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `true`
|
|
||||||
|
|
||||||
Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
|
|
||||||
|
|
||||||
### `fs`
|
|
||||||
|
|
||||||
* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
|
|
||||||
* Default: A default FS methods
|
|
||||||
|
|
||||||
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
interface FileSystemAdapter {
|
|
||||||
lstat?: typeof fs.lstat;
|
|
||||||
stat?: typeof fs.stat;
|
|
||||||
lstatSync?: typeof fs.lstatSync;
|
|
||||||
statSync?: typeof fs.statSync;
|
|
||||||
}
|
|
||||||
|
|
||||||
const settings = new fsStat.Settings({
|
|
||||||
fs: { lstat: fakeLstat }
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## Changelog
|
|
||||||
|
|
||||||
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This software is released under the terms of the MIT license.
|
|
37
backend/app/node_modules/@nodelib/fs.stat/package.json
generated
vendored
37
backend/app/node_modules/@nodelib/fs.stat/package.json
generated
vendored
@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@nodelib/fs.stat",
|
|
||||||
"version": "2.0.5",
|
|
||||||
"description": "Get the status of a file with some features",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat",
|
|
||||||
"keywords": [
|
|
||||||
"NodeLib",
|
|
||||||
"fs",
|
|
||||||
"FileSystem",
|
|
||||||
"file system",
|
|
||||||
"stat"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"out/**",
|
|
||||||
"!out/**/*.map",
|
|
||||||
"!out/**/*.spec.*"
|
|
||||||
],
|
|
||||||
"main": "out/index.js",
|
|
||||||
"typings": "out/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
|
|
||||||
"lint": "eslint \"src/**/*.ts\" --cache",
|
|
||||||
"compile": "tsc -b .",
|
|
||||||
"compile:watch": "tsc -p . --watch --sourceMap",
|
|
||||||
"test": "mocha \"out/**/*.spec.js\" -s 0",
|
|
||||||
"build": "npm run clean && npm run compile && npm run lint && npm test",
|
|
||||||
"watch": "npm run clean && npm run compile:watch"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@nodelib/fs.macchiato": "1.0.4"
|
|
||||||
},
|
|
||||||
"gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562"
|
|
||||||
}
|
|
21
backend/app/node_modules/@nodelib/fs.walk/LICENSE
generated
vendored
21
backend/app/node_modules/@nodelib/fs.walk/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) Denis Malinochkin
|
|
||||||
|
|
||||||
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.
|
|
215
backend/app/node_modules/@nodelib/fs.walk/README.md
generated
vendored
215
backend/app/node_modules/@nodelib/fs.walk/README.md
generated
vendored
@ -1,215 +0,0 @@
|
|||||||
# @nodelib/fs.walk
|
|
||||||
|
|
||||||
> A library for efficiently walking a directory recursively.
|
|
||||||
|
|
||||||
## :bulb: Highlights
|
|
||||||
|
|
||||||
* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
|
|
||||||
* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode).
|
|
||||||
* :gear: Built-in directories/files and error filtering system.
|
|
||||||
* :link: Can safely work with broken symbolic links.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```console
|
|
||||||
npm install @nodelib/fs.walk
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import * as fsWalk from '@nodelib/fs.walk';
|
|
||||||
|
|
||||||
fsWalk.walk('path', (error, entries) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### .walk(path, [optionsOrSettings], callback)
|
|
||||||
|
|
||||||
Reads the directory recursively and asynchronously. Requires a callback function.
|
|
||||||
|
|
||||||
> :book: If you want to use the Promise API, use `util.promisify`.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
fsWalk.walk('path', (error, entries) => { /* … */ });
|
|
||||||
fsWalk.walk('path', {}, (error, entries) => { /* … */ });
|
|
||||||
fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ });
|
|
||||||
```
|
|
||||||
|
|
||||||
### .walkStream(path, [optionsOrSettings])
|
|
||||||
|
|
||||||
Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const stream = fsWalk.walkStream('path');
|
|
||||||
const stream = fsWalk.walkStream('path', {});
|
|
||||||
const stream = fsWalk.walkStream('path', new fsWalk.Settings());
|
|
||||||
```
|
|
||||||
|
|
||||||
### .walkSync(path, [optionsOrSettings])
|
|
||||||
|
|
||||||
Reads the directory recursively and synchronously. Returns an array of entries.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const entries = fsWalk.walkSync('path');
|
|
||||||
const entries = fsWalk.walkSync('path', {});
|
|
||||||
const entries = fsWalk.walkSync('path', new fsWalk.Settings());
|
|
||||||
```
|
|
||||||
|
|
||||||
#### path
|
|
||||||
|
|
||||||
* Required: `true`
|
|
||||||
* Type: `string | Buffer | URL`
|
|
||||||
|
|
||||||
A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
||||||
|
|
||||||
#### optionsOrSettings
|
|
||||||
|
|
||||||
* Required: `false`
|
|
||||||
* Type: `Options | Settings`
|
|
||||||
* Default: An instance of `Settings` class
|
|
||||||
|
|
||||||
An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
|
|
||||||
|
|
||||||
> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
|
|
||||||
|
|
||||||
### Settings([options])
|
|
||||||
|
|
||||||
A class of full settings of the package.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
const settings = new fsWalk.Settings({ followSymbolicLinks: true });
|
|
||||||
|
|
||||||
const entries = fsWalk.walkSync('path', settings);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Entry
|
|
||||||
|
|
||||||
* `name` — The name of the entry (`unknown.txt`).
|
|
||||||
* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
|
|
||||||
* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class.
|
|
||||||
* [`stats`] — An instance of `fs.Stats` class.
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
### basePath
|
|
||||||
|
|
||||||
* Type: `string`
|
|
||||||
* Default: `undefined`
|
|
||||||
|
|
||||||
By default, all paths are built relative to the root path. You can use this option to set custom root path.
|
|
||||||
|
|
||||||
In the example below we read the files from the `root` directory, but in the results the root path will be `custom`.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
fsWalk.walkSync('root'); // → ['root/file.txt']
|
|
||||||
fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt']
|
|
||||||
```
|
|
||||||
|
|
||||||
### concurrency
|
|
||||||
|
|
||||||
* Type: `number`
|
|
||||||
* Default: `Infinity`
|
|
||||||
|
|
||||||
The maximum number of concurrent calls to `fs.readdir`.
|
|
||||||
|
|
||||||
> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)).
|
|
||||||
|
|
||||||
### deepFilter
|
|
||||||
|
|
||||||
* Type: [`DeepFilterFunction`](./src/settings.ts)
|
|
||||||
* Default: `undefined`
|
|
||||||
|
|
||||||
A function that indicates whether the directory will be read deep or not.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
// Skip all directories that starts with `node_modules`
|
|
||||||
const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules');
|
|
||||||
```
|
|
||||||
|
|
||||||
### entryFilter
|
|
||||||
|
|
||||||
* Type: [`EntryFilterFunction`](./src/settings.ts)
|
|
||||||
* Default: `undefined`
|
|
||||||
|
|
||||||
A function that indicates whether the entry will be included to results or not.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
// Exclude all `.js` files from results
|
|
||||||
const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js');
|
|
||||||
```
|
|
||||||
|
|
||||||
### errorFilter
|
|
||||||
|
|
||||||
* Type: [`ErrorFilterFunction`](./src/settings.ts)
|
|
||||||
* Default: `undefined`
|
|
||||||
|
|
||||||
A function that allows you to skip errors that occur when reading directories.
|
|
||||||
|
|
||||||
For example, you can skip `ENOENT` errors if required:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
// Skip all ENOENT errors
|
|
||||||
const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT';
|
|
||||||
```
|
|
||||||
|
|
||||||
### stats
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `false`
|
|
||||||
|
|
||||||
Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
|
|
||||||
|
|
||||||
> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type.
|
|
||||||
|
|
||||||
### followSymbolicLinks
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `false`
|
|
||||||
|
|
||||||
Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
|
|
||||||
|
|
||||||
### `throwErrorOnBrokenSymbolicLink`
|
|
||||||
|
|
||||||
* Type: `boolean`
|
|
||||||
* Default: `true`
|
|
||||||
|
|
||||||
Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
|
|
||||||
|
|
||||||
### `pathSegmentSeparator`
|
|
||||||
|
|
||||||
* Type: `string`
|
|
||||||
* Default: `path.sep`
|
|
||||||
|
|
||||||
By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
|
|
||||||
|
|
||||||
### `fs`
|
|
||||||
|
|
||||||
* Type: `FileSystemAdapter`
|
|
||||||
* Default: A default FS methods
|
|
||||||
|
|
||||||
By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
interface FileSystemAdapter {
|
|
||||||
lstat: typeof fs.lstat;
|
|
||||||
stat: typeof fs.stat;
|
|
||||||
lstatSync: typeof fs.lstatSync;
|
|
||||||
statSync: typeof fs.statSync;
|
|
||||||
readdir: typeof fs.readdir;
|
|
||||||
readdirSync: typeof fs.readdirSync;
|
|
||||||
}
|
|
||||||
|
|
||||||
const settings = new fsWalk.Settings({
|
|
||||||
fs: { lstat: fakeLstat }
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## Changelog
|
|
||||||
|
|
||||||
See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
This software is released under the terms of the MIT license.
|
|
44
backend/app/node_modules/@nodelib/fs.walk/package.json
generated
vendored
44
backend/app/node_modules/@nodelib/fs.walk/package.json
generated
vendored
@ -1,44 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@nodelib/fs.walk",
|
|
||||||
"version": "1.2.8",
|
|
||||||
"description": "A library for efficiently walking a directory recursively",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk",
|
|
||||||
"keywords": [
|
|
||||||
"NodeLib",
|
|
||||||
"fs",
|
|
||||||
"FileSystem",
|
|
||||||
"file system",
|
|
||||||
"walk",
|
|
||||||
"scanner",
|
|
||||||
"crawler"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 8"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"out/**",
|
|
||||||
"!out/**/*.map",
|
|
||||||
"!out/**/*.spec.*",
|
|
||||||
"!out/**/tests/**"
|
|
||||||
],
|
|
||||||
"main": "out/index.js",
|
|
||||||
"typings": "out/index.d.ts",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
|
|
||||||
"lint": "eslint \"src/**/*.ts\" --cache",
|
|
||||||
"compile": "tsc -b .",
|
|
||||||
"compile:watch": "tsc -p . --watch --sourceMap",
|
|
||||||
"test": "mocha \"out/**/*.spec.js\" -s 0",
|
|
||||||
"build": "npm run clean && npm run compile && npm run lint && npm test",
|
|
||||||
"watch": "npm run clean && npm run compile:watch"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@nodelib/fs.scandir": "2.1.5",
|
|
||||||
"fastq": "^1.6.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@nodelib/fs.macchiato": "1.0.4"
|
|
||||||
},
|
|
||||||
"gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8"
|
|
||||||
}
|
|
14
backend/app/node_modules/@pkgjs/parseargs/.editorconfig
generated
vendored
14
backend/app/node_modules/@pkgjs/parseargs/.editorconfig
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
# EditorConfig is awesome: http://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
# Copied from Node.js to ease compatibility in PR.
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
end_of_line = lf
|
|
||||||
indent_size = 2
|
|
||||||
indent_style = space
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
quote_type = single
|
|
147
backend/app/node_modules/@pkgjs/parseargs/CHANGELOG.md
generated
vendored
147
backend/app/node_modules/@pkgjs/parseargs/CHANGELOG.md
generated
vendored
@ -1,147 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## [0.11.0](https://github.com/pkgjs/parseargs/compare/v0.10.0...v0.11.0) (2022-10-08)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add `default` option parameter ([#142](https://github.com/pkgjs/parseargs/issues/142)) ([cd20847](https://github.com/pkgjs/parseargs/commit/cd20847a00b2f556aa9c085ac83b942c60868ec1))
|
|
||||||
|
|
||||||
## [0.10.0](https://github.com/pkgjs/parseargs/compare/v0.9.1...v0.10.0) (2022-07-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add parsed meta-data to returned properties ([#129](https://github.com/pkgjs/parseargs/issues/129)) ([91bfb4d](https://github.com/pkgjs/parseargs/commit/91bfb4d3f7b6937efab1b27c91c45d1205f1497e))
|
|
||||||
|
|
||||||
## [0.9.1](https://github.com/pkgjs/parseargs/compare/v0.9.0...v0.9.1) (2022-06-20)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **runtime:** support node 14+ ([#135](https://github.com/pkgjs/parseargs/issues/135)) ([6a1c5a6](https://github.com/pkgjs/parseargs/commit/6a1c5a6f7cadf2f035e004027e2742e3c4ce554b))
|
|
||||||
|
|
||||||
## [0.9.0](https://github.com/pkgjs/parseargs/compare/v0.8.0...v0.9.0) (2022-05-23)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* drop handling of electron arguments (#121)
|
|
||||||
|
|
||||||
### Code Refactoring
|
|
||||||
|
|
||||||
* drop handling of electron arguments ([#121](https://github.com/pkgjs/parseargs/issues/121)) ([a2ffd53](https://github.com/pkgjs/parseargs/commit/a2ffd537c244a062371522b955acb45a404fc9f2))
|
|
||||||
|
|
||||||
## [0.8.0](https://github.com/pkgjs/parseargs/compare/v0.7.1...v0.8.0) (2022-05-16)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* switch type:string option arguments to greedy, but with error for suspect cases in strict mode (#88)
|
|
||||||
* positionals now opt-in when strict:true (#116)
|
|
||||||
* create result.values with null prototype (#111)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* create result.values with null prototype ([#111](https://github.com/pkgjs/parseargs/issues/111)) ([9d539c3](https://github.com/pkgjs/parseargs/commit/9d539c3d57f269c160e74e0656ad4fa84ff92ec2))
|
|
||||||
* positionals now opt-in when strict:true ([#116](https://github.com/pkgjs/parseargs/issues/116)) ([3643338](https://github.com/pkgjs/parseargs/commit/364333826b746e8a7dc5505b4b22fd19ac51df3b))
|
|
||||||
* switch type:string option arguments to greedy, but with error for suspect cases in strict mode ([#88](https://github.com/pkgjs/parseargs/issues/88)) ([c2b5e72](https://github.com/pkgjs/parseargs/commit/c2b5e72161991dfdc535909f1327cc9b970fe7e8))
|
|
||||||
|
|
||||||
### [0.7.1](https://github.com/pkgjs/parseargs/compare/v0.7.0...v0.7.1) (2022-04-15)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* resist pollution ([#106](https://github.com/pkgjs/parseargs/issues/106)) ([ecf2dec](https://github.com/pkgjs/parseargs/commit/ecf2dece0a9f2a76d789384d5d71c68ffe64022a))
|
|
||||||
|
|
||||||
## [0.7.0](https://github.com/pkgjs/parseargs/compare/v0.6.0...v0.7.0) (2022-04-13)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Add strict mode to parser ([#74](https://github.com/pkgjs/parseargs/issues/74)) ([8267d02](https://github.com/pkgjs/parseargs/commit/8267d02083a87b8b8a71fcce08348d1e031ea91c))
|
|
||||||
|
|
||||||
## [0.6.0](https://github.com/pkgjs/parseargs/compare/v0.5.0...v0.6.0) (2022-04-11)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* rework results to remove redundant `flags` property and store value true for boolean options (#83)
|
|
||||||
* switch to existing ERR_INVALID_ARG_VALUE (#97)
|
|
||||||
|
|
||||||
### Code Refactoring
|
|
||||||
|
|
||||||
* rework results to remove redundant `flags` property and store value true for boolean options ([#83](https://github.com/pkgjs/parseargs/issues/83)) ([be153db](https://github.com/pkgjs/parseargs/commit/be153dbed1d488cb7b6e27df92f601ba7337713d))
|
|
||||||
* switch to existing ERR_INVALID_ARG_VALUE ([#97](https://github.com/pkgjs/parseargs/issues/97)) ([084a23f](https://github.com/pkgjs/parseargs/commit/084a23f9fde2da030b159edb1c2385f24579ce40))
|
|
||||||
|
|
||||||
## [0.5.0](https://github.com/pkgjs/parseargs/compare/v0.4.0...v0.5.0) (2022-04-10)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* Require type to be specified for each supplied option (#95)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Require type to be specified for each supplied option ([#95](https://github.com/pkgjs/parseargs/issues/95)) ([02cd018](https://github.com/pkgjs/parseargs/commit/02cd01885b8aaa59f2db8308f2d4479e64340068))
|
|
||||||
|
|
||||||
## [0.4.0](https://github.com/pkgjs/parseargs/compare/v0.3.0...v0.4.0) (2022-03-12)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* parsing, revisit short option groups, add support for combined short and value (#75)
|
|
||||||
* restructure configuration to take options bag (#63)
|
|
||||||
|
|
||||||
### Code Refactoring
|
|
||||||
|
|
||||||
* parsing, revisit short option groups, add support for combined short and value ([#75](https://github.com/pkgjs/parseargs/issues/75)) ([a92600f](https://github.com/pkgjs/parseargs/commit/a92600fa6c214508ab1e016fa55879a314f541af))
|
|
||||||
* restructure configuration to take options bag ([#63](https://github.com/pkgjs/parseargs/issues/63)) ([b412095](https://github.com/pkgjs/parseargs/commit/b4120957d90e809ee8b607b06e747d3e6a6b213e))
|
|
||||||
|
|
||||||
## [0.3.0](https://github.com/pkgjs/parseargs/compare/v0.2.0...v0.3.0) (2022-02-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **parser:** support short-option groups ([#59](https://github.com/pkgjs/parseargs/issues/59)) ([882067b](https://github.com/pkgjs/parseargs/commit/882067bc2d7cbc6b796f8e5a079a99bc99d4e6ba))
|
|
||||||
|
|
||||||
## [0.2.0](https://github.com/pkgjs/parseargs/compare/v0.1.1...v0.2.0) (2022-02-05)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* basic support for shorts ([#50](https://github.com/pkgjs/parseargs/issues/50)) ([a2f36d7](https://github.com/pkgjs/parseargs/commit/a2f36d7da4145af1c92f76806b7fe2baf6beeceb))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* always store value for a=b ([#43](https://github.com/pkgjs/parseargs/issues/43)) ([a85e8dc](https://github.com/pkgjs/parseargs/commit/a85e8dc06379fd2696ee195cc625de8fac6aee42))
|
|
||||||
* support single dash as positional ([#49](https://github.com/pkgjs/parseargs/issues/49)) ([d795bf8](https://github.com/pkgjs/parseargs/commit/d795bf877d068fd67aec381f30b30b63f97109ad))
|
|
||||||
|
|
||||||
### [0.1.1](https://github.com/pkgjs/parseargs/compare/v0.1.0...v0.1.1) (2022-01-25)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* only use arrays in results for multiples ([#42](https://github.com/pkgjs/parseargs/issues/42)) ([c357584](https://github.com/pkgjs/parseargs/commit/c357584847912506319ed34a0840080116f4fd65))
|
|
||||||
|
|
||||||
## 0.1.0 (2022-01-22)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* expand scenarios covered by default arguments for environments ([#20](https://github.com/pkgjs/parseargs/issues/20)) ([582ada7](https://github.com/pkgjs/parseargs/commit/582ada7be0eca3a73d6e0bd016e7ace43449fa4c))
|
|
||||||
* update readme and include contributing guidelines ([8edd6fc](https://github.com/pkgjs/parseargs/commit/8edd6fc863cd705f6fac732724159ebe8065a2b0))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* do not strip excess leading dashes on long option names ([#21](https://github.com/pkgjs/parseargs/issues/21)) ([f848590](https://github.com/pkgjs/parseargs/commit/f848590ebf3249ed5979ff47e003fa6e1a8ec5c0))
|
|
||||||
* name & readme ([3f057c1](https://github.com/pkgjs/parseargs/commit/3f057c1b158a1bdbe878c64b57460c58e56e465f))
|
|
||||||
* package.json values ([9bac300](https://github.com/pkgjs/parseargs/commit/9bac300e00cd76c77076bf9e75e44f8929512da9))
|
|
||||||
* update readme name ([957d8d9](https://github.com/pkgjs/parseargs/commit/957d8d96e1dcb48297c0a14345d44c0123b2883e))
|
|
||||||
|
|
||||||
|
|
||||||
### Build System
|
|
||||||
|
|
||||||
* first release as minor ([421c6e2](https://github.com/pkgjs/parseargs/commit/421c6e2569a8668ad14fac5a5af5be60479a7571))
|
|
201
backend/app/node_modules/@pkgjs/parseargs/LICENSE
generated
vendored
201
backend/app/node_modules/@pkgjs/parseargs/LICENSE
generated
vendored
@ -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 [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
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.
|
|
413
backend/app/node_modules/@pkgjs/parseargs/README.md
generated
vendored
413
backend/app/node_modules/@pkgjs/parseargs/README.md
generated
vendored
@ -1,413 +0,0 @@
|
|||||||
<!-- omit in toc -->
|
|
||||||
# parseArgs
|
|
||||||
|
|
||||||
[![Coverage][coverage-image]][coverage-url]
|
|
||||||
|
|
||||||
Polyfill of `util.parseArgs()`
|
|
||||||
|
|
||||||
## `util.parseArgs([config])`
|
|
||||||
|
|
||||||
<!-- YAML
|
|
||||||
added: v18.3.0
|
|
||||||
changes:
|
|
||||||
- version: REPLACEME
|
|
||||||
pr-url: https://github.com/nodejs/node/pull/43459
|
|
||||||
description: add support for returning detailed parse information
|
|
||||||
using `tokens` in input `config` and returned properties.
|
|
||||||
-->
|
|
||||||
|
|
||||||
> Stability: 1 - Experimental
|
|
||||||
|
|
||||||
* `config` {Object} Used to provide arguments for parsing and to configure
|
|
||||||
the parser. `config` supports the following properties:
|
|
||||||
* `args` {string\[]} array of argument strings. **Default:** `process.argv`
|
|
||||||
with `execPath` and `filename` removed.
|
|
||||||
* `options` {Object} Used to describe arguments known to the parser.
|
|
||||||
Keys of `options` are the long names of options and values are an
|
|
||||||
{Object} accepting the following properties:
|
|
||||||
* `type` {string} Type of argument, which must be either `boolean` or `string`.
|
|
||||||
* `multiple` {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`.
|
|
||||||
* `short` {string} A single character alias for the option.
|
|
||||||
* `default` {string | boolean | string\[] | boolean\[]} 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.
|
|
||||||
* `strict` {boolean} 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`.
|
|
||||||
* `allowPositionals` {boolean} Whether this command accepts positional
|
|
||||||
arguments.
|
|
||||||
**Default:** `false` if `strict` is `true`, otherwise `true`.
|
|
||||||
* `tokens` {boolean} 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`.
|
|
||||||
|
|
||||||
* Returns: {Object} The parsed command line arguments:
|
|
||||||
* `values` {Object} A mapping of parsed option names with their {string}
|
|
||||||
or {boolean} values.
|
|
||||||
* `positionals` {string\[]} Positional arguments.
|
|
||||||
* `tokens` {Object\[] | undefined} See [parseArgs tokens](#parseargs-tokens)
|
|
||||||
section. Only returned if `config` includes `tokens: true`.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
```mjs
|
|
||||||
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' } []
|
|
||||||
```
|
|
||||||
|
|
||||||
```cjs
|
|
||||||
const { parseArgs } = require('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' } []
|
|
||||||
```
|
|
||||||
|
|
||||||
`util.parseArgs` is experimental and behavior may change. Join the
|
|
||||||
conversation in [pkgjs/parseargs][] to contribute to the design.
|
|
||||||
|
|
||||||
### `parseArgs` `tokens`
|
|
||||||
|
|
||||||
Detailed parse information is available for adding custom behaviours by
|
|
||||||
specifying `tokens: true` in the configuration.
|
|
||||||
The returned tokens have properties describing:
|
|
||||||
|
|
||||||
* all tokens
|
|
||||||
* `kind` {string} One of 'option', 'positional', or 'option-terminator'.
|
|
||||||
* `index` {number} Index of element in `args` containing token. So the
|
|
||||||
source argument for a token is `args[token.index]`.
|
|
||||||
* option tokens
|
|
||||||
* `name` {string} Long name of option.
|
|
||||||
* `rawName` {string} How option used in args, like `-f` of `--foo`.
|
|
||||||
* `value` {string | undefined} Option value specified in args.
|
|
||||||
Undefined for boolean options.
|
|
||||||
* `inlineValue` {boolean | undefined} Whether option value specified inline,
|
|
||||||
like `--foo=bar`.
|
|
||||||
* positional tokens
|
|
||||||
* `value` {string} The value of the positional argument in args (i.e. `args[index]`).
|
|
||||||
* option-terminator token
|
|
||||||
|
|
||||||
The returned tokens are in the order encountered in the input args. Options
|
|
||||||
that appear more than once in args produce a token for each use. Short option
|
|
||||||
groups like `-xy` expand to a token for each option. So `-xxx` produces
|
|
||||||
three tokens.
|
|
||||||
|
|
||||||
For example to use the returned tokens to add support for a negated option
|
|
||||||
like `--no-color`, the tokens can be reprocessed to change the value stored
|
|
||||||
for the negated option.
|
|
||||||
|
|
||||||
```mjs
|
|
||||||
import { parseArgs } from 'node:util';
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
'color': { type: 'boolean' },
|
|
||||||
'no-color': { type: 'boolean' },
|
|
||||||
'logfile': { type: 'string' },
|
|
||||||
'no-logfile': { type: 'boolean' },
|
|
||||||
};
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
// Reprocess the option tokens and overwrite the returned values.
|
|
||||||
tokens
|
|
||||||
.filter((token) => token.kind === 'option')
|
|
||||||
.forEach((token) => {
|
|
||||||
if (token.name.startsWith('no-')) {
|
|
||||||
// Store foo:false for --no-foo
|
|
||||||
const positiveName = token.name.slice(3);
|
|
||||||
values[positiveName] = false;
|
|
||||||
delete values[token.name];
|
|
||||||
} else {
|
|
||||||
// Resave value so last one wins if both --foo and --no-foo.
|
|
||||||
values[token.name] = token.value ?? true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const color = values.color;
|
|
||||||
const logfile = values.logfile ?? 'default.log';
|
|
||||||
|
|
||||||
console.log({ logfile, color });
|
|
||||||
```
|
|
||||||
|
|
||||||
```cjs
|
|
||||||
const { parseArgs } = require('node:util');
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
'color': { type: 'boolean' },
|
|
||||||
'no-color': { type: 'boolean' },
|
|
||||||
'logfile': { type: 'string' },
|
|
||||||
'no-logfile': { type: 'boolean' },
|
|
||||||
};
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
// Reprocess the option tokens and overwrite the returned values.
|
|
||||||
tokens
|
|
||||||
.filter((token) => token.kind === 'option')
|
|
||||||
.forEach((token) => {
|
|
||||||
if (token.name.startsWith('no-')) {
|
|
||||||
// Store foo:false for --no-foo
|
|
||||||
const positiveName = token.name.slice(3);
|
|
||||||
values[positiveName] = false;
|
|
||||||
delete values[token.name];
|
|
||||||
} else {
|
|
||||||
// Resave value so last one wins if both --foo and --no-foo.
|
|
||||||
values[token.name] = token.value ?? true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const color = values.color;
|
|
||||||
const logfile = values.logfile ?? 'default.log';
|
|
||||||
|
|
||||||
console.log({ logfile, color });
|
|
||||||
```
|
|
||||||
|
|
||||||
Example usage showing negated options, and when an option is used
|
|
||||||
multiple ways then last one wins.
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ node negate.js
|
|
||||||
{ logfile: 'default.log', color: undefined }
|
|
||||||
$ node negate.js --no-logfile --no-color
|
|
||||||
{ logfile: false, color: false }
|
|
||||||
$ node negate.js --logfile=test.log --color
|
|
||||||
{ logfile: 'test.log', color: true }
|
|
||||||
$ node negate.js --no-logfile --logfile=test.log --color --no-color
|
|
||||||
{ logfile: 'test.log', color: false }
|
|
||||||
```
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
<!-- omit in toc -->
|
|
||||||
## Table of Contents
|
|
||||||
- [`util.parseArgs([config])`](#utilparseargsconfig)
|
|
||||||
- [Scope](#scope)
|
|
||||||
- [Version Matchups](#version-matchups)
|
|
||||||
- [🚀 Getting Started](#-getting-started)
|
|
||||||
- [🙌 Contributing](#-contributing)
|
|
||||||
- [💡 `process.mainArgs` Proposal](#-processmainargs-proposal)
|
|
||||||
- [Implementation:](#implementation)
|
|
||||||
- [📃 Examples](#-examples)
|
|
||||||
- [F.A.Qs](#faqs)
|
|
||||||
- [Links & Resources](#links--resources)
|
|
||||||
|
|
||||||
-----
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
It is already possible to build great arg parsing modules on top of what Node.js provides; the prickly API is abstracted away by these modules. Thus, process.parseArgs() is not necessarily intended for library authors; it is intended for developers of simple CLI tools, ad-hoc scripts, deployed Node.js applications, and learning materials.
|
|
||||||
|
|
||||||
It is exceedingly difficult to provide an API which would both be friendly to these Node.js users while being extensible enough for libraries to build upon. We chose to prioritize these use cases because these are currently not well-served by Node.js' API.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## Version Matchups
|
|
||||||
|
|
||||||
| Node.js | @pkgjs/parseArgs |
|
|
||||||
| -- | -- |
|
|
||||||
| [v18.3.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [v0.9.1](https://github.com/pkgjs/parseargs/tree/v0.9.1#utilparseargsconfig) |
|
|
||||||
| [v16.17.0](https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilparseargsconfig), [v18.7.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [0.10.0](https://github.com/pkgjs/parseargs/tree/v0.10.0#utilparseargsconfig) |
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## 🚀 Getting Started
|
|
||||||
|
|
||||||
1. **Install dependencies.**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Open the index.js file and start editing!**
|
|
||||||
|
|
||||||
3. **Test your code by calling parseArgs through our test file**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm test
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## 🙌 Contributing
|
|
||||||
|
|
||||||
Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md)
|
|
||||||
|
|
||||||
Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented.
|
|
||||||
|
|
||||||
This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness.
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## 💡 `process.mainArgs` Proposal
|
|
||||||
|
|
||||||
> Note: This can be moved forward independently of the `util.parseArgs()` proposal/work.
|
|
||||||
|
|
||||||
### Implementation:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
process.mainArgs = process.argv.slice(process._exec ? 1 : 2)
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## 📃 Examples
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { parseArgs } = require('@pkgjs/parseargs');
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { parseArgs } = require('@pkgjs/parseargs');
|
|
||||||
// specify the options that may be used
|
|
||||||
const options = {
|
|
||||||
foo: { type: 'string'},
|
|
||||||
bar: { type: 'boolean' },
|
|
||||||
};
|
|
||||||
const args = ['--foo=a', '--bar'];
|
|
||||||
const { values, positionals } = parseArgs({ args, options });
|
|
||||||
// values = { foo: 'a', bar: true }
|
|
||||||
// positionals = []
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { parseArgs } = require('@pkgjs/parseargs');
|
|
||||||
// type:string & multiple
|
|
||||||
const options = {
|
|
||||||
foo: {
|
|
||||||
type: 'string',
|
|
||||||
multiple: true,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
const args = ['--foo=a', '--foo', 'b'];
|
|
||||||
const { values, positionals } = parseArgs({ args, options });
|
|
||||||
// values = { foo: [ 'a', 'b' ] }
|
|
||||||
// positionals = []
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { parseArgs } = require('@pkgjs/parseargs');
|
|
||||||
// shorts
|
|
||||||
const options = {
|
|
||||||
foo: {
|
|
||||||
short: 'f',
|
|
||||||
type: 'boolean'
|
|
||||||
},
|
|
||||||
};
|
|
||||||
const args = ['-f', 'b'];
|
|
||||||
const { values, positionals } = parseArgs({ args, options, allowPositionals: true });
|
|
||||||
// values = { foo: true }
|
|
||||||
// positionals = ['b']
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
const { parseArgs } = require('@pkgjs/parseargs');
|
|
||||||
// unconfigured
|
|
||||||
const options = {};
|
|
||||||
const args = ['-f', '--foo=a', '--bar', 'b'];
|
|
||||||
const { values, positionals } = parseArgs({ strict: false, args, options, allowPositionals: true });
|
|
||||||
// values = { f: true, foo: 'a', bar: true }
|
|
||||||
// positionals = ['b']
|
|
||||||
```
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
## F.A.Qs
|
|
||||||
|
|
||||||
- Is `cmd --foo=bar baz` the same as `cmd baz --foo=bar`?
|
|
||||||
- yes
|
|
||||||
- Does the parser execute a function?
|
|
||||||
- no
|
|
||||||
- Does the parser execute one of several functions, depending on input?
|
|
||||||
- no
|
|
||||||
- Can subcommands take options that are distinct from the main command?
|
|
||||||
- no
|
|
||||||
- Does it output generated help when no options match?
|
|
||||||
- no
|
|
||||||
- Does it generated short usage? Like: `usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]`
|
|
||||||
- no (no usage/help at all)
|
|
||||||
- Does the user provide the long usage text? For each option? For the whole command?
|
|
||||||
- no
|
|
||||||
- Do subcommands (if implemented) have their own usage output?
|
|
||||||
- no
|
|
||||||
- Does usage print if the user runs `cmd --help`?
|
|
||||||
- no
|
|
||||||
- Does it set `process.exitCode`?
|
|
||||||
- no
|
|
||||||
- Does usage print to stderr or stdout?
|
|
||||||
- N/A
|
|
||||||
- Does it check types? (Say, specify that an option is a boolean, number, etc.)
|
|
||||||
- no
|
|
||||||
- Can an option have more than one type? (string or false, for example)
|
|
||||||
- no
|
|
||||||
- Can the user define a type? (Say, `type: path` to call `path.resolve()` on the argument.)
|
|
||||||
- no
|
|
||||||
- Does a `--foo=0o22` mean 0, 22, 18, or "0o22"?
|
|
||||||
- `"0o22"`
|
|
||||||
- Does it coerce types?
|
|
||||||
- no
|
|
||||||
- Does `--no-foo` coerce to `--foo=false`? For all options? Only boolean options?
|
|
||||||
- no, it sets `{values:{'no-foo': true}}`
|
|
||||||
- Is `--foo` the same as `--foo=true`? Only for known booleans? Only at the end?
|
|
||||||
- no, they are not the same. There is no special handling of `true` as a value so it is just another string.
|
|
||||||
- Does it read environment variables? Ie, is `FOO=1 cmd` the same as `cmd --foo=1`?
|
|
||||||
- no
|
|
||||||
- Do unknown arguments raise an error? Are they parsed? Are they treated as positional arguments?
|
|
||||||
- no, they are parsed, not treated as positionals
|
|
||||||
- Does `--` signal the end of options?
|
|
||||||
- yes
|
|
||||||
- Is `--` included as a positional?
|
|
||||||
- no
|
|
||||||
- Is `program -- foo` the same as `program foo`?
|
|
||||||
- yes, both store `{positionals:['foo']}`
|
|
||||||
- Does the API specify whether a `--` was present/relevant?
|
|
||||||
- no
|
|
||||||
- Is `-bar` the same as `--bar`?
|
|
||||||
- no, `-bar` is a short option or options, with expansion logic that follows the
|
|
||||||
[Utility Syntax Guidelines in POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). `-bar` expands to `-b`, `-a`, `-r`.
|
|
||||||
- Is `---foo` the same as `--foo`?
|
|
||||||
- no
|
|
||||||
- the first is a long option named `'-foo'`
|
|
||||||
- the second is a long option named `'foo'`
|
|
||||||
- Is `-` a positional? ie, `bash some-test.sh | tap -`
|
|
||||||
- yes
|
|
||||||
|
|
||||||
## Links & Resources
|
|
||||||
|
|
||||||
* [Initial Tooling Issue](https://github.com/nodejs/tooling/issues/19)
|
|
||||||
* [Initial Proposal](https://github.com/nodejs/node/pull/35015)
|
|
||||||
* [parseArgs Proposal](https://github.com/nodejs/node/pull/42675)
|
|
||||||
|
|
||||||
[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs
|
|
||||||
[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc
|
|
||||||
[pkgjs/parseargs]: https://github.com/pkgjs/parseargs
|
|
25
backend/app/node_modules/@pkgjs/parseargs/examples/is-default-value.js
generated
vendored
25
backend/app/node_modules/@pkgjs/parseargs/examples/is-default-value.js
generated
vendored
@ -1,25 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This example shows how to understand if a default value is used or not.
|
|
||||||
|
|
||||||
// 1. const { parseArgs } = require('node:util'); // from node
|
|
||||||
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
|
|
||||||
const { parseArgs } = require('..'); // in repo
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
file: { short: 'f', type: 'string', default: 'FOO' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
const isFileDefault = !tokens.some((token) => token.kind === 'option' &&
|
|
||||||
token.name === 'file'
|
|
||||||
);
|
|
||||||
|
|
||||||
console.log(values);
|
|
||||||
console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`);
|
|
||||||
|
|
||||||
// Try the following:
|
|
||||||
// node is-default-value.js
|
|
||||||
// node is-default-value.js -f FILE
|
|
||||||
// node is-default-value.js --file FILE
|
|
35
backend/app/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js
generated
vendored
35
backend/app/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js
generated
vendored
@ -1,35 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This is an example of using tokens to add a custom behaviour.
|
|
||||||
//
|
|
||||||
// Require the use of `=` for long options and values by blocking
|
|
||||||
// the use of space separated values.
|
|
||||||
// So allow `--foo=bar`, and not allow `--foo bar`.
|
|
||||||
//
|
|
||||||
// Note: this is not a common behaviour, most CLIs allow both forms.
|
|
||||||
|
|
||||||
// 1. const { parseArgs } = require('node:util'); // from node
|
|
||||||
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
|
|
||||||
const { parseArgs } = require('..'); // in repo
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
file: { short: 'f', type: 'string' },
|
|
||||||
log: { type: 'string' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
const badToken = tokens.find((token) => token.kind === 'option' &&
|
|
||||||
token.value != null &&
|
|
||||||
token.rawName.startsWith('--') &&
|
|
||||||
!token.inlineValue
|
|
||||||
);
|
|
||||||
if (badToken) {
|
|
||||||
throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(values);
|
|
||||||
|
|
||||||
// Try the following:
|
|
||||||
// node limit-long-syntax.js -f FILE --log=LOG
|
|
||||||
// node limit-long-syntax.js --file FILE
|
|
43
backend/app/node_modules/@pkgjs/parseargs/examples/negate.js
generated
vendored
43
backend/app/node_modules/@pkgjs/parseargs/examples/negate.js
generated
vendored
@ -1,43 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This example is used in the documentation.
|
|
||||||
|
|
||||||
// How might I add my own support for --no-foo?
|
|
||||||
|
|
||||||
// 1. const { parseArgs } = require('node:util'); // from node
|
|
||||||
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
|
|
||||||
const { parseArgs } = require('..'); // in repo
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
'color': { type: 'boolean' },
|
|
||||||
'no-color': { type: 'boolean' },
|
|
||||||
'logfile': { type: 'string' },
|
|
||||||
'no-logfile': { type: 'boolean' },
|
|
||||||
};
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
// Reprocess the option tokens and overwrite the returned values.
|
|
||||||
tokens
|
|
||||||
.filter((token) => token.kind === 'option')
|
|
||||||
.forEach((token) => {
|
|
||||||
if (token.name.startsWith('no-')) {
|
|
||||||
// Store foo:false for --no-foo
|
|
||||||
const positiveName = token.name.slice(3);
|
|
||||||
values[positiveName] = false;
|
|
||||||
delete values[token.name];
|
|
||||||
} else {
|
|
||||||
// Resave value so last one wins if both --foo and --no-foo.
|
|
||||||
values[token.name] = token.value ?? true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const color = values.color;
|
|
||||||
const logfile = values.logfile ?? 'default.log';
|
|
||||||
|
|
||||||
console.log({ logfile, color });
|
|
||||||
|
|
||||||
// Try the following:
|
|
||||||
// node negate.js
|
|
||||||
// node negate.js --no-logfile --no-color
|
|
||||||
// negate.js --logfile=test.log --color
|
|
||||||
// node negate.js --no-logfile --logfile=test.log --color --no-color
|
|
31
backend/app/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js
generated
vendored
31
backend/app/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js
generated
vendored
@ -1,31 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This is an example of using tokens to add a custom behaviour.
|
|
||||||
//
|
|
||||||
// Throw an error if an option is used more than once.
|
|
||||||
|
|
||||||
// 1. const { parseArgs } = require('node:util'); // from node
|
|
||||||
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
|
|
||||||
const { parseArgs } = require('..'); // in repo
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
ding: { type: 'boolean', short: 'd' },
|
|
||||||
beep: { type: 'boolean', short: 'b' }
|
|
||||||
};
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
const seenBefore = new Set();
|
|
||||||
tokens.forEach((token) => {
|
|
||||||
if (token.kind !== 'option') return;
|
|
||||||
if (seenBefore.has(token.name)) {
|
|
||||||
throw new Error(`option '${token.name}' used multiple times`);
|
|
||||||
}
|
|
||||||
seenBefore.add(token.name);
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(values);
|
|
||||||
|
|
||||||
// Try the following:
|
|
||||||
// node no-repeated-options --ding --beep
|
|
||||||
// node no-repeated-options --beep -b
|
|
||||||
// node no-repeated-options -ddd
|
|
41
backend/app/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs
generated
vendored
41
backend/app/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs
generated
vendored
@ -1,41 +0,0 @@
|
|||||||
// This is an example of using tokens to add a custom behaviour.
|
|
||||||
//
|
|
||||||
// This adds a option order check so that --some-unstable-option
|
|
||||||
// may only be used after --enable-experimental-options
|
|
||||||
//
|
|
||||||
// Note: this is not a common behaviour, the order of different options
|
|
||||||
// does not usually matter.
|
|
||||||
|
|
||||||
import { parseArgs } from '../index.js';
|
|
||||||
|
|
||||||
function findTokenIndex(tokens, target) {
|
|
||||||
return tokens.findIndex((token) => token.kind === 'option' &&
|
|
||||||
token.name === target
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const experimentalName = 'enable-experimental-options';
|
|
||||||
const unstableName = 'some-unstable-option';
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
[experimentalName]: { type: 'boolean' },
|
|
||||||
[unstableName]: { type: 'boolean' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const { values, tokens } = parseArgs({ options, tokens: true });
|
|
||||||
|
|
||||||
const experimentalIndex = findTokenIndex(tokens, experimentalName);
|
|
||||||
const unstableIndex = findTokenIndex(tokens, unstableName);
|
|
||||||
if (unstableIndex !== -1 &&
|
|
||||||
((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) {
|
|
||||||
throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(values);
|
|
||||||
|
|
||||||
/* eslint-disable max-len */
|
|
||||||
// Try the following:
|
|
||||||
// node ordered-options.mjs
|
|
||||||
// node ordered-options.mjs --some-unstable-option
|
|
||||||
// node ordered-options.mjs --some-unstable-option --enable-experimental-options
|
|
||||||
// node ordered-options.mjs --enable-experimental-options --some-unstable-option
|
|
26
backend/app/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js
generated
vendored
26
backend/app/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js
generated
vendored
@ -1,26 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This example is used in the documentation.
|
|
||||||
|
|
||||||
// 1. const { parseArgs } = require('node:util'); // from node
|
|
||||||
// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package
|
|
||||||
const { parseArgs } = require('..'); // in repo
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
// Try the following:
|
|
||||||
// node simple-hard-coded.js
|
|
396
backend/app/node_modules/@pkgjs/parseargs/index.js
generated
vendored
396
backend/app/node_modules/@pkgjs/parseargs/index.js
generated
vendored
@ -1,396 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const {
|
|
||||||
ArrayPrototypeForEach,
|
|
||||||
ArrayPrototypeIncludes,
|
|
||||||
ArrayPrototypeMap,
|
|
||||||
ArrayPrototypePush,
|
|
||||||
ArrayPrototypePushApply,
|
|
||||||
ArrayPrototypeShift,
|
|
||||||
ArrayPrototypeSlice,
|
|
||||||
ArrayPrototypeUnshiftApply,
|
|
||||||
ObjectEntries,
|
|
||||||
ObjectPrototypeHasOwnProperty: ObjectHasOwn,
|
|
||||||
StringPrototypeCharAt,
|
|
||||||
StringPrototypeIndexOf,
|
|
||||||
StringPrototypeSlice,
|
|
||||||
StringPrototypeStartsWith,
|
|
||||||
} = require('./internal/primordials');
|
|
||||||
|
|
||||||
const {
|
|
||||||
validateArray,
|
|
||||||
validateBoolean,
|
|
||||||
validateBooleanArray,
|
|
||||||
validateObject,
|
|
||||||
validateString,
|
|
||||||
validateStringArray,
|
|
||||||
validateUnion,
|
|
||||||
} = require('./internal/validators');
|
|
||||||
|
|
||||||
const {
|
|
||||||
kEmptyObject,
|
|
||||||
} = require('./internal/util');
|
|
||||||
|
|
||||||
const {
|
|
||||||
findLongOptionForShort,
|
|
||||||
isLoneLongOption,
|
|
||||||
isLoneShortOption,
|
|
||||||
isLongOptionAndValue,
|
|
||||||
isOptionValue,
|
|
||||||
isOptionLikeValue,
|
|
||||||
isShortOptionAndValue,
|
|
||||||
isShortOptionGroup,
|
|
||||||
useDefaultValueOption,
|
|
||||||
objectGetOwn,
|
|
||||||
optionsGetOwn,
|
|
||||||
} = require('./utils');
|
|
||||||
|
|
||||||
const {
|
|
||||||
codes: {
|
|
||||||
ERR_INVALID_ARG_VALUE,
|
|
||||||
ERR_PARSE_ARGS_INVALID_OPTION_VALUE,
|
|
||||||
ERR_PARSE_ARGS_UNKNOWN_OPTION,
|
|
||||||
ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL,
|
|
||||||
},
|
|
||||||
} = require('./internal/errors');
|
|
||||||
|
|
||||||
function getMainArgs() {
|
|
||||||
// Work out where to slice process.argv for user supplied arguments.
|
|
||||||
|
|
||||||
// Check node options for scenarios where user CLI args follow executable.
|
|
||||||
const execArgv = process.execArgv;
|
|
||||||
if (ArrayPrototypeIncludes(execArgv, '-e') ||
|
|
||||||
ArrayPrototypeIncludes(execArgv, '--eval') ||
|
|
||||||
ArrayPrototypeIncludes(execArgv, '-p') ||
|
|
||||||
ArrayPrototypeIncludes(execArgv, '--print')) {
|
|
||||||
return ArrayPrototypeSlice(process.argv, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Normally first two arguments are executable and script, then CLI arguments
|
|
||||||
return ArrayPrototypeSlice(process.argv, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* In strict mode, throw for possible usage errors like --foo --bar
|
|
||||||
*
|
|
||||||
* @param {object} token - from tokens as available from parseArgs
|
|
||||||
*/
|
|
||||||
function checkOptionLikeValue(token) {
|
|
||||||
if (!token.inlineValue && isOptionLikeValue(token.value)) {
|
|
||||||
// Only show short example if user used short option.
|
|
||||||
const example = StringPrototypeStartsWith(token.rawName, '--') ?
|
|
||||||
`'${token.rawName}=-XYZ'` :
|
|
||||||
`'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`;
|
|
||||||
const errorMessage = `Option '${token.rawName}' argument is ambiguous.
|
|
||||||
Did you forget to specify the option argument for '${token.rawName}'?
|
|
||||||
To specify an option argument starting with a dash use ${example}.`;
|
|
||||||
throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* In strict mode, throw for usage errors.
|
|
||||||
*
|
|
||||||
* @param {object} config - from config passed to parseArgs
|
|
||||||
* @param {object} token - from tokens as available from parseArgs
|
|
||||||
*/
|
|
||||||
function checkOptionUsage(config, token) {
|
|
||||||
if (!ObjectHasOwn(config.options, token.name)) {
|
|
||||||
throw new ERR_PARSE_ARGS_UNKNOWN_OPTION(
|
|
||||||
token.rawName, config.allowPositionals);
|
|
||||||
}
|
|
||||||
|
|
||||||
const short = optionsGetOwn(config.options, token.name, 'short');
|
|
||||||
const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`;
|
|
||||||
const type = optionsGetOwn(config.options, token.name, 'type');
|
|
||||||
if (type === 'string' && typeof token.value !== 'string') {
|
|
||||||
throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} <value>' argument missing`);
|
|
||||||
}
|
|
||||||
// (Idiomatic test for undefined||null, expecting undefined.)
|
|
||||||
if (type === 'boolean' && token.value != null) {
|
|
||||||
throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store the option value in `values`.
|
|
||||||
*
|
|
||||||
* @param {string} longOption - long option name e.g. 'foo'
|
|
||||||
* @param {string|undefined} optionValue - value from user args
|
|
||||||
* @param {object} options - option configs, from parseArgs({ options })
|
|
||||||
* @param {object} values - option values returned in `values` by parseArgs
|
|
||||||
*/
|
|
||||||
function storeOption(longOption, optionValue, options, values) {
|
|
||||||
if (longOption === '__proto__') {
|
|
||||||
return; // No. Just no.
|
|
||||||
}
|
|
||||||
|
|
||||||
// We store based on the option value rather than option type,
|
|
||||||
// preserving the users intent for author to deal with.
|
|
||||||
const newValue = optionValue ?? true;
|
|
||||||
if (optionsGetOwn(options, longOption, 'multiple')) {
|
|
||||||
// Always store value in array, including for boolean.
|
|
||||||
// values[longOption] starts out not present,
|
|
||||||
// first value is added as new array [newValue],
|
|
||||||
// subsequent values are pushed to existing array.
|
|
||||||
// (note: values has null prototype, so simpler usage)
|
|
||||||
if (values[longOption]) {
|
|
||||||
ArrayPrototypePush(values[longOption], newValue);
|
|
||||||
} else {
|
|
||||||
values[longOption] = [newValue];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
values[longOption] = newValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store the default option value in `values`.
|
|
||||||
*
|
|
||||||
* @param {string} longOption - long option name e.g. 'foo'
|
|
||||||
* @param {string
|
|
||||||
* | boolean
|
|
||||||
* | string[]
|
|
||||||
* | boolean[]} optionValue - default value from option config
|
|
||||||
* @param {object} values - option values returned in `values` by parseArgs
|
|
||||||
*/
|
|
||||||
function storeDefaultOption(longOption, optionValue, values) {
|
|
||||||
if (longOption === '__proto__') {
|
|
||||||
return; // No. Just no.
|
|
||||||
}
|
|
||||||
|
|
||||||
values[longOption] = optionValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Process args and turn into identified tokens:
|
|
||||||
* - option (along with value, if any)
|
|
||||||
* - positional
|
|
||||||
* - option-terminator
|
|
||||||
*
|
|
||||||
* @param {string[]} args - from parseArgs({ args }) or mainArgs
|
|
||||||
* @param {object} options - option configs, from parseArgs({ options })
|
|
||||||
*/
|
|
||||||
function argsToTokens(args, options) {
|
|
||||||
const tokens = [];
|
|
||||||
let index = -1;
|
|
||||||
let groupCount = 0;
|
|
||||||
|
|
||||||
const remainingArgs = ArrayPrototypeSlice(args);
|
|
||||||
while (remainingArgs.length > 0) {
|
|
||||||
const arg = ArrayPrototypeShift(remainingArgs);
|
|
||||||
const nextArg = remainingArgs[0];
|
|
||||||
if (groupCount > 0)
|
|
||||||
groupCount--;
|
|
||||||
else
|
|
||||||
index++;
|
|
||||||
|
|
||||||
// Check if `arg` is an options terminator.
|
|
||||||
// Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
|
|
||||||
if (arg === '--') {
|
|
||||||
// Everything after a bare '--' is considered a positional argument.
|
|
||||||
ArrayPrototypePush(tokens, { kind: 'option-terminator', index });
|
|
||||||
ArrayPrototypePushApply(
|
|
||||||
tokens, ArrayPrototypeMap(remainingArgs, (arg) => {
|
|
||||||
return { kind: 'positional', index: ++index, value: arg };
|
|
||||||
})
|
|
||||||
);
|
|
||||||
break; // Finished processing args, leave while loop.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLoneShortOption(arg)) {
|
|
||||||
// e.g. '-f'
|
|
||||||
const shortOption = StringPrototypeCharAt(arg, 1);
|
|
||||||
const longOption = findLongOptionForShort(shortOption, options);
|
|
||||||
let value;
|
|
||||||
let inlineValue;
|
|
||||||
if (optionsGetOwn(options, longOption, 'type') === 'string' &&
|
|
||||||
isOptionValue(nextArg)) {
|
|
||||||
// e.g. '-f', 'bar'
|
|
||||||
value = ArrayPrototypeShift(remainingArgs);
|
|
||||||
inlineValue = false;
|
|
||||||
}
|
|
||||||
ArrayPrototypePush(
|
|
||||||
tokens,
|
|
||||||
{ kind: 'option', name: longOption, rawName: arg,
|
|
||||||
index, value, inlineValue });
|
|
||||||
if (value != null) ++index;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isShortOptionGroup(arg, options)) {
|
|
||||||
// Expand -fXzy to -f -X -z -y
|
|
||||||
const expanded = [];
|
|
||||||
for (let index = 1; index < arg.length; index++) {
|
|
||||||
const shortOption = StringPrototypeCharAt(arg, index);
|
|
||||||
const longOption = findLongOptionForShort(shortOption, options);
|
|
||||||
if (optionsGetOwn(options, longOption, 'type') !== 'string' ||
|
|
||||||
index === arg.length - 1) {
|
|
||||||
// Boolean option, or last short in group. Well formed.
|
|
||||||
ArrayPrototypePush(expanded, `-${shortOption}`);
|
|
||||||
} else {
|
|
||||||
// String option in middle. Yuck.
|
|
||||||
// Expand -abfFILE to -a -b -fFILE
|
|
||||||
ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`);
|
|
||||||
break; // finished short group
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ArrayPrototypeUnshiftApply(remainingArgs, expanded);
|
|
||||||
groupCount = expanded.length;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isShortOptionAndValue(arg, options)) {
|
|
||||||
// e.g. -fFILE
|
|
||||||
const shortOption = StringPrototypeCharAt(arg, 1);
|
|
||||||
const longOption = findLongOptionForShort(shortOption, options);
|
|
||||||
const value = StringPrototypeSlice(arg, 2);
|
|
||||||
ArrayPrototypePush(
|
|
||||||
tokens,
|
|
||||||
{ kind: 'option', name: longOption, rawName: `-${shortOption}`,
|
|
||||||
index, value, inlineValue: true });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLoneLongOption(arg)) {
|
|
||||||
// e.g. '--foo'
|
|
||||||
const longOption = StringPrototypeSlice(arg, 2);
|
|
||||||
let value;
|
|
||||||
let inlineValue;
|
|
||||||
if (optionsGetOwn(options, longOption, 'type') === 'string' &&
|
|
||||||
isOptionValue(nextArg)) {
|
|
||||||
// e.g. '--foo', 'bar'
|
|
||||||
value = ArrayPrototypeShift(remainingArgs);
|
|
||||||
inlineValue = false;
|
|
||||||
}
|
|
||||||
ArrayPrototypePush(
|
|
||||||
tokens,
|
|
||||||
{ kind: 'option', name: longOption, rawName: arg,
|
|
||||||
index, value, inlineValue });
|
|
||||||
if (value != null) ++index;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isLongOptionAndValue(arg)) {
|
|
||||||
// e.g. --foo=bar
|
|
||||||
const equalIndex = StringPrototypeIndexOf(arg, '=');
|
|
||||||
const longOption = StringPrototypeSlice(arg, 2, equalIndex);
|
|
||||||
const value = StringPrototypeSlice(arg, equalIndex + 1);
|
|
||||||
ArrayPrototypePush(
|
|
||||||
tokens,
|
|
||||||
{ kind: 'option', name: longOption, rawName: `--${longOption}`,
|
|
||||||
index, value, inlineValue: true });
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg });
|
|
||||||
}
|
|
||||||
|
|
||||||
return tokens;
|
|
||||||
}
|
|
||||||
|
|
||||||
const parseArgs = (config = kEmptyObject) => {
|
|
||||||
const args = objectGetOwn(config, 'args') ?? getMainArgs();
|
|
||||||
const strict = objectGetOwn(config, 'strict') ?? true;
|
|
||||||
const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict;
|
|
||||||
const returnTokens = objectGetOwn(config, 'tokens') ?? false;
|
|
||||||
const options = objectGetOwn(config, 'options') ?? { __proto__: null };
|
|
||||||
// Bundle these up for passing to strict-mode checks.
|
|
||||||
const parseConfig = { args, strict, options, allowPositionals };
|
|
||||||
|
|
||||||
// Validate input configuration.
|
|
||||||
validateArray(args, 'args');
|
|
||||||
validateBoolean(strict, 'strict');
|
|
||||||
validateBoolean(allowPositionals, 'allowPositionals');
|
|
||||||
validateBoolean(returnTokens, 'tokens');
|
|
||||||
validateObject(options, 'options');
|
|
||||||
ArrayPrototypeForEach(
|
|
||||||
ObjectEntries(options),
|
|
||||||
({ 0: longOption, 1: optionConfig }) => {
|
|
||||||
validateObject(optionConfig, `options.${longOption}`);
|
|
||||||
|
|
||||||
// type is required
|
|
||||||
const optionType = objectGetOwn(optionConfig, 'type');
|
|
||||||
validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']);
|
|
||||||
|
|
||||||
if (ObjectHasOwn(optionConfig, 'short')) {
|
|
||||||
const shortOption = optionConfig.short;
|
|
||||||
validateString(shortOption, `options.${longOption}.short`);
|
|
||||||
if (shortOption.length !== 1) {
|
|
||||||
throw new ERR_INVALID_ARG_VALUE(
|
|
||||||
`options.${longOption}.short`,
|
|
||||||
shortOption,
|
|
||||||
'must be a single character'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const multipleOption = objectGetOwn(optionConfig, 'multiple');
|
|
||||||
if (ObjectHasOwn(optionConfig, 'multiple')) {
|
|
||||||
validateBoolean(multipleOption, `options.${longOption}.multiple`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const defaultValue = objectGetOwn(optionConfig, 'default');
|
|
||||||
if (defaultValue !== undefined) {
|
|
||||||
let validator;
|
|
||||||
switch (optionType) {
|
|
||||||
case 'string':
|
|
||||||
validator = multipleOption ? validateStringArray : validateString;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'boolean':
|
|
||||||
validator = multipleOption ? validateBooleanArray : validateBoolean;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
validator(defaultValue, `options.${longOption}.default`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Phase 1: identify tokens
|
|
||||||
const tokens = argsToTokens(args, options);
|
|
||||||
|
|
||||||
// Phase 2: process tokens into parsed option values and positionals
|
|
||||||
const result = {
|
|
||||||
values: { __proto__: null },
|
|
||||||
positionals: [],
|
|
||||||
};
|
|
||||||
if (returnTokens) {
|
|
||||||
result.tokens = tokens;
|
|
||||||
}
|
|
||||||
ArrayPrototypeForEach(tokens, (token) => {
|
|
||||||
if (token.kind === 'option') {
|
|
||||||
if (strict) {
|
|
||||||
checkOptionUsage(parseConfig, token);
|
|
||||||
checkOptionLikeValue(token);
|
|
||||||
}
|
|
||||||
storeOption(token.name, token.value, options, result.values);
|
|
||||||
} else if (token.kind === 'positional') {
|
|
||||||
if (!allowPositionals) {
|
|
||||||
throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value);
|
|
||||||
}
|
|
||||||
ArrayPrototypePush(result.positionals, token.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Phase 3: fill in default values for missing args
|
|
||||||
ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption,
|
|
||||||
1: optionConfig }) => {
|
|
||||||
const mustSetDefault = useDefaultValueOption(longOption,
|
|
||||||
optionConfig,
|
|
||||||
result.values);
|
|
||||||
if (mustSetDefault) {
|
|
||||||
storeDefaultOption(longOption,
|
|
||||||
objectGetOwn(optionConfig, 'default'),
|
|
||||||
result.values);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
parseArgs,
|
|
||||||
};
|
|
47
backend/app/node_modules/@pkgjs/parseargs/internal/errors.js
generated
vendored
47
backend/app/node_modules/@pkgjs/parseargs/internal/errors.js
generated
vendored
@ -1,47 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
class ERR_INVALID_ARG_TYPE extends TypeError {
|
|
||||||
constructor(name, expected, actual) {
|
|
||||||
super(`${name} must be ${expected} got ${actual}`);
|
|
||||||
this.code = 'ERR_INVALID_ARG_TYPE';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ERR_INVALID_ARG_VALUE extends TypeError {
|
|
||||||
constructor(arg1, arg2, expected) {
|
|
||||||
super(`The property ${arg1} ${expected}. Received '${arg2}'`);
|
|
||||||
this.code = 'ERR_INVALID_ARG_VALUE';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error {
|
|
||||||
constructor(message) {
|
|
||||||
super(message);
|
|
||||||
this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error {
|
|
||||||
constructor(option, allowPositionals) {
|
|
||||||
const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : '';
|
|
||||||
super(`Unknown option '${option}'${suggestDashDash}`);
|
|
||||||
this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error {
|
|
||||||
constructor(positional) {
|
|
||||||
super(`Unexpected argument '${positional}'. This command does not take positional arguments`);
|
|
||||||
this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
codes: {
|
|
||||||
ERR_INVALID_ARG_TYPE,
|
|
||||||
ERR_INVALID_ARG_VALUE,
|
|
||||||
ERR_PARSE_ARGS_INVALID_OPTION_VALUE,
|
|
||||||
ERR_PARSE_ARGS_UNKNOWN_OPTION,
|
|
||||||
ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL,
|
|
||||||
}
|
|
||||||
};
|
|
393
backend/app/node_modules/@pkgjs/parseargs/internal/primordials.js
generated
vendored
393
backend/app/node_modules/@pkgjs/parseargs/internal/primordials.js
generated
vendored
@ -1,393 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js
|
|
||||||
under the following license:
|
|
||||||
|
|
||||||
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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/* eslint-disable node-core/prefer-primordials */
|
|
||||||
|
|
||||||
// This file subclasses and stores the JS builtins that come from the VM
|
|
||||||
// so that Node.js's builtin modules do not need to later look these up from
|
|
||||||
// the global proxy, which can be mutated by users.
|
|
||||||
|
|
||||||
// Use of primordials have sometimes a dramatic impact on performance, please
|
|
||||||
// benchmark all changes made in performance-sensitive areas of the codebase.
|
|
||||||
// See: https://github.com/nodejs/node/pull/38248
|
|
||||||
|
|
||||||
const primordials = {};
|
|
||||||
|
|
||||||
const {
|
|
||||||
defineProperty: ReflectDefineProperty,
|
|
||||||
getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor,
|
|
||||||
ownKeys: ReflectOwnKeys,
|
|
||||||
} = Reflect;
|
|
||||||
|
|
||||||
// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`.
|
|
||||||
// It is using `bind.bind(call)` to avoid using `Function.prototype.bind`
|
|
||||||
// and `Function.prototype.call` after it may have been mutated by users.
|
|
||||||
const { apply, bind, call } = Function.prototype;
|
|
||||||
const uncurryThis = bind.bind(call);
|
|
||||||
primordials.uncurryThis = uncurryThis;
|
|
||||||
|
|
||||||
// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`.
|
|
||||||
// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind`
|
|
||||||
// and `Function.prototype.apply` after it may have been mutated by users.
|
|
||||||
const applyBind = bind.bind(apply);
|
|
||||||
primordials.applyBind = applyBind;
|
|
||||||
|
|
||||||
// Methods that accept a variable number of arguments, and thus it's useful to
|
|
||||||
// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`,
|
|
||||||
// instead of `Function.prototype.call`, and thus doesn't require iterator
|
|
||||||
// destructuring.
|
|
||||||
const varargsMethods = [
|
|
||||||
// 'ArrayPrototypeConcat' is omitted, because it performs the spread
|
|
||||||
// on its own for arrays and array-likes with a truthy
|
|
||||||
// @@isConcatSpreadable symbol property.
|
|
||||||
'ArrayOf',
|
|
||||||
'ArrayPrototypePush',
|
|
||||||
'ArrayPrototypeUnshift',
|
|
||||||
// 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply'
|
|
||||||
// and 'FunctionPrototypeApply'.
|
|
||||||
'MathHypot',
|
|
||||||
'MathMax',
|
|
||||||
'MathMin',
|
|
||||||
'StringPrototypeConcat',
|
|
||||||
'TypedArrayOf',
|
|
||||||
];
|
|
||||||
|
|
||||||
function getNewKey(key) {
|
|
||||||
return typeof key === 'symbol' ?
|
|
||||||
`Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` :
|
|
||||||
`${key[0].toUpperCase()}${key.slice(1)}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyAccessor(dest, prefix, key, { enumerable, get, set }) {
|
|
||||||
ReflectDefineProperty(dest, `${prefix}Get${key}`, {
|
|
||||||
value: uncurryThis(get),
|
|
||||||
enumerable
|
|
||||||
});
|
|
||||||
if (set !== undefined) {
|
|
||||||
ReflectDefineProperty(dest, `${prefix}Set${key}`, {
|
|
||||||
value: uncurryThis(set),
|
|
||||||
enumerable
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyPropsRenamed(src, dest, prefix) {
|
|
||||||
for (const key of ReflectOwnKeys(src)) {
|
|
||||||
const newKey = getNewKey(key);
|
|
||||||
const desc = ReflectGetOwnPropertyDescriptor(src, key);
|
|
||||||
if ('get' in desc) {
|
|
||||||
copyAccessor(dest, prefix, newKey, desc);
|
|
||||||
} else {
|
|
||||||
const name = `${prefix}${newKey}`;
|
|
||||||
ReflectDefineProperty(dest, name, desc);
|
|
||||||
if (varargsMethods.includes(name)) {
|
|
||||||
ReflectDefineProperty(dest, `${name}Apply`, {
|
|
||||||
// `src` is bound as the `this` so that the static `this` points
|
|
||||||
// to the object it was defined on,
|
|
||||||
// e.g.: `ArrayOfApply` gets a `this` of `Array`:
|
|
||||||
value: applyBind(desc.value, src),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyPropsRenamedBound(src, dest, prefix) {
|
|
||||||
for (const key of ReflectOwnKeys(src)) {
|
|
||||||
const newKey = getNewKey(key);
|
|
||||||
const desc = ReflectGetOwnPropertyDescriptor(src, key);
|
|
||||||
if ('get' in desc) {
|
|
||||||
copyAccessor(dest, prefix, newKey, desc);
|
|
||||||
} else {
|
|
||||||
const { value } = desc;
|
|
||||||
if (typeof value === 'function') {
|
|
||||||
desc.value = value.bind(src);
|
|
||||||
}
|
|
||||||
|
|
||||||
const name = `${prefix}${newKey}`;
|
|
||||||
ReflectDefineProperty(dest, name, desc);
|
|
||||||
if (varargsMethods.includes(name)) {
|
|
||||||
ReflectDefineProperty(dest, `${name}Apply`, {
|
|
||||||
value: applyBind(value, src),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyPrototype(src, dest, prefix) {
|
|
||||||
for (const key of ReflectOwnKeys(src)) {
|
|
||||||
const newKey = getNewKey(key);
|
|
||||||
const desc = ReflectGetOwnPropertyDescriptor(src, key);
|
|
||||||
if ('get' in desc) {
|
|
||||||
copyAccessor(dest, prefix, newKey, desc);
|
|
||||||
} else {
|
|
||||||
const { value } = desc;
|
|
||||||
if (typeof value === 'function') {
|
|
||||||
desc.value = uncurryThis(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
const name = `${prefix}${newKey}`;
|
|
||||||
ReflectDefineProperty(dest, name, desc);
|
|
||||||
if (varargsMethods.includes(name)) {
|
|
||||||
ReflectDefineProperty(dest, `${name}Apply`, {
|
|
||||||
value: applyBind(value),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create copies of configurable value properties of the global object
|
|
||||||
[
|
|
||||||
'Proxy',
|
|
||||||
'globalThis',
|
|
||||||
].forEach((name) => {
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
primordials[name] = globalThis[name];
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create copies of URI handling functions
|
|
||||||
[
|
|
||||||
decodeURI,
|
|
||||||
decodeURIComponent,
|
|
||||||
encodeURI,
|
|
||||||
encodeURIComponent,
|
|
||||||
].forEach((fn) => {
|
|
||||||
primordials[fn.name] = fn;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create copies of the namespace objects
|
|
||||||
[
|
|
||||||
'JSON',
|
|
||||||
'Math',
|
|
||||||
'Proxy',
|
|
||||||
'Reflect',
|
|
||||||
].forEach((name) => {
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
copyPropsRenamed(global[name], primordials, name);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create copies of intrinsic objects
|
|
||||||
[
|
|
||||||
'Array',
|
|
||||||
'ArrayBuffer',
|
|
||||||
'BigInt',
|
|
||||||
'BigInt64Array',
|
|
||||||
'BigUint64Array',
|
|
||||||
'Boolean',
|
|
||||||
'DataView',
|
|
||||||
'Date',
|
|
||||||
'Error',
|
|
||||||
'EvalError',
|
|
||||||
'Float32Array',
|
|
||||||
'Float64Array',
|
|
||||||
'Function',
|
|
||||||
'Int16Array',
|
|
||||||
'Int32Array',
|
|
||||||
'Int8Array',
|
|
||||||
'Map',
|
|
||||||
'Number',
|
|
||||||
'Object',
|
|
||||||
'RangeError',
|
|
||||||
'ReferenceError',
|
|
||||||
'RegExp',
|
|
||||||
'Set',
|
|
||||||
'String',
|
|
||||||
'Symbol',
|
|
||||||
'SyntaxError',
|
|
||||||
'TypeError',
|
|
||||||
'URIError',
|
|
||||||
'Uint16Array',
|
|
||||||
'Uint32Array',
|
|
||||||
'Uint8Array',
|
|
||||||
'Uint8ClampedArray',
|
|
||||||
'WeakMap',
|
|
||||||
'WeakSet',
|
|
||||||
].forEach((name) => {
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
const original = global[name];
|
|
||||||
primordials[name] = original;
|
|
||||||
copyPropsRenamed(original, primordials, name);
|
|
||||||
copyPrototype(original.prototype, primordials, `${name}Prototype`);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create copies of intrinsic objects that require a valid `this` to call
|
|
||||||
// static methods.
|
|
||||||
// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all
|
|
||||||
[
|
|
||||||
'Promise',
|
|
||||||
].forEach((name) => {
|
|
||||||
// eslint-disable-next-line no-restricted-globals
|
|
||||||
const original = global[name];
|
|
||||||
primordials[name] = original;
|
|
||||||
copyPropsRenamedBound(original, primordials, name);
|
|
||||||
copyPrototype(original.prototype, primordials, `${name}Prototype`);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create copies of abstract intrinsic objects that are not directly exposed
|
|
||||||
// on the global object.
|
|
||||||
// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object
|
|
||||||
[
|
|
||||||
{ name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) },
|
|
||||||
{ name: 'ArrayIterator', original: {
|
|
||||||
prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()),
|
|
||||||
} },
|
|
||||||
{ name: 'StringIterator', original: {
|
|
||||||
prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()),
|
|
||||||
} },
|
|
||||||
].forEach(({ name, original }) => {
|
|
||||||
primordials[name] = original;
|
|
||||||
// The static %TypedArray% methods require a valid `this`, but can't be bound,
|
|
||||||
// as they need a subclass constructor as the receiver:
|
|
||||||
copyPrototype(original, primordials, name);
|
|
||||||
copyPrototype(original.prototype, primordials, `${name}Prototype`);
|
|
||||||
});
|
|
||||||
|
|
||||||
/* eslint-enable node-core/prefer-primordials */
|
|
||||||
|
|
||||||
const {
|
|
||||||
ArrayPrototypeForEach,
|
|
||||||
FunctionPrototypeCall,
|
|
||||||
Map,
|
|
||||||
ObjectFreeze,
|
|
||||||
ObjectSetPrototypeOf,
|
|
||||||
Set,
|
|
||||||
SymbolIterator,
|
|
||||||
WeakMap,
|
|
||||||
WeakSet,
|
|
||||||
} = primordials;
|
|
||||||
|
|
||||||
// Because these functions are used by `makeSafe`, which is exposed
|
|
||||||
// on the `primordials` object, it's important to use const references
|
|
||||||
// to the primordials that they use:
|
|
||||||
const createSafeIterator = (factory, next) => {
|
|
||||||
class SafeIterator {
|
|
||||||
constructor(iterable) {
|
|
||||||
this._iterator = factory(iterable);
|
|
||||||
}
|
|
||||||
next() {
|
|
||||||
return next(this._iterator);
|
|
||||||
}
|
|
||||||
[SymbolIterator]() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ObjectSetPrototypeOf(SafeIterator.prototype, null);
|
|
||||||
ObjectFreeze(SafeIterator.prototype);
|
|
||||||
ObjectFreeze(SafeIterator);
|
|
||||||
return SafeIterator;
|
|
||||||
};
|
|
||||||
|
|
||||||
primordials.SafeArrayIterator = createSafeIterator(
|
|
||||||
primordials.ArrayPrototypeSymbolIterator,
|
|
||||||
primordials.ArrayIteratorPrototypeNext
|
|
||||||
);
|
|
||||||
primordials.SafeStringIterator = createSafeIterator(
|
|
||||||
primordials.StringPrototypeSymbolIterator,
|
|
||||||
primordials.StringIteratorPrototypeNext
|
|
||||||
);
|
|
||||||
|
|
||||||
const copyProps = (src, dest) => {
|
|
||||||
ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => {
|
|
||||||
if (!ReflectGetOwnPropertyDescriptor(dest, key)) {
|
|
||||||
ReflectDefineProperty(
|
|
||||||
dest,
|
|
||||||
key,
|
|
||||||
ReflectGetOwnPropertyDescriptor(src, key));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const makeSafe = (unsafe, safe) => {
|
|
||||||
if (SymbolIterator in unsafe.prototype) {
|
|
||||||
const dummy = new unsafe();
|
|
||||||
let next; // We can reuse the same `next` method.
|
|
||||||
|
|
||||||
ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => {
|
|
||||||
if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) {
|
|
||||||
const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key);
|
|
||||||
if (
|
|
||||||
typeof desc.value === 'function' &&
|
|
||||||
desc.value.length === 0 &&
|
|
||||||
SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {})
|
|
||||||
) {
|
|
||||||
const createIterator = uncurryThis(desc.value);
|
|
||||||
next = next ?? uncurryThis(createIterator(dummy).next);
|
|
||||||
const SafeIterator = createSafeIterator(createIterator, next);
|
|
||||||
desc.value = function() {
|
|
||||||
return new SafeIterator(this);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
ReflectDefineProperty(safe.prototype, key, desc);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
copyProps(unsafe.prototype, safe.prototype);
|
|
||||||
}
|
|
||||||
copyProps(unsafe, safe);
|
|
||||||
|
|
||||||
ObjectSetPrototypeOf(safe.prototype, null);
|
|
||||||
ObjectFreeze(safe.prototype);
|
|
||||||
ObjectFreeze(safe);
|
|
||||||
return safe;
|
|
||||||
};
|
|
||||||
primordials.makeSafe = makeSafe;
|
|
||||||
|
|
||||||
// Subclass the constructors because we need to use their prototype
|
|
||||||
// methods later.
|
|
||||||
// Defining the `constructor` is necessary here to avoid the default
|
|
||||||
// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`.
|
|
||||||
primordials.SafeMap = makeSafe(
|
|
||||||
Map,
|
|
||||||
class SafeMap extends Map {
|
|
||||||
constructor(i) { super(i); } // eslint-disable-line no-useless-constructor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
primordials.SafeWeakMap = makeSafe(
|
|
||||||
WeakMap,
|
|
||||||
class SafeWeakMap extends WeakMap {
|
|
||||||
constructor(i) { super(i); } // eslint-disable-line no-useless-constructor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
primordials.SafeSet = makeSafe(
|
|
||||||
Set,
|
|
||||||
class SafeSet extends Set {
|
|
||||||
constructor(i) { super(i); } // eslint-disable-line no-useless-constructor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
primordials.SafeWeakSet = makeSafe(
|
|
||||||
WeakSet,
|
|
||||||
class SafeWeakSet extends WeakSet {
|
|
||||||
constructor(i) { super(i); } // eslint-disable-line no-useless-constructor
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
ObjectSetPrototypeOf(primordials, null);
|
|
||||||
ObjectFreeze(primordials);
|
|
||||||
|
|
||||||
module.exports = primordials;
|
|
14
backend/app/node_modules/@pkgjs/parseargs/internal/util.js
generated
vendored
14
backend/app/node_modules/@pkgjs/parseargs/internal/util.js
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This is a placeholder for util.js in node.js land.
|
|
||||||
|
|
||||||
const {
|
|
||||||
ObjectCreate,
|
|
||||||
ObjectFreeze,
|
|
||||||
} = require('./primordials');
|
|
||||||
|
|
||||||
const kEmptyObject = ObjectFreeze(ObjectCreate(null));
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
kEmptyObject,
|
|
||||||
};
|
|
89
backend/app/node_modules/@pkgjs/parseargs/internal/validators.js
generated
vendored
89
backend/app/node_modules/@pkgjs/parseargs/internal/validators.js
generated
vendored
@ -1,89 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
// This file is a proxy of the original file located at:
|
|
||||||
// https://github.com/nodejs/node/blob/main/lib/internal/validators.js
|
|
||||||
// Every addition or modification to this file must be evaluated
|
|
||||||
// during the PR review.
|
|
||||||
|
|
||||||
const {
|
|
||||||
ArrayIsArray,
|
|
||||||
ArrayPrototypeIncludes,
|
|
||||||
ArrayPrototypeJoin,
|
|
||||||
} = require('./primordials');
|
|
||||||
|
|
||||||
const {
|
|
||||||
codes: {
|
|
||||||
ERR_INVALID_ARG_TYPE
|
|
||||||
}
|
|
||||||
} = require('./errors');
|
|
||||||
|
|
||||||
function validateString(value, name) {
|
|
||||||
if (typeof value !== 'string') {
|
|
||||||
throw new ERR_INVALID_ARG_TYPE(name, 'String', value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateUnion(value, name, union) {
|
|
||||||
if (!ArrayPrototypeIncludes(union, value)) {
|
|
||||||
throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateBoolean(value, name) {
|
|
||||||
if (typeof value !== 'boolean') {
|
|
||||||
throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateArray(value, name) {
|
|
||||||
if (!ArrayIsArray(value)) {
|
|
||||||
throw new ERR_INVALID_ARG_TYPE(name, 'Array', value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateStringArray(value, name) {
|
|
||||||
validateArray(value, name);
|
|
||||||
for (let i = 0; i < value.length; i++) {
|
|
||||||
validateString(value[i], `${name}[${i}]`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateBooleanArray(value, name) {
|
|
||||||
validateArray(value, name);
|
|
||||||
for (let i = 0; i < value.length; i++) {
|
|
||||||
validateBoolean(value[i], `${name}[${i}]`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {unknown} value
|
|
||||||
* @param {string} name
|
|
||||||
* @param {{
|
|
||||||
* allowArray?: boolean,
|
|
||||||
* allowFunction?: boolean,
|
|
||||||
* nullable?: boolean
|
|
||||||
* }} [options]
|
|
||||||
*/
|
|
||||||
function validateObject(value, name, options) {
|
|
||||||
const useDefaultOptions = options == null;
|
|
||||||
const allowArray = useDefaultOptions ? false : options.allowArray;
|
|
||||||
const allowFunction = useDefaultOptions ? false : options.allowFunction;
|
|
||||||
const nullable = useDefaultOptions ? false : options.nullable;
|
|
||||||
if ((!nullable && value === null) ||
|
|
||||||
(!allowArray && ArrayIsArray(value)) ||
|
|
||||||
(typeof value !== 'object' && (
|
|
||||||
!allowFunction || typeof value !== 'function'
|
|
||||||
))) {
|
|
||||||
throw new ERR_INVALID_ARG_TYPE(name, 'Object', value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
validateArray,
|
|
||||||
validateObject,
|
|
||||||
validateString,
|
|
||||||
validateStringArray,
|
|
||||||
validateUnion,
|
|
||||||
validateBoolean,
|
|
||||||
validateBooleanArray,
|
|
||||||
};
|
|
36
backend/app/node_modules/@pkgjs/parseargs/package.json
generated
vendored
36
backend/app/node_modules/@pkgjs/parseargs/package.json
generated
vendored
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@pkgjs/parseargs",
|
|
||||||
"version": "0.11.0",
|
|
||||||
"description": "Polyfill of future proposal for `util.parseArgs()`",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
},
|
|
||||||
"main": "index.js",
|
|
||||||
"exports": {
|
|
||||||
".": "./index.js",
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"coverage": "c8 --check-coverage tape 'test/*.js'",
|
|
||||||
"test": "c8 tape 'test/*.js'",
|
|
||||||
"posttest": "eslint .",
|
|
||||||
"fix": "npm run posttest -- --fix"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git@github.com:pkgjs/parseargs.git"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/pkgjs/parseargs/issues"
|
|
||||||
},
|
|
||||||
"homepage": "https://github.com/pkgjs/parseargs#readme",
|
|
||||||
"devDependencies": {
|
|
||||||
"c8": "^7.10.0",
|
|
||||||
"eslint": "^8.2.0",
|
|
||||||
"eslint-plugin-node-core": "iansu/eslint-plugin-node-core",
|
|
||||||
"tape": "^5.2.2"
|
|
||||||
}
|
|
||||||
}
|
|
198
backend/app/node_modules/@pkgjs/parseargs/utils.js
generated
vendored
198
backend/app/node_modules/@pkgjs/parseargs/utils.js
generated
vendored
@ -1,198 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const {
|
|
||||||
ArrayPrototypeFind,
|
|
||||||
ObjectEntries,
|
|
||||||
ObjectPrototypeHasOwnProperty: ObjectHasOwn,
|
|
||||||
StringPrototypeCharAt,
|
|
||||||
StringPrototypeIncludes,
|
|
||||||
StringPrototypeStartsWith,
|
|
||||||
} = require('./internal/primordials');
|
|
||||||
|
|
||||||
const {
|
|
||||||
validateObject,
|
|
||||||
} = require('./internal/validators');
|
|
||||||
|
|
||||||
// These are internal utilities to make the parsing logic easier to read, and
|
|
||||||
// add lots of detail for the curious. They are in a separate file to allow
|
|
||||||
// unit testing, although that is not essential (this could be rolled into
|
|
||||||
// main file and just tested implicitly via API).
|
|
||||||
//
|
|
||||||
// These routines are for internal use, not for export to client.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the named property, but only if it is an own property.
|
|
||||||
*/
|
|
||||||
function objectGetOwn(obj, prop) {
|
|
||||||
if (ObjectHasOwn(obj, prop))
|
|
||||||
return obj[prop];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the named options property, but only if it is an own property.
|
|
||||||
*/
|
|
||||||
function optionsGetOwn(options, longOption, prop) {
|
|
||||||
if (ObjectHasOwn(options, longOption))
|
|
||||||
return objectGetOwn(options[longOption], prop);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if the argument may be used as an option value.
|
|
||||||
* @example
|
|
||||||
* isOptionValue('V') // returns true
|
|
||||||
* isOptionValue('-v') // returns true (greedy)
|
|
||||||
* isOptionValue('--foo') // returns true (greedy)
|
|
||||||
* isOptionValue(undefined) // returns false
|
|
||||||
*/
|
|
||||||
function isOptionValue(value) {
|
|
||||||
if (value == null) return false;
|
|
||||||
|
|
||||||
// Open Group Utility Conventions are that an option-argument
|
|
||||||
// is the argument after the option, and may start with a dash.
|
|
||||||
return true; // greedy!
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Detect whether there is possible confusion and user may have omitted
|
|
||||||
* the option argument, like `--port --verbose` when `port` of type:string.
|
|
||||||
* In strict mode we throw errors if value is option-like.
|
|
||||||
*/
|
|
||||||
function isOptionLikeValue(value) {
|
|
||||||
if (value == null) return false;
|
|
||||||
|
|
||||||
return value.length > 1 && StringPrototypeCharAt(value, 0) === '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if `arg` is just a short option.
|
|
||||||
* @example '-f'
|
|
||||||
*/
|
|
||||||
function isLoneShortOption(arg) {
|
|
||||||
return arg.length === 2 &&
|
|
||||||
StringPrototypeCharAt(arg, 0) === '-' &&
|
|
||||||
StringPrototypeCharAt(arg, 1) !== '-';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if `arg` is a lone long option.
|
|
||||||
* @example
|
|
||||||
* isLoneLongOption('a') // returns false
|
|
||||||
* isLoneLongOption('-a') // returns false
|
|
||||||
* isLoneLongOption('--foo') // returns true
|
|
||||||
* isLoneLongOption('--foo=bar') // returns false
|
|
||||||
*/
|
|
||||||
function isLoneLongOption(arg) {
|
|
||||||
return arg.length > 2 &&
|
|
||||||
StringPrototypeStartsWith(arg, '--') &&
|
|
||||||
!StringPrototypeIncludes(arg, '=', 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if `arg` is a long option and value in the same argument.
|
|
||||||
* @example
|
|
||||||
* isLongOptionAndValue('--foo') // returns false
|
|
||||||
* isLongOptionAndValue('--foo=bar') // returns true
|
|
||||||
*/
|
|
||||||
function isLongOptionAndValue(arg) {
|
|
||||||
return arg.length > 2 &&
|
|
||||||
StringPrototypeStartsWith(arg, '--') &&
|
|
||||||
StringPrototypeIncludes(arg, '=', 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines if `arg` is a short option group.
|
|
||||||
*
|
|
||||||
* See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html).
|
|
||||||
* One or more options without option-arguments, followed by at most one
|
|
||||||
* option that takes an option-argument, should be accepted when grouped
|
|
||||||
* behind one '-' delimiter.
|
|
||||||
* @example
|
|
||||||
* isShortOptionGroup('-a', {}) // returns false
|
|
||||||
* isShortOptionGroup('-ab', {}) // returns true
|
|
||||||
* // -fb is an option and a value, not a short option group
|
|
||||||
* isShortOptionGroup('-fb', {
|
|
||||||
* options: { f: { type: 'string' } }
|
|
||||||
* }) // returns false
|
|
||||||
* isShortOptionGroup('-bf', {
|
|
||||||
* options: { f: { type: 'string' } }
|
|
||||||
* }) // returns true
|
|
||||||
* // -bfb is an edge case, return true and caller sorts it out
|
|
||||||
* isShortOptionGroup('-bfb', {
|
|
||||||
* options: { f: { type: 'string' } }
|
|
||||||
* }) // returns true
|
|
||||||
*/
|
|
||||||
function isShortOptionGroup(arg, options) {
|
|
||||||
if (arg.length <= 2) return false;
|
|
||||||
if (StringPrototypeCharAt(arg, 0) !== '-') return false;
|
|
||||||
if (StringPrototypeCharAt(arg, 1) === '-') return false;
|
|
||||||
|
|
||||||
const firstShort = StringPrototypeCharAt(arg, 1);
|
|
||||||
const longOption = findLongOptionForShort(firstShort, options);
|
|
||||||
return optionsGetOwn(options, longOption, 'type') !== 'string';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if arg is a short string option followed by its value.
|
|
||||||
* @example
|
|
||||||
* isShortOptionAndValue('-a', {}); // returns false
|
|
||||||
* isShortOptionAndValue('-ab', {}); // returns false
|
|
||||||
* isShortOptionAndValue('-fFILE', {
|
|
||||||
* options: { foo: { short: 'f', type: 'string' }}
|
|
||||||
* }) // returns true
|
|
||||||
*/
|
|
||||||
function isShortOptionAndValue(arg, options) {
|
|
||||||
validateObject(options, 'options');
|
|
||||||
|
|
||||||
if (arg.length <= 2) return false;
|
|
||||||
if (StringPrototypeCharAt(arg, 0) !== '-') return false;
|
|
||||||
if (StringPrototypeCharAt(arg, 1) === '-') return false;
|
|
||||||
|
|
||||||
const shortOption = StringPrototypeCharAt(arg, 1);
|
|
||||||
const longOption = findLongOptionForShort(shortOption, options);
|
|
||||||
return optionsGetOwn(options, longOption, 'type') === 'string';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the long option associated with a short option. Looks for a configured
|
|
||||||
* `short` and returns the short option itself if a long option is not found.
|
|
||||||
* @example
|
|
||||||
* findLongOptionForShort('a', {}) // returns 'a'
|
|
||||||
* findLongOptionForShort('b', {
|
|
||||||
* options: { bar: { short: 'b' } }
|
|
||||||
* }) // returns 'bar'
|
|
||||||
*/
|
|
||||||
function findLongOptionForShort(shortOption, options) {
|
|
||||||
validateObject(options, 'options');
|
|
||||||
const longOptionEntry = ArrayPrototypeFind(
|
|
||||||
ObjectEntries(options),
|
|
||||||
({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption
|
|
||||||
);
|
|
||||||
return longOptionEntry?.[0] ?? shortOption;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the given option includes a default value
|
|
||||||
* and that option has not been set by the input args.
|
|
||||||
*
|
|
||||||
* @param {string} longOption - long option name e.g. 'foo'
|
|
||||||
* @param {object} optionConfig - the option configuration properties
|
|
||||||
* @param {object} values - option values returned in `values` by parseArgs
|
|
||||||
*/
|
|
||||||
function useDefaultValueOption(longOption, optionConfig, values) {
|
|
||||||
return objectGetOwn(optionConfig, 'default') !== undefined &&
|
|
||||||
values[longOption] === undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
findLongOptionForShort,
|
|
||||||
isLoneLongOption,
|
|
||||||
isLoneShortOption,
|
|
||||||
isLongOptionAndValue,
|
|
||||||
isOptionValue,
|
|
||||||
isOptionLikeValue,
|
|
||||||
isShortOptionAndValue,
|
|
||||||
isShortOptionGroup,
|
|
||||||
useDefaultValueOption,
|
|
||||||
objectGetOwn,
|
|
||||||
optionsGetOwn,
|
|
||||||
};
|
|
33
backend/app/node_modules/ansi-regex/index.d.ts
generated
vendored
33
backend/app/node_modules/ansi-regex/index.d.ts
generated
vendored
@ -1,33 +0,0 @@
|
|||||||
export type Options = {
|
|
||||||
/**
|
|
||||||
Match only the first ANSI escape.
|
|
||||||
|
|
||||||
@default false
|
|
||||||
*/
|
|
||||||
readonly onlyFirst: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Regular expression for matching ANSI escape codes.
|
|
||||||
|
|
||||||
@example
|
|
||||||
```
|
|
||||||
import ansiRegex from 'ansi-regex';
|
|
||||||
|
|
||||||
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
|
||||||
//=> true
|
|
||||||
|
|
||||||
ansiRegex().test('cake');
|
|
||||||
//=> false
|
|
||||||
|
|
||||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
|
||||||
//=> ['\u001B[4m', '\u001B[0m']
|
|
||||||
|
|
||||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
|
|
||||||
//=> ['\u001B[4m']
|
|
||||||
|
|
||||||
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
|
|
||||||
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
|
|
||||||
```
|
|
||||||
*/
|
|
||||||
export default function ansiRegex(options?: Options): RegExp;
|
|
10
backend/app/node_modules/ansi-regex/index.js
generated
vendored
10
backend/app/node_modules/ansi-regex/index.js
generated
vendored
@ -1,10 +0,0 @@
|
|||||||
export default function ansiRegex({onlyFirst = false} = {}) {
|
|
||||||
// Valid string terminator sequences are BEL, ESC\, and 0x9c
|
|
||||||
const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
|
|
||||||
const pattern = [
|
|
||||||
`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
|
|
||||||
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
||||||
].join('|');
|
|
||||||
|
|
||||||
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
||||||
}
|
|
9
backend/app/node_modules/ansi-regex/license
generated
vendored
9
backend/app/node_modules/ansi-regex/license
generated
vendored
@ -1,9 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
|
61
backend/app/node_modules/ansi-regex/package.json
generated
vendored
61
backend/app/node_modules/ansi-regex/package.json
generated
vendored
@ -1,61 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ansi-regex",
|
|
||||||
"version": "6.1.0",
|
|
||||||
"description": "Regular expression for matching ANSI escape codes",
|
|
||||||
"license": "MIT",
|
|
||||||
"repository": "chalk/ansi-regex",
|
|
||||||
"funding": "https://github.com/chalk/ansi-regex?sponsor=1",
|
|
||||||
"author": {
|
|
||||||
"name": "Sindre Sorhus",
|
|
||||||
"email": "sindresorhus@gmail.com",
|
|
||||||
"url": "https://sindresorhus.com"
|
|
||||||
},
|
|
||||||
"type": "module",
|
|
||||||
"exports": "./index.js",
|
|
||||||
"types": "./index.d.ts",
|
|
||||||
"sideEffects": false,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "xo && ava && tsd",
|
|
||||||
"view-supported": "node fixtures/view-codes.js"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js",
|
|
||||||
"index.d.ts"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"ansi",
|
|
||||||
"styles",
|
|
||||||
"color",
|
|
||||||
"colour",
|
|
||||||
"colors",
|
|
||||||
"terminal",
|
|
||||||
"console",
|
|
||||||
"cli",
|
|
||||||
"string",
|
|
||||||
"tty",
|
|
||||||
"escape",
|
|
||||||
"formatting",
|
|
||||||
"rgb",
|
|
||||||
"256",
|
|
||||||
"shell",
|
|
||||||
"xterm",
|
|
||||||
"command-line",
|
|
||||||
"text",
|
|
||||||
"regex",
|
|
||||||
"regexp",
|
|
||||||
"re",
|
|
||||||
"match",
|
|
||||||
"test",
|
|
||||||
"find",
|
|
||||||
"pattern"
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"ansi-escapes": "^5.0.0",
|
|
||||||
"ava": "^3.15.0",
|
|
||||||
"tsd": "^0.21.0",
|
|
||||||
"xo": "^0.54.2"
|
|
||||||
}
|
|
||||||
}
|
|
60
backend/app/node_modules/ansi-regex/readme.md
generated
vendored
60
backend/app/node_modules/ansi-regex/readme.md
generated
vendored
@ -1,60 +0,0 @@
|
|||||||
# ansi-regex
|
|
||||||
|
|
||||||
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install ansi-regex
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
import ansiRegex from 'ansi-regex';
|
|
||||||
|
|
||||||
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
|
||||||
//=> true
|
|
||||||
|
|
||||||
ansiRegex().test('cake');
|
|
||||||
//=> false
|
|
||||||
|
|
||||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
|
||||||
//=> ['\u001B[4m', '\u001B[0m']
|
|
||||||
|
|
||||||
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
|
|
||||||
//=> ['\u001B[4m']
|
|
||||||
|
|
||||||
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
|
|
||||||
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
|
|
||||||
```
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
### ansiRegex(options?)
|
|
||||||
|
|
||||||
Returns a regex for matching ANSI escape codes.
|
|
||||||
|
|
||||||
#### options
|
|
||||||
|
|
||||||
Type: `object`
|
|
||||||
|
|
||||||
##### onlyFirst
|
|
||||||
|
|
||||||
Type: `boolean`\
|
|
||||||
Default: `false` *(Matches any ANSI escape codes in a string)*
|
|
||||||
|
|
||||||
Match only the first ANSI escape.
|
|
||||||
|
|
||||||
## FAQ
|
|
||||||
|
|
||||||
### Why do you test for codes not in the ECMA 48 standard?
|
|
||||||
|
|
||||||
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
|
||||||
|
|
||||||
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
|
||||||
|
|
||||||
## Maintainers
|
|
||||||
|
|
||||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
||||||
- [Josh Junon](https://github.com/qix-)
|
|
236
backend/app/node_modules/ansi-styles/index.d.ts
generated
vendored
236
backend/app/node_modules/ansi-styles/index.d.ts
generated
vendored
@ -1,236 +0,0 @@
|
|||||||
export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention
|
|
||||||
/**
|
|
||||||
The ANSI terminal control sequence for starting this style.
|
|
||||||
*/
|
|
||||||
readonly open: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
The ANSI terminal control sequence for ending this style.
|
|
||||||
*/
|
|
||||||
readonly close: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ColorBase {
|
|
||||||
/**
|
|
||||||
The ANSI terminal control sequence for ending this color.
|
|
||||||
*/
|
|
||||||
readonly close: string;
|
|
||||||
|
|
||||||
ansi(code: number): string;
|
|
||||||
|
|
||||||
ansi256(code: number): string;
|
|
||||||
|
|
||||||
ansi16m(red: number, green: number, blue: number): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Modifier {
|
|
||||||
/**
|
|
||||||
Resets the current color chain.
|
|
||||||
*/
|
|
||||||
readonly reset: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Make text bold.
|
|
||||||
*/
|
|
||||||
readonly bold: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Emitting only a small amount of light.
|
|
||||||
*/
|
|
||||||
readonly dim: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Make text italic. (Not widely supported)
|
|
||||||
*/
|
|
||||||
readonly italic: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Make text underline. (Not widely supported)
|
|
||||||
*/
|
|
||||||
readonly underline: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Make text overline.
|
|
||||||
|
|
||||||
Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
|
|
||||||
*/
|
|
||||||
readonly overline: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Inverse background and foreground colors.
|
|
||||||
*/
|
|
||||||
readonly inverse: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Prints the text, but makes it invisible.
|
|
||||||
*/
|
|
||||||
readonly hidden: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Puts a horizontal line through the center of the text. (Not widely supported)
|
|
||||||
*/
|
|
||||||
readonly strikethrough: CSPair;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ForegroundColor {
|
|
||||||
readonly black: CSPair;
|
|
||||||
readonly red: CSPair;
|
|
||||||
readonly green: CSPair;
|
|
||||||
readonly yellow: CSPair;
|
|
||||||
readonly blue: CSPair;
|
|
||||||
readonly cyan: CSPair;
|
|
||||||
readonly magenta: CSPair;
|
|
||||||
readonly white: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Alias for `blackBright`.
|
|
||||||
*/
|
|
||||||
readonly gray: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Alias for `blackBright`.
|
|
||||||
*/
|
|
||||||
readonly grey: CSPair;
|
|
||||||
|
|
||||||
readonly blackBright: CSPair;
|
|
||||||
readonly redBright: CSPair;
|
|
||||||
readonly greenBright: CSPair;
|
|
||||||
readonly yellowBright: CSPair;
|
|
||||||
readonly blueBright: CSPair;
|
|
||||||
readonly cyanBright: CSPair;
|
|
||||||
readonly magentaBright: CSPair;
|
|
||||||
readonly whiteBright: CSPair;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface BackgroundColor {
|
|
||||||
readonly bgBlack: CSPair;
|
|
||||||
readonly bgRed: CSPair;
|
|
||||||
readonly bgGreen: CSPair;
|
|
||||||
readonly bgYellow: CSPair;
|
|
||||||
readonly bgBlue: CSPair;
|
|
||||||
readonly bgCyan: CSPair;
|
|
||||||
readonly bgMagenta: CSPair;
|
|
||||||
readonly bgWhite: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Alias for `bgBlackBright`.
|
|
||||||
*/
|
|
||||||
readonly bgGray: CSPair;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Alias for `bgBlackBright`.
|
|
||||||
*/
|
|
||||||
readonly bgGrey: CSPair;
|
|
||||||
|
|
||||||
readonly bgBlackBright: CSPair;
|
|
||||||
readonly bgRedBright: CSPair;
|
|
||||||
readonly bgGreenBright: CSPair;
|
|
||||||
readonly bgYellowBright: CSPair;
|
|
||||||
readonly bgBlueBright: CSPair;
|
|
||||||
readonly bgCyanBright: CSPair;
|
|
||||||
readonly bgMagentaBright: CSPair;
|
|
||||||
readonly bgWhiteBright: CSPair;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ConvertColor {
|
|
||||||
/**
|
|
||||||
Convert from the RGB color space to the ANSI 256 color space.
|
|
||||||
|
|
||||||
@param red - (`0...255`)
|
|
||||||
@param green - (`0...255`)
|
|
||||||
@param blue - (`0...255`)
|
|
||||||
*/
|
|
||||||
rgbToAnsi256(red: number, green: number, blue: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Convert from the RGB HEX color space to the RGB color space.
|
|
||||||
|
|
||||||
@param hex - A hexadecimal string containing RGB data.
|
|
||||||
*/
|
|
||||||
hexToRgb(hex: string): [red: number, green: number, blue: number];
|
|
||||||
|
|
||||||
/**
|
|
||||||
Convert from the RGB HEX color space to the ANSI 256 color space.
|
|
||||||
|
|
||||||
@param hex - A hexadecimal string containing RGB data.
|
|
||||||
*/
|
|
||||||
hexToAnsi256(hex: string): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Convert from the ANSI 256 color space to the ANSI 16 color space.
|
|
||||||
|
|
||||||
@param code - A number representing the ANSI 256 color.
|
|
||||||
*/
|
|
||||||
ansi256ToAnsi(code: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Convert from the RGB color space to the ANSI 16 color space.
|
|
||||||
|
|
||||||
@param red - (`0...255`)
|
|
||||||
@param green - (`0...255`)
|
|
||||||
@param blue - (`0...255`)
|
|
||||||
*/
|
|
||||||
rgbToAnsi(red: number, green: number, blue: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Convert from the RGB HEX color space to the ANSI 16 color space.
|
|
||||||
|
|
||||||
@param hex - A hexadecimal string containing RGB data.
|
|
||||||
*/
|
|
||||||
hexToAnsi(hex: string): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic modifier names.
|
|
||||||
*/
|
|
||||||
export type ModifierName = keyof Modifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic foreground color names.
|
|
||||||
|
|
||||||
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
||||||
*/
|
|
||||||
export type ForegroundColorName = keyof ForegroundColor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic background color names.
|
|
||||||
|
|
||||||
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
||||||
*/
|
|
||||||
export type BackgroundColorName = keyof BackgroundColor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic color names. The combination of foreground and background color names.
|
|
||||||
|
|
||||||
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
||||||
*/
|
|
||||||
export type ColorName = ForegroundColorName | BackgroundColorName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic modifier names.
|
|
||||||
*/
|
|
||||||
export const modifierNames: readonly ModifierName[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic foreground color names.
|
|
||||||
*/
|
|
||||||
export const foregroundColorNames: readonly ForegroundColorName[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
Basic background color names.
|
|
||||||
*/
|
|
||||||
export const backgroundColorNames: readonly BackgroundColorName[];
|
|
||||||
|
|
||||||
/*
|
|
||||||
Basic color names. The combination of foreground and background color names.
|
|
||||||
*/
|
|
||||||
export const colorNames: readonly ColorName[];
|
|
||||||
|
|
||||||
declare const ansiStyles: {
|
|
||||||
readonly modifier: Modifier;
|
|
||||||
readonly color: ColorBase & ForegroundColor;
|
|
||||||
readonly bgColor: ColorBase & BackgroundColor;
|
|
||||||
readonly codes: ReadonlyMap<number, number>;
|
|
||||||
} & ForegroundColor & BackgroundColor & Modifier & ConvertColor;
|
|
||||||
|
|
||||||
export default ansiStyles;
|
|
223
backend/app/node_modules/ansi-styles/index.js
generated
vendored
223
backend/app/node_modules/ansi-styles/index.js
generated
vendored
@ -1,223 +0,0 @@
|
|||||||
const ANSI_BACKGROUND_OFFSET = 10;
|
|
||||||
|
|
||||||
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
|
||||||
|
|
||||||
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
|
||||||
|
|
||||||
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
||||||
|
|
||||||
const styles = {
|
|
||||||
modifier: {
|
|
||||||
reset: [0, 0],
|
|
||||||
// 21 isn't widely supported and 22 does the same thing
|
|
||||||
bold: [1, 22],
|
|
||||||
dim: [2, 22],
|
|
||||||
italic: [3, 23],
|
|
||||||
underline: [4, 24],
|
|
||||||
overline: [53, 55],
|
|
||||||
inverse: [7, 27],
|
|
||||||
hidden: [8, 28],
|
|
||||||
strikethrough: [9, 29],
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
black: [30, 39],
|
|
||||||
red: [31, 39],
|
|
||||||
green: [32, 39],
|
|
||||||
yellow: [33, 39],
|
|
||||||
blue: [34, 39],
|
|
||||||
magenta: [35, 39],
|
|
||||||
cyan: [36, 39],
|
|
||||||
white: [37, 39],
|
|
||||||
|
|
||||||
// Bright color
|
|
||||||
blackBright: [90, 39],
|
|
||||||
gray: [90, 39], // Alias of `blackBright`
|
|
||||||
grey: [90, 39], // Alias of `blackBright`
|
|
||||||
redBright: [91, 39],
|
|
||||||
greenBright: [92, 39],
|
|
||||||
yellowBright: [93, 39],
|
|
||||||
blueBright: [94, 39],
|
|
||||||
magentaBright: [95, 39],
|
|
||||||
cyanBright: [96, 39],
|
|
||||||
whiteBright: [97, 39],
|
|
||||||
},
|
|
||||||
bgColor: {
|
|
||||||
bgBlack: [40, 49],
|
|
||||||
bgRed: [41, 49],
|
|
||||||
bgGreen: [42, 49],
|
|
||||||
bgYellow: [43, 49],
|
|
||||||
bgBlue: [44, 49],
|
|
||||||
bgMagenta: [45, 49],
|
|
||||||
bgCyan: [46, 49],
|
|
||||||
bgWhite: [47, 49],
|
|
||||||
|
|
||||||
// Bright color
|
|
||||||
bgBlackBright: [100, 49],
|
|
||||||
bgGray: [100, 49], // Alias of `bgBlackBright`
|
|
||||||
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
|
||||||
bgRedBright: [101, 49],
|
|
||||||
bgGreenBright: [102, 49],
|
|
||||||
bgYellowBright: [103, 49],
|
|
||||||
bgBlueBright: [104, 49],
|
|
||||||
bgMagentaBright: [105, 49],
|
|
||||||
bgCyanBright: [106, 49],
|
|
||||||
bgWhiteBright: [107, 49],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export const modifierNames = Object.keys(styles.modifier);
|
|
||||||
export const foregroundColorNames = Object.keys(styles.color);
|
|
||||||
export const backgroundColorNames = Object.keys(styles.bgColor);
|
|
||||||
export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
||||||
|
|
||||||
function assembleStyles() {
|
|
||||||
const codes = new Map();
|
|
||||||
|
|
||||||
for (const [groupName, group] of Object.entries(styles)) {
|
|
||||||
for (const [styleName, style] of Object.entries(group)) {
|
|
||||||
styles[styleName] = {
|
|
||||||
open: `\u001B[${style[0]}m`,
|
|
||||||
close: `\u001B[${style[1]}m`,
|
|
||||||
};
|
|
||||||
|
|
||||||
group[styleName] = styles[styleName];
|
|
||||||
|
|
||||||
codes.set(style[0], style[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(styles, groupName, {
|
|
||||||
value: group,
|
|
||||||
enumerable: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.defineProperty(styles, 'codes', {
|
|
||||||
value: codes,
|
|
||||||
enumerable: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
styles.color.close = '\u001B[39m';
|
|
||||||
styles.bgColor.close = '\u001B[49m';
|
|
||||||
|
|
||||||
styles.color.ansi = wrapAnsi16();
|
|
||||||
styles.color.ansi256 = wrapAnsi256();
|
|
||||||
styles.color.ansi16m = wrapAnsi16m();
|
|
||||||
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
||||||
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
||||||
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
||||||
|
|
||||||
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
||||||
Object.defineProperties(styles, {
|
|
||||||
rgbToAnsi256: {
|
|
||||||
value: (red, green, blue) => {
|
|
||||||
// We use the extended greyscale palette here, with the exception of
|
|
||||||
// black and white. normal palette only has 4 greyscale shades.
|
|
||||||
if (red === green && green === blue) {
|
|
||||||
if (red < 8) {
|
|
||||||
return 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (red > 248) {
|
|
||||||
return 231;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.round(((red - 8) / 247) * 24) + 232;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 16
|
|
||||||
+ (36 * Math.round(red / 255 * 5))
|
|
||||||
+ (6 * Math.round(green / 255 * 5))
|
|
||||||
+ Math.round(blue / 255 * 5);
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
hexToRgb: {
|
|
||||||
value: hex => {
|
|
||||||
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
||||||
if (!matches) {
|
|
||||||
return [0, 0, 0];
|
|
||||||
}
|
|
||||||
|
|
||||||
let [colorString] = matches;
|
|
||||||
|
|
||||||
if (colorString.length === 3) {
|
|
||||||
colorString = [...colorString].map(character => character + character).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
const integer = Number.parseInt(colorString, 16);
|
|
||||||
|
|
||||||
return [
|
|
||||||
/* eslint-disable no-bitwise */
|
|
||||||
(integer >> 16) & 0xFF,
|
|
||||||
(integer >> 8) & 0xFF,
|
|
||||||
integer & 0xFF,
|
|
||||||
/* eslint-enable no-bitwise */
|
|
||||||
];
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
hexToAnsi256: {
|
|
||||||
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
ansi256ToAnsi: {
|
|
||||||
value: code => {
|
|
||||||
if (code < 8) {
|
|
||||||
return 30 + code;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (code < 16) {
|
|
||||||
return 90 + (code - 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
let red;
|
|
||||||
let green;
|
|
||||||
let blue;
|
|
||||||
|
|
||||||
if (code >= 232) {
|
|
||||||
red = (((code - 232) * 10) + 8) / 255;
|
|
||||||
green = red;
|
|
||||||
blue = red;
|
|
||||||
} else {
|
|
||||||
code -= 16;
|
|
||||||
|
|
||||||
const remainder = code % 36;
|
|
||||||
|
|
||||||
red = Math.floor(code / 36) / 5;
|
|
||||||
green = Math.floor(remainder / 6) / 5;
|
|
||||||
blue = (remainder % 6) / 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
const value = Math.max(red, green, blue) * 2;
|
|
||||||
|
|
||||||
if (value === 0) {
|
|
||||||
return 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-bitwise
|
|
||||||
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
|
||||||
|
|
||||||
if (value === 2) {
|
|
||||||
result += 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
rgbToAnsi: {
|
|
||||||
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
hexToAnsi: {
|
|
||||||
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
||||||
enumerable: false,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return styles;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ansiStyles = assembleStyles();
|
|
||||||
|
|
||||||
export default ansiStyles;
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user