diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..deed335 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.env diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 100644 index 679bd16..0000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" -else - exec node "$basedir/../acorn/bin/acorn" "$@" -fi diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd deleted file mode 100644 index a9324df..0000000 --- a/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/.bin/acorn.ps1 b/node_modules/.bin/acorn.ps1 deleted file mode 100644 index 6f6dcdd..0000000 --- a/node_modules/.bin/acorn.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/baseline-browser-mapping b/node_modules/.bin/baseline-browser-mapping deleted file mode 100644 index 7e4dd08..0000000 --- a/node_modules/.bin/baseline-browser-mapping +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@" -else - exec node "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@" -fi diff --git a/node_modules/.bin/baseline-browser-mapping.cmd b/node_modules/.bin/baseline-browser-mapping.cmd deleted file mode 100644 index 724ac4d..0000000 --- a/node_modules/.bin/baseline-browser-mapping.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\baseline-browser-mapping\dist\cli.cjs" %* diff --git a/node_modules/.bin/baseline-browser-mapping.ps1 b/node_modules/.bin/baseline-browser-mapping.ps1 deleted file mode 100644 index 049fe74..0000000 --- a/node_modules/.bin/baseline-browser-mapping.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args - } else { - & "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args - } else { - & "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/browserslist b/node_modules/.bin/browserslist deleted file mode 100644 index 60e71ad..0000000 --- a/node_modules/.bin/browserslist +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@" -else - exec node "$basedir/../browserslist/cli.js" "$@" -fi diff --git a/node_modules/.bin/browserslist.cmd b/node_modules/.bin/browserslist.cmd deleted file mode 100644 index f93c251..0000000 --- a/node_modules/.bin/browserslist.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %* diff --git a/node_modules/.bin/browserslist.ps1 b/node_modules/.bin/browserslist.ps1 deleted file mode 100644 index 01e10a0..0000000 --- a/node_modules/.bin/browserslist.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../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 diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint deleted file mode 100644 index d450ee1..0000000 --- a/node_modules/.bin/eslint +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" -else - exec node "$basedir/../eslint/bin/eslint.js" "$@" -fi diff --git a/node_modules/.bin/eslint.cmd b/node_modules/.bin/eslint.cmd deleted file mode 100644 index 032901a..0000000 --- a/node_modules/.bin/eslint.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %* diff --git a/node_modules/.bin/eslint.ps1 b/node_modules/.bin/eslint.ps1 deleted file mode 100644 index 155bec4..0000000 --- a/node_modules/.bin/eslint.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args - } else { - & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args - } else { - & "node$exe" "$basedir/../eslint/bin/eslint.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc deleted file mode 100644 index 879c413..0000000 --- a/node_modules/.bin/jsesc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" -else - exec node "$basedir/../jsesc/bin/jsesc" "$@" -fi diff --git a/node_modules/.bin/jsesc.cmd b/node_modules/.bin/jsesc.cmd deleted file mode 100644 index eb41110..0000000 --- a/node_modules/.bin/jsesc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %* diff --git a/node_modules/.bin/jsesc.ps1 b/node_modules/.bin/jsesc.ps1 deleted file mode 100644 index 6007e02..0000000 --- a/node_modules/.bin/jsesc.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args - } else { - & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args - } else { - & "node$exe" "$basedir/../jsesc/bin/jsesc" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 deleted file mode 100644 index abf72a4..0000000 --- a/node_modules/.bin/json5 +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" -else - exec node "$basedir/../json5/lib/cli.js" "$@" -fi diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd deleted file mode 100644 index 95c137f..0000000 --- a/node_modules/.bin/json5.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* diff --git a/node_modules/.bin/json5.ps1 b/node_modules/.bin/json5.ps1 deleted file mode 100644 index 8700ddb..0000000 --- a/node_modules/.bin/json5.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/nanoid b/node_modules/.bin/nanoid deleted file mode 100644 index 46220bd..0000000 --- a/node_modules/.bin/nanoid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@" -else - exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@" -fi diff --git a/node_modules/.bin/nanoid.cmd b/node_modules/.bin/nanoid.cmd deleted file mode 100644 index 9c40107..0000000 --- a/node_modules/.bin/nanoid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %* diff --git a/node_modules/.bin/nanoid.ps1 b/node_modules/.bin/nanoid.ps1 deleted file mode 100644 index d8a4d7a..0000000 --- a/node_modules/.bin/nanoid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../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 diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which deleted file mode 100644 index b49b03f..0000000 --- a/node_modules/.bin/node-which +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../which/bin/node-which" "$@" -else - exec node "$basedir/../which/bin/node-which" "$@" -fi diff --git a/node_modules/.bin/node-which.cmd b/node_modules/.bin/node-which.cmd deleted file mode 100644 index 8738aed..0000000 --- a/node_modules/.bin/node-which.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %* diff --git a/node_modules/.bin/node-which.ps1 b/node_modules/.bin/node-which.ps1 deleted file mode 100644 index cfb09e8..0000000 --- a/node_modules/.bin/node-which.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../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 diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser deleted file mode 100644 index 7696ad4..0000000 --- a/node_modules/.bin/parser +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" -else - exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" -fi diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd deleted file mode 100644 index 1ad5c81..0000000 --- a/node_modules/.bin/parser.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %* diff --git a/node_modules/.bin/parser.ps1 b/node_modules/.bin/parser.ps1 deleted file mode 100644 index 8926517..0000000 --- a/node_modules/.bin/parser.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } else { - & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/rolldown b/node_modules/.bin/rolldown deleted file mode 100644 index e7853ee..0000000 --- a/node_modules/.bin/rolldown +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../rolldown/bin/cli.mjs" "$@" -else - exec node "$basedir/../rolldown/bin/cli.mjs" "$@" -fi diff --git a/node_modules/.bin/rolldown.cmd b/node_modules/.bin/rolldown.cmd deleted file mode 100644 index 1882f3e..0000000 --- a/node_modules/.bin/rolldown.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rolldown\bin\cli.mjs" %* diff --git a/node_modules/.bin/rolldown.ps1 b/node_modules/.bin/rolldown.ps1 deleted file mode 100644 index 145fb8e..0000000 --- a/node_modules/.bin/rolldown.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../rolldown/bin/cli.mjs" $args - } else { - & "$basedir/node$exe" "$basedir/../rolldown/bin/cli.mjs" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../rolldown/bin/cli.mjs" $args - } else { - & "node$exe" "$basedir/../rolldown/bin/cli.mjs" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 100644 index 97c5327..0000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9..0000000 --- a/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717a..0000000 --- a/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/update-browserslist-db b/node_modules/.bin/update-browserslist-db deleted file mode 100644 index cced63c..0000000 --- a/node_modules/.bin/update-browserslist-db +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@" -else - exec node "$basedir/../update-browserslist-db/cli.js" "$@" -fi diff --git a/node_modules/.bin/update-browserslist-db.cmd b/node_modules/.bin/update-browserslist-db.cmd deleted file mode 100644 index 2e14905..0000000 --- a/node_modules/.bin/update-browserslist-db.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %* diff --git a/node_modules/.bin/update-browserslist-db.ps1 b/node_modules/.bin/update-browserslist-db.ps1 deleted file mode 100644 index 7abdf26..0000000 --- a/node_modules/.bin/update-browserslist-db.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../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 diff --git a/node_modules/.bin/vite b/node_modules/.bin/vite deleted file mode 100644 index 014463f..0000000 --- a/node_modules/.bin/vite +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@" -else - exec node "$basedir/../vite/bin/vite.js" "$@" -fi diff --git a/node_modules/.bin/vite.cmd b/node_modules/.bin/vite.cmd deleted file mode 100644 index f62e966..0000000 --- a/node_modules/.bin/vite.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %* diff --git a/node_modules/.bin/vite.ps1 b/node_modules/.bin/vite.ps1 deleted file mode 100644 index a7759bc..0000000 --- a/node_modules/.bin/vite.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args - } else { - & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../vite/bin/vite.js" $args - } else { - & "node$exe" "$basedir/../vite/bin/vite.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index 3a020ae..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,1872 +0,0 @@ -{ - "name": "01-fundamentals", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.29.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.3.tgz", - "integrity": "sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", - "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-module-transforms": "^7.28.6", - "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/traverse": "^7.29.0", - "@babel/types": "^7.29.0", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", - "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.0", - "@babel/types": "^7.29.0", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", - "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-validator-option": "^7.27.1", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", - "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.28.6", - "@babel/types": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", - "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.28.6", - "@babel/helper-validator-identifier": "^7.28.5", - "@babel/traverse": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", - "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz", - "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", - "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/parser": "^7.28.6", - "@babel/types": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", - "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz", - "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz", - "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@oxc-project/types": { - "version": "0.127.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.127.0.tgz", - "integrity": "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" - } - }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.0-rc.17", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz", - "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-rc.7", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.7.tgz", - "integrity": "sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/react": { - "version": "19.2.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", - "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^19.2.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.1.tgz", - "integrity": "sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rolldown/pluginutils": "1.0.0-rc.7" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", - "babel-plugin-react-compiler": "^1.0.0", - "vite": "^8.0.0" - }, - "peerDependenciesMeta": { - "@rolldown/plugin-babel": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - } - } - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/baseline-browser-mapping": { - "version": "2.10.27", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.27.tgz", - "integrity": "sha512-zEs/ufmZoUd7WftKpKyXaT6RFxpQ5Qm9xytKRHvJfxFV9DFJkZph9RvJ1LcOUi0Z1ZVijMte65JbILeV+8QQEA==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001791", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz", - "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.349", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.349.tgz", - "integrity": "sha512-QsWVGyRuY07Aqb234QytTfwd5d9AJlfNIQ5wIOl1L+PZDzI9d9+Fn0FRale/QYlFxt/bUnB0/nLd1jFPGxGK1A==", - "dev": true, - "license": "ISC" - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.3.0.tgz", - "integrity": "sha512-XbEXaRva5cF0ZQB8w6MluHA0kZZfV2DuCMJ3ozyEOHLwDpZX2Lmm/7Pp0xdJmI0GL1W05VH5VwIFHEm1Vcw2gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.5.5", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz", - "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.24.4", - "@babel/parser": "^7.24.4", - "hermes-parser": "^0.25.1", - "zod": "^3.25.0 || ^4.0.0", - "zod-validation-error": "^3.5.0 || ^4.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0" - } - }, - "node_modules/eslint-plugin-react-refresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.2.tgz", - "integrity": "sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "eslint": "^9 || ^10" - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true, - "license": "ISC" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", - "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hermes-estree": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", - "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==", - "dev": true, - "license": "MIT" - }, - "node_modules/hermes-parser": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz", - "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "hermes-estree": "0.25.1" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-releases": { - "version": "2.0.38", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", - "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.5.13", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.13.tgz", - "integrity": "sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/react": { - "version": "19.2.5", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz", - "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.2.5", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz", - "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.27.0" - }, - "peerDependencies": { - "react": "^19.2.5" - } - }, - "node_modules/rolldown": { - "version": "1.0.0-rc.17", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.17.tgz", - "integrity": "sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@oxc-project/types": "=0.127.0", - "@rolldown/pluginutils": "1.0.0-rc.17" - }, - "bin": { - "rolldown": "bin/cli.mjs" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.0-rc.17", - "@rolldown/binding-darwin-arm64": "1.0.0-rc.17", - "@rolldown/binding-darwin-x64": "1.0.0-rc.17", - "@rolldown/binding-freebsd-x64": "1.0.0-rc.17", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.17", - "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.17", - "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.17", - "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.17", - "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.17", - "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17", - "@rolldown/binding-linux-x64-musl": "1.0.0-rc.17", - "@rolldown/binding-openharmony-arm64": "1.0.0-rc.17", - "@rolldown/binding-wasm32-wasi": "1.0.0-rc.17", - "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.17", - "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.17" - } - }, - "node_modules/rolldown/node_modules/@rolldown/pluginutils": { - "version": "1.0.0-rc.17", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.17.tgz", - "integrity": "sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==", - "dev": true, - "license": "MIT" - }, - "node_modules/scheduler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/vite": { - "version": "8.0.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.10.tgz", - "integrity": "sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==", - "dev": true, - "license": "MIT", - "dependencies": { - "lightningcss": "^1.32.0", - "picomatch": "^4.0.4", - "postcss": "^8.5.10", - "rolldown": "1.0.0-rc.17", - "tinyglobby": "^0.2.16" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.1.0", - "esbuild": "^0.27.0 || ^0.28.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "@vitejs/devtools": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.2.tgz", - "integrity": "sha512-IynmDyxsEsb9RKzO3J9+4SxXnl2FTFSzNBaKKaMV6tsSk0rw9gYw9gs+JFCq/qk2LCZ78KDwyj+Z289TijSkUw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-validation-error": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz", - "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } - } - } -} diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/code-frame/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md deleted file mode 100644 index 7160755..0000000 --- a/node_modules/@babel/code-frame/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/code-frame - -> Generate errors that contain a code frame that point to source locations. - -See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/code-frame -``` - -or using yarn: - -```sh -yarn add @babel/code-frame --dev -``` diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js deleted file mode 100644 index 9c5db40..0000000 --- a/node_modules/@babel/code-frame/lib/index.js +++ /dev/null @@ -1,217 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var picocolors = require('picocolors'); -var jsTokens = require('js-tokens'); -var helperValidatorIdentifier = require('@babel/helper-validator-identifier'); - -function isColorSupported() { - return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported - ); -} -const compose = (f, g) => v => f(g(v)); -function buildDefs(colors) { - return { - keyword: colors.cyan, - capitalized: colors.yellow, - jsxIdentifier: colors.yellow, - punctuator: colors.yellow, - number: colors.magenta, - string: colors.green, - regex: colors.magenta, - comment: colors.gray, - invalid: compose(compose(colors.white, colors.bgRed), colors.bold), - gutter: colors.gray, - marker: compose(colors.red, colors.bold), - message: compose(colors.red, colors.bold), - reset: colors.reset - }; -} -const defsOn = buildDefs(picocolors.createColors(true)); -const defsOff = buildDefs(picocolors.createColors(false)); -function getDefs(enabled) { - return enabled ? defsOn : defsOff; -} - -const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); -const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; -const BRACKET = /^[()[\]{}]$/; -let tokenize; -const JSX_TAG = /^[a-z][\w-]*$/i; -const getTokenType = function (token, offset, text) { - if (token.type === "name") { - const tokenValue = token.value; - if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) { - return "keyword"; - } - if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === " defs[type](str)).join("\n"); - } else { - highlighted += value; - } - } - return highlighted; -} - -let deprecationWarningShown = false; -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; -function getMarkerLines(loc, source, opts, startLineBaseZero) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line - startLineBaseZero; - const startColumn = startLoc.column; - const endLine = endLoc.line - startLineBaseZero; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - if (startLine === -1) { - start = 0; - } - if (endLine === -1) { - end = source.length; - } - const lineDiff = endLine - startLine; - const markerLines = {}; - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - return { - start, - end, - markerLines - }; -} -function codeFrameColumns(rawLines, loc, opts = {}) { - const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; - const startLineBaseZero = (opts.startLine || 1) - 1; - const defs = getDefs(shouldHighlight); - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts, startLineBaseZero); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end + startLineBaseZero).length; - const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; - let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} |`; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - if (hasMarker) { - let markerLine = ""; - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); - if (lastMarkerLine && opts.message) { - markerLine += " " + defs.message(opts.message); - } - } - return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); - } else { - return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; - } - }).join("\n"); - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; - } - if (shouldHighlight) { - return defs.reset(frame); - } else { - return frame; - } -} -function index (rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); -} - -exports.codeFrameColumns = codeFrameColumns; -exports.default = index; -exports.highlight = highlight; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/code-frame/lib/index.js.map b/node_modules/@babel/code-frame/lib/index.js.map deleted file mode 100644 index 6b85ae4..0000000 --- a/node_modules/@babel/code-frame/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/defs.ts","../src/highlight.ts","../src/index.ts"],"sourcesContent":["import picocolors, { createColors } from \"picocolors\";\nimport type { Colors, Formatter } from \"picocolors/types\";\n\nexport function isColorSupported() {\n return (\n // See https://github.com/alexeyraspopov/picocolors/issues/62\n typeof process === \"object\" &&\n (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\")\n ? false\n : picocolors.isColorSupported\n );\n}\n\nexport type InternalTokenType =\n | \"keyword\"\n | \"capitalized\"\n | \"jsxIdentifier\"\n | \"punctuator\"\n | \"number\"\n | \"string\"\n | \"regex\"\n | \"comment\"\n | \"invalid\";\n\ntype UITokens = \"gutter\" | \"marker\" | \"message\";\n\nexport type Defs = Record;\n\nconst compose: (f: (gv: U) => V, g: (v: T) => U) => (v: T) => V =\n (f, g) => v =>\n f(g(v));\n\n/**\n * Styles for token types.\n */\nfunction buildDefs(colors: Colors): Defs {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n\n reset: colors.reset,\n };\n}\n\nconst defsOn = buildDefs(createColors(true));\nconst defsOff = buildDefs(createColors(false));\n\nexport function getDefs(enabled: boolean): Defs {\n return enabled ? defsOn : defsOff;\n}\n","import type { Token as JSToken, JSXToken } from \"js-tokens\";\nimport jsTokens from \"js-tokens\";\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nimport {\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nimport { getDefs, type InternalTokenType } from \"./defs.ts\";\n\n/**\n * Names that are always allowed as identifiers, but also appear as keywords\n * within certain syntactic productions.\n *\n * https://tc39.es/ecma262/#sec-keywords-and-reserved-words\n *\n * `target` has been omitted since it is very likely going to be a false\n * positive.\n */\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\ntype Token = {\n type: InternalTokenType | \"uncolored\";\n value: string;\n};\n\n/**\n * RegExp to test for newlines in terminal.\n */\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * RegExp to test for the three types of brackets.\n */\nconst BRACKET = /^[()[\\]{}]$/;\n\nlet tokenize: (\n text: string,\n) => Generator<{ type: InternalTokenType | \"uncolored\"; value: string }>;\n\nif (process.env.BABEL_8_BREAKING) {\n /**\n * Get the type of token, specifying punctuator type.\n */\n const getTokenType = function (\n token: JSToken | JSXToken,\n ): InternalTokenType | \"uncolored\" {\n if (token.type === \"IdentifierName\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n const firstChar = tokenValue.charCodeAt(0);\n if (firstChar < 128) {\n // ASCII characters\n if (\n firstChar >= charCodes.uppercaseA &&\n firstChar <= charCodes.uppercaseZ\n ) {\n return \"capitalized\";\n }\n } else {\n const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));\n if (firstChar !== firstChar.toLowerCase()) {\n return \"capitalized\";\n }\n }\n }\n\n if (token.type === \"Punctuator\" && BRACKET.test(token.value)) {\n return \"uncolored\";\n }\n\n if (token.type === \"Invalid\" && token.value === \"@\") {\n return \"punctuator\";\n }\n\n switch (token.type) {\n case \"NumericLiteral\":\n return \"number\";\n\n case \"StringLiteral\":\n case \"JSXString\":\n case \"NoSubstitutionTemplate\":\n return \"string\";\n\n case \"RegularExpressionLiteral\":\n return \"regex\";\n\n case \"Punctuator\":\n case \"JSXPunctuator\":\n return \"punctuator\";\n\n case \"MultiLineComment\":\n case \"SingleLineComment\":\n return \"comment\";\n\n case \"Invalid\":\n case \"JSXInvalid\":\n return \"invalid\";\n\n case \"JSXIdentifier\":\n return \"jsxIdentifier\";\n\n default:\n return \"uncolored\";\n }\n };\n\n /**\n * Turn a string of JS into an array of objects.\n */\n tokenize = function* (text: string): Generator {\n for (const token of jsTokens(text, { jsx: true })) {\n switch (token.type) {\n case \"TemplateHead\":\n yield { type: \"string\", value: token.value.slice(0, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateMiddle\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateTail\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1) };\n break;\n\n default:\n yield {\n type: getTokenType(token),\n value: token.value,\n };\n }\n }\n };\n} else {\n /**\n * RegExp to test for what seems to be a JSX tag name.\n */\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n // The token here is defined in js-tokens@4. However we don't bother\n // typing it since the whole block will be removed in Babel 8\n const getTokenType = function (token: any, offset: number, text: string) {\n if (token.type === \"name\") {\n const tokenValue = token.value;\n if (\n isKeyword(tokenValue) ||\n isStrictReservedWord(tokenValue, true) ||\n sometimesKeywords.has(tokenValue)\n ) {\n return \"keyword\";\n }\n\n if (\n JSX_TAG.test(tokenValue) &&\n (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \" defs[type as InternalTokenType](str))\n .join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n","import { getDefs, isColorSupported } from \"./defs.ts\";\nimport { highlight } from \"./highlight.ts\";\n\nexport { highlight };\n\nlet deprecationWarningShown = false;\n\ntype Location = {\n column: number;\n line: number;\n};\n\ntype NodeLocation = {\n end?: Location;\n start: Location;\n};\n\nexport interface Options {\n /** Syntax highlight the code as JavaScript for terminals. default: false */\n highlightCode?: boolean;\n /** The number of lines to show above the error. default: 2 */\n linesAbove?: number;\n /** The number of lines to show below the error. default: 3 */\n linesBelow?: number;\n /** The line number corresponding to the first line in `rawLines`. default: 1 */\n startLine?: number;\n /**\n * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n * overrides highlightCode.\n * default: false\n */\n forceColor?: boolean;\n /**\n * Pass in a string to be displayed inline (if possible) next to the\n * highlighted location in the code. If it can't be positioned inline,\n * it will be placed above the code frame.\n * default: nothing\n */\n message?: string;\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * Extract what lines should be marked and highlighted.\n */\n\ntype MarkerLines = Record;\n\nfunction getMarkerLines(\n loc: NodeLocation,\n source: string[],\n opts: Options,\n startLineBaseZero: number,\n): {\n start: number;\n end: number;\n markerLines: MarkerLines;\n} {\n const startLoc: Location = {\n column: 0,\n line: -1,\n ...loc.start,\n };\n const endLoc: Location = {\n ...startLoc,\n ...loc.end,\n };\n const { linesAbove = 2, linesBelow = 3 } = opts || {};\n const startLine = startLoc.line - startLineBaseZero;\n const startColumn = startLoc.column;\n const endLine = endLoc.line - startLineBaseZero;\n const endColumn = endLoc.column;\n\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines: MarkerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return { start, end, markerLines };\n}\n\nexport function codeFrameColumns(\n rawLines: string,\n loc: NodeLocation,\n opts: Options = {},\n): string {\n const shouldHighlight =\n opts.forceColor || (isColorSupported() && opts.highlightCode);\n const startLineBaseZero = (opts.startLine || 1) - 1;\n const defs = getDefs(shouldHighlight);\n\n const lines = rawLines.split(NEWLINE);\n const { start, end, markerLines } = getMarkerLines(\n loc,\n lines,\n opts,\n startLineBaseZero,\n );\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n\n const numberMaxWidth = String(end + startLineBaseZero).length;\n\n const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;\n\n let frame = highlightedLines\n .split(NEWLINE, end)\n .slice(start, end)\n .map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number + startLineBaseZero}`.slice(\n -numberMaxWidth,\n );\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line\n .slice(0, Math.max(hasMarker[0] - 1, 0))\n .replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n\n markerLine = [\n \"\\n \",\n defs.gutter(gutter.replace(/\\d/g, \" \")),\n \" \",\n markerSpacing,\n defs.marker(\"^\").repeat(numberOfMarkers),\n ].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + defs.message(opts.message);\n }\n }\n return [\n defs.marker(\">\"),\n defs.gutter(gutter),\n line.length > 0 ? ` ${line}` : \"\",\n markerLine,\n ].join(\"\");\n } else {\n return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n })\n .join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (shouldHighlight) {\n return defs.reset(frame);\n } else {\n return frame;\n }\n}\n\n/**\n * Create a code frame, adding line numbers, code highlighting, and pointing to a given position.\n */\n\nexport default function (\n rawLines: string,\n lineNumber: number,\n colNumber?: number | null,\n opts: Options = {},\n): string {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n\n const message =\n \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n // A string is directly supplied to emitWarning, because when supplying an\n // Error object node throws in the tests because of different contexts\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n\n const location: NodeLocation = {\n start: { column: colNumber, line: lineNumber },\n };\n\n return codeFrameColumns(rawLines, location, opts);\n}\n"],"names":["isColorSupported","process","env","FORCE_COLOR","picocolors","compose","f","g","v","buildDefs","colors","keyword","cyan","capitalized","yellow","jsxIdentifier","punctuator","number","magenta","string","green","regex","comment","gray","invalid","white","bgRed","bold","gutter","marker","red","message","reset","defsOn","createColors","defsOff","getDefs","enabled","sometimesKeywords","Set","NEWLINE","BRACKET","tokenize","JSX_TAG","getTokenType","token","offset","text","type","tokenValue","value","isKeyword","isStrictReservedWord","has","test","slice","firstChar","String","fromCodePoint","codePointAt","toLowerCase","match","jsTokens","default","exec","matchToToken","index","highlight","defs","highlighted","split","map","str","join","deprecationWarningShown","getMarkerLines","loc","source","opts","startLineBaseZero","startLoc","Object","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","i","lineNumber","sourceLength","codeFrameColumns","rawLines","shouldHighlight","forceColor","highlightCode","lines","hasColumns","numberMaxWidth","highlightedLines","frame","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","colNumber","emitWarning","deprecationError","Error","name","console","warn","location"],"mappings":";;;;;;;;AAGO,SAASA,gBAAgBA,GAAG;EACjC,QAEE,OAAOC,OAAO,KAAK,QAAQ,KACxBA,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,GAAG,IAAIF,OAAO,CAACC,GAAG,CAACC,WAAW,KAAK,OAAO,CAAC,GACtE,KAAK,GACLC,UAAU,CAACJ,gBAAAA;AAAgB,IAAA;AAEnC,CAAA;AAiBA,MAAMK,OAAkE,GACtEA,CAACC,CAAC,EAAEC,CAAC,KAAKC,CAAC,IACTF,CAAC,CAACC,CAAC,CAACC,CAAC,CAAC,CAAC,CAAA;AAKX,SAASC,SAASA,CAACC,MAAc,EAAQ;EACvC,OAAO;IACLC,OAAO,EAAED,MAAM,CAACE,IAAI;IACpBC,WAAW,EAAEH,MAAM,CAACI,MAAM;IAC1BC,aAAa,EAAEL,MAAM,CAACI,MAAM;IAC5BE,UAAU,EAAEN,MAAM,CAACI,MAAM;IACzBG,MAAM,EAAEP,MAAM,CAACQ,OAAO;IACtBC,MAAM,EAAET,MAAM,CAACU,KAAK;IACpBC,KAAK,EAAEX,MAAM,CAACQ,OAAO;IACrBI,OAAO,EAAEZ,MAAM,CAACa,IAAI;AACpBC,IAA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,QAAsB,GAAG;AAC7B7C,IAAAA,KAAK,EAAE;AAAEF,MAAAA,MAAM,EAAEwC,SAAS;AAAEvC,MAAAA,IAAI,EAAEiB,UAAAA;AAAW,KAAA;GAC9C,CAAA;AAED,EAAA,OAAOE,gBAAgB,CAACC,QAAQ,EAAE0B,QAAQ,EAAEpD,IAAI,CAAC,CAAA;AACnD;;;;;;"} \ No newline at end of file diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json deleted file mode 100644 index d78a947..0000000 --- a/node_modules/@babel/code-frame/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@babel/code-frame", - "version": "7.29.0", - "description": "Generate errors that contain a code frame that point to source locations.", - "author": "The Babel Team (https://babel.dev/team)", - "homepage": "https://babel.dev/docs/en/next/babel-code-frame", - "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-code-frame" - }, - "main": "./lib/index.js", - "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "devDependencies": { - "charcodes": "^0.2.0", - "import-meta-resolve": "^4.1.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/compat-data/LICENSE b/node_modules/@babel/compat-data/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/compat-data/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/compat-data/README.md b/node_modules/@babel/compat-data/README.md deleted file mode 100644 index c191898..0000000 --- a/node_modules/@babel/compat-data/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/compat-data - -> The compat-data to determine required Babel plugins - -See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information. - -## Install - -Using npm: - -```sh -npm install --save @babel/compat-data -``` - -or using yarn: - -```sh -yarn add @babel/compat-data -``` diff --git a/node_modules/@babel/compat-data/corejs2-built-ins.js b/node_modules/@babel/compat-data/corejs2-built-ins.js deleted file mode 100644 index ed19e0b..0000000 --- a/node_modules/@babel/compat-data/corejs2-built-ins.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2 -module.exports = require("./data/corejs2-built-ins.json"); diff --git a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js deleted file mode 100644 index 7909b8c..0000000 --- a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3 -module.exports = require("./data/corejs3-shipped-proposals.json"); diff --git a/node_modules/@babel/compat-data/data/corejs2-built-ins.json b/node_modules/@babel/compat-data/data/corejs2-built-ins.json deleted file mode 100644 index c7fd188..0000000 --- a/node_modules/@babel/compat-data/data/corejs2-built-ins.json +++ /dev/null @@ -1,2120 +0,0 @@ -{ - "es6.array.copy-within": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "32", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.31" - }, - "es6.array.every": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.fill": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "31", - "safari": "7.1", - "node": "4", - "deno": "1", - "ios": "8", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.31" - }, - "es6.array.filter": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.array.find": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "4", - "deno": "1", - "ios": "8", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.31" - }, - "es6.array.find-index": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "4", - "deno": "1", - "ios": "8", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.31" - }, - "es7.array.flat-map": { - "chrome": "69", - "opera": "56", - "edge": "79", - "firefox": "62", - "safari": "12", - "node": "11", - "deno": "1", - "ios": "12", - "samsung": "10", - "rhino": "1.7.15", - "opera_mobile": "48", - "electron": "4.0" - }, - "es6.array.for-each": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.from": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "36", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "41", - "electron": "1.2" - }, - "es7.array.includes": { - "chrome": "47", - "opera": "34", - "edge": "14", - "firefox": "102", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "34", - "electron": "0.36" - }, - "es6.array.index-of": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.is-array": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.iterator": { - "chrome": "66", - "opera": "53", - "edge": "12", - "firefox": "60", - "safari": "9", - "node": "10", - "deno": "1", - "ios": "9", - "samsung": "9", - "rhino": "1.7.13", - "opera_mobile": "47", - "electron": "3.0" - }, - "es6.array.last-index-of": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.map": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.array.of": { - "chrome": "45", - "opera": "32", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.31" - }, - "es6.array.reduce": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.reduce-right": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.slice": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.array.some": { - "chrome": "5", - "opera": "10.10", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.array.sort": { - "chrome": "63", - "opera": "50", - "edge": "12", - "firefox": "5", - "safari": "12", - "node": "10", - "deno": "1", - "ie": "9", - "ios": "12", - "samsung": "8", - "rhino": "1.7.13", - "opera_mobile": "46", - "electron": "3.0" - }, - "es6.array.species": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.date.now": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.date.to-iso-string": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3.5", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.date.to-json": { - "chrome": "5", - "opera": "12.10", - "edge": "12", - "firefox": "4", - "safari": "10", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "10", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12.1", - "electron": "0.20" - }, - "es6.date.to-primitive": { - "chrome": "47", - "opera": "34", - "edge": "15", - "firefox": "44", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "34", - "electron": "0.36" - }, - "es6.date.to-string": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.4", - "deno": "1", - "ie": "10", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.function.bind": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "5.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "es6.function.has-instance": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "50", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.function.name": { - "chrome": "5", - "opera": "10.50", - "edge": "14", - "firefox": "2", - "safari": "4", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es6.map": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.math.acosh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.asinh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.atanh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.cbrt": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.clz32": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.cosh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.expm1": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.fround": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "26", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.hypot": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "27", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.imul": { - "chrome": "30", - "opera": "17", - "edge": "12", - "firefox": "23", - "safari": "7", - "node": "0.12", - "deno": "1", - "android": "4.4", - "ios": "7", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "18", - "electron": "0.20" - }, - "es6.math.log1p": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.log10": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.log2": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.sign": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.sinh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.tanh": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.math.trunc": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "25", - "safari": "7.1", - "node": "0.12", - "deno": "1", - "ios": "8", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.number.constructor": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.number.epsilon": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.14", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.is-finite": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "16", - "safari": "9", - "node": "0.8", - "deno": "1", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "rhino": "1.7.13", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.number.is-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "16", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.is-nan": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "15", - "safari": "9", - "node": "0.8", - "deno": "1", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "rhino": "1.7.13", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.number.is-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "32", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.max-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.min-safe-integer": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.parse-float": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.14", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.number.parse-int": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "25", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "2", - "rhino": "1.7.14", - "opera_mobile": "21", - "electron": "0.20" - }, - "es6.object.assign": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "36", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.object.create": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "es7.object.define-getter": { - "chrome": "62", - "opera": "49", - "edge": "16", - "firefox": "48", - "safari": "9", - "node": "8.10", - "deno": "1", - "ios": "9", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es7.object.define-setter": { - "chrome": "62", - "opera": "49", - "edge": "16", - "firefox": "48", - "safari": "9", - "node": "8.10", - "deno": "1", - "ios": "9", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es6.object.define-property": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "5.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "es6.object.define-properties": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "4", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "es7.object.entries": { - "chrome": "54", - "opera": "41", - "edge": "14", - "firefox": "47", - "safari": "10.1", - "node": "7", - "deno": "1", - "ios": "10.3", - "samsung": "6", - "rhino": "1.7.14", - "opera_mobile": "41", - "electron": "1.4" - }, - "es6.object.freeze": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.get-own-property-descriptor": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es7.object.get-own-property-descriptors": { - "chrome": "54", - "opera": "41", - "edge": "15", - "firefox": "50", - "safari": "10.1", - "node": "7", - "deno": "1", - "ios": "10.3", - "samsung": "6", - "rhino": "1.8", - "opera_mobile": "41", - "electron": "1.4" - }, - "es6.object.get-own-property-names": { - "chrome": "40", - "opera": "27", - "edge": "12", - "firefox": "33", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "27", - "electron": "0.21" - }, - "es6.object.get-prototype-of": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es7.object.lookup-getter": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "36", - "safari": "9", - "node": "8.10", - "deno": "1", - "ios": "9", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es7.object.lookup-setter": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "36", - "safari": "9", - "node": "8.10", - "deno": "1", - "ios": "9", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es6.object.prevent-extensions": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.to-string": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "51", - "safari": "10", - "node": "8", - "deno": "1", - "ios": "10", - "samsung": "7", - "rhino": "1.9", - "opera_mobile": "43", - "electron": "1.7" - }, - "es6.object.is": { - "chrome": "19", - "opera": "15", - "edge": "12", - "firefox": "22", - "safari": "9", - "node": "0.8", - "deno": "1", - "android": "4.1", - "ios": "9", - "samsung": "1.5", - "rhino": "1.7.13", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.object.is-frozen": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.is-sealed": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.is-extensible": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.keys": { - "chrome": "40", - "opera": "27", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "27", - "electron": "0.21" - }, - "es6.object.seal": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "35", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.13", - "opera_mobile": "32", - "electron": "0.30" - }, - "es6.object.set-prototype-of": { - "chrome": "34", - "opera": "21", - "edge": "12", - "firefox": "31", - "safari": "9", - "node": "0.12", - "deno": "1", - "ie": "11", - "ios": "9", - "samsung": "2", - "rhino": "1.7.13", - "opera_mobile": "21", - "electron": "0.20" - }, - "es7.object.values": { - "chrome": "54", - "opera": "41", - "edge": "14", - "firefox": "47", - "safari": "10.1", - "node": "7", - "deno": "1", - "ios": "10.3", - "samsung": "6", - "rhino": "1.7.14", - "opera_mobile": "41", - "electron": "1.4" - }, - "es6.promise": { - "chrome": "51", - "opera": "38", - "edge": "14", - "firefox": "45", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "41", - "electron": "1.2" - }, - "es7.promise.finally": { - "chrome": "63", - "opera": "50", - "edge": "18", - "firefox": "58", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es6.reflect.apply": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.construct": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "49", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.define-property": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.delete-property": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.get": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.get-own-property-descriptor": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.get-prototype-of": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.has": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.is-extensible": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.own-keys": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.prevent-extensions": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.set": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.reflect.set-prototype-of": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "42", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.regexp.constructor": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "40", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.regexp.flags": { - "chrome": "49", - "opera": "36", - "edge": "79", - "firefox": "37", - "safari": "9", - "node": "6", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "36", - "electron": "0.37" - }, - "es6.regexp.match": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.regexp.replace": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.regexp.split": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.regexp.search": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "49", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.regexp.to-string": { - "chrome": "50", - "opera": "37", - "edge": "79", - "firefox": "39", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "37", - "electron": "1.1" - }, - "es6.set": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.symbol": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "51", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "es7.symbol.async-iterator": { - "chrome": "63", - "opera": "50", - "edge": "79", - "firefox": "57", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "es6.string.anchor": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.big": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.blink": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.bold": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.code-point-at": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.ends-with": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.fixed": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.fontcolor": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.fontsize": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.from-code-point": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.includes": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "40", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.italics": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.iterator": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "0.12", - "deno": "1", - "ios": "9", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" - }, - "es6.string.link": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es7.string.pad-start": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "48", - "safari": "10", - "node": "8", - "deno": "1", - "ios": "10", - "samsung": "7", - "rhino": "1.7.13", - "opera_mobile": "43", - "electron": "1.7" - }, - "es7.string.pad-end": { - "chrome": "57", - "opera": "44", - "edge": "15", - "firefox": "48", - "safari": "10", - "node": "8", - "deno": "1", - "ios": "10", - "samsung": "7", - "rhino": "1.7.13", - "opera_mobile": "43", - "electron": "1.7" - }, - "es6.string.raw": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "34", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.14", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.repeat": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "24", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.small": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.starts-with": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "29", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.7.13", - "opera_mobile": "28", - "electron": "0.21" - }, - "es6.string.strike": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.sub": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.sup": { - "chrome": "5", - "opera": "15", - "edge": "12", - "firefox": "17", - "safari": "6", - "node": "0.4", - "deno": "1", - "android": "4", - "ios": "7", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.14", - "opera_mobile": "14", - "electron": "0.20" - }, - "es6.string.trim": { - "chrome": "5", - "opera": "10.50", - "edge": "12", - "firefox": "3.5", - "safari": "4", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "es7.string.trim-left": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "61", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "9", - "rhino": "1.7.13", - "opera_mobile": "47", - "electron": "3.0" - }, - "es7.string.trim-right": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "61", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "9", - "rhino": "1.7.13", - "opera_mobile": "47", - "electron": "3.0" - }, - "es6.typed.array-buffer": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.data-view": { - "chrome": "5", - "opera": "12", - "edge": "12", - "firefox": "15", - "safari": "5.1", - "node": "0.4", - "deno": "1", - "ie": "10", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "es6.typed.int8-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.uint8-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.uint8-clamped-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.int16-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.uint16-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.int32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.uint32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.float32-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.typed.float64-array": { - "chrome": "51", - "opera": "38", - "edge": "13", - "firefox": "48", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.weak-map": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "9", - "node": "6.5", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "41", - "electron": "1.2" - }, - "es6.weak-set": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "9", - "node": "6.5", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "41", - "electron": "1.2" - } -} diff --git a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json deleted file mode 100644 index d03b698..0000000 --- a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "esnext.promise.all-settled", - "esnext.string.match-all", - "esnext.global-this" -] diff --git a/node_modules/@babel/compat-data/data/native-modules.json b/node_modules/@babel/compat-data/data/native-modules.json deleted file mode 100644 index 2328d21..0000000 --- a/node_modules/@babel/compat-data/data/native-modules.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "es6.module": { - "chrome": "61", - "and_chr": "61", - "edge": "16", - "firefox": "60", - "and_ff": "60", - "node": "13.2.0", - "opera": "48", - "op_mob": "45", - "safari": "10.1", - "ios": "10.3", - "samsung": "8.2", - "android": "61", - "electron": "2.0", - "ios_saf": "10.3" - } -} diff --git a/node_modules/@babel/compat-data/data/overlapping-plugins.json b/node_modules/@babel/compat-data/data/overlapping-plugins.json deleted file mode 100644 index c0df4bd..0000000 --- a/node_modules/@babel/compat-data/data/overlapping-plugins.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "transform-async-to-generator": [ - "bugfix/transform-async-arrows-in-class" - ], - "transform-parameters": [ - "bugfix/transform-edge-default-parameters", - "bugfix/transform-safari-id-destructuring-collision-in-function-expression" - ], - "transform-function-name": [ - "bugfix/transform-edge-function-name" - ], - "transform-block-scoping": [ - "bugfix/transform-safari-block-shadowing", - "bugfix/transform-safari-for-shadowing" - ], - "transform-destructuring": [ - "bugfix/transform-safari-rest-destructuring-rhs-array" - ], - "transform-template-literals": [ - "bugfix/transform-tagged-template-caching" - ], - "transform-optional-chaining": [ - "bugfix/transform-v8-spread-parameters-in-optional-chaining" - ], - "proposal-optional-chaining": [ - "bugfix/transform-v8-spread-parameters-in-optional-chaining" - ], - "transform-class-properties": [ - "bugfix/transform-v8-static-class-fields-redefine-readonly", - "bugfix/transform-firefox-class-in-computed-class-key", - "bugfix/transform-safari-class-field-initializer-scope" - ], - "proposal-class-properties": [ - "bugfix/transform-v8-static-class-fields-redefine-readonly", - "bugfix/transform-firefox-class-in-computed-class-key", - "bugfix/transform-safari-class-field-initializer-scope" - ] -} diff --git a/node_modules/@babel/compat-data/data/plugin-bugfixes.json b/node_modules/@babel/compat-data/data/plugin-bugfixes.json deleted file mode 100644 index 7b6589a..0000000 --- a/node_modules/@babel/compat-data/data/plugin-bugfixes.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "bugfix/transform-async-arrows-in-class": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "11", - "node": "7.6", - "deno": "1", - "ios": "11", - "samsung": "6", - "opera_mobile": "42", - "electron": "1.6" - }, - "bugfix/transform-edge-default-parameters": { - "chrome": "49", - "opera": "36", - "edge": "18", - "firefox": "52", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "bugfix/transform-edge-function-name": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.9", - "opera_mobile": "41", - "electron": "1.2" - }, - "bugfix/transform-safari-block-shadowing": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "44", - "safari": "11", - "node": "6", - "deno": "1", - "ie": "11", - "ios": "11", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "bugfix/transform-safari-for-shadowing": { - "chrome": "49", - "opera": "36", - "edge": "12", - "firefox": "4", - "safari": "11", - "node": "6", - "deno": "1", - "ie": "11", - "ios": "11", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "36", - "electron": "0.37" - }, - "bugfix/transform-safari-id-destructuring-collision-in-function-expression": { - "chrome": "49", - "opera": "36", - "edge": "14", - "firefox": "2", - "safari": "16.3", - "node": "6", - "deno": "1", - "ios": "16.3", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "bugfix/transform-safari-rest-destructuring-rhs-array": { - "chrome": "49", - "opera": "36", - "edge": "14", - "firefox": "34", - "safari": "14.1", - "node": "6", - "deno": "1", - "ios": "14.5", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "bugfix/transform-tagged-template-caching": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "34", - "safari": "13", - "node": "4", - "deno": "1", - "ios": "13", - "samsung": "3.4", - "rhino": "1.7.14", - "opera_mobile": "28", - "electron": "0.21" - }, - "bugfix/transform-v8-spread-parameters-in-optional-chaining": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "74", - "safari": "13.1", - "node": "16.9", - "deno": "1.9", - "ios": "13.4", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - }, - "transform-optional-chaining": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "74", - "safari": "13.1", - "node": "14", - "deno": "1", - "ios": "13.4", - "samsung": "13", - "rhino": "1.8", - "opera_mobile": "57", - "electron": "8.0" - }, - "proposal-optional-chaining": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "74", - "safari": "13.1", - "node": "14", - "deno": "1", - "ios": "13.4", - "samsung": "13", - "rhino": "1.8", - "opera_mobile": "57", - "electron": "8.0" - }, - "transform-parameters": { - "chrome": "49", - "opera": "36", - "edge": "15", - "firefox": "52", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "transform-async-to-generator": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "10.1", - "node": "7.6", - "deno": "1", - "ios": "10.3", - "samsung": "6", - "opera_mobile": "42", - "electron": "1.6" - }, - "transform-template-literals": { - "chrome": "41", - "opera": "28", - "edge": "13", - "firefox": "34", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "rhino": "1.9", - "opera_mobile": "28", - "electron": "0.21" - }, - "transform-function-name": { - "chrome": "51", - "opera": "38", - "edge": "14", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "transform-destructuring": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "transform-block-scoping": { - "chrome": "50", - "opera": "37", - "edge": "14", - "firefox": "53", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" - } -} diff --git a/node_modules/@babel/compat-data/data/plugins.json b/node_modules/@babel/compat-data/data/plugins.json deleted file mode 100644 index 81e6de4..0000000 --- a/node_modules/@babel/compat-data/data/plugins.json +++ /dev/null @@ -1,843 +0,0 @@ -{ - "transform-explicit-resource-management": { - "chrome": "141", - "edge": "141", - "firefox": "141", - "node": "25", - "electron": "39.0" - }, - "transform-duplicate-named-capturing-groups-regex": { - "chrome": "126", - "opera": "112", - "edge": "126", - "firefox": "129", - "safari": "17.4", - "node": "23", - "ios": "17.4", - "rhino": "1.9", - "electron": "31.0" - }, - "transform-regexp-modifiers": { - "chrome": "125", - "opera": "111", - "edge": "125", - "firefox": "132", - "node": "23", - "samsung": "27", - "electron": "31.0" - }, - "transform-unicode-sets-regex": { - "chrome": "112", - "opera": "98", - "edge": "112", - "firefox": "116", - "safari": "17", - "node": "20", - "deno": "1.32", - "ios": "17", - "samsung": "23", - "opera_mobile": "75", - "electron": "24.0" - }, - "bugfix/transform-v8-static-class-fields-redefine-readonly": { - "chrome": "98", - "opera": "84", - "edge": "98", - "firefox": "75", - "safari": "15", - "node": "12", - "deno": "1.18", - "ios": "15", - "samsung": "11", - "opera_mobile": "52", - "electron": "17.0" - }, - "bugfix/transform-firefox-class-in-computed-class-key": { - "chrome": "74", - "opera": "62", - "edge": "79", - "firefox": "126", - "safari": "16", - "node": "12", - "deno": "1", - "ios": "16", - "samsung": "11", - "opera_mobile": "53", - "electron": "6.0" - }, - "bugfix/transform-safari-class-field-initializer-scope": { - "chrome": "74", - "opera": "62", - "edge": "79", - "firefox": "69", - "safari": "16", - "node": "12", - "deno": "1", - "ios": "16", - "samsung": "11", - "opera_mobile": "53", - "electron": "6.0" - }, - "transform-class-static-block": { - "chrome": "94", - "opera": "80", - "edge": "94", - "firefox": "93", - "safari": "16.4", - "node": "16.11", - "deno": "1.14", - "ios": "16.4", - "samsung": "17", - "opera_mobile": "66", - "electron": "15.0" - }, - "proposal-class-static-block": { - "chrome": "94", - "opera": "80", - "edge": "94", - "firefox": "93", - "safari": "16.4", - "node": "16.11", - "deno": "1.14", - "ios": "16.4", - "samsung": "17", - "opera_mobile": "66", - "electron": "15.0" - }, - "transform-private-property-in-object": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "90", - "safari": "15", - "node": "16.9", - "deno": "1.9", - "ios": "15", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - }, - "proposal-private-property-in-object": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "90", - "safari": "15", - "node": "16.9", - "deno": "1.9", - "ios": "15", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - }, - "transform-class-properties": { - "chrome": "74", - "opera": "62", - "edge": "79", - "firefox": "90", - "safari": "14.1", - "node": "12", - "deno": "1", - "ios": "14.5", - "samsung": "11", - "opera_mobile": "53", - "electron": "6.0" - }, - "proposal-class-properties": { - "chrome": "74", - "opera": "62", - "edge": "79", - "firefox": "90", - "safari": "14.1", - "node": "12", - "deno": "1", - "ios": "14.5", - "samsung": "11", - "opera_mobile": "53", - "electron": "6.0" - }, - "transform-private-methods": { - "chrome": "84", - "opera": "70", - "edge": "84", - "firefox": "90", - "safari": "15", - "node": "14.6", - "deno": "1", - "ios": "15", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" - }, - "proposal-private-methods": { - "chrome": "84", - "opera": "70", - "edge": "84", - "firefox": "90", - "safari": "15", - "node": "14.6", - "deno": "1", - "ios": "15", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" - }, - "transform-numeric-separator": { - "chrome": "75", - "opera": "62", - "edge": "79", - "firefox": "70", - "safari": "13", - "node": "12.5", - "deno": "1", - "ios": "13", - "samsung": "11", - "rhino": "1.7.14", - "opera_mobile": "54", - "electron": "6.0" - }, - "proposal-numeric-separator": { - "chrome": "75", - "opera": "62", - "edge": "79", - "firefox": "70", - "safari": "13", - "node": "12.5", - "deno": "1", - "ios": "13", - "samsung": "11", - "rhino": "1.7.14", - "opera_mobile": "54", - "electron": "6.0" - }, - "transform-logical-assignment-operators": { - "chrome": "85", - "opera": "71", - "edge": "85", - "firefox": "79", - "safari": "14", - "node": "15", - "deno": "1.2", - "ios": "14", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" - }, - "proposal-logical-assignment-operators": { - "chrome": "85", - "opera": "71", - "edge": "85", - "firefox": "79", - "safari": "14", - "node": "15", - "deno": "1.2", - "ios": "14", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" - }, - "transform-nullish-coalescing-operator": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "72", - "safari": "13.1", - "node": "14", - "deno": "1", - "ios": "13.4", - "samsung": "13", - "rhino": "1.8", - "opera_mobile": "57", - "electron": "8.0" - }, - "proposal-nullish-coalescing-operator": { - "chrome": "80", - "opera": "67", - "edge": "80", - "firefox": "72", - "safari": "13.1", - "node": "14", - "deno": "1", - "ios": "13.4", - "samsung": "13", - "rhino": "1.8", - "opera_mobile": "57", - "electron": "8.0" - }, - "transform-optional-chaining": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "74", - "safari": "13.1", - "node": "16.9", - "deno": "1.9", - "ios": "13.4", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - }, - "proposal-optional-chaining": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "74", - "safari": "13.1", - "node": "16.9", - "deno": "1.9", - "ios": "13.4", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - }, - "transform-json-strings": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "62", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "9", - "rhino": "1.7.14", - "opera_mobile": "47", - "electron": "3.0" - }, - "proposal-json-strings": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "62", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "9", - "rhino": "1.7.14", - "opera_mobile": "47", - "electron": "3.0" - }, - "transform-optional-catch-binding": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "58", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "9", - "opera_mobile": "47", - "electron": "3.0" - }, - "proposal-optional-catch-binding": { - "chrome": "66", - "opera": "53", - "edge": "79", - "firefox": "58", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "9", - "opera_mobile": "47", - "electron": "3.0" - }, - "transform-parameters": { - "chrome": "49", - "opera": "36", - "edge": "18", - "firefox": "52", - "safari": "16.3", - "node": "6", - "deno": "1", - "ios": "16.3", - "samsung": "5", - "opera_mobile": "36", - "electron": "0.37" - }, - "transform-async-generator-functions": { - "chrome": "63", - "opera": "50", - "edge": "79", - "firefox": "57", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "proposal-async-generator-functions": { - "chrome": "63", - "opera": "50", - "edge": "79", - "firefox": "57", - "safari": "12", - "node": "10", - "deno": "1", - "ios": "12", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - }, - "transform-object-rest-spread": { - "chrome": "60", - "opera": "47", - "edge": "79", - "firefox": "55", - "safari": "11.1", - "node": "8.3", - "deno": "1", - "ios": "11.3", - "samsung": "8", - "opera_mobile": "44", - "electron": "2.0" - }, - "proposal-object-rest-spread": { - "chrome": "60", - "opera": "47", - "edge": "79", - "firefox": "55", - "safari": "11.1", - "node": "8.3", - "deno": "1", - "ios": "11.3", - "samsung": "8", - "opera_mobile": "44", - "electron": "2.0" - }, - "transform-dotall-regex": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "8.10", - "deno": "1", - "ios": "11.3", - "samsung": "8", - "rhino": "1.7.15", - "opera_mobile": "46", - "electron": "3.0" - }, - "transform-unicode-property-regex": { - "chrome": "64", - "opera": "51", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "9", - "rhino": "1.9", - "opera_mobile": "47", - "electron": "3.0" - }, - "proposal-unicode-property-regex": { - "chrome": "64", - "opera": "51", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "9", - "rhino": "1.9", - "opera_mobile": "47", - "electron": "3.0" - }, - "transform-named-capturing-groups-regex": { - "chrome": "64", - "opera": "51", - "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "10", - "deno": "1", - "ios": "11.3", - "samsung": "9", - "rhino": "1.9", - "opera_mobile": "47", - "electron": "3.0" - }, - "transform-async-to-generator": { - "chrome": "55", - "opera": "42", - "edge": "15", - "firefox": "52", - "safari": "11", - "node": "7.6", - "deno": "1", - "ios": "11", - "samsung": "6", - "opera_mobile": "42", - "electron": "1.6" - }, - "transform-exponentiation-operator": { - "chrome": "52", - "opera": "39", - "edge": "14", - "firefox": "52", - "safari": "10.1", - "node": "7", - "deno": "1", - "ios": "10.3", - "samsung": "6", - "rhino": "1.7.14", - "opera_mobile": "41", - "electron": "1.3" - }, - "transform-template-literals": { - "chrome": "41", - "opera": "28", - "edge": "13", - "firefox": "34", - "safari": "13", - "node": "4", - "deno": "1", - "ios": "13", - "samsung": "3.4", - "rhino": "1.9", - "opera_mobile": "28", - "electron": "0.21" - }, - "transform-literals": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "53", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.15", - "opera_mobile": "32", - "electron": "0.30" - }, - "transform-function-name": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "transform-arrow-functions": { - "chrome": "47", - "opera": "34", - "edge": "13", - "firefox": "43", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "34", - "electron": "0.36" - }, - "transform-block-scoped-functions": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "46", - "safari": "10", - "node": "4", - "deno": "1", - "ie": "11", - "ios": "10", - "samsung": "3.4", - "opera_mobile": "28", - "electron": "0.21" - }, - "transform-classes": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" - }, - "transform-object-super": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" - }, - "transform-shorthand-properties": { - "chrome": "43", - "opera": "30", - "edge": "12", - "firefox": "33", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.14", - "opera_mobile": "30", - "electron": "0.27" - }, - "transform-duplicate-keys": { - "chrome": "42", - "opera": "29", - "edge": "12", - "firefox": "34", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "3.4", - "opera_mobile": "29", - "electron": "0.25" - }, - "transform-computed-properties": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "34", - "safari": "7.1", - "node": "4", - "deno": "1", - "ios": "8", - "samsung": "4", - "rhino": "1.8", - "opera_mobile": "32", - "electron": "0.30" - }, - "transform-for-of": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "transform-sticky-regex": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "3", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "36", - "electron": "0.37" - }, - "transform-unicode-escapes": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "53", - "safari": "9", - "node": "4", - "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.15", - "opera_mobile": "32", - "electron": "0.30" - }, - "transform-unicode-regex": { - "chrome": "50", - "opera": "37", - "edge": "13", - "firefox": "46", - "safari": "12", - "node": "6", - "deno": "1", - "ios": "12", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" - }, - "transform-spread": { - "chrome": "46", - "opera": "33", - "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" - }, - "transform-destructuring": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "14.1", - "node": "6.5", - "deno": "1", - "ios": "14.5", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" - }, - "transform-block-scoping": { - "chrome": "50", - "opera": "37", - "edge": "14", - "firefox": "53", - "safari": "11", - "node": "6", - "deno": "1", - "ios": "11", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" - }, - "transform-typeof-symbol": { - "chrome": "48", - "opera": "35", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "6", - "deno": "1", - "ios": "9", - "samsung": "5", - "rhino": "1.8", - "opera_mobile": "35", - "electron": "0.37" - }, - "transform-new-target": { - "chrome": "46", - "opera": "33", - "edge": "14", - "firefox": "41", - "safari": "10", - "node": "5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" - }, - "transform-regenerator": { - "chrome": "50", - "opera": "37", - "edge": "13", - "firefox": "53", - "safari": "10", - "node": "6", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" - }, - "transform-member-expression-literals": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "2", - "safari": "5.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "transform-property-literals": { - "chrome": "7", - "opera": "12", - "edge": "12", - "firefox": "2", - "safari": "5.1", - "node": "0.4", - "deno": "1", - "ie": "9", - "android": "4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "12", - "electron": "0.20" - }, - "transform-reserved-words": { - "chrome": "13", - "opera": "10.50", - "edge": "12", - "firefox": "2", - "safari": "3.1", - "node": "0.6", - "deno": "1", - "ie": "9", - "android": "4.4", - "ios": "6", - "phantom": "1.9", - "samsung": "1", - "rhino": "1.7.13", - "opera_mobile": "10.1", - "electron": "0.20" - }, - "transform-export-namespace-from": { - "chrome": "72", - "deno": "1.0", - "edge": "79", - "firefox": "80", - "node": "13.2.0", - "opera": "60", - "opera_mobile": "51", - "safari": "14.1", - "ios": "14.5", - "samsung": "11.0", - "android": "72", - "electron": "5.0" - }, - "proposal-export-namespace-from": { - "chrome": "72", - "deno": "1.0", - "edge": "79", - "firefox": "80", - "node": "13.2.0", - "opera": "60", - "opera_mobile": "51", - "safari": "14.1", - "ios": "14.5", - "samsung": "11.0", - "android": "72", - "electron": "5.0" - } -} diff --git a/node_modules/@babel/compat-data/native-modules.js b/node_modules/@babel/compat-data/native-modules.js deleted file mode 100644 index f8c25fa..0000000 --- a/node_modules/@babel/compat-data/native-modules.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly -module.exports = require("./data/native-modules.json"); diff --git a/node_modules/@babel/compat-data/overlapping-plugins.js b/node_modules/@babel/compat-data/overlapping-plugins.js deleted file mode 100644 index 0dd35f1..0000000 --- a/node_modules/@babel/compat-data/overlapping-plugins.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly -module.exports = require("./data/overlapping-plugins.json"); diff --git a/node_modules/@babel/compat-data/package.json b/node_modules/@babel/compat-data/package.json deleted file mode 100644 index 67268d8..0000000 --- a/node_modules/@babel/compat-data/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@babel/compat-data", - "version": "7.29.3", - "author": "The Babel Team (https://babel.dev/team)", - "license": "MIT", - "description": "The compat-data to determine required Babel plugins", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-compat-data" - }, - "publishConfig": { - "access": "public" - }, - "exports": { - "./plugins": "./plugins.js", - "./native-modules": "./native-modules.js", - "./corejs2-built-ins": "./corejs2-built-ins.js", - "./corejs3-shipped-proposals": "./corejs3-shipped-proposals.js", - "./overlapping-plugins": "./overlapping-plugins.js", - "./plugin-bugfixes": "./plugin-bugfixes.js" - }, - "scripts": { - "build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.mjs && node ./scripts/build-modules-support.mjs && node ./scripts/build-bugfixes-targets.mjs" - }, - "keywords": [ - "babel", - "compat-table", - "compat-data" - ], - "devDependencies": { - "@mdn/browser-compat-data": "^6.0.8", - "core-js-compat": "^3.48.0", - "electron-to-chromium": "^1.5.278" - }, - "engines": { - "node": ">=6.9.0" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/compat-data/plugin-bugfixes.js b/node_modules/@babel/compat-data/plugin-bugfixes.js deleted file mode 100644 index 9aaf364..0000000 --- a/node_modules/@babel/compat-data/plugin-bugfixes.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly -module.exports = require("./data/plugin-bugfixes.json"); diff --git a/node_modules/@babel/compat-data/plugins.js b/node_modules/@babel/compat-data/plugins.js deleted file mode 100644 index b191017..0000000 --- a/node_modules/@babel/compat-data/plugins.js +++ /dev/null @@ -1,2 +0,0 @@ -// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly -module.exports = require("./data/plugins.json"); diff --git a/node_modules/@babel/core/LICENSE b/node_modules/@babel/core/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/core/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/README.md b/node_modules/@babel/core/README.md deleted file mode 100644 index 2903543..0000000 --- a/node_modules/@babel/core/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/core - -> Babel compiler core. - -See our website [@babel/core](https://babeljs.io/docs/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/core -``` - -or using yarn: - -```sh -yarn add @babel/core --dev -``` diff --git a/node_modules/@babel/core/lib/config/cache-contexts.js b/node_modules/@babel/core/lib/config/cache-contexts.js deleted file mode 100644 index f2ececd..0000000 --- a/node_modules/@babel/core/lib/config/cache-contexts.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -0 && 0; - -//# sourceMappingURL=cache-contexts.js.map diff --git a/node_modules/@babel/core/lib/config/cache-contexts.js.map b/node_modules/@babel/core/lib/config/cache-contexts.js.map deleted file mode 100644 index 39b1898..0000000 --- a/node_modules/@babel/core/lib/config/cache-contexts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":[],"sources":["../../src/config/cache-contexts.ts"],"sourcesContent":["import type { ConfigContext } from \"./config-chain.ts\";\nimport type {\n CallerMetadata,\n TargetsListOrObject,\n} from \"./validation/options.ts\";\n\nexport type { ConfigContext as FullConfig };\n\nexport type FullPreset = {\n targets: TargetsListOrObject;\n} & ConfigContext;\nexport type FullPlugin = {\n assumptions: Record;\n} & FullPreset;\n\n// Context not including filename since it is used in places that cannot\n// process 'ignore'/'only' and other filename-based logic.\nexport type SimpleConfig = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\nexport type SimplePreset = {\n targets: TargetsListOrObject;\n} & SimpleConfig;\nexport type SimplePlugin = {\n assumptions: Record;\n} & SimplePreset;\n"],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js deleted file mode 100644 index 344c839..0000000 --- a/node_modules/@babel/core/lib/config/caching.js +++ /dev/null @@ -1,261 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertSimpleType = assertSimpleType; -exports.makeStrongCache = makeStrongCache; -exports.makeStrongCacheSync = makeStrongCacheSync; -exports.makeWeakCache = makeWeakCache; -exports.makeWeakCacheSync = makeWeakCacheSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _async = require("../gensync-utils/async.js"); -var _util = require("./util.js"); -const synchronize = gen => { - return _gensync()(gen).sync; -}; -function* genTrue() { - return true; -} -function makeWeakCache(handler) { - return makeCachedFunction(WeakMap, handler); -} -function makeWeakCacheSync(handler) { - return synchronize(makeWeakCache(handler)); -} -function makeStrongCache(handler) { - return makeCachedFunction(Map, handler); -} -function makeStrongCacheSync(handler) { - return synchronize(makeStrongCache(handler)); -} -function makeCachedFunction(CallCache, handler) { - const callCacheSync = new CallCache(); - const callCacheAsync = new CallCache(); - const futureCache = new CallCache(); - return function* cachedFunction(arg, data) { - const asyncContext = yield* (0, _async.isAsync)(); - const callCache = asyncContext ? callCacheAsync : callCacheSync; - const cached = yield* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data); - if (cached.valid) return cached.value; - const cache = new CacheConfigurator(data); - const handlerResult = handler(arg, cache); - let finishLock; - let value; - if ((0, _util.isIterableIterator)(handlerResult)) { - value = yield* (0, _async.onFirstPause)(handlerResult, () => { - finishLock = setupAsyncLocks(cache, futureCache, arg); - }); - } else { - value = handlerResult; - } - updateFunctionCache(callCache, cache, arg, value); - if (finishLock) { - futureCache.delete(arg); - finishLock.release(value); - } - return value; - }; -} -function* getCachedValue(cache, arg, data) { - const cachedValue = cache.get(arg); - if (cachedValue) { - for (const { - value, - valid - } of cachedValue) { - if (yield* valid(data)) return { - valid: true, - value - }; - } - } - return { - valid: false, - value: null - }; -} -function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) { - const cached = yield* getCachedValue(callCache, arg, data); - if (cached.valid) { - return cached; - } - if (asyncContext) { - const cached = yield* getCachedValue(futureCache, arg, data); - if (cached.valid) { - const value = yield* (0, _async.waitFor)(cached.value.promise); - return { - valid: true, - value - }; - } - } - return { - valid: false, - value: null - }; -} -function setupAsyncLocks(config, futureCache, arg) { - const finishLock = new Lock(); - updateFunctionCache(futureCache, config, arg, finishLock); - return finishLock; -} -function updateFunctionCache(cache, config, arg, value) { - if (!config.configured()) config.forever(); - let cachedValue = cache.get(arg); - config.deactivate(); - switch (config.mode()) { - case "forever": - cachedValue = [{ - value, - valid: genTrue - }]; - cache.set(arg, cachedValue); - break; - case "invalidate": - cachedValue = [{ - value, - valid: config.validator() - }]; - cache.set(arg, cachedValue); - break; - case "valid": - if (cachedValue) { - cachedValue.push({ - value, - valid: config.validator() - }); - } else { - cachedValue = [{ - value, - valid: config.validator() - }]; - cache.set(arg, cachedValue); - } - } -} -class CacheConfigurator { - constructor(data) { - this._active = true; - this._never = false; - this._forever = false; - this._invalidate = false; - this._configured = false; - this._pairs = []; - this._data = void 0; - this._data = data; - } - simple() { - return makeSimpleConfigurator(this); - } - mode() { - if (this._never) return "never"; - if (this._forever) return "forever"; - if (this._invalidate) return "invalidate"; - return "valid"; - } - forever() { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - if (this._never) { - throw new Error("Caching has already been configured with .never()"); - } - this._forever = true; - this._configured = true; - } - never() { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - if (this._forever) { - throw new Error("Caching has already been configured with .forever()"); - } - this._never = true; - this._configured = true; - } - using(handler) { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - if (this._never || this._forever) { - throw new Error("Caching has already been configured with .never or .forever()"); - } - this._configured = true; - const key = handler(this._data); - const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`); - if ((0, _async.isThenable)(key)) { - return key.then(key => { - this._pairs.push([key, fn]); - return key; - }); - } - this._pairs.push([key, fn]); - return key; - } - invalidate(handler) { - this._invalidate = true; - return this.using(handler); - } - validator() { - const pairs = this._pairs; - return function* (data) { - for (const [key, fn] of pairs) { - if (key !== (yield* fn(data))) return false; - } - return true; - }; - } - deactivate() { - this._active = false; - } - configured() { - return this._configured; - } -} -function makeSimpleConfigurator(cache) { - function cacheFn(val) { - if (typeof val === "boolean") { - if (val) cache.forever();else cache.never(); - return; - } - return cache.using(() => assertSimpleType(val())); - } - cacheFn.forever = () => cache.forever(); - cacheFn.never = () => cache.never(); - cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); - cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); - return cacheFn; -} -function assertSimpleType(value) { - if ((0, _async.isThenable)(value)) { - throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`); - } - if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { - throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); - } - return value; -} -class Lock { - constructor() { - this.released = false; - this.promise = void 0; - this._resolve = void 0; - this.promise = new Promise(resolve => { - this._resolve = resolve; - }); - } - release(value) { - this.released = true; - this._resolve(value); - } -} -0 && 0; - -//# sourceMappingURL=caching.js.map diff --git a/node_modules/@babel/core/lib/config/caching.js.map b/node_modules/@babel/core/lib/config/caching.js.map deleted file mode 100644 index c9a69fd..0000000 --- a/node_modules/@babel/core/lib/config/caching.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_async","_util","synchronize","gen","gensync","sync","genTrue","makeWeakCache","handler","makeCachedFunction","WeakMap","makeWeakCacheSync","makeStrongCache","Map","makeStrongCacheSync","CallCache","callCacheSync","callCacheAsync","futureCache","cachedFunction","arg","asyncContext","isAsync","callCache","cached","getCachedValueOrWait","valid","value","cache","CacheConfigurator","handlerResult","finishLock","isIterableIterator","onFirstPause","setupAsyncLocks","updateFunctionCache","delete","release","getCachedValue","cachedValue","get","waitFor","promise","config","Lock","configured","forever","deactivate","mode","set","validator","push","constructor","_active","_never","_forever","_invalidate","_configured","_pairs","_data","simple","makeSimpleConfigurator","Error","never","using","key","fn","maybeAsync","isThenable","then","invalidate","pairs","cacheFn","val","assertSimpleType","cb","released","_resolve","Promise","resolve"],"sources":["../../src/config/caching.ts"],"sourcesContent":["import gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport {\n maybeAsync,\n isAsync,\n onFirstPause,\n waitFor,\n isThenable,\n} from \"../gensync-utils/async.ts\";\nimport { isIterableIterator } from \"./util.ts\";\n\nexport type { CacheConfigurator };\n\nexport type SimpleCacheConfigurator = {\n (forever: boolean): void;\n (handler: () => T): T;\n\n forever: () => void;\n never: () => void;\n using: (handler: () => T) => T;\n invalidate: (handler: () => T) => T;\n};\n\nexport type CacheEntry = {\n value: ResultT;\n valid: (channel: SideChannel) => Handler;\n}[];\n\nconst synchronize = (\n gen: (...args: ArgsT) => Handler,\n): ((...args: ArgsT) => ResultT) => {\n return gensync(gen).sync;\n};\n\n// eslint-disable-next-line require-yield\nfunction* genTrue() {\n return true;\n}\n\nexport function makeWeakCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(WeakMap, handler);\n}\n\nexport function makeWeakCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeWeakCache(handler),\n );\n}\n\nexport function makeStrongCache(\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n return makeCachedFunction(Map, handler);\n}\n\nexport function makeStrongCacheSync(\n handler: (arg: ArgT, cache?: CacheConfigurator) => ResultT,\n): (arg: ArgT, data?: SideChannel) => ResultT {\n return synchronize<[ArgT, SideChannel], ResultT>(\n makeStrongCache(handler),\n );\n}\n\n/* NOTE: Part of the logic explained in this comment is explained in the\n * getCachedValueOrWait and setupAsyncLocks functions.\n *\n * > There are only two hard things in Computer Science: cache invalidation and naming things.\n * > -- Phil Karlton\n *\n * I don't know if Phil was also thinking about handling a cache whose invalidation function is\n * defined asynchronously is considered, but it is REALLY hard to do correctly.\n *\n * The implemented logic (only when gensync is run asynchronously) is the following:\n * 1. If there is a valid cache associated to the current \"arg\" parameter,\n * a. RETURN the cached value\n * 3. If there is a FinishLock associated to the current \"arg\" parameter representing a valid cache,\n * a. Wait for that lock to be released\n * b. RETURN the value associated with that lock\n * 5. Start executing the function to be cached\n * a. If it pauses on a promise, then\n * i. Let FinishLock be a new lock\n * ii. Store FinishLock as associated to the current \"arg\" parameter\n * iii. Wait for the function to finish executing\n * iv. Release FinishLock\n * v. Send the function result to anyone waiting on FinishLock\n * 6. Store the result in the cache\n * 7. RETURN the result\n */\nfunction makeCachedFunction(\n CallCache: new () => CacheMap,\n handler: (\n arg: ArgT,\n cache: CacheConfigurator,\n ) => Handler | ResultT,\n): (arg: ArgT, data: SideChannel) => Handler {\n const callCacheSync = new CallCache();\n const callCacheAsync = new CallCache();\n const futureCache = new CallCache>();\n\n return function* cachedFunction(arg: ArgT, data: SideChannel) {\n const asyncContext = yield* isAsync();\n const callCache = asyncContext ? callCacheAsync : callCacheSync;\n\n const cached = yield* getCachedValueOrWait(\n asyncContext,\n callCache,\n futureCache,\n arg,\n data,\n );\n if (cached.valid) return cached.value;\n\n const cache = new CacheConfigurator(data);\n\n const handlerResult: Handler | ResultT = handler(arg, cache);\n\n let finishLock: Lock;\n let value: ResultT;\n\n if (isIterableIterator(handlerResult)) {\n value = yield* onFirstPause(handlerResult, () => {\n finishLock = setupAsyncLocks(cache, futureCache, arg);\n });\n } else {\n value = handlerResult;\n }\n\n updateFunctionCache(callCache, cache, arg, value);\n\n if (finishLock) {\n futureCache.delete(arg);\n finishLock.release(value);\n }\n\n return value;\n };\n}\n\ntype CacheMap =\n | Map>\n // @ts-expect-error todo(flow->ts): add `extends object` constraint to ArgT\n | WeakMap>;\n\nfunction* getCachedValue(\n cache: CacheMap,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cachedValue: CacheEntry | void = cache.get(arg);\n\n if (cachedValue) {\n for (const { value, valid } of cachedValue) {\n if (yield* valid(data)) return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction* getCachedValueOrWait(\n asyncContext: boolean,\n callCache: CacheMap,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n data: SideChannel,\n): Handler<{ valid: true; value: ResultT } | { valid: false; value: null }> {\n const cached = yield* getCachedValue(callCache, arg, data);\n if (cached.valid) {\n return cached;\n }\n\n if (asyncContext) {\n const cached = yield* getCachedValue(futureCache, arg, data);\n if (cached.valid) {\n const value = yield* waitFor(cached.value.promise);\n return { valid: true, value };\n }\n }\n\n return { valid: false, value: null };\n}\n\nfunction setupAsyncLocks(\n config: CacheConfigurator,\n futureCache: CacheMap, SideChannel>,\n arg: ArgT,\n): Lock {\n const finishLock = new Lock();\n\n updateFunctionCache(futureCache, config, arg, finishLock);\n\n return finishLock;\n}\n\nfunction updateFunctionCache<\n ArgT,\n ResultT,\n SideChannel,\n Cache extends CacheMap,\n>(\n cache: Cache,\n config: CacheConfigurator,\n arg: ArgT,\n value: ResultT,\n) {\n if (!config.configured()) config.forever();\n\n let cachedValue: CacheEntry | void = cache.get(arg);\n\n config.deactivate();\n\n switch (config.mode()) {\n case \"forever\":\n cachedValue = [{ value, valid: genTrue }];\n cache.set(arg, cachedValue);\n break;\n case \"invalidate\":\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n break;\n case \"valid\":\n if (cachedValue) {\n cachedValue.push({ value, valid: config.validator() });\n } else {\n cachedValue = [{ value, valid: config.validator() }];\n cache.set(arg, cachedValue);\n }\n }\n}\n\nclass CacheConfigurator {\n _active: boolean = true;\n _never: boolean = false;\n _forever: boolean = false;\n _invalidate: boolean = false;\n\n _configured: boolean = false;\n\n _pairs: [\n cachedValue: unknown,\n handler: (data: SideChannel) => Handler,\n ][] = [];\n\n _data: SideChannel;\n\n constructor(data: SideChannel) {\n this._data = data;\n }\n\n simple() {\n return makeSimpleConfigurator(this);\n }\n\n mode() {\n if (this._never) return \"never\";\n if (this._forever) return \"forever\";\n if (this._invalidate) return \"invalidate\";\n return \"valid\";\n }\n\n forever() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never) {\n throw new Error(\"Caching has already been configured with .never()\");\n }\n this._forever = true;\n this._configured = true;\n }\n\n never() {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._forever) {\n throw new Error(\"Caching has already been configured with .forever()\");\n }\n this._never = true;\n this._configured = true;\n }\n\n using(handler: (data: SideChannel) => T): T {\n if (!this._active) {\n throw new Error(\"Cannot change caching after evaluation has completed.\");\n }\n if (this._never || this._forever) {\n throw new Error(\n \"Caching has already been configured with .never or .forever()\",\n );\n }\n this._configured = true;\n\n const key = handler(this._data);\n\n const fn = maybeAsync(\n handler,\n `You appear to be using an async cache handler, but Babel has been called synchronously`,\n );\n\n if (isThenable(key)) {\n // @ts-expect-error todo(flow->ts): improve function return type annotation\n return key.then((key: unknown) => {\n this._pairs.push([key, fn]);\n return key;\n });\n }\n\n this._pairs.push([key, fn]);\n return key;\n }\n\n invalidate(handler: (data: SideChannel) => T): T {\n this._invalidate = true;\n return this.using(handler);\n }\n\n validator(): (data: SideChannel) => Handler {\n const pairs = this._pairs;\n return function* (data: SideChannel) {\n for (const [key, fn] of pairs) {\n if (key !== (yield* fn(data))) return false;\n }\n return true;\n };\n }\n\n deactivate() {\n this._active = false;\n }\n\n configured() {\n return this._configured;\n }\n}\n\nfunction makeSimpleConfigurator(\n cache: CacheConfigurator,\n): SimpleCacheConfigurator {\n function cacheFn(val: any) {\n if (typeof val === \"boolean\") {\n if (val) cache.forever();\n else cache.never();\n return;\n }\n\n return cache.using(() => assertSimpleType(val()));\n }\n cacheFn.forever = () => cache.forever();\n cacheFn.never = () => cache.never();\n cacheFn.using = (cb: () => SimpleType) =>\n cache.using(() => assertSimpleType(cb()));\n cacheFn.invalidate = (cb: () => SimpleType) =>\n cache.invalidate(() => assertSimpleType(cb()));\n\n return cacheFn as any;\n}\n\n// Types are limited here so that in the future these values can be used\n// as part of Babel's caching logic.\nexport type SimpleType =\n | string\n | boolean\n | number\n | null\n | void\n | Promise;\nexport function assertSimpleType(value: unknown): SimpleType {\n if (isThenable(value)) {\n throw new Error(\n `You appear to be using an async cache handler, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously handle your caching logic.`,\n );\n }\n\n if (\n value != null &&\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n typeof value !== \"number\"\n ) {\n throw new Error(\n \"Cache keys must be either string, boolean, number, null, or undefined.\",\n );\n }\n // @ts-expect-error Type 'unknown' is not assignable to type 'SimpleType'. This can be removed\n // when strictNullCheck is enabled\n return value;\n}\n\nclass Lock {\n released: boolean = false;\n promise: Promise;\n _resolve: (value: T) => void;\n\n constructor() {\n this.promise = new Promise(resolve => {\n this._resolve = resolve;\n });\n }\n\n release(value: T) {\n this.released = true;\n this._resolve(value);\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AAmBA,MAAMG,WAAW,GACfC,GAAyC,IACP;EAClC,OAAOC,SAAMA,CAAC,CAACD,GAAG,CAAC,CAACE,IAAI;AAC1B,CAAC;AAGD,UAAUC,OAAOA,CAAA,EAAG;EAClB,OAAO,IAAI;AACb;AAEO,SAASC,aAAaA,CAC3BC,OAG+B,EACqB;EACpD,OAAOC,kBAAkB,CAA6BC,OAAO,EAAEF,OAAO,CAAC;AACzE;AAEO,SAASG,iBAAiBA,CAC/BH,OAAuE,EAC3B;EAC5C,OAAON,WAAW,CAChBK,aAAa,CAA6BC,OAAO,CACnD,CAAC;AACH;AAEO,SAASI,eAAeA,CAC7BJ,OAG+B,EACqB;EACpD,OAAOC,kBAAkB,CAA6BI,GAAG,EAAEL,OAAO,CAAC;AACrE;AAEO,SAASM,mBAAmBA,CACjCN,OAAuE,EAC3B;EAC5C,OAAON,WAAW,CAChBU,eAAe,CAA6BJ,OAAO,CACrD,CAAC;AACH;AA2BA,SAASC,kBAAkBA,CACzBM,SAAgE,EAChEP,OAG+B,EACqB;EACpD,MAAMQ,aAAa,GAAG,IAAID,SAAS,CAAU,CAAC;EAC9C,MAAME,cAAc,GAAG,IAAIF,SAA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,CAAC;EACtB;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-chain.js b/node_modules/@babel/core/lib/config/config-chain.js deleted file mode 100644 index 5fded8e..0000000 --- a/node_modules/@babel/core/lib/config/config-chain.js +++ /dev/null @@ -1,469 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.buildPresetChain = buildPresetChain; -exports.buildPresetChainWalker = void 0; -exports.buildRootChain = buildRootChain; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _debug() { - const data = require("debug"); - _debug = function () { - return data; - }; - return data; -} -var _options = require("./validation/options.js"); -var _patternToRegex = require("./pattern-to-regex.js"); -var _printer = require("./printer.js"); -var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js"); -var _configError = require("../errors/config-error.js"); -var _index = require("./files/index.js"); -var _caching = require("./caching.js"); -var _configDescriptors = require("./config-descriptors.js"); -const debug = _debug()("babel:config:config-chain"); -function* buildPresetChain(arg, context) { - const chain = yield* buildPresetChainWalker(arg, context); - if (!chain) return null; - return { - plugins: dedupDescriptors(chain.plugins), - presets: dedupDescriptors(chain.presets), - options: chain.options.map(o => createConfigChainOptions(o)), - files: new Set() - }; -} -const buildPresetChainWalker = exports.buildPresetChainWalker = makeChainWalker({ - root: preset => loadPresetDescriptors(preset), - env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), - overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), - overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName), - createLogger: () => () => {} -}); -const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); -const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); -const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); -const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); -function* buildRootChain(opts, context) { - let configReport, babelRcReport; - const programmaticLogger = new _printer.ConfigPrinter(); - const programmaticChain = yield* loadProgrammaticChain({ - options: opts, - dirname: context.cwd - }, context, undefined, programmaticLogger); - if (!programmaticChain) return null; - const programmaticReport = yield* programmaticLogger.output(); - let configFile; - if (typeof opts.configFile === "string") { - configFile = yield* (0, _index.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); - } else if (opts.configFile !== false) { - configFile = yield* (0, _index.findRootConfig)(context.root, context.envName, context.caller); - } - let { - babelrc, - babelrcRoots - } = opts; - let babelrcRootsDirectory = context.cwd; - const configFileChain = emptyChain(); - const configFileLogger = new _printer.ConfigPrinter(); - if (configFile) { - const validatedFile = validateConfigFile(configFile); - const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger); - if (!result) return null; - configReport = yield* configFileLogger.output(); - if (babelrc === undefined) { - babelrc = validatedFile.options.babelrc; - } - if (babelrcRoots === undefined) { - babelrcRootsDirectory = validatedFile.dirname; - babelrcRoots = validatedFile.options.babelrcRoots; - } - mergeChain(configFileChain, result); - } - let ignoreFile, babelrcFile; - let isIgnored = false; - const fileChain = emptyChain(); - if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") { - const pkgData = yield* (0, _index.findPackageData)(context.filename); - if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { - ({ - ignore: ignoreFile, - config: babelrcFile - } = yield* (0, _index.findRelativeConfig)(pkgData, context.envName, context.caller)); - if (ignoreFile) { - fileChain.files.add(ignoreFile.filepath); - } - if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { - isIgnored = true; - } - if (babelrcFile && !isIgnored) { - const validatedFile = validateBabelrcFile(babelrcFile); - const babelrcLogger = new _printer.ConfigPrinter(); - const result = yield* loadFileChain(validatedFile, context, undefined, babelrcLogger); - if (!result) { - isIgnored = true; - } else { - babelRcReport = yield* babelrcLogger.output(); - mergeChain(fileChain, result); - } - } - if (babelrcFile && isIgnored) { - fileChain.files.add(babelrcFile.filepath); - } - } - } - if (context.showConfig) { - console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n") + "\n-----End Babel configs-----"); - } - const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); - return { - plugins: isIgnored ? [] : dedupDescriptors(chain.plugins), - presets: isIgnored ? [] : dedupDescriptors(chain.presets), - options: isIgnored ? [] : chain.options.map(o => createConfigChainOptions(o)), - fileHandling: isIgnored ? "ignored" : "transpile", - ignore: ignoreFile || undefined, - babelrc: babelrcFile || undefined, - config: configFile || undefined, - files: chain.files - }; -} -function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) { - if (typeof babelrcRoots === "boolean") return babelrcRoots; - const absoluteRoot = context.root; - if (babelrcRoots === undefined) { - return pkgData.directories.includes(absoluteRoot); - } - let babelrcPatterns = babelrcRoots; - if (!Array.isArray(babelrcPatterns)) { - babelrcPatterns = [babelrcPatterns]; - } - babelrcPatterns = babelrcPatterns.map(pat => { - return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat; - }); - if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { - return pkgData.directories.includes(absoluteRoot); - } - return babelrcPatterns.some(pat => { - if (typeof pat === "string") { - pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); - } - return pkgData.directories.some(directory => { - return matchPattern(pat, babelrcRootsDirectory, directory, context); - }); - }); -} -const validateConfigFile = (0, _caching.makeWeakCacheSync)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("configfile", file.options, file.filepath) -})); -const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("babelrcfile", file.options, file.filepath) -})); -const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("extendsfile", file.options, file.filepath) -})); -const loadProgrammaticChain = makeChainWalker({ - root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), - env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName), - overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index), - overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName), - createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger) -}); -const loadFileChainWalker = makeChainWalker({ - root: file => loadFileDescriptors(file), - env: (file, envName) => loadFileEnvDescriptors(file)(envName), - overrides: (file, index) => loadFileOverridesDescriptors(file)(index), - overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName), - createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger) -}); -function* loadFileChain(input, context, files, baseLogger) { - const chain = yield* loadFileChainWalker(input, context, files, baseLogger); - chain == null || chain.files.add(input.filepath); - return chain; -} -const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); -const loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); -const loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); -const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); -function buildFileLogger(filepath, context, baseLogger) { - if (!baseLogger) { - return () => {}; - } - return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, { - filepath - }); -} -function buildRootDescriptors({ - dirname, - options -}, alias, descriptors) { - return descriptors(dirname, options, alias); -} -function buildProgrammaticLogger(_, context, baseLogger) { - var _context$caller; - if (!baseLogger) { - return () => {}; - } - return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, { - callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name - }); -} -function buildEnvDescriptors({ - dirname, - options -}, alias, descriptors, envName) { - var _options$env; - const opts = (_options$env = options.env) == null ? void 0 : _options$env[envName]; - return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null; -} -function buildOverrideDescriptors({ - dirname, - options -}, alias, descriptors, index) { - var _options$overrides; - const opts = (_options$overrides = options.overrides) == null ? void 0 : _options$overrides[index]; - if (!opts) throw new Error("Assertion failure - missing override"); - return descriptors(dirname, opts, `${alias}.overrides[${index}]`); -} -function buildOverrideEnvDescriptors({ - dirname, - options -}, alias, descriptors, index, envName) { - var _options$overrides2, _override$env; - const override = (_options$overrides2 = options.overrides) == null ? void 0 : _options$overrides2[index]; - if (!override) throw new Error("Assertion failure - missing override"); - const opts = (_override$env = override.env) == null ? void 0 : _override$env[envName]; - return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null; -} -function makeChainWalker({ - root, - env, - overrides, - overridesEnv, - createLogger -}) { - return function* chainWalker(input, context, files = new Set(), baseLogger) { - const { - dirname - } = input; - const flattenedConfigs = []; - const rootOpts = root(input); - if (configIsApplicable(rootOpts, dirname, context, input.filepath)) { - flattenedConfigs.push({ - config: rootOpts, - envName: undefined, - index: undefined - }); - const envOpts = env(input, context.envName); - if (envOpts && configIsApplicable(envOpts, dirname, context, input.filepath)) { - flattenedConfigs.push({ - config: envOpts, - envName: context.envName, - index: undefined - }); - } - (rootOpts.options.overrides || []).forEach((_, index) => { - const overrideOps = overrides(input, index); - if (configIsApplicable(overrideOps, dirname, context, input.filepath)) { - flattenedConfigs.push({ - config: overrideOps, - index, - envName: undefined - }); - const overrideEnvOpts = overridesEnv(input, index, context.envName); - if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context, input.filepath)) { - flattenedConfigs.push({ - config: overrideEnvOpts, - index, - envName: context.envName - }); - } - } - }); - } - if (flattenedConfigs.some(({ - config: { - options: { - ignore, - only - } - } - }) => shouldIgnore(context, ignore, only, dirname))) { - return null; - } - const chain = emptyChain(); - const logger = createLogger(input, context, baseLogger); - for (const { - config, - index, - envName - } of flattenedConfigs) { - if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) { - return null; - } - logger(config, index, envName); - yield* mergeChainOpts(chain, config); - } - return chain; - }; -} -function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) { - if (opts.extends === undefined) return true; - const file = yield* (0, _index.loadConfig)(opts.extends, dirname, context.envName, context.caller); - if (files.has(file)) { - throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n")); - } - files.add(file); - const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger); - files.delete(file); - if (!fileChain) return false; - mergeChain(chain, fileChain); - return true; -} -function mergeChain(target, source) { - target.options.push(...source.options); - target.plugins.push(...source.plugins); - target.presets.push(...source.presets); - for (const file of source.files) { - target.files.add(file); - } - return target; -} -function* mergeChainOpts(target, { - options, - plugins, - presets -}) { - target.options.push(options); - target.plugins.push(...(yield* plugins())); - target.presets.push(...(yield* presets())); - return target; -} -function emptyChain() { - return { - options: [], - presets: [], - plugins: [], - files: new Set() - }; -} -function createConfigChainOptions(opts) { - const options = Object.assign({}, opts); - delete options.extends; - delete options.env; - delete options.overrides; - delete options.plugins; - delete options.presets; - delete options.passPerPreset; - delete options.ignore; - delete options.only; - delete options.test; - delete options.include; - delete options.exclude; - if (hasOwnProperty.call(options, "sourceMap")) { - options.sourceMaps = options.sourceMap; - delete options.sourceMap; - } - return options; -} -function dedupDescriptors(items) { - const map = new Map(); - const descriptors = []; - for (const item of items) { - if (typeof item.value === "function") { - const fnKey = item.value; - let nameMap = map.get(fnKey); - if (!nameMap) { - nameMap = new Map(); - map.set(fnKey, nameMap); - } - let desc = nameMap.get(item.name); - if (!desc) { - desc = { - value: item - }; - descriptors.push(desc); - if (!item.ownPass) nameMap.set(item.name, desc); - } else { - desc.value = item; - } - } else { - descriptors.push({ - value: item - }); - } - } - return descriptors.reduce((acc, desc) => { - acc.push(desc.value); - return acc; - }, []); -} -function configIsApplicable({ - options -}, dirname, context, configName) { - return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname, configName)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname, configName)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname, configName)); -} -function configFieldIsApplicable(context, test, dirname, configName) { - const patterns = Array.isArray(test) ? test : [test]; - return matchesPatterns(context, patterns, dirname, configName); -} -function ignoreListReplacer(_key, value) { - if (value instanceof RegExp) { - return String(value); - } - return value; -} -function shouldIgnore(context, ignore, only, dirname) { - if (ignore && matchesPatterns(context, ignore, dirname)) { - var _context$filename; - const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname}"`; - debug(message); - if (context.showConfig) { - console.log(message); - } - return true; - } - if (only && !matchesPatterns(context, only, dirname)) { - var _context$filename2; - const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`; - debug(message); - if (context.showConfig) { - console.log(message); - } - return true; - } - return false; -} -function matchesPatterns(context, patterns, dirname, configName) { - return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context, configName)); -} -function matchPattern(pattern, dirname, pathToTest, context, configName) { - if (typeof pattern === "function") { - return !!(0, _rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest, { - dirname, - envName: context.envName, - caller: context.caller - }); - } - if (typeof pathToTest !== "string") { - throw new _configError.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName); - } - if (typeof pattern === "string") { - pattern = (0, _patternToRegex.default)(pattern, dirname); - } - return pattern.test(pathToTest); -} -0 && 0; - -//# sourceMappingURL=config-chain.js.map diff --git a/node_modules/@babel/core/lib/config/config-chain.js.map b/node_modules/@babel/core/lib/config/config-chain.js.map deleted file mode 100644 index 92414e5..0000000 --- a/node_modules/@babel/core/lib/config/config-chain.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","_debug","_options","_patternToRegex","_printer","_rewriteStackTrace","_configError","_index","_caching","_configDescriptors","debug","buildDebug","buildPresetChain","arg","context","chain","buildPresetChainWalker","plugins","dedupDescriptors","presets","options","map","o","createConfigChainOptions","files","Set","exports","makeChainWalker","root","preset","loadPresetDescriptors","env","envName","loadPresetEnvDescriptors","overrides","index","loadPresetOverridesDescriptors","overridesEnv","loadPresetOverridesEnvDescriptors","createLogger","makeWeakCacheSync","buildRootDescriptors","alias","createUncachedDescriptors","makeStrongCacheSync","buildEnvDescriptors","buildOverrideDescriptors","buildOverrideEnvDescriptors","buildRootChain","opts","configReport","babelRcReport","programmaticLogger","ConfigPrinter","programmaticChain","loadProgrammaticChain","dirname","cwd","undefined","programmaticReport","output","configFile","loadConfig","caller","findRootConfig","babelrc","babelrcRoots","babelrcRootsDirectory","configFileChain","emptyChain","configFileLogger","validatedFile","validateConfigFile","result","loadFileChain","mergeChain","ignoreFile","babelrcFile","isIgnored","fileChain","filename","pkgData","findPackageData","babelrcLoadEnabled","ignore","config","findRelativeConfig","add","filepath","shouldIgnore","validateBabelrcFile","babelrcLogger","showConfig","console","log","filter","x","join","fileHandling","absoluteRoot","directories","includes","babelrcPatterns","Array","isArray","pat","path","resolve","length","some","pathPatternToRegex","directory","matchPattern","file","validate","validateExtendFile","input","createCachedDescriptors","baseLogger","buildProgrammaticLogger","loadFileChainWalker","loadFileDescriptors","loadFileEnvDescriptors","loadFileOverridesDescriptors","loadFileOverridesEnvDescriptors","buildFileLogger","configure","ChainFormatter","Config","descriptors","_","_context$caller","Programmatic","callerName","name","_options$env","_options$overrides","Error","_options$overrides2","_override$env","override","chainWalker","flattenedConfigs","rootOpts","configIsApplicable","push","envOpts","forEach","overrideOps","overrideEnvOpts","only","logger","mergeExtendsChain","mergeChainOpts","extends","has","from","delete","target","source","Object","assign","passPerPreset","test","include","exclude","hasOwnProperty","call","sourceMaps","sourceMap","items","Map","item","value","fnKey","nameMap","get","set","desc","ownPass","reduce","acc","configName","configFieldIsApplicable","patterns","matchesPatterns","ignoreListReplacer","_key","RegExp","String","_context$filename","message","JSON","stringify","_context$filename2","pattern","pathToTest","endHiddenCallStack","ConfigError"],"sources":["../../src/config/config-chain.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-use-before-define */\n\nimport path from \"node:path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { validate } from \"./validation/options.ts\";\nimport type {\n ConfigApplicableTest,\n BabelrcSearch,\n CallerMetadata,\n MatchItem,\n InputOptions,\n ConfigChainOptions,\n} from \"./validation/options.ts\";\nimport pathPatternToRegex from \"./pattern-to-regex.ts\";\nimport { ConfigPrinter, ChainFormatter } from \"./printer.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\n\nimport { endHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nconst debug = buildDebug(\"babel:config:config-chain\");\n\nimport {\n findPackageData,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile, FilePackageData } from \"./files/index.ts\";\n\nimport { makeWeakCacheSync, makeStrongCacheSync } from \"./caching.ts\";\n\nimport {\n createCachedDescriptors,\n createUncachedDescriptors,\n} from \"./config-descriptors.ts\";\nimport type {\n UnloadedDescriptor,\n OptionsAndDescriptors,\n ValidatedFile,\n} from \"./config-descriptors.ts\";\n\nexport type ConfigChain = {\n plugins: UnloadedDescriptor[];\n presets: UnloadedDescriptor[];\n options: ConfigChainOptions[];\n files: Set;\n};\n\nexport type PresetInstance = {\n options: InputOptions;\n alias: string;\n dirname: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type ConfigContext = {\n filename: string | undefined;\n cwd: string;\n root: string;\n envName: string;\n caller: CallerMetadata | undefined;\n showConfig: boolean;\n};\n\n/**\n * Build a config chain for a given preset.\n */\nexport function* buildPresetChain(\n arg: PresetInstance,\n context: any,\n): Handler {\n const chain = yield* buildPresetChainWalker(arg, context);\n if (!chain) return null;\n\n return {\n plugins: dedupDescriptors(chain.plugins),\n presets: dedupDescriptors(chain.presets),\n options: chain.options.map(o => createConfigChainOptions(o)),\n files: new Set(),\n };\n}\n\nexport const buildPresetChainWalker = makeChainWalker({\n root: preset => loadPresetDescriptors(preset),\n env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),\n overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),\n overridesEnv: (preset, index, envName) =>\n loadPresetOverridesEnvDescriptors(preset)(index)(envName),\n createLogger: () => () => {}, // Currently we don't support logging how preset is expanded\n});\nconst loadPresetDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n buildRootDescriptors(preset, preset.alias, createUncachedDescriptors),\n);\nconst loadPresetEnvDescriptors = makeWeakCacheSync((preset: PresetInstance) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadPresetOverridesDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadPresetOverridesEnvDescriptors = makeWeakCacheSync(\n (preset: PresetInstance) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n preset,\n preset.alias,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nexport type FileHandling = \"transpile\" | \"ignored\" | \"unsupported\";\nexport type RootConfigChain = ConfigChain & {\n babelrc: ConfigFile | undefined;\n config: ConfigFile | undefined;\n ignore: IgnoreFile | undefined;\n fileHandling: FileHandling;\n files: Set;\n};\n\n/**\n * Build a config chain for Babel's full root configuration.\n */\nexport function* buildRootChain(\n opts: InputOptions,\n context: ConfigContext,\n): Handler {\n let configReport, babelRcReport;\n const programmaticLogger = new ConfigPrinter();\n const programmaticChain = yield* loadProgrammaticChain(\n {\n options: opts,\n dirname: context.cwd,\n },\n context,\n undefined,\n programmaticLogger,\n );\n if (!programmaticChain) return null;\n const programmaticReport = yield* programmaticLogger.output();\n\n let configFile;\n if (typeof opts.configFile === \"string\") {\n configFile = yield* loadConfig(\n opts.configFile,\n context.cwd,\n context.envName,\n context.caller,\n );\n } else if (opts.configFile !== false) {\n configFile = yield* findRootConfig(\n context.root,\n context.envName,\n context.caller,\n );\n }\n\n let { babelrc, babelrcRoots } = opts;\n let babelrcRootsDirectory = context.cwd;\n\n const configFileChain = emptyChain();\n const configFileLogger = new ConfigPrinter();\n if (configFile) {\n const validatedFile = validateConfigFile(configFile);\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n configFileLogger,\n );\n if (!result) return null;\n configReport = yield* configFileLogger.output();\n\n // Allow config files to toggle `.babelrc` resolution on and off and\n // specify where the roots are.\n if (babelrc === undefined) {\n babelrc = validatedFile.options.babelrc;\n }\n if (babelrcRoots === undefined) {\n babelrcRootsDirectory = validatedFile.dirname;\n babelrcRoots = validatedFile.options.babelrcRoots;\n }\n\n mergeChain(configFileChain, result);\n }\n\n let ignoreFile, babelrcFile;\n let isIgnored = false;\n const fileChain = emptyChain();\n // resolve all .babelrc files\n if (\n (babelrc === true || babelrc === undefined) &&\n typeof context.filename === \"string\"\n ) {\n const pkgData = yield* findPackageData(context.filename);\n\n if (\n pkgData &&\n babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)\n ) {\n ({ ignore: ignoreFile, config: babelrcFile } = yield* findRelativeConfig(\n pkgData,\n context.envName,\n context.caller,\n ));\n\n if (ignoreFile) {\n fileChain.files.add(ignoreFile.filepath);\n }\n\n if (\n ignoreFile &&\n shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)\n ) {\n isIgnored = true;\n }\n\n if (babelrcFile && !isIgnored) {\n const validatedFile = validateBabelrcFile(babelrcFile);\n const babelrcLogger = new ConfigPrinter();\n const result = yield* loadFileChain(\n validatedFile,\n context,\n undefined,\n babelrcLogger,\n );\n if (!result) {\n isIgnored = true;\n } else {\n babelRcReport = yield* babelrcLogger.output();\n mergeChain(fileChain, result);\n }\n }\n\n if (babelrcFile && isIgnored) {\n fileChain.files.add(babelrcFile.filepath);\n }\n }\n }\n\n if (context.showConfig) {\n console.log(\n `Babel configs on \"${context.filename}\" (ascending priority):\\n` +\n // print config by the order of ascending priority\n [configReport, babelRcReport, programmaticReport]\n .filter(x => !!x)\n .join(\"\\n\\n\") +\n \"\\n-----End Babel configs-----\",\n );\n }\n // Insert file chain in front so programmatic options have priority\n // over configuration file chain items.\n const chain = mergeChain(\n mergeChain(mergeChain(emptyChain(), configFileChain), fileChain),\n programmaticChain,\n );\n\n return {\n plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),\n presets: isIgnored ? [] : dedupDescriptors(chain.presets),\n options: isIgnored\n ? []\n : chain.options.map(o => createConfigChainOptions(o)),\n fileHandling: isIgnored ? \"ignored\" : \"transpile\",\n ignore: ignoreFile || undefined,\n babelrc: babelrcFile || undefined,\n config: configFile || undefined,\n files: chain.files,\n };\n}\n\nfunction babelrcLoadEnabled(\n context: ConfigContext,\n pkgData: FilePackageData,\n babelrcRoots: BabelrcSearch | undefined,\n babelrcRootsDirectory: string,\n): boolean {\n if (typeof babelrcRoots === \"boolean\") return babelrcRoots;\n\n const absoluteRoot = context.root;\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcRoots === undefined) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n let babelrcPatterns = babelrcRoots;\n if (!Array.isArray(babelrcPatterns)) {\n babelrcPatterns = [babelrcPatterns];\n }\n babelrcPatterns = babelrcPatterns.map(pat => {\n return typeof pat === \"string\"\n ? path.resolve(babelrcRootsDirectory, pat)\n : pat;\n });\n\n // Fast path to avoid having to match patterns if the babelrc is just\n // loading in the standard root directory.\n if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {\n return pkgData.directories.includes(absoluteRoot);\n }\n\n return babelrcPatterns.some(pat => {\n if (typeof pat === \"string\") {\n pat = pathPatternToRegex(pat, babelrcRootsDirectory);\n }\n\n return pkgData.directories.some(directory => {\n return matchPattern(pat, babelrcRootsDirectory, directory, context);\n });\n });\n}\n\nconst validateConfigFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"configfile\", file.options, file.filepath),\n }),\n);\n\nconst validateBabelrcFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"babelrcfile\", file.options, file.filepath),\n }),\n);\n\nconst validateExtendFile = makeWeakCacheSync(\n (file: ConfigFile): ValidatedFile => ({\n filepath: file.filepath,\n dirname: file.dirname,\n options: validate(\"extendsfile\", file.options, file.filepath),\n }),\n);\n\n/**\n * Build a config chain for just the programmatic options passed into Babel.\n */\nconst loadProgrammaticChain = makeChainWalker({\n root: input => buildRootDescriptors(input, \"base\", createCachedDescriptors),\n env: (input, envName) =>\n buildEnvDescriptors(input, \"base\", createCachedDescriptors, envName),\n overrides: (input, index) =>\n buildOverrideDescriptors(input, \"base\", createCachedDescriptors, index),\n overridesEnv: (input, index, envName) =>\n buildOverrideEnvDescriptors(\n input,\n \"base\",\n createCachedDescriptors,\n index,\n envName,\n ),\n createLogger: (input, context, baseLogger) =>\n buildProgrammaticLogger(input, context, baseLogger),\n});\n\n/**\n * Build a config chain for a given file.\n */\nconst loadFileChainWalker = makeChainWalker({\n root: file => loadFileDescriptors(file),\n env: (file, envName) => loadFileEnvDescriptors(file)(envName),\n overrides: (file, index) => loadFileOverridesDescriptors(file)(index),\n overridesEnv: (file, index, envName) =>\n loadFileOverridesEnvDescriptors(file)(index)(envName),\n createLogger: (file, context, baseLogger) =>\n buildFileLogger(file.filepath, context, baseLogger),\n});\n\nfunction* loadFileChain(\n input: ValidatedFile,\n context: ConfigContext,\n files: Set,\n baseLogger: ConfigPrinter,\n) {\n const chain = yield* loadFileChainWalker(input, context, files, baseLogger);\n chain?.files.add(input.filepath);\n\n return chain;\n}\n\nconst loadFileDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n buildRootDescriptors(file, file.filepath, createUncachedDescriptors),\n);\nconst loadFileEnvDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((envName: string) =>\n buildEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n envName,\n ),\n ),\n);\nconst loadFileOverridesDescriptors = makeWeakCacheSync((file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n buildOverrideDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n ),\n ),\n);\nconst loadFileOverridesEnvDescriptors = makeWeakCacheSync(\n (file: ValidatedFile) =>\n makeStrongCacheSync((index: number) =>\n makeStrongCacheSync((envName: string) =>\n buildOverrideEnvDescriptors(\n file,\n file.filepath,\n createUncachedDescriptors,\n index,\n envName,\n ),\n ),\n ),\n);\n\nfunction buildFileLogger(\n filepath: string,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Config, {\n filepath,\n });\n}\n\nfunction buildRootDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: InputOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n) {\n return descriptors(dirname, options, alias);\n}\n\nfunction buildProgrammaticLogger(\n _: unknown,\n context: ConfigContext,\n baseLogger: ConfigPrinter | void,\n) {\n if (!baseLogger) {\n return () => {};\n }\n return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {\n callerName: context.caller?.name,\n });\n}\n\nfunction buildEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: InputOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n envName: string,\n) {\n const opts = options.env?.[envName];\n return opts ? descriptors(dirname, opts, `${alias}.env[\"${envName}\"]`) : null;\n}\n\nfunction buildOverrideDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: InputOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n) {\n const opts = options.overrides?.[index];\n if (!opts) throw new Error(\"Assertion failure - missing override\");\n\n return descriptors(dirname, opts, `${alias}.overrides[${index}]`);\n}\n\nfunction buildOverrideEnvDescriptors(\n { dirname, options }: Partial,\n alias: string,\n descriptors: (\n dirname: string,\n options: InputOptions,\n alias: string,\n ) => OptionsAndDescriptors,\n index: number,\n envName: string,\n) {\n const override = options.overrides?.[index];\n if (!override) throw new Error(\"Assertion failure - missing override\");\n\n const opts = override.env?.[envName];\n return opts\n ? descriptors(\n dirname,\n opts,\n `${alias}.overrides[${index}].env[\"${envName}\"]`,\n )\n : null;\n}\n\nfunction makeChainWalker<\n ArgT extends {\n options: InputOptions;\n dirname: string;\n filepath?: string;\n },\n>({\n root,\n env,\n overrides,\n overridesEnv,\n createLogger,\n}: {\n root: (configEntry: ArgT) => OptionsAndDescriptors;\n env: (configEntry: ArgT, env: string) => OptionsAndDescriptors | null;\n overrides: (configEntry: ArgT, index: number) => OptionsAndDescriptors;\n overridesEnv: (\n configEntry: ArgT,\n index: number,\n env: string,\n ) => OptionsAndDescriptors | null;\n createLogger: (\n configEntry: ArgT,\n context: ConfigContext,\n printer: ConfigPrinter | void,\n ) => (\n opts: OptionsAndDescriptors,\n index?: number | null,\n env?: string | null,\n ) => void;\n}): (\n configEntry: ArgT,\n context: ConfigContext,\n files?: Set,\n baseLogger?: ConfigPrinter,\n) => Handler {\n return function* chainWalker(input, context, files = new Set(), baseLogger) {\n const { dirname } = input;\n\n const flattenedConfigs: {\n config: OptionsAndDescriptors;\n index: number | undefined | null;\n envName: string | undefined | null;\n }[] = [];\n\n const rootOpts = root(input);\n if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: rootOpts,\n envName: undefined,\n index: undefined,\n });\n\n const envOpts = env(input, context.envName);\n if (\n envOpts &&\n configIsApplicable(envOpts, dirname, context, input.filepath)\n ) {\n flattenedConfigs.push({\n config: envOpts,\n envName: context.envName,\n index: undefined,\n });\n }\n\n (rootOpts.options.overrides || []).forEach((_, index) => {\n const overrideOps = overrides(input, index);\n if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {\n flattenedConfigs.push({\n config: overrideOps,\n index,\n envName: undefined,\n });\n\n const overrideEnvOpts = overridesEnv(input, index, context.envName);\n if (\n overrideEnvOpts &&\n configIsApplicable(\n overrideEnvOpts,\n dirname,\n context,\n input.filepath,\n )\n ) {\n flattenedConfigs.push({\n config: overrideEnvOpts,\n index,\n envName: context.envName,\n });\n }\n }\n });\n }\n\n // Process 'ignore' and 'only' before 'extends' items are processed so\n // that we don't do extra work loading extended configs if a file is\n // ignored.\n if (\n flattenedConfigs.some(\n ({\n config: {\n options: { ignore, only },\n },\n }) => shouldIgnore(context, ignore, only, dirname),\n )\n ) {\n return null;\n }\n\n const chain = emptyChain();\n const logger = createLogger(input, context, baseLogger);\n\n for (const { config, index, envName } of flattenedConfigs) {\n if (\n !(yield* mergeExtendsChain(\n chain,\n config.options,\n dirname,\n context,\n files,\n baseLogger,\n ))\n ) {\n return null;\n }\n\n logger(config, index, envName);\n yield* mergeChainOpts(chain, config);\n }\n return chain;\n };\n}\n\nfunction* mergeExtendsChain(\n chain: ConfigChain,\n opts: InputOptions,\n dirname: string,\n context: ConfigContext,\n files: Set,\n baseLogger?: ConfigPrinter,\n): Handler {\n if (opts.extends === undefined) return true;\n\n const file = yield* loadConfig(\n opts.extends,\n dirname,\n context.envName,\n context.caller,\n );\n\n if (files.has(file)) {\n throw new Error(\n `Configuration cycle detected loading ${file.filepath}.\\n` +\n `File already loaded following the config chain:\\n` +\n Array.from(files, file => ` - ${file.filepath}`).join(\"\\n\"),\n );\n }\n\n files.add(file);\n const fileChain = yield* loadFileChain(\n validateExtendFile(file),\n context,\n files,\n baseLogger,\n );\n files.delete(file);\n\n if (!fileChain) return false;\n\n mergeChain(chain, fileChain);\n\n return true;\n}\n\nfunction mergeChain(target: ConfigChain, source: ConfigChain): ConfigChain {\n target.options.push(...source.options);\n target.plugins.push(...source.plugins);\n target.presets.push(...source.presets);\n for (const file of source.files) {\n target.files.add(file);\n }\n\n return target;\n}\n\nfunction* mergeChainOpts(\n target: ConfigChain,\n { options, plugins, presets }: OptionsAndDescriptors,\n): Handler {\n target.options.push(options);\n target.plugins.push(...(yield* plugins()));\n target.presets.push(...(yield* presets()));\n\n return target;\n}\n\nfunction emptyChain(): ConfigChain {\n return {\n options: [],\n presets: [],\n plugins: [],\n files: new Set(),\n };\n}\n\nfunction createConfigChainOptions(opts: InputOptions): ConfigChainOptions {\n const options = {\n ...opts,\n };\n delete options.extends;\n delete options.env;\n delete options.overrides;\n delete options.plugins;\n delete options.presets;\n delete options.passPerPreset;\n delete options.ignore;\n delete options.only;\n delete options.test;\n delete options.include;\n delete options.exclude;\n\n // \"sourceMap\" is just aliased to sourceMap, so copy it over as\n // we merge the options together.\n if (Object.hasOwn(options, \"sourceMap\")) {\n options.sourceMaps = options.sourceMap;\n delete options.sourceMap;\n }\n return options;\n}\n\nfunction dedupDescriptors(\n items: UnloadedDescriptor[],\n): UnloadedDescriptor[] {\n const map = new Map<\n Function,\n Map }>\n >();\n\n const descriptors = [];\n\n for (const item of items) {\n if (typeof item.value === \"function\") {\n const fnKey = item.value;\n let nameMap = map.get(fnKey);\n if (!nameMap) {\n nameMap = new Map();\n map.set(fnKey, nameMap);\n }\n let desc = nameMap.get(item.name);\n if (!desc) {\n desc = { value: item };\n descriptors.push(desc);\n\n // Treat passPerPreset presets as unique, skipping them\n // in the merge processing steps.\n if (!item.ownPass) nameMap.set(item.name, desc);\n } else {\n desc.value = item;\n }\n } else {\n descriptors.push({ value: item });\n }\n }\n\n return descriptors.reduce((acc, desc) => {\n acc.push(desc.value);\n return acc;\n }, []);\n}\n\nfunction configIsApplicable(\n { options }: OptionsAndDescriptors,\n dirname: string,\n context: ConfigContext,\n configName: string,\n): boolean {\n return (\n (options.test === undefined ||\n configFieldIsApplicable(context, options.test, dirname, configName)) &&\n (options.include === undefined ||\n configFieldIsApplicable(context, options.include, dirname, configName)) &&\n (options.exclude === undefined ||\n !configFieldIsApplicable(context, options.exclude, dirname, configName))\n );\n}\n\nfunction configFieldIsApplicable(\n context: ConfigContext,\n test: ConfigApplicableTest,\n dirname: string,\n configName: string,\n): boolean {\n const patterns = Array.isArray(test) ? test : [test];\n\n return matchesPatterns(context, patterns, dirname, configName);\n}\n\n/**\n * Print the ignoreList-values in a more helpful way than the default.\n */\nfunction ignoreListReplacer(\n _key: string,\n value: MatchItem[] | MatchItem,\n): MatchItem[] | MatchItem | string {\n if (value instanceof RegExp) {\n return String(value);\n }\n\n return value;\n}\n\n/**\n * Tests if a filename should be ignored based on \"ignore\" and \"only\" options.\n */\nfunction shouldIgnore(\n context: ConfigContext,\n ignore: MatchItem[] | undefined | null,\n only: MatchItem[] | undefined | null,\n dirname: string,\n): boolean {\n if (ignore && matchesPatterns(context, ignore, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it matches one of \\`ignore: ${JSON.stringify(\n ignore,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n if (only && !matchesPatterns(context, only, dirname)) {\n const message = `No config is applied to \"${\n context.filename ?? \"(unknown)\"\n }\" because it fails to match one of \\`only: ${JSON.stringify(\n only,\n ignoreListReplacer,\n )}\\` from \"${dirname}\"`;\n debug(message);\n if (context.showConfig) {\n console.log(message);\n }\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns result of calling function with filename if pattern is a function.\n * Otherwise returns result of matching pattern Regex with filename.\n */\nfunction matchesPatterns(\n context: ConfigContext,\n patterns: MatchItem[],\n dirname: string,\n configName?: string,\n): boolean {\n return patterns.some(pattern =>\n matchPattern(pattern, dirname, context.filename, context, configName),\n );\n}\n\nfunction matchPattern(\n pattern: MatchItem,\n dirname: string,\n pathToTest: string | undefined,\n context: ConfigContext,\n configName?: string,\n): boolean {\n if (typeof pattern === \"function\") {\n return !!endHiddenCallStack(pattern)(pathToTest, {\n dirname,\n envName: context.envName,\n caller: context.caller,\n });\n }\n\n if (typeof pathToTest !== \"string\") {\n throw new ConfigError(\n `Configuration contains string/RegExp pattern, but no filename was passed to Babel`,\n configName,\n );\n }\n\n if (typeof pattern === \"string\") {\n pattern = pathPatternToRegex(pattern, dirname);\n }\n return pattern.test(pathToTest);\n}\n"],"mappings":";;;;;;;;AAEA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA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B,EACV;EACT,OAAOE,QAAQ,CAAC3E,IAAI,CAACsF,OAAO,IAC1BnF,YAAY,CAACmF,OAAO,EAAE3I,OAAO,EAAE1C,OAAO,CAACkE,QAAQ,EAAElE,OAAO,EAAEwK,UAAU,CACtE,CAAC;AACH;AAEA,SAAStE,YAAYA,CACnBmF,OAAkB,EAClB3I,OAAe,EACf4I,UAA8B,EAC9BtL,OAAsB,EACtBwK,UAAmB,EACV;EACT,IAAI,OAAOa,OAAO,KAAK,UAAU,EAAE;IACjC,OAAO,CAAC,CAAC,IAAAE,qCAAkB,EAACF,OAAO,CAAC,CAACC,UAAU,EAAE;MAC/C5I,OAAO;MACPxB,OAAO,EAAElB,OAAO,CAACkB,OAAO;MACxB+B,MAAM,EAAEjD,OAAO,CAACiD;IAClB,CAAC,CAAC;EACJ;EAEA,IAAI,OAAOqI,UAAU,KAAK,QAAQ,EAAE;IAClC,MAAM,IAAIE,oBAAW,CACnB,mFAAmF,EACnFhB,UACF,CAAC;EACH;EAEA,IAAI,OAAOa,OAAO,KAAK,QAAQ,EAAE;IAC/BA,OAAO,GAAG,IAAArF,uBAAkB,EAACqF,OAAO,EAAE3I,OAAO,CAAC;EAChD;EACA,OAAO2I,OAAO,CAAChC,IAAI,CAACiC,UAAU,CAAC;AACjC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js deleted file mode 100644 index 21fb414..0000000 --- a/node_modules/@babel/core/lib/config/config-descriptors.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createCachedDescriptors = createCachedDescriptors; -exports.createDescriptor = createDescriptor; -exports.createUncachedDescriptors = createUncachedDescriptors; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _functional = require("../gensync-utils/functional.js"); -var _index = require("./files/index.js"); -var _item = require("./item.js"); -var _caching = require("./caching.js"); -var _resolveTargets = require("./resolve-targets.js"); -function isEqualDescriptor(a, b) { - var _a$file, _b$file, _a$file2, _b$file2; - return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && ((_a$file = a.file) == null ? void 0 : _a$file.request) === ((_b$file = b.file) == null ? void 0 : _b$file.request) && ((_a$file2 = a.file) == null ? void 0 : _a$file2.resolved) === ((_b$file2 = b.file) == null ? void 0 : _b$file2.resolved); -} -function* handlerOf(value) { - return value; -} -function optionsWithResolvedBrowserslistConfigFile(options, dirname) { - if (typeof options.browserslistConfigFile === "string") { - options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname); - } - return options; -} -function createCachedDescriptors(dirname, options, alias) { - const { - plugins, - presets, - passPerPreset - } = options; - return { - options: optionsWithResolvedBrowserslistConfigFile(options, dirname), - plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]), - presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([]) - }; -} -function createUncachedDescriptors(dirname, options, alias) { - return { - options: optionsWithResolvedBrowserslistConfigFile(options, dirname), - plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname, alias)), - presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset)) - }; -} -const PRESET_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => { - const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCache)(function* (passPerPreset) { - const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset); - return descriptors.map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)); - })); -}); -const PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => { - const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCache)(function* (alias) { - const descriptors = yield* createPluginDescriptors(items, dirname, alias); - return descriptors.map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc)); - }); -}); -const DEFAULT_OPTIONS = {}; -function loadCachedDescriptor(cache, desc) { - const { - value, - options = DEFAULT_OPTIONS - } = desc; - if (options === false) return desc; - let cacheByOptions = cache.get(value); - if (!cacheByOptions) { - cacheByOptions = new WeakMap(); - cache.set(value, cacheByOptions); - } - let possibilities = cacheByOptions.get(options); - if (!possibilities) { - possibilities = []; - cacheByOptions.set(options, possibilities); - } - if (!possibilities.includes(desc)) { - const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc)); - if (matches.length > 0) { - return matches[0]; - } - possibilities.push(desc); - } - return desc; -} -function* createPresetDescriptors(items, dirname, alias, passPerPreset) { - return yield* createDescriptors("preset", items, dirname, alias, passPerPreset); -} -function* createPluginDescriptors(items, dirname, alias) { - return yield* createDescriptors("plugin", items, dirname, alias); -} -function* createDescriptors(type, items, dirname, alias, ownPass) { - const descriptors = yield* _gensync().all(items.map((item, index) => createDescriptor(item, dirname, { - type, - alias: `${alias}$${index}`, - ownPass: !!ownPass - }))); - assertNoDuplicates(descriptors); - return descriptors; -} -function* createDescriptor(pair, dirname, { - type, - alias, - ownPass -}) { - const desc = (0, _item.getItemDescriptor)(pair); - if (desc) { - return desc; - } - let name; - let options; - let value = pair; - if (Array.isArray(value)) { - if (value.length === 3) { - [value, options, name] = value; - } else { - [value, options] = value; - } - } - let file = undefined; - let filepath = null; - if (typeof value === "string") { - if (typeof type !== "string") { - throw new Error("To resolve a string-based item, the type of item must be given"); - } - const resolver = type === "plugin" ? _index.loadPlugin : _index.loadPreset; - const request = value; - ({ - filepath, - value - } = yield* resolver(value, dirname)); - file = { - request, - resolved: filepath - }; - } - if (!value) { - throw new Error(`Unexpected falsy value: ${String(value)}`); - } - if (typeof value === "object" && value.__esModule) { - if (value.default) { - value = value.default; - } else { - throw new Error("Must export a default export when using ES6 modules."); - } - } - if (typeof value !== "object" && typeof value !== "function") { - throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`); - } - if (filepath !== null && typeof value === "object" && value) { - throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`); - } - return { - name, - alias: filepath || alias, - value, - options, - dirname, - ownPass, - file - }; -} -function assertNoDuplicates(items) { - const map = new Map(); - for (const item of items) { - if (typeof item.value !== "function") continue; - let nameMap = map.get(item.value); - if (!nameMap) { - nameMap = new Set(); - map.set(item.value, nameMap); - } - if (nameMap.has(item.name)) { - const conflicts = items.filter(i => i.value === item.value); - throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n")); - } - nameMap.add(item.name); - } -} -0 && 0; - -//# sourceMappingURL=config-descriptors.js.map diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js.map b/node_modules/@babel/core/lib/config/config-descriptors.js.map deleted file mode 100644 index b51b2cb..0000000 --- a/node_modules/@babel/core/lib/config/config-descriptors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_functional","_index","_item","_caching","_resolveTargets","isEqualDescriptor","a","b","_a$file","_b$file","_a$file2","_b$file2","name","value","options","dirname","alias","ownPass","file","request","resolved","handlerOf","optionsWithResolvedBrowserslistConfigFile","browserslistConfigFile","resolveBrowserslistConfigFile","createCachedDescriptors","plugins","presets","passPerPreset","createCachedPluginDescriptors","createCachedPresetDescriptors","createUncachedDescriptors","once","createPluginDescriptors","createPresetDescriptors","PRESET_DESCRIPTOR_CACHE","WeakMap","makeWeakCacheSync","items","cache","using","dir","makeStrongCacheSync","makeStrongCache","descriptors","map","desc","loadCachedDescriptor","PLUGIN_DESCRIPTOR_CACHE","DEFAULT_OPTIONS","cacheByOptions","get","set","possibilities","includes","matches","filter","possibility","length","push","createDescriptors","type","gensync","all","item","index","createDescriptor","assertNoDuplicates","pair","getItemDescriptor","Array","isArray","undefined","filepath","Error","resolver","loadPlugin","loadPreset","String","__esModule","default","Map","nameMap","Set","has","conflicts","i","JSON","stringify","join","add"],"sources":["../../src/config/config-descriptors.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport { once } from \"../gensync-utils/functional.ts\";\n\nimport { loadPlugin, loadPreset } from \"./files/index.ts\";\n\nimport { getItemDescriptor } from \"./item.ts\";\n\nimport {\n makeWeakCacheSync,\n makeStrongCacheSync,\n makeStrongCache,\n} from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\n\nimport type {\n PluginItem,\n InputOptions,\n PresetItem,\n} from \"./validation/options.ts\";\n\nimport { resolveBrowserslistConfigFile } from \"./resolve-targets.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\n// Represents a config object and functions to lazily load the descriptors\n// for the plugins and presets so we don't load the plugins/presets unless\n// the options object actually ends up being applicable.\nexport type OptionsAndDescriptors = {\n options: InputOptions;\n plugins: () => Handler[]>;\n presets: () => Handler[]>;\n};\n\n// Represents a plugin or presets at a given location in a config object.\n// At this point these have been resolved to a specific object or function,\n// but have not yet been executed to call functions with options.\nexport interface UnloadedDescriptor {\n name: string | undefined;\n value: object | ((api: API, options: Options, dirname: string) => unknown);\n options: Options;\n dirname: string;\n alias: string;\n ownPass?: boolean;\n file?: {\n request: string;\n resolved: string;\n };\n}\n\nfunction isEqualDescriptor(\n a: UnloadedDescriptor,\n b: UnloadedDescriptor,\n): boolean {\n return (\n a.name === b.name &&\n a.value === b.value &&\n a.options === b.options &&\n a.dirname === b.dirname &&\n a.alias === b.alias &&\n a.ownPass === b.ownPass &&\n a.file?.request === b.file?.request &&\n a.file?.resolved === b.file?.resolved\n );\n}\n\nexport type ValidatedFile = {\n filepath: string;\n dirname: string;\n options: InputOptions;\n};\n\n// eslint-disable-next-line require-yield\nfunction* handlerOf(value: T): Handler {\n return value;\n}\n\nfunction optionsWithResolvedBrowserslistConfigFile(\n options: InputOptions,\n dirname: string,\n): InputOptions {\n if (typeof options.browserslistConfigFile === \"string\") {\n options.browserslistConfigFile = resolveBrowserslistConfigFile(\n options.browserslistConfigFile,\n dirname,\n );\n }\n return options;\n}\n\n/**\n * Create a set of descriptors from a given options object, preserving\n * descriptor identity based on the identity of the plugin/preset arrays\n * themselves, and potentially on the identity of the plugins/presets + options.\n */\nexport function createCachedDescriptors(\n dirname: string,\n options: InputOptions,\n alias: string,\n): OptionsAndDescriptors {\n const { plugins, presets, passPerPreset } = options;\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n plugins: plugins\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPluginDescriptors(plugins, dirname)(alias)\n : () => handlerOf([]),\n presets: presets\n ? () =>\n // @ts-expect-error todo(flow->ts) ts complains about incorrect arguments\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n createCachedPresetDescriptors(presets, dirname)(alias)(\n !!passPerPreset,\n )\n : () => handlerOf([]),\n };\n}\n\n/**\n * Create a set of descriptors from a given options object, with consistent\n * identity for the descriptors, but not caching based on any specific identity.\n */\nexport function createUncachedDescriptors(\n dirname: string,\n options: InputOptions,\n alias: string,\n): OptionsAndDescriptors {\n return {\n options: optionsWithResolvedBrowserslistConfigFile(options, dirname),\n // The returned result here is cached to represent a config object in\n // memory, so we build and memoize the descriptors to ensure the same\n // values are returned consistently.\n plugins: once(() =>\n createPluginDescriptors(options.plugins || [], dirname, alias),\n ),\n presets: once(() =>\n createPresetDescriptors(\n options.presets || [],\n dirname,\n alias,\n !!options.passPerPreset,\n ),\n ),\n };\n}\n\nconst PRESET_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPresetDescriptors = makeWeakCacheSync(\n (items: PresetItem[], cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCacheSync((alias: string) =>\n makeStrongCache(function* (\n passPerPreset: boolean,\n ): Handler[]> {\n const descriptors = yield* createPresetDescriptors(\n items,\n dirname,\n alias,\n passPerPreset,\n );\n return descriptors.map(\n // Items are cached using the overall preset array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc),\n );\n }),\n );\n },\n);\n\nconst PLUGIN_DESCRIPTOR_CACHE = new WeakMap();\nconst createCachedPluginDescriptors = makeWeakCacheSync(\n (items: PluginItem[], cache: CacheConfigurator) => {\n const dirname = cache.using(dir => dir);\n return makeStrongCache(function* (\n alias: string,\n ): Handler[]> {\n const descriptors = yield* createPluginDescriptors(items, dirname, alias);\n return descriptors.map(\n // Items are cached using the overall plugin array identity when\n // possibly, but individual descriptors are also cached if a match\n // can be found in the previously-used descriptor lists.\n desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc),\n );\n });\n },\n);\n\n/**\n * When no options object is given in a descriptor, this object is used\n * as a WeakMap key in order to have consistent identity.\n */\nconst DEFAULT_OPTIONS = {};\n\n/**\n * Given the cache and a descriptor, returns a matching descriptor from the\n * cache, or else returns the input descriptor and adds it to the cache for\n * next time.\n */\nfunction loadCachedDescriptor(\n cache: WeakMap[]>>,\n desc: UnloadedDescriptor,\n) {\n const { value, options = DEFAULT_OPTIONS } = desc;\n if (options === false) return desc;\n\n let cacheByOptions = cache.get(value);\n if (!cacheByOptions) {\n cacheByOptions = new WeakMap();\n cache.set(value, cacheByOptions);\n }\n\n let possibilities = cacheByOptions.get(options);\n if (!possibilities) {\n possibilities = [];\n cacheByOptions.set(options, possibilities);\n }\n\n if (!possibilities.includes(desc)) {\n const matches = possibilities.filter(possibility =>\n isEqualDescriptor(possibility, desc),\n );\n if (matches.length > 0) {\n return matches[0];\n }\n\n possibilities.push(desc);\n }\n\n return desc;\n}\n\nfunction* createPresetDescriptors(\n items: PresetItem[],\n dirname: string,\n alias: string,\n passPerPreset: boolean,\n): Handler[]> {\n return yield* createDescriptors(\n \"preset\",\n items,\n dirname,\n alias,\n passPerPreset,\n );\n}\n\nfunction* createPluginDescriptors(\n items: PluginItem[],\n dirname: string,\n alias: string,\n): Handler[]> {\n return yield* createDescriptors(\"plugin\", items, dirname, alias);\n}\n\nfunction* createDescriptors(\n type: Type,\n items: Type extends \"plugin\" ? PluginItem[] : PresetItem[],\n dirname: string,\n alias: string,\n ownPass?: boolean,\n): Handler<\n UnloadedDescriptor[]\n> {\n const descriptors = yield* gensync.all(\n items.map((item, index) =>\n createDescriptor(item, dirname, {\n type,\n alias: `${alias}$${index}`,\n ownPass: !!ownPass,\n }),\n ),\n );\n\n assertNoDuplicates(descriptors);\n\n return descriptors;\n}\n\n/**\n * Given a plugin/preset item, resolve it into a standard format.\n */\nexport function* createDescriptor(\n pair: PluginItem | PresetItem,\n dirname: string,\n {\n type,\n alias,\n ownPass,\n }: {\n type?: \"plugin\" | \"preset\";\n alias: string;\n ownPass?: boolean;\n },\n): Handler> {\n const desc = getItemDescriptor(pair);\n if (desc) {\n return desc;\n }\n\n let name;\n let options;\n let value = pair;\n if (Array.isArray(value)) {\n if (value.length === 3) {\n [value, options, name] = value;\n } else {\n [value, options] = value;\n }\n }\n\n let file = undefined;\n let filepath = null;\n if (typeof value === \"string\") {\n if (typeof type !== \"string\") {\n throw new Error(\n \"To resolve a string-based item, the type of item must be given\",\n );\n }\n const resolver = type === \"plugin\" ? loadPlugin : loadPreset;\n const request = value;\n\n // @ts-expect-error value must be a PluginItem\n ({ filepath, value } = yield* resolver(value, dirname));\n\n file = {\n request,\n resolved: filepath,\n };\n }\n\n if (!value) {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n throw new Error(`Unexpected falsy value: ${String(value)}`);\n }\n\n // @ts-expect-error Handle transpiled ES6 modules.\n if (typeof value === \"object\" && value.__esModule) {\n // @ts-expect-error Handle transpiled ES6 modules.\n if (value.default) {\n // @ts-expect-error Handle transpiled ES6 modules.\n value = value.default;\n } else {\n throw new Error(\"Must export a default export when using ES6 modules.\");\n }\n }\n\n if (typeof value !== \"object\" && typeof value !== \"function\") {\n throw new Error(\n `Unsupported format: ${typeof value}. Expected an object or a function.`,\n );\n }\n\n if (filepath !== null && typeof value === \"object\" && value) {\n // We allow object values for plugins/presets nested directly within a\n // config object, because it can be useful to define them in nested\n // configuration contexts.\n throw new Error(\n `Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`,\n );\n }\n\n return {\n name,\n alias: filepath || alias,\n value,\n options,\n dirname,\n ownPass,\n file,\n };\n}\n\nfunction assertNoDuplicates(items: UnloadedDescriptor[]): void {\n const map = new Map();\n\n for (const item of items) {\n if (typeof item.value !== \"function\") continue;\n\n let nameMap = map.get(item.value);\n if (!nameMap) {\n nameMap = new Set();\n map.set(item.value, nameMap);\n }\n\n if (nameMap.has(item.name)) {\n const conflicts = items.filter(i => i.value === item.value);\n throw new Error(\n [\n `Duplicate plugin/preset detected.`,\n `If you'd like to use two separate instances of a plugin,`,\n `they need separate names, e.g.`,\n ``,\n ` plugins: [`,\n ` ['some-plugin', {}],`,\n ` ['some-plugin', {}, 'some unique name'],`,\n ` ]`,\n ``,\n `Duplicates detected are:`,\n `${JSON.stringify(conflicts, null, 2)}`,\n ].join(\"\\n\"),\n );\n }\n\n nameMap.add(item.name);\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAaA,IAAAK,eAAA,GAAAL,OAAA;AA4BA,SAASM,iBAAiBA,C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B,GAAGa,IAAI,CAACC,SAAS,CAACH,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CACxC,CAACI,IAAI,CAAC,IAAI,CACb,CAAC;IACH;IAEAP,OAAO,CAACQ,GAAG,CAAC1B,IAAI,CAACpD,IAAI,CAAC;EACxB;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js deleted file mode 100644 index 582fc32..0000000 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ROOT_CONFIG_FILENAMES = void 0; -exports.findConfigUpwards = findConfigUpwards; -exports.findRelativeConfig = findRelativeConfig; -exports.findRootConfig = findRootConfig; -exports.loadConfig = loadConfig; -exports.resolveShowConfigPath = resolveShowConfigPath; -function _debug() { - const data = require("debug"); - _debug = function () { - return data; - }; - return data; -} -function _fs() { - const data = require("fs"); - _fs = function () { - return data; - }; - return data; -} -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _json() { - const data = require("json5"); - _json = function () { - return data; - }; - return data; -} -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _caching = require("../caching.js"); -var _configApi = require("../helpers/config-api.js"); -var _utils = require("./utils.js"); -var _moduleTypes = require("./module-types.js"); -var _patternToRegex = require("../pattern-to-regex.js"); -var _configError = require("../../errors/config-error.js"); -var fs = require("../../gensync-utils/fs.js"); -require("module"); -var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js"); -var _async = require("../../gensync-utils/async.js"); -const debug = _debug()("babel:config:loading:files:configuration"); -const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts", "babel.config.ts", "babel.config.mts"]; -const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"]; -const BABELIGNORE_FILENAME = ".babelignore"; -const runConfig = (0, _caching.makeWeakCache)(function* runConfig(options, cache) { - yield* []; - return { - options: (0, _rewriteStackTrace.endHiddenCallStack)(options)((0, _configApi.makeConfigAPI)(cache)), - cacheNeedsConfiguration: !cache.configured() - }; -}); -function* readConfigCode(filepath, data) { - if (!_fs().existsSync(filepath)) return null; - let options = yield* (0, _moduleTypes.default)(filepath, (yield* (0, _async.isAsync)()) ? "auto" : "require", "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", "You appear to be using a configuration file that contains top-level " + "await, which is only supported when running Babel asynchronously."); - let cacheNeedsConfiguration = false; - if (typeof options === "function") { - ({ - options, - cacheNeedsConfiguration - } = yield* runConfig(options, data)); - } - if (!options || typeof options !== "object" || Array.isArray(options)) { - throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath); - } - if (typeof options.then === "function") { - options.catch == null || options.catch(() => {}); - throw new _configError.default(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`, filepath); - } - if (cacheNeedsConfiguration) throwConfigError(filepath); - return buildConfigFileObject(options, filepath); -} -const cfboaf = new WeakMap(); -function buildConfigFileObject(options, filepath) { - let configFilesByFilepath = cfboaf.get(options); - if (!configFilesByFilepath) { - cfboaf.set(options, configFilesByFilepath = new Map()); - } - let configFile = configFilesByFilepath.get(filepath); - if (!configFile) { - configFile = { - filepath, - dirname: _path().dirname(filepath), - options - }; - configFilesByFilepath.set(filepath, configFile); - } - return configFile; -} -const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => { - const babel = file.options.babel; - if (babel === undefined) return null; - if (typeof babel !== "object" || Array.isArray(babel) || babel === null) { - throw new _configError.default(`.babel property must be an object`, file.filepath); - } - return { - filepath: file.filepath, - dirname: file.dirname, - options: babel - }; -}); -const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => { - let options; - try { - options = _json().parse(content); - } catch (err) { - throw new _configError.default(`Error while parsing config - ${err.message}`, filepath); - } - if (!options) throw new _configError.default(`No config detected`, filepath); - if (typeof options !== "object") { - throw new _configError.default(`Config returned typeof ${typeof options}`, filepath); - } - if (Array.isArray(options)) { - throw new _configError.default(`Expected config object but found array`, filepath); - } - delete options.$schema; - return { - filepath, - dirname: _path().dirname(filepath), - options - }; -}); -const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => { - const ignoreDir = _path().dirname(filepath); - const ignorePatterns = content.split("\n").map(line => line.replace(/#.*$/, "").trim()).filter(Boolean); - for (const pattern of ignorePatterns) { - if (pattern.startsWith("!")) { - throw new _configError.default(`Negation of file paths is not supported.`, filepath); - } - } - return { - filepath, - dirname: _path().dirname(filepath), - ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir)) - }; -}); -function findConfigUpwards(rootDir) { - let dirname = rootDir; - for (;;) { - for (const filename of ROOT_CONFIG_FILENAMES) { - if (_fs().existsSync(_path().join(dirname, filename))) { - return dirname; - } - } - const nextDir = _path().dirname(dirname); - if (dirname === nextDir) break; - dirname = nextDir; - } - return null; -} -function* findRelativeConfig(packageData, envName, caller) { - let config = null; - let ignore = null; - const dirname = _path().dirname(packageData.filepath); - for (const loc of packageData.directories) { - if (!config) { - var _packageData$pkg; - config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null); - } - if (!ignore) { - const ignoreLoc = _path().join(loc, BABELIGNORE_FILENAME); - ignore = yield* readIgnoreConfig(ignoreLoc); - if (ignore) { - debug("Found ignore %o from %o.", ignore.filepath, dirname); - } - } - } - return { - config, - ignore - }; -} -function findRootConfig(dirname, envName, caller) { - return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller); -} -function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) { - const configs = yield* _gensync().all(names.map(filename => readConfig(_path().join(dirname, filename), envName, caller))); - const config = configs.reduce((previousConfig, config) => { - if (config && previousConfig) { - throw new _configError.default(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`); - } - return config || previousConfig; - }, previousConfig); - if (config) { - debug("Found configuration %o from %o.", config.filepath, dirname); - } - return config; -} -function* loadConfig(name, dirname, envName, caller) { - const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(name, { - paths: [dirname] - }); - const conf = yield* readConfig(filepath, envName, caller); - if (!conf) { - throw new _configError.default(`Config file contains no configuration data`, filepath); - } - debug("Loaded config %o from %o.", name, dirname); - return conf; -} -function readConfig(filepath, envName, caller) { - const ext = _path().extname(filepath); - switch (ext) { - case ".js": - case ".cjs": - case ".mjs": - case ".ts": - case ".cts": - case ".mts": - return readConfigCode(filepath, { - envName, - caller - }); - default: - return readConfigJSON5(filepath); - } -} -function* resolveShowConfigPath(dirname) { - const targetPath = process.env.BABEL_SHOW_CONFIG_FOR; - if (targetPath != null) { - const absolutePath = _path().resolve(dirname, targetPath); - const stats = yield* fs.stat(absolutePath); - if (!stats.isFile()) { - throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`); - } - return absolutePath; - } - return null; -} -function throwConfigError(filepath) { - throw new _configError.default(`\ -Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured -for various types of caching, using the first param of their handler functions: - -module.exports = function(api) { - // The API exposes the following: - - // Cache the returned value forever and don't call this function again. - api.cache(true); - - // Don't cache at all. Not recommended because it will be very slow. - api.cache(false); - - // Cached based on the value of some function. If this function returns a value different from - // a previously-encountered value, the plugins will re-evaluate. - var env = api.cache(() => process.env.NODE_ENV); - - // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for - // any possible NODE_ENV value that might come up during plugin execution. - var isProd = api.cache(() => process.env.NODE_ENV === "production"); - - // .cache(fn) will perform a linear search though instances to find the matching plugin based - // based on previous instantiated plugins. If you want to recreate the plugin and discard the - // previous instance whenever something changes, you may use: - var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production"); - - // Note, we also expose the following more-verbose versions of the above examples: - api.cache.forever(); // api.cache(true) - api.cache.never(); // api.cache(false) - api.cache.using(fn); // api.cache(fn) - - // Return the value that will be cached. - return { }; -};`, filepath); -} -0 && 0; - -//# sourceMappingURL=configuration.js.map diff --git a/node_modules/@babel/core/lib/config/files/configuration.js.map b/node_modules/@babel/core/lib/config/files/configuration.js.map deleted file mode 100644 index 07c99ef..0000000 --- a/node_modules/@babel/core/lib/config/files/configuration.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_debug","data","require","_fs","_path","_json","_gensync","_caching","_configApi","_utils","_moduleTypes","_patternToRegex","_configError","fs","_rewriteStackTrace","_async","debug","buildDebug","ROOT_CONFIG_FILENAMES","exports","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","runConfig","makeWeakCache","options","cache","endHiddenCallStack","makeConfigAPI","cacheNeedsConfiguration","configured","readConfigCode","filepath","nodeFs","existsSync","loadCodeDefault","isAsync","Array","isArray","ConfigError","then","catch","throwConfigError","buildConfigFileObject","cfboaf","WeakMap","configFilesByFilepath","get","set","Map","configFile","dirname","path","packageToBabelConfig","makeWeakCacheSync","file","babel","undefined","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","$schema","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","Boolean","pattern","startsWith","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","_packageData$pkg","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","v","w","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","conf","ext","extname","resolveShowConfigPath","targetPath","env","BABEL_SHOW_CONFIG_FOR","absolutePath","stats","stat","isFile"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"node:fs\";\nimport path from \"node:path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeWeakCache, makeWeakCacheSync } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport { makeConfigAPI } from \"../helpers/config-api.ts\";\nimport type { ConfigAPI } from \"../helpers/config-api.ts\";\nimport { makeStaticFileCache } from \"./utils.ts\";\nimport loadCodeDefault from \"./module-types.ts\";\nimport pathPatternToRegex from \"../pattern-to-regex.ts\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types.ts\";\nimport type { CallerMetadata, InputOptions } from \"../validation/options.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport * as fs from \"../../gensync-utils/fs.ts\";\n\nimport { createRequire } from \"node:module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport { isAsync } from \"../../gensync-utils/async.ts\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n \"babel.config.js\",\n \"babel.config.cjs\",\n \"babel.config.mjs\",\n \"babel.config.json\",\n \"babel.config.cts\",\n \"babel.config.ts\",\n \"babel.config.mts\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n \".babelrc\",\n \".babelrc.js\",\n \".babelrc.cjs\",\n \".babelrc.mjs\",\n \".babelrc.json\",\n \".babelrc.cts\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\ntype ConfigCacheData = {\n envName: string;\n caller: CallerMetadata | undefined;\n};\n\nconst runConfig = makeWeakCache(function* runConfig(\n options: Function,\n cache: CacheConfigurator,\n): Handler<{\n options: InputOptions | null;\n cacheNeedsConfiguration: boolean;\n}> {\n // if we want to make it possible to use async configs\n yield* [];\n\n return {\n options: endHiddenCallStack(options as any as (api: ConfigAPI) => unknown)(\n makeConfigAPI(cache),\n ),\n cacheNeedsConfiguration: !cache.configured(),\n };\n});\n\nfunction* readConfigCode(\n filepath: string,\n data: ConfigCacheData,\n): Handler {\n if (!nodeFs.existsSync(filepath)) return null;\n\n let options = yield* loadCodeDefault(\n filepath,\n (yield* isAsync()) ? \"auto\" : \"require\",\n \"You appear to be using a native ECMAScript module configuration \" +\n \"file, which is only supported when running Babel asynchronously \" +\n \"or when using the Node.js `--experimental-require-module` flag.\",\n \"You appear to be using a configuration file that contains top-level \" +\n \"await, which is only supported when running Babel asynchronously.\",\n );\n\n let cacheNeedsConfiguration = false;\n if (typeof options === \"function\") {\n ({ options, cacheNeedsConfiguration } = yield* runConfig(options, data));\n }\n\n if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n throw new ConfigError(\n `Configuration should be an exported JavaScript object.`,\n filepath,\n );\n }\n\n // @ts-expect-error todo(flow->ts)\n if (typeof options.then === \"function\") {\n // @ts-expect-error We use ?. in case options is a thenable but not a promise\n options.catch?.(() => {});\n throw new ConfigError(\n `You appear to be using an async configuration, ` +\n `which your current version of Babel does not support. ` +\n `We may add support for this in the future, ` +\n `but if you're on the most recent version of @babel/core and still ` +\n `seeing this error, then you'll need to synchronously return your config.`,\n filepath,\n );\n }\n\n if (cacheNeedsConfiguration) throwConfigError(filepath);\n\n return buildConfigFileObject(options, filepath);\n}\n\n// We cache the generated ConfigFile object rather than creating a new one\n// every time, so that it can be used as a cache key in other functions.\nconst cfboaf /* configFilesByOptionsAndFilepath */ = new WeakMap<\n InputOptions,\n Map\n>();\nfunction buildConfigFileObject(\n options: InputOptions,\n filepath: string,\n): ConfigFile {\n let configFilesByFilepath = cfboaf.get(options);\n if (!configFilesByFilepath) {\n cfboaf.set(options, (configFilesByFilepath = new Map()));\n }\n\n let configFile = configFilesByFilepath.get(filepath);\n if (!configFile) {\n configFile = {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n configFilesByFilepath.set(filepath, configFile);\n }\n\n return configFile;\n}\n\nconst packageToBabelConfig = makeWeakCacheSync(\n (file: ConfigFile): ConfigFile | null => {\n const babel: unknown = file.options.babel;\n\n if (babel === undefined) return null;\n\n if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n throw new ConfigError(`.babel property must be an object`, file.filepath);\n }\n\n return {\n filepath: file.filepath,\n dirname: file.dirname,\n options: babel,\n };\n },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n let options;\n try {\n options = json5.parse(content);\n } catch (err) {\n throw new ConfigError(\n `Error while parsing config - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new ConfigError(`No config detected`, filepath);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n delete options.$schema;\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n const ignoreDir = path.dirname(filepath);\n const ignorePatterns = content\n .split(\"\\n\")\n .map(line =>\n line.replace(process.env.BABEL_8_BREAKING ? /^#.*$/ : /#.*$/, \"\").trim(),\n )\n .filter(Boolean);\n\n for (const pattern of ignorePatterns) {\n if (pattern.startsWith(\"!\")) {\n throw new ConfigError(\n `Negation of file paths is not supported.`,\n filepath,\n );\n }\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n ignore: ignorePatterns.map(pattern =>\n pathPatternToRegex(pattern, ignoreDir),\n ),\n };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n let dirname = rootDir;\n for (;;) {\n for (const filename of ROOT_CONFIG_FILENAMES) {\n if (nodeFs.existsSync(path.join(dirname, filename))) {\n return dirname;\n }\n }\n\n const nextDir = path.dirname(dirname);\n if (dirname === nextDir) break;\n dirname = nextDir;\n }\n\n return null;\n}\n\nexport function* findRelativeConfig(\n packageData: FilePackageData,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n let config = null;\n let ignore = null;\n\n const dirname = path.dirname(packageData.filepath);\n\n for (const loc of packageData.directories) {\n if (!config) {\n config = yield* loadOneConfig(\n RELATIVE_CONFIG_FILENAMES,\n loc,\n envName,\n caller,\n packageData.pkg?.dirname === loc\n ? packageToBabelConfig(packageData.pkg)\n : null,\n );\n }\n\n if (!ignore) {\n const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n ignore = yield* readIgnoreConfig(ignoreLoc);\n\n if (ignore) {\n debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n }\n }\n }\n\n return { config, ignore };\n}\n\nexport function findRootConfig(\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n names: string[],\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n previousConfig: ConfigFile | null = null,\n): Handler {\n const configs = yield* gensync.all(\n names.map(filename =>\n readConfig(path.join(dirname, filename), envName, caller),\n ),\n );\n const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n if (config && previousConfig) {\n throw new ConfigError(\n `Multiple configuration files found. Please remove one:\\n` +\n ` - ${path.basename(previousConfig.filepath)}\\n` +\n ` - ${config.filepath}\\n` +\n `from ${dirname}`,\n );\n }\n\n return config || previousConfig;\n }, previousConfig);\n\n if (config) {\n debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n }\n return config;\n}\n\nexport function* loadConfig(\n name: string,\n dirname: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const filepath = require.resolve(name, { paths: [dirname] });\n\n const conf = yield* readConfig(filepath, envName, caller);\n if (!conf) {\n throw new ConfigError(\n `Config file contains no configuration data`,\n filepath,\n );\n }\n\n debug(\"Loaded config %o from %o.\", name, dirname);\n return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n filepath: string,\n envName: string,\n caller: CallerMetadata | undefined,\n): Handler {\n const ext = path.extname(filepath);\n switch (ext) {\n case \".js\":\n case \".cjs\":\n case \".mjs\":\n case \".ts\":\n case \".cts\":\n case \".mts\":\n return readConfigCode(filepath, { envName, caller });\n default:\n return readConfigJSON5(filepath);\n }\n}\n\nexport function* resolveShowConfigPath(\n dirname: string,\n): Handler {\n const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n if (targetPath != null) {\n const absolutePath = path.resolve(dirname, targetPath);\n const stats = yield* fs.stat(absolutePath);\n if (!stats.isFile()) {\n throw new Error(\n `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n );\n }\n return absolutePath;\n }\n return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n throw new ConfigError(\n `\\\nCaching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n // The API exposes the following:\n\n // Cache the returned value forever and don't call this function again.\n api.cache(true);\n\n // Don't cache at all. Not recommended because it will be very slow.\n api.cache(false);\n\n // Cached based on the value of some function. If this function returns a value different from\n // a previously-encountered value, the plugins will re-evaluate.\n var env = api.cache(() => process.env.NODE_ENV);\n\n // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n // any possible NODE_ENV value that might come up during plugin execution.\n var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n // .cache(fn) will perform a linear search though instances to find the matching plugin based\n // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n // previous instance whenever something changes, you may use:\n var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n // Note, we also expose the following more-verbose versions of the above examples:\n api.cache.forever(); // api.cache(true)\n api.cache.never(); // api.cache(false)\n api.cache.using(fn); // api.cache(fn)\n\n // Return the value that will be cached.\n return { };\n};`,\n filepath,\n );\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,QAAA,GAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAGA,IAAAU,YAAA,GAAAV,OAAA;AAEA,IAAAW,EAAA,GAAAX,OAAA;AAEAA,OAAA;AACA,IAAAY,kBAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;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I,CAACC,KAAK,CAACE,MAAM,CAAC,CAAC,EAAE;MACnB,MAAM,IAAIZ,KAAK,CACb,GAAGS,YAAY,sFACjB,CAAC;IACH;IACA,OAAOA,YAAY;EACrB;EACA,OAAO,IAAI;AACb;AAEA,SAASxF,gBAAgBA,CAACV,QAAgB,EAAS;EACjD,MAAM,IAAIO,oBAAW,CACnB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACCP,QACF,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/import.cjs b/node_modules/@babel/core/lib/config/files/import.cjs deleted file mode 100644 index 46fa5d5..0000000 --- a/node_modules/@babel/core/lib/config/files/import.cjs +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function import_(filepath) { - return import(filepath); -}; -0 && 0; - -//# sourceMappingURL=import.cjs.map diff --git a/node_modules/@babel/core/lib/config/files/import.cjs.map b/node_modules/@babel/core/lib/config/files/import.cjs.map deleted file mode 100644 index 2200da8..0000000 --- a/node_modules/@babel/core/lib/config/files/import.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["module","exports","import_","filepath"],"sources":["../../../src/config/files/import.cjs"],"sourcesContent":["// We keep this in a separate file so that in older node versions, where\n// import() isn't supported, we can try/catch around the require() call\n// when loading this file.\n\nmodule.exports = function import_(filepath) {\n return import(filepath);\n};\n"],"mappings":"AAIAA,MAAM,CAACC,OAAO,GAAG,SAASC,OAAOA,CAACC,QAAQ,EAAE;EAC1C,OAAO,OAAOA,QAAQ,CAAC;AACzB,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js b/node_modules/@babel/core/lib/config/files/index-browser.js deleted file mode 100644 index d8ba7db..0000000 --- a/node_modules/@babel/core/lib/config/files/index-browser.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ROOT_CONFIG_FILENAMES = void 0; -exports.findConfigUpwards = findConfigUpwards; -exports.findPackageData = findPackageData; -exports.findRelativeConfig = findRelativeConfig; -exports.findRootConfig = findRootConfig; -exports.loadConfig = loadConfig; -exports.loadPlugin = loadPlugin; -exports.loadPreset = loadPreset; -exports.resolvePlugin = resolvePlugin; -exports.resolvePreset = resolvePreset; -exports.resolveShowConfigPath = resolveShowConfigPath; -function findConfigUpwards(rootDir) { - return null; -} -function* findPackageData(filepath) { - return { - filepath, - directories: [], - pkg: null, - isPackage: false - }; -} -function* findRelativeConfig(pkgData, envName, caller) { - return { - config: null, - ignore: null - }; -} -function* findRootConfig(dirname, envName, caller) { - return null; -} -function* loadConfig(name, dirname, envName, caller) { - throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); -} -function* resolveShowConfigPath(dirname) { - return null; -} -const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = []; -function resolvePlugin(name, dirname) { - return null; -} -function resolvePreset(name, dirname) { - return null; -} -function loadPlugin(name, dirname) { - throw new Error(`Cannot load plugin ${name} relative to ${dirname} in a browser`); -} -function loadPreset(name, dirname) { - throw new Error(`Cannot load preset ${name} relative to ${dirname} in a browser`); -} -0 && 0; - -//# sourceMappingURL=index-browser.js.map diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js.map b/node_modules/@babel/core/lib/config/files/index-browser.js.map deleted file mode 100644 index e10ddee..0000000 --- a/node_modules/@babel/core/lib/config/files/index-browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["/* c8 ignore start */\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\ntype Resolved =\n | { loader: \"require\"; filepath: string }\n | { loader: \"import\"; filepath: string };\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): Resolved | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): Resolved | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAC,eAAeD,IAAI,gBAAgBF,OAAO,eAAe,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAAC,OAAA,CAAAD,qBAAA,GAAG,EAAE;AAO1C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index.js b/node_modules/@babel/core/lib/config/files/index.js deleted file mode 100644 index 8750f40..0000000 --- a/node_modules/@babel/core/lib/config/files/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", { - enumerable: true, - get: function () { - return _configuration.ROOT_CONFIG_FILENAMES; - } -}); -Object.defineProperty(exports, "findConfigUpwards", { - enumerable: true, - get: function () { - return _configuration.findConfigUpwards; - } -}); -Object.defineProperty(exports, "findPackageData", { - enumerable: true, - get: function () { - return _package.findPackageData; - } -}); -Object.defineProperty(exports, "findRelativeConfig", { - enumerable: true, - get: function () { - return _configuration.findRelativeConfig; - } -}); -Object.defineProperty(exports, "findRootConfig", { - enumerable: true, - get: function () { - return _configuration.findRootConfig; - } -}); -Object.defineProperty(exports, "loadConfig", { - enumerable: true, - get: function () { - return _configuration.loadConfig; - } -}); -Object.defineProperty(exports, "loadPlugin", { - enumerable: true, - get: function () { - return _plugins.loadPlugin; - } -}); -Object.defineProperty(exports, "loadPreset", { - enumerable: true, - get: function () { - return _plugins.loadPreset; - } -}); -Object.defineProperty(exports, "resolvePlugin", { - enumerable: true, - get: function () { - return _plugins.resolvePlugin; - } -}); -Object.defineProperty(exports, "resolvePreset", { - enumerable: true, - get: function () { - return _plugins.resolvePreset; - } -}); -Object.defineProperty(exports, "resolveShowConfigPath", { - enumerable: true, - get: function () { - return _configuration.resolveShowConfigPath; - } -}); -var _package = require("./package.js"); -var _configuration = require("./configuration.js"); -var _plugins = require("./plugins.js"); -({}); -0 && 0; - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/config/files/index.js.map b/node_modules/@babel/core/lib/config/files/index.js.map deleted file mode 100644 index 832135f..0000000 --- a/node_modules/@babel/core/lib/config/files/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_package","require","_configuration","_plugins"],"sources":["../../../src/config/files/index.ts"],"sourcesContent":["type indexBrowserType = typeof import(\"./index-browser\");\ntype indexType = typeof import(\"./index\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n({}) as any as indexBrowserType as indexType;\n\nexport { findPackageData } from \"./package.ts\";\n\nexport {\n findConfigUpwards,\n findRelativeConfig,\n findRootConfig,\n loadConfig,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./configuration.ts\";\nexport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\nexport {\n loadPlugin,\n loadPreset,\n resolvePlugin,\n resolvePreset,\n} from \"./plugins.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AAlBA,CAAC,CAAC,CAAC;AAA0C","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/module-types.js b/node_modules/@babel/core/lib/config/files/module-types.js deleted file mode 100644 index e29a82f..0000000 --- a/node_modules/@babel/core/lib/config/files/module-types.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadCodeDefault; -exports.supportsESM = void 0; -var _async = require("../../gensync-utils/async.js"); -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _url() { - const data = require("url"); - _url = function () { - return data; - }; - return data; -} -require("module"); -function _semver() { - const data = require("semver"); - _semver = function () { - return data; - }; - return data; -} -function _debug() { - const data = require("debug"); - _debug = function () { - return data; - }; - return data; -} -var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js"); -var _configError = require("../../errors/config-error.js"); -var _transformFile = require("../../transform-file.js"); -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -const debug = _debug()("babel:config:loading:files:module-types"); -try { - var import_ = require("./import.cjs"); -} catch (_unused) {} -const supportsESM = exports.supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); -const LOADING_CJS_FILES = new Set(); -function loadCjsDefault(filepath) { - if (LOADING_CJS_FILES.has(filepath)) { - debug("Auto-ignoring usage of config %o.", filepath); - return {}; - } - let module; - try { - LOADING_CJS_FILES.add(filepath); - module = (0, _rewriteStackTrace.endHiddenCallStack)(require)(filepath); - } finally { - LOADING_CJS_FILES.delete(filepath); - } - return module != null && (module.__esModule || module[Symbol.toStringTag] === "Module") ? module.default || (arguments[1] ? module : undefined) : module; -} -const loadMjsFromPath = (0, _rewriteStackTrace.endHiddenCallStack)(function () { - var _loadMjsFromPath = _asyncToGenerator(function* (filepath) { - const url = (0, _url().pathToFileURL)(filepath).toString() + "?import"; - if (!import_) { - throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath); - } - return yield import_(url); - }); - function loadMjsFromPath(_x) { - return _loadMjsFromPath.apply(this, arguments); - } - return loadMjsFromPath; -}()); -const tsNotSupportedError = ext => `\ -You are using a ${ext} config file, but Babel only supports transpiling .cts configs. Either: -- Use a .cts config file -- Update to Node.js 23.6.0, which has native TypeScript support -- Install tsx to transpile ${ext} files on the fly\ -`; -const SUPPORTED_EXTENSIONS = { - ".js": "unknown", - ".mjs": "esm", - ".cjs": "cjs", - ".ts": "unknown", - ".mts": "esm", - ".cts": "cjs" -}; -const asyncModules = new Set(); -function* loadCodeDefault(filepath, loader, esmError, tlaError) { - let async; - const ext = _path().extname(filepath); - const isTS = ext === ".ts" || ext === ".cts" || ext === ".mts"; - const type = SUPPORTED_EXTENSIONS[hasOwnProperty.call(SUPPORTED_EXTENSIONS, ext) ? ext : ".js"]; - const pattern = `${loader} ${type}`; - switch (pattern) { - case "require cjs": - case "auto cjs": - if (isTS) { - return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath)); - } else { - return loadCjsDefault(filepath, arguments[2]); - } - case "auto unknown": - case "require unknown": - case "require esm": - try { - if (isTS) { - return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath)); - } else { - return loadCjsDefault(filepath, arguments[2]); - } - } catch (e) { - if (e.code === "ERR_REQUIRE_ASYNC_MODULE" || e.code === "ERR_REQUIRE_CYCLE_MODULE" && asyncModules.has(filepath)) { - asyncModules.add(filepath); - if (!(async != null ? async : async = yield* (0, _async.isAsync)())) { - throw new _configError.default(tlaError, filepath); - } - } else if (e.code === "ERR_REQUIRE_ESM" || type === "esm") {} else { - throw e; - } - } - case "auto esm": - if (async != null ? async : async = yield* (0, _async.isAsync)()) { - const promise = isTS ? ensureTsSupport(filepath, ext, () => loadMjsFromPath(filepath)) : loadMjsFromPath(filepath); - return (yield* (0, _async.waitFor)(promise)).default; - } - if (isTS) { - throw new _configError.default(tsNotSupportedError(ext), filepath); - } else { - throw new _configError.default(esmError, filepath); - } - default: - throw new Error("Internal Babel error: unreachable code."); - } -} -function ensureTsSupport(filepath, ext, callback) { - if (process.features.typescript || require.extensions[".ts"] || require.extensions[".cts"] || require.extensions[".mts"]) { - return callback(); - } - if (ext !== ".cts") { - throw new _configError.default(tsNotSupportedError(ext), filepath); - } - const opts = { - babelrc: false, - configFile: false, - sourceType: "unambiguous", - sourceMaps: "inline", - sourceFileName: _path().basename(filepath), - presets: [[getTSPreset(filepath), Object.assign({ - onlyRemoveTypeImports: true, - optimizeConstEnums: true - }, { - allowDeclareFields: true - })]] - }; - let handler = function (m, filename) { - if (handler && filename.endsWith(".cts")) { - try { - return m._compile((0, _transformFile.transformFileSync)(filename, Object.assign({}, opts, { - filename - })).code, filename); - } catch (error) { - const packageJson = require("@babel/preset-typescript/package.json"); - if (_semver().lt(packageJson.version, "7.21.4")) { - console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`."); - } - throw error; - } - } - return require.extensions[".js"](m, filename); - }; - require.extensions[ext] = handler; - try { - return callback(); - } finally { - if (require.extensions[ext] === handler) delete require.extensions[ext]; - handler = undefined; - } -} -function getTSPreset(filepath) { - try { - return require("@babel/preset-typescript"); - } catch (error) { - if (error.code !== "MODULE_NOT_FOUND") throw error; - let message = "You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!"; - if (process.versions.pnp) { - message += ` -If you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file: - -packageExtensions: -\t"@babel/core@*": -\t\tpeerDependencies: -\t\t\t"@babel/preset-typescript": "*" -`; - } - throw new _configError.default(message, filepath); - } -} -0 && 0; - -//# sourceMappingURL=module-types.js.map diff --git a/node_modules/@babel/core/lib/config/files/module-types.js.map b/node_modules/@babel/core/lib/config/files/module-types.js.map deleted file mode 100644 index eafb5e6..0000000 --- a/node_modules/@babel/core/lib/config/files/module-types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_async","require","_path","data","_url","_semver","_debug","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","debug","buildDebug","import_","_unused","supportsESM","exports","semver","satisfies","process","versions","node","LOADING_CJS_FILES","Set","loadCjsDefault","filepath","has","module","add","endHiddenCallStack","delete","__esModule","Symbol","toStringTag","default","undefined","loadMjsFromPath","_loadMjsFromPath","url","pathToFileURL","toString","ConfigError","_x","tsNotSupportedError","ext","SUPPORTED_EXTENSIONS","asyncModules","loadCodeDefault","loader","esmError","tlaError","async","path","extname","isTS","type","hasOwnProperty","call","pattern","ensureTsSupport","code","isAsync","promise","waitFor","Error","callback","features","typescript","extensions","opts","babelrc","configFile","sourceType","sourceMaps","sourceFileName","basename","presets","getTSPreset","Object","assign","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","handler","m","filename","endsWith","_compile","transformFileSync","error","packageJson","lt","version","console","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async.ts\";\nimport type { Handler } from \"gensync\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { createRequire } from \"node:module\";\nimport semver from \"semver\";\nimport buildDebug from \"debug\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport type { InputOptions } from \"../index.ts\";\nimport { transformFileSync } from \"../../transform-file.ts\";\n\nconst debug = buildDebug(\"babel:config:loading:files:module-types\");\n\nconst require = createRequire(import.meta.url);\n\nif (!process.env.BABEL_8_BREAKING) {\n try {\n // Old Node.js versions don't support import() syntax.\n // eslint-disable-next-line no-var\n var import_:\n | ((specifier: string | URL) => any)\n | undefined = require(\"./import.cjs\");\n } catch {}\n}\n\nexport const supportsESM = semver.satisfies(\n process.versions.node,\n // older versions, starting from 10, support the dynamic\n // import syntax but always return a rejected promise.\n \"^12.17 || >=13.2\",\n);\n\nconst LOADING_CJS_FILES = new Set();\n\nfunction loadCjsDefault(filepath: string) {\n // The `require()` call below can make this code reentrant if a require hook\n // like @babel/register has been loaded into the system. That would cause\n // Babel to attempt to compile the `.babelrc.js` file as it loads below. To\n // cover this case, we auto-ignore re-entrant config processing. ESM loaders\n // do not have this problem, because loaders do not apply to themselves.\n if (LOADING_CJS_FILES.has(filepath)) {\n debug(\"Auto-ignoring usage of config %o.\", filepath);\n return {};\n }\n\n let module;\n try {\n LOADING_CJS_FILES.add(filepath);\n module = endHiddenCallStack(require)(filepath);\n } finally {\n LOADING_CJS_FILES.delete(filepath);\n }\n\n if (process.env.BABEL_8_BREAKING) {\n return module != null &&\n (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n ? module.default\n : module;\n } else {\n return module != null &&\n (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n ? module.default ||\n /* fallbackToTranspiledModule */ (arguments[1] ? module : undefined)\n : module;\n }\n}\n\nconst loadMjsFromPath = endHiddenCallStack(async function loadMjsFromPath(\n filepath: string,\n) {\n // Add ?import as a workaround for https://github.com/nodejs/node/issues/55500\n const url = pathToFileURL(filepath).toString() + \"?import\";\n\n if (process.env.BABEL_8_BREAKING) {\n return await import(url);\n } else {\n if (!import_) {\n throw new ConfigError(\n \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n filepath,\n );\n }\n\n return await import_(url);\n }\n});\n\nconst tsNotSupportedError = (ext: string) => `\\\nYou are using a ${ext} config file, but Babel only supports transpiling .cts configs. Either:\n- Use a .cts config file\n- Update to Node.js 23.6.0, which has native TypeScript support\n- Install tsx to transpile ${ext} files on the fly\\\n`;\n\nconst SUPPORTED_EXTENSIONS = {\n \".js\": \"unknown\",\n \".mjs\": \"esm\",\n \".cjs\": \"cjs\",\n \".ts\": \"unknown\",\n \".mts\": \"esm\",\n \".cts\": \"cjs\",\n} as const;\n\nconst asyncModules = new Set();\n\nexport default function* loadCodeDefault(\n filepath: string,\n loader: \"require\" | \"auto\",\n esmError: string,\n tlaError: string,\n): Handler {\n let async;\n\n const ext = path.extname(filepath);\n const isTS = ext === \".ts\" || ext === \".cts\" || ext === \".mts\";\n\n const type =\n SUPPORTED_EXTENSIONS[\n Object.hasOwn(SUPPORTED_EXTENSIONS, ext)\n ? (ext as keyof typeof SUPPORTED_EXTENSIONS)\n : (\".js\" as const)\n ];\n\n const pattern = `${loader} ${type}` as const;\n switch (pattern) {\n case \"require cjs\":\n case \"auto cjs\":\n if (isTS) {\n return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath));\n } else if (process.env.BABEL_8_BREAKING) {\n return loadCjsDefault(filepath);\n } else {\n return loadCjsDefault(\n filepath,\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n /* fallbackToTranspiledModule */ arguments[2],\n );\n }\n case \"auto unknown\":\n case \"require unknown\":\n case \"require esm\":\n try {\n if (isTS) {\n return ensureTsSupport(filepath, ext, () => loadCjsDefault(filepath));\n } else if (process.env.BABEL_8_BREAKING) {\n return loadCjsDefault(filepath);\n } else {\n return loadCjsDefault(\n filepath,\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n /* fallbackToTranspiledModule */ arguments[2],\n );\n }\n } catch (e) {\n if (\n e.code === \"ERR_REQUIRE_ASYNC_MODULE\" ||\n // Node.js 13.0.0 throws ERR_REQUIRE_CYCLE_MODULE instead of\n // ERR_REQUIRE_ASYNC_MODULE when requiring a module a second time\n // https://github.com/nodejs/node/issues/55516\n // This `asyncModules` won't catch all of such cases, but it will\n // at least catch those caused by Babel trying to load a module twice.\n (e.code === \"ERR_REQUIRE_CYCLE_MODULE\" && asyncModules.has(filepath))\n ) {\n asyncModules.add(filepath);\n if (!(async ??= yield* isAsync())) {\n throw new ConfigError(tlaError, filepath);\n }\n // fall through: require() failed due to TLA\n } else if (\n e.code === \"ERR_REQUIRE_ESM\" ||\n (!process.env.BABEL_8_BREAKING && type === \"esm\")\n ) {\n // fall through: require() failed due to ESM\n } else {\n throw e;\n }\n }\n // fall through: require() failed due to ESM or TLA, try import()\n case \"auto esm\":\n if ((async ??= yield* isAsync())) {\n const promise = isTS\n ? ensureTsSupport(filepath, ext, () => loadMjsFromPath(filepath))\n : loadMjsFromPath(filepath);\n\n return (yield* waitFor(promise)).default;\n }\n if (isTS) {\n throw new ConfigError(tsNotSupportedError(ext), filepath);\n } else {\n throw new ConfigError(esmError, filepath);\n }\n default:\n throw new Error(\"Internal Babel error: unreachable code.\");\n }\n}\n\nfunction ensureTsSupport(\n filepath: string,\n ext: string,\n callback: () => T,\n): T {\n if (\n process.features.typescript ||\n require.extensions[\".ts\"] ||\n require.extensions[\".cts\"] ||\n require.extensions[\".mts\"]\n ) {\n return callback();\n }\n\n if (ext !== \".cts\") {\n throw new ConfigError(tsNotSupportedError(ext), filepath);\n }\n\n const opts: InputOptions = {\n babelrc: false,\n configFile: false,\n sourceType: \"unambiguous\",\n sourceMaps: \"inline\",\n sourceFileName: path.basename(filepath),\n presets: [\n [\n getTSPreset(filepath),\n {\n onlyRemoveTypeImports: true,\n optimizeConstEnums: true,\n ...(process.env.BABEL_8_BREAKING ? {} : { allowDeclareFields: true }),\n },\n ],\n ],\n };\n\n let handler: NodeJS.RequireExtensions[\"\"] = function (m, filename) {\n // If we want to support `.ts`, `.d.ts` must be handled specially.\n if (handler && filename.endsWith(\".cts\")) {\n try {\n // @ts-expect-error Undocumented API\n return m._compile(\n transformFileSync(filename, {\n ...opts,\n filename,\n }).code,\n filename,\n );\n } catch (error) {\n // TODO(Babel 8): Add this as an optional peer dependency\n // eslint-disable-next-line import/no-extraneous-dependencies\n const packageJson = require(\"@babel/preset-typescript/package.json\");\n if (semver.lt(packageJson.version, \"7.21.4\")) {\n console.error(\n \"`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.\",\n );\n }\n throw error;\n }\n }\n return require.extensions[\".js\"](m, filename);\n };\n require.extensions[ext] = handler;\n\n try {\n return callback();\n } finally {\n if (require.extensions[ext] === handler) delete require.extensions[ext];\n handler = undefined;\n }\n}\n\nfunction getTSPreset(filepath: string) {\n try {\n // eslint-disable-next-line import/no-extraneous-dependencies\n return require(\"@babel/preset-typescript\");\n } catch (error) {\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n let message =\n \"You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!\";\n\n if (!process.env.BABEL_8_BREAKING) {\n if (process.versions.pnp) {\n // Using Yarn PnP, which doesn't allow requiring packages that are not\n // explicitly specified as dependencies.\n message += `\nIf you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\\t\"@babel/core@*\":\n\\t\\tpeerDependencies:\n\\t\\t\\t\"@babel/preset-typescript\": \"*\"\n`;\n }\n }\n\n throw new ConfigError(message, filepath);\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAAAC,MAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAC,KAAA;EAAA,MAAAD,IAAA,GAAAF,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAD,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACAF,OAAA;AACA,SAAAI,QAAA;EAAA,MAAAF,IAAA,GAAAF,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAF,OAAA;EAAAK,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAI,kBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAGA,IAAAQ,cAAA,GAAAR,OAAA;AAA4D,SAAAS,mBAAAC,CAAA,EAAAC,CAAA,EAAAC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AC;EAC/C,CAAC;EACDvG,OAAO,CAACsF,UAAU,CAACxB,GAAG,CAAC,GAAGuC,OAAO;EAEjC,IAAI;IACF,OAAOlB,QAAQ,CAAC,CAAC;EACnB,CAAC,SAAS;IACR,IAAInF,OAAO,CAACsF,UAAU,CAACxB,GAAG,CAAC,KAAKuC,OAAO,EAAE,OAAOrG,OAAO,CAACsF,UAAU,CAACxB,GAAG,CAAC;IACvEuC,OAAO,GAAGhD,SAAS;EACrB;AACF;AAEA,SAAS0C,WAAWA,CAACpD,QAAgB,EAAE;EACrC,IAAI;IAEF,OAAO3C,OAAO,CAAC,0BAA0B,CAAC;EAC5C,CAAC,CAAC,OAAO2G,KAAK,EAAE;IACd,IAAIA,KAAK,CAAC7B,IAAI,KAAK,kBAAkB,EAAE,MAAM6B,KAAK;IAElD,IAAIK,OAAO,GACT,yIAAyI;IAGzI,IAAI3E,OAAO,CAACC,QAAQ,CAAC2E,GAAG,EAAE;MAGxBD,OAAO,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;IACK;IAGF,MAAM,IAAIrD,oBAAW,CAACqD,OAAO,EAAErE,QAAQ,CAAC;EAC1C;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js deleted file mode 100644 index eed8ab8..0000000 --- a/node_modules/@babel/core/lib/config/files/package.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findPackageData = findPackageData; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -var _utils = require("./utils.js"); -var _configError = require("../../errors/config-error.js"); -const PACKAGE_FILENAME = "package.json"; -const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => { - let options; - try { - options = JSON.parse(content); - } catch (err) { - throw new _configError.default(`Error while parsing JSON - ${err.message}`, filepath); - } - if (!options) throw new Error(`${filepath}: No config detected`); - if (typeof options !== "object") { - throw new _configError.default(`Config returned typeof ${typeof options}`, filepath); - } - if (Array.isArray(options)) { - throw new _configError.default(`Expected config object but found array`, filepath); - } - return { - filepath, - dirname: _path().dirname(filepath), - options - }; -}); -function* findPackageData(filepath) { - let pkg = null; - const directories = []; - let isPackage = true; - let dirname = _path().dirname(filepath); - while (!pkg && _path().basename(dirname) !== "node_modules") { - directories.push(dirname); - pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME)); - const nextLoc = _path().dirname(dirname); - if (dirname === nextLoc) { - isPackage = false; - break; - } - dirname = nextLoc; - } - return { - filepath, - directories, - pkg, - isPackage - }; -} -0 && 0; - -//# sourceMappingURL=package.js.map diff --git a/node_modules/@babel/core/lib/config/files/package.js.map b/node_modules/@babel/core/lib/config/files/package.js.map deleted file mode 100644 index 38aeb2c..0000000 --- a/node_modules/@babel/core/lib/config/files/package.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","_utils","_configError","PACKAGE_FILENAME","readConfigPackage","makeStaticFileCache","filepath","content","options","JSON","parse","err","ConfigError","message","Error","Array","isArray","dirname","path","findPackageData","pkg","directories","isPackage","basename","push","join","nextLoc"],"sources":["../../../src/config/files/package.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { Handler } from \"gensync\";\nimport { makeStaticFileCache } from \"./utils.ts\";\n\nimport type { ConfigFile, FilePackageData } from \"./types.ts\";\n\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst PACKAGE_FILENAME = \"package.json\";\n\nconst readConfigPackage = makeStaticFileCache(\n (filepath, content): ConfigFile => {\n let options;\n try {\n options = JSON.parse(content) as unknown;\n } catch (err) {\n throw new ConfigError(\n `Error while parsing JSON - ${err.message}`,\n filepath,\n );\n }\n\n if (!options) throw new Error(`${filepath}: No config detected`);\n\n if (typeof options !== \"object\") {\n throw new ConfigError(\n `Config returned typeof ${typeof options}`,\n filepath,\n );\n }\n if (Array.isArray(options)) {\n throw new ConfigError(`Expected config object but found array`, filepath);\n }\n\n return {\n filepath,\n dirname: path.dirname(filepath),\n options,\n };\n },\n);\n\n/**\n * Find metadata about the package that this file is inside of. Resolution\n * of Babel's config requires general package information to decide when to\n * search for .babelrc files\n */\nexport function* findPackageData(filepath: string): Handler {\n let pkg = null;\n const directories = [];\n let isPackage = true;\n\n let dirname = path.dirname(filepath);\n while (!pkg && path.basename(dirname) !== \"node_modules\") {\n directories.push(dirname);\n\n pkg = yield* readConfigPackage(path.join(dirname, PACKAGE_FILENAME));\n\n const nextLoc = path.dirname(dirname);\n if (dirname === nextLoc) {\n isPackage = false;\n break;\n }\n dirname = nextLoc;\n }\n\n return { filepath, directories, pkg, isPackage };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAIA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,gBAAgB,GAAG,cAAc;AAEvC,MAAMC,iBAAiB,GAAG,IAAAC,0BAAmB,EAC3C,CAACC,QAAQ,EAAEC,OAAO,KAAiB;EACjC,IAAIC,OAAO;EACX,IAAI;IACFA,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACH,OAAO,CAAY;EAC1C,CAAC,CAAC,OAAOI,GAAG,EAAE;IACZ,MAAM,IAAIC,oBAAW,CACnB,8BAA8BD,GAAG,CAACE,OAAO,EAAE,EAC3CP,QACF,CAAC;EACH;EAEA,IAAI,CAACE,OAAO,EAAE,MAAM,IAAIM,KAAK,CAAC,GAAGR,QAAQ,sBAAsB,CAAC;EAEhE,IAAI,OAAOE,OAAO,KAAK,QAAQ,EAAE;IAC/B,MAAM,IAAII,oBAAW,CACnB,0BAA0B,OAAOJ,OAAO,EAAE,EAC1CF,QACF,CAAC;EACH;EACA,IAAIS,KAAK,CAACC,OAAO,CAACR,OAAO,CAAC,EAAE;IAC1B,MAAM,IAAII,oBAAW,CAAC,wCAAwC,EAAEN,QAAQ,CAAC;EAC3E;EAEA,OAAO;IACLA,QAAQ;IACRW,OAAO,EAAEC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;IAC/BE;EACF,CAAC;AACH,CACF,CAAC;AAOM,UAAUW,eAAeA,CAACb,QAAgB,EAA4B;EAC3E,IAAIc,GAAG,GAAG,IAAI;EACd,MAAMC,WAAW,GAAG,EAAE;EACtB,IAAIC,SAAS,GAAG,IAAI;EAEpB,IAAIL,OAAO,GAAGC,MAAGA,CAAC,CAACD,OAAO,CAACX,QAAQ,CAAC;EACpC,OAAO,CAACc,GAAG,IAAIF,MAAGA,CAAC,CAACK,QAAQ,CAACN,OAAO,CAAC,KAAK,cAAc,EAAE;IACxDI,WAAW,CAACG,IAAI,CAACP,OAAO,CAAC;IAEzBG,GAAG,GAAG,OAAOhB,iBAAiB,CAACc,MAAGA,CAAC,CAACO,IAAI,CAACR,OAAO,EAAEd,gBAAgB,CAAC,CAAC;IAEpE,MAAMuB,OAAO,GAAGR,MAAGA,CAAC,CAACD,OAAO,CAACA,OAAO,CAAC;IACrC,IAAIA,OAAO,KAAKS,OAAO,EAAE;MACvBJ,SAAS,GAAG,KAAK;MACjB;IACF;IACAL,OAAO,GAAGS,OAAO;EACnB;EAEA,OAAO;IAAEpB,QAAQ;IAAEe,WAAW;IAAED,GAAG;IAAEE;EAAU,CAAC;AAClD;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js deleted file mode 100644 index caad07f..0000000 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ /dev/null @@ -1,220 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.loadPlugin = loadPlugin; -exports.loadPreset = loadPreset; -exports.resolvePreset = exports.resolvePlugin = void 0; -function _debug() { - const data = require("debug"); - _debug = function () { - return data; - }; - return data; -} -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -var _async = require("../../gensync-utils/async.js"); -var _moduleTypes = require("./module-types.js"); -function _url() { - const data = require("url"); - _url = function () { - return data; - }; - return data; -} -var _importMetaResolve = require("../../vendor/import-meta-resolve.js"); -require("module"); -function _fs() { - const data = require("fs"); - _fs = function () { - return data; - }; - return data; -} -const debug = _debug()("babel:config:loading:files:plugins"); -const EXACT_RE = /^module:/; -const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/; -const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/; -const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/; -const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; -const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/; -const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/; -const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/; -const resolvePlugin = exports.resolvePlugin = resolveStandardizedName.bind(null, "plugin"); -const resolvePreset = exports.resolvePreset = resolveStandardizedName.bind(null, "preset"); -function* loadPlugin(name, dirname) { - const { - filepath, - loader - } = resolvePlugin(name, dirname, yield* (0, _async.isAsync)()); - const value = yield* requireModule("plugin", loader, filepath); - debug("Loaded plugin %o from %o.", name, dirname); - return { - filepath, - value - }; -} -function* loadPreset(name, dirname) { - const { - filepath, - loader - } = resolvePreset(name, dirname, yield* (0, _async.isAsync)()); - const value = yield* requireModule("preset", loader, filepath); - debug("Loaded preset %o from %o.", name, dirname); - return { - filepath, - value - }; -} -function standardizeName(type, name) { - if (_path().isAbsolute(name)) return name; - const isPreset = type === "preset"; - return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, ""); -} -function* resolveAlternativesHelper(type, name) { - const standardizedName = standardizeName(type, name); - const { - error, - value - } = yield standardizedName; - if (!error) return value; - if (error.code !== "MODULE_NOT_FOUND") throw error; - if (standardizedName !== name && !(yield name).error) { - error.message += `\n- If you want to resolve "${name}", use "module:${name}"`; - } - if (!(yield standardizeName(type, "@babel/" + name)).error) { - error.message += `\n- Did you mean "@babel/${name}"?`; - } - const oppositeType = type === "preset" ? "plugin" : "preset"; - if (!(yield standardizeName(oppositeType, name)).error) { - error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; - } - if (type === "plugin") { - const transformName = standardizedName.replace("-proposal-", "-transform-"); - if (transformName !== standardizedName && !(yield transformName).error) { - error.message += `\n- Did you mean "${transformName}"?`; - } - } - error.message += `\n -Make sure that all the Babel plugins and presets you are using -are defined as dependencies or devDependencies in your package.json -file. It's possible that the missing plugin is loaded by a preset -you are using that forgot to add the plugin to its dependencies: you -can workaround this problem by explicitly adding the missing package -to your top-level package.json. -`; - throw error; -} -function tryRequireResolve(id, dirname) { - try { - if (dirname) { - return { - error: null, - value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { - paths: [b] - }, M = require("module")) => { - let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); - if (f) return f; - f = new Error(`Cannot resolve module '${r}'`); - f.code = "MODULE_NOT_FOUND"; - throw f; - })(id, { - paths: [dirname] - }) - }; - } else { - return { - error: null, - value: require.resolve(id) - }; - } - } catch (error) { - return { - error, - value: null - }; - } -} -function tryImportMetaResolve(id, options) { - try { - return { - error: null, - value: (0, _importMetaResolve.resolve)(id, options) - }; - } catch (error) { - return { - error, - value: null - }; - } -} -function resolveStandardizedNameForRequire(type, name, dirname) { - const it = resolveAlternativesHelper(type, name); - let res = it.next(); - while (!res.done) { - res = it.next(tryRequireResolve(res.value, dirname)); - } - return { - loader: "require", - filepath: res.value - }; -} -function resolveStandardizedNameForImport(type, name, dirname) { - const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href; - const it = resolveAlternativesHelper(type, name); - let res = it.next(); - while (!res.done) { - res = it.next(tryImportMetaResolve(res.value, parentUrl)); - } - return { - loader: "auto", - filepath: (0, _url().fileURLToPath)(res.value) - }; -} -function resolveStandardizedName(type, name, dirname, allowAsync) { - if (!_moduleTypes.supportsESM || !allowAsync) { - return resolveStandardizedNameForRequire(type, name, dirname); - } - try { - const resolved = resolveStandardizedNameForImport(type, name, dirname); - if (!(0, _fs().existsSync)(resolved.filepath)) { - throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), { - type: "MODULE_NOT_FOUND" - }); - } - return resolved; - } catch (e) { - try { - return resolveStandardizedNameForRequire(type, name, dirname); - } catch (e2) { - if (e.type === "MODULE_NOT_FOUND") throw e; - if (e2.type === "MODULE_NOT_FOUND") throw e2; - throw e; - } - } -} -var LOADING_MODULES = new Set(); -function* requireModule(type, loader, name) { - if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) { - throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.'); - } - try { - LOADING_MODULES.add(name); - return yield* (0, _moduleTypes.default)(name, loader, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", `You appear to be using a ${type} that contains top-level await, ` + "which is only supported when running Babel asynchronously.", true); - } catch (err) { - err.message = `[BABEL]: ${err.message} (While processing: ${name})`; - throw err; - } finally { - LOADING_MODULES.delete(name); - } -} -0 && 0; - -//# sourceMappingURL=plugins.js.map diff --git a/node_modules/@babel/core/lib/config/files/plugins.js.map b/node_modules/@babel/core/lib/config/files/plugins.js.map deleted file mode 100644 index f3879e3..0000000 --- a/node_modules/@babel/core/lib/config/files/plugins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_debug","data","require","_path","_async","_moduleTypes","_url","_importMetaResolve","_fs","debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","exports","resolveStandardizedName","bind","resolvePreset","loadPlugin","name","dirname","filepath","loader","isAsync","value","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","error","code","message","oppositeType","transformName","tryRequireResolve","id","v","w","split","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","done","resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","allowAsync","supportsESM","resolved","existsSync","Object","assign","e","e2","LOADING_MODULES","Set","has","add","loadCodeDefault","err","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"node:path\";\nimport type { Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async.ts\";\nimport loadCodeDefault, { supportsESM } from \"./module-types.ts\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nimport { resolve as importMetaResolve } from \"../../vendor/import-meta-resolve.js\";\n\nimport { createRequire } from \"node:module\";\nimport { existsSync } from \"node:fs\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport const resolvePlugin = resolveStandardizedName.bind(null, \"plugin\");\nexport const resolvePreset = resolveStandardizedName.bind(null, \"preset\");\n\nexport function* loadPlugin(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const { filepath, loader } = resolvePlugin(name, dirname, yield* isAsync());\n\n const value = yield* requireModule(\"plugin\", loader, filepath);\n debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nexport function* loadPreset(\n name: string,\n dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n const { filepath, loader } = resolvePreset(name, dirname, yield* isAsync());\n\n const value = yield* requireModule(\"preset\", loader, filepath);\n\n debug(\"Loaded preset %o from %o.\", name, dirname);\n\n return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n // Let absolute and relative paths through.\n if (path.isAbsolute(name)) return name;\n\n const isPreset = type === \"preset\";\n\n return (\n name\n // foo -> babel-preset-foo\n .replace(\n isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n `babel-${type}-`,\n )\n // @babel/es2015 -> @babel/preset-es2015\n .replace(\n isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n `$1${type}-`,\n )\n // @foo/mypreset -> @foo/babel-preset-mypreset\n .replace(\n isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n `$1babel-${type}-`,\n )\n // @foo -> @foo/babel-preset\n .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n // module:mypreset -> mypreset\n .replace(EXACT_RE, \"\")\n );\n}\n\ntype Result = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n type: \"plugin\" | \"preset\",\n name: string,\n): Iterator> {\n const standardizedName = standardizeName(type, name);\n const { error, value } = yield standardizedName;\n if (!error) return value;\n\n // @ts-expect-error code may not index error\n if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n if (standardizedName !== name && !(yield name).error) {\n error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n }\n\n if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n }\n\n const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n if (!(yield standardizeName(oppositeType, name)).error) {\n error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n }\n\n if (type === \"plugin\") {\n const transformName = standardizedName.replace(\"-proposal-\", \"-transform-\");\n if (transformName !== standardizedName && !(yield transformName).error) {\n error.message += `\\n- Did you mean \"${transformName}\"?`;\n }\n }\n\n error.message += `\\n\nMake sure that all the Babel plugins and presets you are using\nare defined as dependencies or devDependencies in your package.json\nfile. It's possible that the missing plugin is loaded by a preset\nyou are using that forgot to add the plugin to its dependencies: you\ncan workaround this problem by explicitly adding the missing package\nto your top-level package.json.\n`;\n\n throw error;\n}\n\nfunction tryRequireResolve(\n id: string,\n dirname: string | undefined,\n): Result {\n try {\n if (dirname) {\n return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n } else {\n return { error: null, value: require.resolve(id) };\n }\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction tryImportMetaResolve(\n id: Parameters[0],\n options: Parameters[1],\n): Result {\n try {\n return { error: null, value: importMetaResolve(id, options) };\n } catch (error) {\n return { error, value: null };\n }\n}\n\nfunction resolveStandardizedNameForRequire(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryRequireResolve(res.value, dirname));\n }\n return { loader: \"require\" as const, filepath: res.value };\n}\nfunction resolveStandardizedNameForImport(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n) {\n const parentUrl = pathToFileURL(\n path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n ).href;\n\n const it = resolveAlternativesHelper(type, name);\n let res = it.next();\n while (!res.done) {\n res = it.next(tryImportMetaResolve(res.value, parentUrl));\n }\n return { loader: \"auto\" as const, filepath: fileURLToPath(res.value) };\n}\n\nfunction resolveStandardizedName(\n type: \"plugin\" | \"preset\",\n name: string,\n dirname: string,\n allowAsync: boolean,\n) {\n if (!supportsESM || !allowAsync) {\n return resolveStandardizedNameForRequire(type, name, dirname);\n }\n\n try {\n const resolved = resolveStandardizedNameForImport(type, name, dirname);\n // import-meta-resolve 4.0 does not throw if the module is not found.\n if (!existsSync(resolved.filepath)) {\n throw Object.assign(\n new Error(`Could not resolve \"${name}\" in file ${dirname}.`),\n { type: \"MODULE_NOT_FOUND\" },\n );\n }\n return resolved;\n } catch (e) {\n try {\n return resolveStandardizedNameForRequire(type, name, dirname);\n } catch (e2) {\n if (e.type === \"MODULE_NOT_FOUND\") throw e;\n if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n throw e;\n }\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // eslint-disable-next-line no-var\n var LOADING_MODULES = new Set();\n}\nfunction* requireModule(\n type: string,\n loader: \"require\" | \"auto\",\n name: string,\n): Handler {\n if (!process.env.BABEL_8_BREAKING) {\n if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n throw new Error(\n `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n 'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n );\n }\n }\n\n try {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.add(name);\n }\n\n if (process.env.BABEL_8_BREAKING) {\n return yield* loadCodeDefault(\n name,\n loader,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously \" +\n \"or when using the Node.js `--experimental-require-module` flag.\",\n `You appear to be using a ${type} that contains top-level await, ` +\n \"which is only supported when running Babel asynchronously.\",\n );\n } else {\n return yield* loadCodeDefault(\n name,\n loader,\n `You appear to be using a native ECMAScript module ${type}, ` +\n \"which is only supported when running Babel asynchronously \" +\n \"or when using the Node.js `--experimental-require-module` flag.\",\n `You appear to be using a ${type} that contains top-level await, ` +\n \"which is only supported when running Babel asynchronously.\",\n // For backward compatibility, we need to support malformed presets\n // defined as separate named exports rather than a single default\n // export.\n // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n // @ts-ignore(Babel 7 vs Babel 8) This param has been removed\n true,\n );\n }\n } catch (err) {\n err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n throw err;\n } finally {\n if (!process.env.BABEL_8_BREAKING) {\n LOADING_MODULES.delete(name);\n }\n }\n}\n"],"mappings":";;;;;;;;AAIA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,MAAA,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uBlB,IAAI,GAAG;IACnE,MAAMkE,GAAG;EACX,CAAC,SAAS;IAENL,eAAe,CAACM,MAAM,CAACnE,IAAI,CAAC;EAEhC;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/types.js b/node_modules/@babel/core/lib/config/files/types.js deleted file mode 100644 index 8fd1422..0000000 --- a/node_modules/@babel/core/lib/config/files/types.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -0 && 0; - -//# sourceMappingURL=types.js.map diff --git a/node_modules/@babel/core/lib/config/files/types.js.map b/node_modules/@babel/core/lib/config/files/types.js.map deleted file mode 100644 index a2ac40b..0000000 --- a/node_modules/@babel/core/lib/config/files/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":[],"sources":["../../../src/config/files/types.ts"],"sourcesContent":["import type { InputOptions } from \"../index.ts\";\n\nexport type ConfigFile = {\n filepath: string;\n dirname: string;\n options: InputOptions & { babel?: unknown };\n};\n\nexport type IgnoreFile = {\n filepath: string;\n dirname: string;\n ignore: RegExp[];\n};\n\nexport type RelativeConfig = {\n // The actual config, either from package.json#babel, .babelrc, or\n // .babelrc.js, if there was one.\n config: ConfigFile | null;\n // The .babelignore, if there was one.\n ignore: IgnoreFile | null;\n};\n\nexport type FilePackageData = {\n // The file in the package.\n filepath: string;\n // Any ancestor directories of the file that are within the package.\n directories: string[];\n // The contents of the package.json. May not be found if the package just\n // terminated at a node_modules folder without finding one.\n pkg: ConfigFile | null;\n // True if a package.json or node_modules folder was found while traversing\n // the directory structure.\n isPackage: boolean;\n};\n"],"mappings":"","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/utils.js b/node_modules/@babel/core/lib/config/files/utils.js deleted file mode 100644 index 406aab9..0000000 --- a/node_modules/@babel/core/lib/config/files/utils.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.makeStaticFileCache = makeStaticFileCache; -var _caching = require("../caching.js"); -var fs = require("../../gensync-utils/fs.js"); -function _fs2() { - const data = require("fs"); - _fs2 = function () { - return data; - }; - return data; -} -function makeStaticFileCache(fn) { - return (0, _caching.makeStrongCache)(function* (filepath, cache) { - const cached = cache.invalidate(() => fileMtime(filepath)); - if (cached === null) { - return null; - } - return fn(filepath, yield* fs.readFile(filepath, "utf8")); - }); -} -function fileMtime(filepath) { - if (!_fs2().existsSync(filepath)) return null; - try { - return +_fs2().statSync(filepath).mtime; - } catch (e) { - if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e; - } - return null; -} -0 && 0; - -//# sourceMappingURL=utils.js.map diff --git a/node_modules/@babel/core/lib/config/files/utils.js.map b/node_modules/@babel/core/lib/config/files/utils.js.map deleted file mode 100644 index f3be225..0000000 --- a/node_modules/@babel/core/lib/config/files/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_caching","require","fs","_fs2","data","makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport * as fs from \"../../gensync-utils/fs.ts\";\nimport nodeFs from \"node:fs\";\n\nexport function makeStaticFileCache(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator,\n ): Handler {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAD,OAAA;AACA,SAAAE,KAAA;EAAA,MAAAC,IAAA,GAAAH,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASC,mBAAmBA,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAON,EAAE,CAACW,QAAQ,CAACL,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAASA,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACM,KAAKA,CAAC,CAACC,UAAU,CAACP,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACM,KAAKA,CAAC,CAACE,QAAQ,CAACR,QAAQ,CAAC,CAACS,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js deleted file mode 100644 index 614caa9..0000000 --- a/node_modules/@babel/core/lib/config/full.js +++ /dev/null @@ -1,312 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _async = require("../gensync-utils/async.js"); -var _util = require("./util.js"); -var context = require("../index.js"); -var _plugin = require("./plugin.js"); -var _item = require("./item.js"); -var _configChain = require("./config-chain.js"); -var _deepArray = require("./helpers/deep-array.js"); -function _traverse() { - const data = require("@babel/traverse"); - _traverse = function () { - return data; - }; - return data; -} -var _caching = require("./caching.js"); -var _options = require("./validation/options.js"); -var _plugins = require("./validation/plugins.js"); -var _configApi = require("./helpers/config-api.js"); -var _partial = require("./partial.js"); -var _configError = require("../errors/config-error.js"); -var _default = exports.default = _gensync()(function* loadFullConfig(inputOpts) { - var _opts$assumptions; - const result = yield* (0, _partial.default)(inputOpts); - if (!result) { - return null; - } - const { - options, - context, - fileHandling - } = result; - if (fileHandling === "ignored") { - return null; - } - const optionDefaults = {}; - const { - plugins, - presets - } = options; - if (!plugins || !presets) { - throw new Error("Assertion failure - plugins and presets exist"); - } - const presetContext = Object.assign({}, context, { - targets: options.targets - }); - const toDescriptor = item => { - const desc = (0, _item.getItemDescriptor)(item); - if (!desc) { - throw new Error("Assertion failure - must be config item"); - } - return desc; - }; - const presetsDescriptors = presets.map(toDescriptor); - const initialPluginsDescriptors = plugins.map(toDescriptor); - const pluginDescriptorsByPass = [[]]; - const passes = []; - const externalDependencies = []; - const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) { - const presets = []; - for (let i = 0; i < rawPresets.length; i++) { - const descriptor = rawPresets[i]; - if (descriptor.options !== false) { - try { - var preset = yield* loadPresetDescriptor(descriptor, presetContext); - } catch (e) { - if (e.code === "BABEL_UNKNOWN_OPTION") { - (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e); - } - throw e; - } - externalDependencies.push(preset.externalDependencies); - if (descriptor.ownPass) { - presets.push({ - preset: preset.chain, - pass: [] - }); - } else { - presets.unshift({ - preset: preset.chain, - pass: pluginDescriptorsPass - }); - } - } - } - if (presets.length > 0) { - pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass)); - for (const { - preset, - pass - } of presets) { - if (!preset) return true; - pass.push(...preset.plugins); - const ignored = yield* recursePresetDescriptors(preset.presets, pass); - if (ignored) return true; - preset.options.forEach(opts => { - (0, _util.mergeOptions)(optionDefaults, opts); - }); - } - } - })(presetsDescriptors, pluginDescriptorsByPass[0]); - if (ignored) return null; - const opts = optionDefaults; - (0, _util.mergeOptions)(opts, options); - const pluginContext = Object.assign({}, presetContext, { - assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {} - }); - yield* enhanceError(context, function* loadPluginDescriptors() { - pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors); - for (const descs of pluginDescriptorsByPass) { - const pass = []; - passes.push(pass); - for (let i = 0; i < descs.length; i++) { - const descriptor = descs[i]; - if (descriptor.options !== false) { - try { - var plugin = yield* loadPluginDescriptor(descriptor, pluginContext); - } catch (e) { - if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") { - (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e); - } - throw e; - } - pass.push(plugin); - externalDependencies.push(plugin.externalDependencies); - } - } - } - })(); - opts.plugins = passes[0]; - opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({ - plugins - })); - opts.passPerPreset = opts.presets.length > 0; - return { - options: opts, - passes: passes, - externalDependencies: (0, _deepArray.finalize)(externalDependencies) - }; -}); -function enhanceError(context, fn) { - return function* (arg1, arg2) { - try { - return yield* fn(arg1, arg2); - } catch (e) { - if (!e.message.startsWith("[BABEL]")) { - var _context$filename; - e.message = `[BABEL] ${(_context$filename = context.filename) != null ? _context$filename : "unknown file"}: ${e.message}`; - } - throw e; - } - }; -} -const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({ - value, - options, - dirname, - alias -}, cache) { - if (options === false) throw new Error("Assertion failure"); - options = options || {}; - const externalDependencies = []; - let item = value; - if (typeof value === "function") { - const factory = (0, _async.maybeAsync)(value, `You appear to be using an async plugin/preset, but Babel has been called synchronously`); - const api = Object.assign({}, context, apiFactory(cache, externalDependencies)); - try { - item = yield* factory(api, options, dirname); - } catch (e) { - if (alias) { - e.message += ` (While processing: ${JSON.stringify(alias)})`; - } - throw e; - } - } - if (!item || typeof item !== "object") { - throw new Error("Plugin/Preset did not return an object."); - } - if ((0, _async.isThenable)(item)) { - yield* []; - throw new Error(`You appear to be using a promise as a plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version. ` + `As an alternative, you can prefix the promise with "await". ` + `(While processing: ${JSON.stringify(alias)})`); - } - if (externalDependencies.length > 0 && (!cache.configured() || cache.mode() === "forever")) { - let error = `A plugin/preset has external untracked dependencies ` + `(${externalDependencies[0]}), but the cache `; - if (!cache.configured()) { - error += `has not been configured to be invalidated when the external dependencies change. `; - } else { - error += ` has been configured to never be invalidated. `; - } - error += `Plugins/presets should configure their cache to be invalidated when the external ` + `dependencies change, for example using \`api.cache.invalidate(() => ` + `statSync(filepath).mtimeMs)\` or \`api.cache.never()\`\n` + `(While processing: ${JSON.stringify(alias)})`; - throw new Error(error); - } - return { - value: item, - options, - dirname, - alias, - externalDependencies: (0, _deepArray.finalize)(externalDependencies) - }; -}); -const pluginDescriptorLoader = makeDescriptorLoader(_configApi.makePluginAPI); -const presetDescriptorLoader = makeDescriptorLoader(_configApi.makePresetAPI); -const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({ - value, - options, - dirname, - alias, - externalDependencies -}, cache) { - const pluginObj = (0, _plugins.validatePluginObject)(value); - const plugin = Object.assign({}, pluginObj); - if (plugin.visitor) { - plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor)); - } - if (plugin.inherits) { - const inheritsDescriptor = { - name: undefined, - alias: `${alias}$inherits`, - value: plugin.inherits, - options, - dirname - }; - const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, run => { - return cache.invalidate(data => run(inheritsDescriptor, data)); - }); - plugin.pre = chainMaybeAsync(inherits.pre, plugin.pre); - plugin.post = chainMaybeAsync(inherits.post, plugin.post); - plugin.manipulateOptions = chainMaybeAsync(inherits.manipulateOptions, plugin.manipulateOptions); - plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]); - if (inherits.externalDependencies.length > 0) { - if (externalDependencies.length === 0) { - externalDependencies = inherits.externalDependencies; - } else { - externalDependencies = (0, _deepArray.finalize)([externalDependencies, inherits.externalDependencies]); - } - } - } - return new _plugin.default(plugin, options, alias, externalDependencies); -}); -function* loadPluginDescriptor(descriptor, context) { - if (descriptor.value instanceof _plugin.default) { - if (descriptor.options) { - throw new Error("Passed options to an existing Plugin instance will not work."); - } - return descriptor.value; - } - return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context), context); -} -const needsFilename = val => val && typeof val !== "function"; -const validateIfOptionNeedsFilename = (options, descriptor) => { - if (needsFilename(options.test) || needsFilename(options.include) || needsFilename(options.exclude)) { - const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */"; - throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n")); - } -}; -const validatePreset = (preset, context, descriptor) => { - if (!context.filename) { - var _options$overrides; - const { - options - } = preset; - validateIfOptionNeedsFilename(options, descriptor); - (_options$overrides = options.overrides) == null || _options$overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor)); - } -}; -const instantiatePreset = (0, _caching.makeWeakCacheSync)(({ - value, - dirname, - alias, - externalDependencies -}) => { - return { - options: (0, _options.validate)("preset", value), - alias, - dirname, - externalDependencies - }; -}); -function* loadPresetDescriptor(descriptor, context) { - const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context)); - validatePreset(preset, context, descriptor); - return { - chain: yield* (0, _configChain.buildPresetChain)(preset, context), - externalDependencies: preset.externalDependencies - }; -} -function chainMaybeAsync(a, b) { - if (!a) return b; - if (!b) return a; - return function (...args) { - const res = a.apply(this, args); - if (res && typeof res.then === "function") { - return res.then(() => b.apply(this, args)); - } - return b.apply(this, args); - }; -} -0 && 0; - -//# sourceMappingURL=full.js.map diff --git a/node_modules/@babel/core/lib/config/full.js.map b/node_modules/@babel/core/lib/config/full.js.map deleted file mode 100644 index 55e99b8..0000000 --- a/node_modules/@babel/core/lib/config/full.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_async","_util","context","_plugin","_item","_configChain","_deepArray","_traverse","_caching","_options","_plugins","_configApi","_partial","_configError","_default","exports","default","gensync","loadFullConfig","inputOpts","_opts$assumptions","result","loadPrivatePartialConfig","options","fileHandling","optionDefaults","plugins","presets","Error","presetContext","Object","assign","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","fn","arg1","arg2","message","startsWith","_context$filename","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","pre","chainMaybeAsync","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","test","include","exclude","formattedPresetName","ConfigError","join","validatePreset","_options$overrides","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","args","res","apply","then"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport {\n forwardAsync,\n maybeAsync,\n isThenable,\n} from \"../gensync-utils/async.ts\";\n\nimport { mergeOptions } from \"./util.ts\";\nimport * as context from \"../index.ts\";\nimport Plugin from \"./plugin.ts\";\nimport { getItemDescriptor } from \"./item.ts\";\nimport { buildPresetChain } from \"./config-chain.ts\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array.ts\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type {\n ConfigContext,\n ConfigChain,\n PresetInstance,\n} from \"./config-chain.ts\";\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\nimport {\n validate,\n checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options.ts\";\nimport type { InputOptions, PluginItem } from \"./validation/options.ts\";\nimport { validatePluginObject } from \"./validation/plugins.ts\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nimport loadPrivatePartialConfig from \"./partial.ts\";\nimport type { ResolvedOptions } from \"./validation/options.ts\";\n\nimport type * as Context from \"./cache-contexts.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\n\ntype LoadedDescriptor = {\n value: any;\n options: object;\n dirname: string;\n alias: string;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { InputOptions } from \"./validation/options.ts\";\n\nexport type ResolvedConfig = {\n options: ResolvedOptions;\n passes: PluginPasses;\n externalDependencies: ReadonlyDeepArray;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Plugin[];\nexport type PluginPasses = PluginPassList[];\n\nexport default gensync(function* loadFullConfig(\n inputOpts: InputOptions,\n): Handler {\n const result = yield* loadPrivatePartialConfig(inputOpts);\n if (!result) {\n return null;\n }\n const { options, context, fileHandling } = result;\n\n if (fileHandling === \"ignored\") {\n return null;\n }\n\n const optionDefaults = {};\n\n const { plugins, presets } = options;\n\n if (!plugins || !presets) {\n throw new Error(\"Assertion failure - plugins and presets exist\");\n }\n\n const presetContext: Context.FullPreset = {\n ...context,\n targets: options.targets,\n };\n\n const toDescriptor = (item: PluginItem) => {\n const desc = getItemDescriptor(item);\n if (!desc) {\n throw new Error(\"Assertion failure - must be config item\");\n }\n\n return desc;\n };\n\n const presetsDescriptors = presets.map(toDescriptor);\n const initialPluginsDescriptors = plugins.map(toDescriptor);\n const pluginDescriptorsByPass: UnloadedDescriptor[][] = [[]];\n const passes: Plugin[][] = [];\n\n const externalDependencies: DeepArray = [];\n\n const ignored = yield* enhanceError(\n context,\n function* recursePresetDescriptors(\n rawPresets: UnloadedDescriptor[],\n pluginDescriptorsPass: UnloadedDescriptor[],\n ): Handler {\n const presets: {\n preset: ConfigChain | null;\n pass: UnloadedDescriptor[];\n }[] = [];\n\n for (let i = 0; i < rawPresets.length; i++) {\n const descriptor = rawPresets[i];\n // @ts-expect-error TODO: disallow false\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n }\n throw e;\n }\n\n externalDependencies.push(preset.externalDependencies);\n\n // Presets normally run in reverse order, but if they\n // have their own pass they run after the presets\n // in the previous pass.\n if (descriptor.ownPass) {\n presets.push({ preset: preset.chain, pass: [] });\n } else {\n presets.unshift({\n preset: preset.chain,\n pass: pluginDescriptorsPass,\n });\n }\n }\n }\n\n // resolve presets\n if (presets.length > 0) {\n // The passes are created in the same order as the preset list, but are inserted before any\n // existing additional passes.\n pluginDescriptorsByPass.splice(\n 1,\n 0,\n ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n );\n\n for (const { preset, pass } of presets) {\n if (!preset) return true;\n\n pass.push(...preset.plugins);\n\n const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n if (ignored) return true;\n\n preset.options.forEach(opts => {\n mergeOptions(optionDefaults, opts);\n });\n }\n }\n },\n )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n if (ignored) return null;\n\n const opts = optionDefaults as ResolvedOptions;\n mergeOptions(opts, options);\n\n const pluginContext: Context.FullPlugin = {\n ...presetContext,\n assumptions: opts.assumptions ?? {},\n };\n\n yield* enhanceError(context, function* loadPluginDescriptors() {\n pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n for (const descs of pluginDescriptorsByPass) {\n const pass: Plugin[] = [];\n passes.push(pass);\n\n for (let i = 0; i < descs.length; i++) {\n const descriptor = descs[i];\n // @ts-expect-error TODO: disallow false\n if (descriptor.options !== false) {\n try {\n // eslint-disable-next-line no-var\n var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n } catch (e) {\n if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n }\n throw e;\n }\n pass.push(plugin);\n\n externalDependencies.push(plugin.externalDependencies);\n }\n }\n }\n })();\n\n opts.plugins = passes[0];\n opts.presets = passes\n .slice(1)\n .filter(plugins => plugins.length > 0)\n .map(plugins => ({ plugins }));\n opts.passPerPreset = opts.presets.length > 0;\n\n return {\n options: opts,\n passes: passes,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n});\n\nfunction enhanceError(context: ConfigContext, fn: T): T {\n return function* (arg1: unknown, arg2: unknown) {\n try {\n return yield* fn(arg1, arg2);\n } catch (e) {\n // There are a few case where thrown errors will try to annotate themselves multiple times, so\n // to keep things simple we just bail out if re-wrapping the message.\n if (!e.message.startsWith(\"[BABEL]\")) {\n e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n e.message\n }`;\n }\n\n throw e;\n }\n } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = (\n apiFactory: (\n cache: CacheConfigurator,\n externalDependencies: string[],\n ) => API,\n) =>\n makeWeakCache(function* (\n { value, options, dirname, alias }: UnloadedDescriptor,\n cache: CacheConfigurator,\n ): Handler {\n // Disabled presets should already have been filtered out\n // @ts-expect-error expected\n if (options === false) throw new Error(\"Assertion failure\");\n\n options = options || {};\n\n const externalDependencies: string[] = [];\n\n let item: unknown = value;\n if (typeof value === \"function\") {\n const factory = maybeAsync(\n value as (api: API, options: object, dirname: string) => unknown,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n const api = {\n ...context,\n ...apiFactory(cache, externalDependencies),\n };\n try {\n item = yield* factory(api, options, dirname);\n } catch (e) {\n if (alias) {\n e.message += ` (While processing: ${JSON.stringify(alias)})`;\n }\n throw e;\n }\n }\n\n if (!item || typeof item !== \"object\") {\n throw new Error(\"Plugin/Preset did not return an object.\");\n }\n\n if (isThenable(item)) {\n // if we want to support async plugins\n yield* [];\n\n throw new Error(\n `You appear to be using a promise as a plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version. ` +\n `As an alternative, you can prefix the promise with \"await\". ` +\n `(While processing: ${JSON.stringify(alias)})`,\n );\n }\n\n if (\n externalDependencies.length > 0 &&\n (!cache.configured() || cache.mode() === \"forever\")\n ) {\n let error =\n `A plugin/preset has external untracked dependencies ` +\n `(${externalDependencies[0]}), but the cache `;\n if (!cache.configured()) {\n error += `has not been configured to be invalidated when the external dependencies change. `;\n } else {\n error += ` has been configured to never be invalidated. `;\n }\n error +=\n `Plugins/presets should configure their cache to be invalidated when the external ` +\n `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n `(While processing: ${JSON.stringify(alias)})`;\n\n throw new Error(error);\n }\n\n return {\n value: item,\n options,\n dirname,\n alias,\n externalDependencies: freezeDeepArray(externalDependencies),\n };\n });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n Context.SimplePlugin,\n PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n Context.SimplePreset,\n PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n cache: CacheConfigurator,\n): Handler {\n const pluginObj = validatePluginObject(value);\n\n const plugin = {\n ...pluginObj,\n };\n if (plugin.visitor) {\n plugin.visitor = traverse.explode({\n ...plugin.visitor,\n });\n }\n\n if (plugin.inherits) {\n const inheritsDescriptor: UnloadedDescriptor = {\n name: undefined,\n alias: `${alias}$inherits`,\n value: plugin.inherits,\n options,\n dirname,\n };\n\n const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n // If the inherited plugin changes, reinstantiate this plugin.\n return cache.invalidate(data => run(inheritsDescriptor, data));\n });\n\n plugin.pre = chainMaybeAsync(inherits.pre, plugin.pre);\n plugin.post = chainMaybeAsync(inherits.post, plugin.post);\n plugin.manipulateOptions = chainMaybeAsync(\n inherits.manipulateOptions,\n plugin.manipulateOptions,\n );\n plugin.visitor = traverse.visitors.merge([\n inherits.visitor || {},\n plugin.visitor || {},\n ]);\n\n if (inherits.externalDependencies.length > 0) {\n if (externalDependencies.length === 0) {\n externalDependencies = inherits.externalDependencies;\n } else {\n externalDependencies = freezeDeepArray([\n externalDependencies,\n inherits.externalDependencies,\n ]);\n }\n }\n }\n\n return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.SimplePlugin,\n): Handler {\n if (descriptor.value instanceof Plugin) {\n if (descriptor.options) {\n throw new Error(\n \"Passed options to an existing Plugin instance will not work.\",\n );\n }\n\n return descriptor.value;\n }\n\n return yield* instantiatePlugin(\n yield* pluginDescriptorLoader(descriptor, context),\n context,\n );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n options: InputOptions,\n descriptor: UnloadedDescriptor,\n): void => {\n if (\n needsFilename(options.test) ||\n needsFilename(options.include) ||\n needsFilename(options.exclude)\n ) {\n const formattedPresetName = descriptor.name\n ? `\"${descriptor.name}\"`\n : \"/* your preset */\";\n throw new ConfigError(\n [\n `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n `\\`\\`\\``,\n `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n `\\`\\`\\``,\n `See https://babeljs.io/docs/en/options#filename for more information.`,\n ].join(\"\\n\"),\n );\n }\n};\n\nconst validatePreset = (\n preset: PresetInstance,\n context: ConfigContext,\n descriptor: UnloadedDescriptor,\n): void => {\n if (!context.filename) {\n const { options } = preset;\n validateIfOptionNeedsFilename(options, descriptor);\n options.overrides?.forEach(overrideOptions =>\n validateIfOptionNeedsFilename(overrideOptions, descriptor),\n );\n }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n ({\n value,\n dirname,\n alias,\n externalDependencies,\n }: LoadedDescriptor): PresetInstance => {\n return {\n options: validate(\"preset\", value),\n alias,\n dirname,\n externalDependencies,\n };\n },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n descriptor: UnloadedDescriptor,\n context: Context.FullPreset,\n): Handler<{\n chain: ConfigChain | null;\n externalDependencies: ReadonlyDeepArray;\n}> {\n const preset = instantiatePreset(\n yield* presetDescriptorLoader(descriptor, context),\n );\n validatePreset(preset, context, descriptor);\n return {\n chain: yield* buildPresetChain(preset, context),\n externalDependencies: preset.externalDependencies,\n };\n}\n\nfunction chainMaybeAsync>(\n a: undefined | ((...args: Args) => R),\n b: undefined | ((...args: Args) => R),\n): (...args: Args) => R {\n if (!a) return b;\n if (!b) return a;\n\n return function (this: unknown, ...args: Args) {\n const res = a.apply(this, args);\n if (res && typeof res.then === \"function\") {\n return res.then(() => b.apply(this, args));\n }\n return b.apply(this, args);\n } as (...args: Args) => R;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,MAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAQA,SAAAQ,UAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,SAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAU,QAAA,GAAAT,OAAA;AAEA,IAAAU,QAAA,GAAAV,OAAA;AAKA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AAGA,IAAAa,QAAA,GAAAb,OAAA;AAIA,IAAAc,YAAA,GAAAd,OAAA;AAAoD,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAsBrCC,SAAMA,CAAC,CAAC,UAAUC,cAAcA,CAC7CC,SAAuB,EACS;EAAA,IAAAC,iBAAA;EAChC,MAAMC,MAAM,GAAG,OAAO,IAAAC,gBAAwB,EAACH,SAAS,CAAC;EACzD,IAAI,CAACE,MAAM,EAAE;IACX,OAAO,IAAI;EACb;EACA,MAAM;IAAEE,OAAO;IAAErB,OAAO;IAAEsB;EAAa,CAAC,GAAGH,MAAM;EAEjD,IAAIG,YAAY,KAAK,SAAS,EAAE;IAC9B,OAAO,IAAI;EACb;EAEA,MAAMC,cAAc,GAAG,CAAC,CAAC;EAEzB,MAA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AiB,EACzC,CAAC;EACCnD,KAAK;EACLC,OAAO;EACPC,KAAK;EACL/C;AACgB,CAAC,KAAqB;EACtC,OAAO;IACLnB,OAAO,EAAE,IAAAoH,iBAAQ,EAAC,QAAQ,EAAEpD,KAAK,CAAC;IAClCE,KAAK;IACLD,OAAO;IACP9C;EACF,CAAC;AACH,CACF,CAAC;AAKD,UAAUU,oBAAoBA,CAC5BF,UAAyC,EACzChD,OAA2B,EAI1B;EACD,MAAMiD,MAAM,GAAGsF,iBAAiB,CAC9B,OAAOnC,sBAAsB,CAACpD,UAAU,EAAEhD,OAAO,CACnD,CAAC;EACDmI,cAAc,CAAClF,MAAM,EAAEjD,OAAO,EAAEgD,UAAU,CAAC;EAC3C,OAAO;IACLQ,KAAK,EAAE,OAAO,IAAAkF,6BAAgB,EAACzF,MAAM,EAAEjD,OAAO,CAAC;IAC/CwC,oBAAoB,EAAES,MAAM,CAACT;EAC/B,CAAC;AACH;AAEA,SAAS4E,eAAeA,CACtBuB,CAAqC,EACrCC,CAAqC,EACf;EACtB,IAAI,CAACD,CAAC,EAAE,OAAOC,CAAC;EAChB,IAAI,CAACA,CAAC,EAAE,OAAOD,CAAC;EAEhB,OAAO,UAAyB,GAAGE,IAAU,EAAE;IAC7C,MAAMC,GAAG,GAAGH,CAAC,CAACI,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC;IAC/B,IAAIC,GAAG,IAAI,OAAOA,GAAG,CAACE,IAAI,KAAK,UAAU,EAAE;MACzC,OAAOF,GAAG,CAACE,IAAI,CAAC,MAAMJ,CAAC,CAACG,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC,CAAC;IAC5C;IACA,OAAOD,CAAC,CAACG,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC;EAC5B,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js b/node_modules/@babel/core/lib/config/helpers/config-api.js deleted file mode 100644 index 192ebcf..0000000 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.makeConfigAPI = makeConfigAPI; -exports.makePluginAPI = makePluginAPI; -exports.makePresetAPI = makePresetAPI; -function _semver() { - const data = require("semver"); - _semver = function () { - return data; - }; - return data; -} -var _index = require("../../index.js"); -var _caching = require("../caching.js"); -function makeConfigAPI(cache) { - const env = value => cache.using(data => { - if (value === undefined) return data.envName; - if (typeof value === "function") { - return (0, _caching.assertSimpleType)(value(data.envName)); - } - return (Array.isArray(value) ? value : [value]).some(entry => { - if (typeof entry !== "string") { - throw new Error("Unexpected non-string value"); - } - return entry === data.envName; - }); - }); - const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller))); - return { - version: _index.version, - cache: cache.simple(), - env, - async: () => false, - caller, - assertVersion - }; -} -function makePresetAPI(cache, externalDependencies) { - const targets = () => JSON.parse(cache.using(data => JSON.stringify(data.targets))); - const addExternalDependency = ref => { - externalDependencies.push(ref); - }; - return Object.assign({}, makeConfigAPI(cache), { - targets, - addExternalDependency - }); -} -function makePluginAPI(cache, externalDependencies) { - const assumption = name => cache.using(data => data.assumptions[name]); - return Object.assign({}, makePresetAPI(cache, externalDependencies), { - assumption - }); -} -function assertVersion(range) { - if (typeof range === "number") { - if (!Number.isInteger(range)) { - throw new Error("Expected string or integer value."); - } - range = `^${range}.0.0-0`; - } - if (typeof range !== "string") { - throw new Error("Expected string or integer value."); - } - if (range === "*" || _semver().satisfies(_index.version, range)) return; - const message = `Requires Babel "${range}", but was loaded with "${_index.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`; - const limit = Error.stackTraceLimit; - if (typeof limit === "number" && limit < 25) { - Error.stackTraceLimit = 25; - } - const err = new Error(message); - if (typeof limit === "number") { - Error.stackTraceLimit = limit; - } - throw Object.assign(err, { - code: "BABEL_VERSION_UNSUPPORTED", - version: _index.version, - range - }); -} -0 && 0; - -//# sourceMappingURL=config-api.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js.map b/node_modules/@babel/core/lib/config/helpers/config-api.js.map deleted file mode 100644 index b88d9f7..0000000 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_semver","data","require","_index","_caching","makeConfigAPI","cache","env","value","using","undefined","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","Object","assign","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","message","limit","stackTraceLimit","err","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../index.ts\";\nimport { assertSimpleType } from \"../caching.ts\";\nimport type {\n CacheConfigurator,\n SimpleCacheConfigurator,\n SimpleType,\n} from \"../caching.ts\";\n\nimport type {\n AssumptionName,\n CallerMetadata,\n InputOptions,\n} from \"../validation/options.ts\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvName = NonNullable;\ntype EnvFunction = {\n (): string;\n (extractor: (envName: EnvName) => T): T;\n (envVar: string): boolean;\n (envVars: string[]): boolean;\n};\n\ntype CallerFactory = {\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => T,\n ): T;\n (\n extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n ): SimpleType;\n};\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n version: string;\n cache: SimpleCacheConfigurator;\n env: EnvFunction;\n async: () => boolean;\n assertVersion: typeof assertVersion;\n caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n targets: TargetsFunction;\n addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI(\n cache: CacheConfigurator,\n): ConfigAPI {\n // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n // and the `as any` type cast, TypeScript crashes in an infinite\n // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n // PR, we should check if it still crashes and report it to the TS team.\n const env: EnvFunction = ((\n value: string | string[] | ((babelEnv: string) => T),\n ) =>\n cache.using(data => {\n if (value === undefined) return data.envName;\n if (typeof value === \"function\") {\n return assertSimpleType(value(data.envName));\n }\n return (Array.isArray(value) ? value : [value]).some(entry => {\n if (typeof entry !== \"string\") {\n throw new Error(\"Unexpected non-string value\");\n }\n return entry === data.envName;\n });\n })) as any;\n\n const caller = (\n cb: (CallerMetadata: CallerMetadata | undefined) => SimpleType,\n ) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n return {\n version: coreVersion,\n cache: cache.simple(),\n // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n env,\n async: () => false,\n caller,\n assertVersion,\n };\n}\n\nexport function makePresetAPI(\n cache: CacheConfigurator,\n externalDependencies: string[],\n): PresetAPI {\n const targets = () =>\n // We are using JSON.parse/JSON.stringify because it's only possible to cache\n // primitive values. We can safely stringify the targets object because it\n // only contains strings as its properties.\n // Please make the Record and Tuple proposal happen!\n JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n const addExternalDependency = (ref: string) => {\n externalDependencies.push(ref);\n };\n\n return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI(\n cache: CacheConfigurator,\n externalDependencies: string[],\n): PluginAPI {\n const assumption = (name: string) =>\n cache.using(data => data.assumptions[name]);\n\n return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n if (typeof range === \"number\") {\n if (!Number.isInteger(range)) {\n throw new Error(\"Expected string or integer value.\");\n }\n range = `^${range}.0.0-0`;\n }\n if (typeof range !== \"string\") {\n throw new Error(\"Expected string or integer value.\");\n }\n\n // We want \"*\" to also allow any pre-release, but we do not pass\n // the includePrerelease option to semver.satisfies because we\n // do not want ^7.0.0 to match 8.0.0-alpha.1.\n if (range === \"*\" || semver.satisfies(coreVersion, range)) return;\n\n const message =\n `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n `If you are sure you have a compatible version of @babel/core, ` +\n `it is likely that something in your build process is loading the ` +\n `wrong version. Inspect the stack trace of this error to look for ` +\n `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n `to see what is calling Babel.`;\n\n if (\n typeof process !== \"undefined\" &&\n process.env.BABEL_8_BREAKING &&\n process.env.BABEL_7_TO_8_DANGEROUSLY_DISABLE_VERSION_CHECK\n ) {\n console.warn(message);\n return;\n }\n\n const limit = Error.stackTraceLimit;\n\n if (typeof limit === \"number\" && limit < 25) {\n // Bump up the limit if needed so that users are more likely\n // to be able to see what is calling Babel.\n Error.stackTraceLimit = 25;\n }\n\n const err = new Error(message);\n\n if (typeof limit === \"number\") {\n Error.stackTraceLimit = limit;\n }\n\n throw Object.assign(err, {\n code: \"BABEL_VERSION_UNSUPPORTED\",\n version: coreVersion,\n range,\n });\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAoDO,SAASG,aAAaA,CAC3BC,KAAqC,EAC1B;EAKX,MAAMC,GAAgB,GACpBC,KAAuD,IAEvDF,KAAK,CAACG,KAAK,CAACR,IAAI,IAAI;IAClB,IAAIO,KAAK,KAAKE,SAAS,EAAE,OAAOT,IAAI,CAACU,OAAO;IAC5C,IAAI,OAAOH,KAA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ACpBmB;EACF,CAAC,CAAC;AACJ;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js b/node_modules/@babel/core/lib/config/helpers/deep-array.js deleted file mode 100644 index c611db2..0000000 --- a/node_modules/@babel/core/lib/config/helpers/deep-array.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.finalize = finalize; -exports.flattenToSet = flattenToSet; -function finalize(deepArr) { - return Object.freeze(deepArr); -} -function flattenToSet(arr) { - const result = new Set(); - const stack = [arr]; - while (stack.length > 0) { - for (const el of stack.pop()) { - if (Array.isArray(el)) stack.push(el);else result.add(el); - } - } - return result; -} -0 && 0; - -//# sourceMappingURL=deep-array.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js.map b/node_modules/@babel/core/lib/config/helpers/deep-array.js.map deleted file mode 100644 index 57239da..0000000 --- a/node_modules/@babel/core/lib/config/helpers/deep-array.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["finalize","deepArr","Object","freeze","flattenToSet","arr","result","Set","stack","length","el","pop","Array","isArray","push","add"],"sources":["../../../src/config/helpers/deep-array.ts"],"sourcesContent":["export type DeepArray = (T | ReadonlyDeepArray)[];\n\n// Just to make sure that DeepArray is not assignable to ReadonlyDeepArray\ndeclare const __marker: unique symbol;\nexport type ReadonlyDeepArray = readonly (T | ReadonlyDeepArray)[] & {\n [__marker]: true;\n};\n\nexport function finalize(deepArr: DeepArray): ReadonlyDeepArray {\n return Object.freeze(deepArr) as ReadonlyDeepArray;\n}\n\nexport function flattenToSet(\n arr: ReadonlyDeepArray,\n): Set {\n const result = new Set();\n const stack = [arr];\n while (stack.length > 0) {\n for (const el of stack.pop()) {\n if (Array.isArray(el)) stack.push(el as ReadonlyDeepArray);\n else result.add(el as T);\n }\n }\n return result;\n}\n"],"mappings":";;;;;;;AAQO,SAASA,QAAQA,CAAIC,OAAqB,EAAwB;EACvE,OAAOC,MAAM,CAACC,MAAM,CAACF,OAAO,CAAC;AAC/B;AAEO,SAASG,YAAYA,CAC1BC,GAAyB,EACjB;EACR,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAI,CAAC;EAC3B,MAAMC,KAAK,GAAG,CAACH,GAAG,CAAC;EACnB,OAAOG,KAAK,CAACC,MAAM,GAAG,CAAC,EAAE;IACvB,KAAK,MAAMC,EAAE,IAAIF,KAAK,CAACG,GAAG,CAAC,CAAC,EAAE;MAC5B,IAAIC,KAAK,CAACC,OAAO,CAACH,EAAE,CAAC,EAAEF,KAAK,CAACM,IAAI,CAACJ,EAA0B,CAAC,CAAC,KACzDJ,MAAM,CAACS,GAAG,CAACL,EAAO,CAAC;IAC1B;EACF;EACA,OAAOJ,MAAM;AACf;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js b/node_modules/@babel/core/lib/config/helpers/environment.js deleted file mode 100644 index a23b80b..0000000 --- a/node_modules/@babel/core/lib/config/helpers/environment.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getEnv = getEnv; -function getEnv(defaultValue = "development") { - return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue; -} -0 && 0; - -//# sourceMappingURL=environment.js.map diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js.map b/node_modules/@babel/core/lib/config/helpers/environment.js.map deleted file mode 100644 index c34fc17..0000000 --- a/node_modules/@babel/core/lib/config/helpers/environment.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["getEnv","defaultValue","process","env","BABEL_ENV","NODE_ENV"],"sources":["../../../src/config/helpers/environment.ts"],"sourcesContent":["export function getEnv(defaultValue: string = \"development\"): string {\n return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;\n}\n"],"mappings":";;;;;;AAAO,SAASA,MAAMA,CAACC,YAAoB,GAAG,aAAa,EAAU;EACnE,OAAOC,OAAO,CAACC,GAAG,CAACC,SAAS,IAAIF,OAAO,CAACC,GAAG,CAACE,QAAQ,IAAIJ,YAAY;AACtE;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js deleted file mode 100644 index cebfe23..0000000 --- a/node_modules/@babel/core/lib/config/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createConfigItem = createConfigItem; -exports.createConfigItemAsync = createConfigItemAsync; -exports.createConfigItemSync = createConfigItemSync; -Object.defineProperty(exports, "default", { - enumerable: true, - get: function () { - return _full.default; - } -}); -exports.loadOptions = loadOptions; -exports.loadOptionsAsync = loadOptionsAsync; -exports.loadOptionsSync = loadOptionsSync; -exports.loadPartialConfig = loadPartialConfig; -exports.loadPartialConfigAsync = loadPartialConfigAsync; -exports.loadPartialConfigSync = loadPartialConfigSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _full = require("./full.js"); -var _partial = require("./partial.js"); -var _item = require("./item.js"); -var _rewriteStackTrace = require("../errors/rewrite-stack-trace.js"); -const loadPartialConfigRunner = _gensync()(_partial.loadPartialConfig); -function loadPartialConfigAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.async)(...args); -} -function loadPartialConfigSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.sync)(...args); -} -function loadPartialConfig(opts, callback) { - if (callback !== undefined) { - (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(opts, callback); - } else if (typeof opts === "function") { - (0, _rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(undefined, opts); - } else { - return loadPartialConfigSync(opts); - } -} -function* loadOptionsImpl(opts) { - var _config$options; - const config = yield* (0, _full.default)(opts); - return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null; -} -const loadOptionsRunner = _gensync()(loadOptionsImpl); -function loadOptionsAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.async)(...args); -} -function loadOptionsSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.sync)(...args); -} -function loadOptions(opts, callback) { - if (callback !== undefined) { - (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(opts, callback); - } else if (typeof opts === "function") { - (0, _rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(undefined, opts); - } else { - return loadOptionsSync(opts); - } -} -const createConfigItemRunner = _gensync()(_item.createConfigItem); -function createConfigItemAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.async)(...args); -} -function createConfigItemSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.sync)(...args); -} -function createConfigItem(target, options, callback) { - if (callback !== undefined) { - (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, options, callback); - } else if (typeof options === "function") { - (0, _rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target, undefined, callback); - } else { - return createConfigItemSync(target, options); - } -} -0 && 0; - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/config/index.js.map b/node_modules/@babel/core/lib/config/index.js.map deleted file mode 100644 index 32f94ed..0000000 --- a/node_modules/@babel/core/lib/config/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_full","_partial","_item","_rewriteStackTrace","loadPartialConfigRunner","gensync","loadPartialConfigImpl","loadPartialConfigAsync","args","beginHiddenCallStack","async","loadPartialConfigSync","sync","loadPartialConfig","opts","callback","undefined","errback","loadOptionsImpl","_config$options","config","loadFullConfig","options","loadOptionsRunner","loadOptionsAsync","loadOptionsSync","loadOptions","createConfigItemRunner","createConfigItemImpl","createConfigItemAsync","createConfigItemSync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nexport type {\n ResolvedConfig,\n InputOptions,\n PluginPasses,\n Plugin,\n} from \"./full.ts\";\n\nimport type {\n InputOptions,\n PluginTarget,\n ResolvedOptions,\n} from \"./validation/options.ts\";\nexport type { ConfigAPI } from \"./helpers/config-api.ts\";\nimport type {\n PluginAPI as basePluginAPI,\n PresetAPI as basePresetAPI,\n} from \"./helpers/config-api.ts\";\nexport type { PluginObject } from \"./validation/plugins.ts\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\nexport type {\n CallerMetadata,\n NormalizedOptions,\n} from \"./validation/options.ts\";\n\nimport loadFullConfig from \"./full.ts\";\nimport {\n type PartialConfig,\n loadPartialConfig as loadPartialConfigImpl,\n} from \"./partial.ts\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial.ts\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item.ts\";\nimport type { ConfigItem } from \"./item.ts\";\nexport type { ConfigItem };\n\nimport { beginHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\n\nconst loadPartialConfigRunner = gensync(loadPartialConfigImpl);\nexport function loadPartialConfigAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.async)(...args);\n}\nexport function loadPartialConfigSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadPartialConfigRunner.sync)(...args);\n}\nexport function loadPartialConfig(\n opts: Parameters[0],\n callback?: (err: Error, val: PartialConfig | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadPartialConfigRunner.errback)(\n undefined,\n opts as (err: Error, val: PartialConfig | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadPartialConfig' function expects a callback. If you need to call it synchronously, please use 'loadPartialConfigSync'.\",\n );\n } else {\n return loadPartialConfigSync(opts);\n }\n }\n}\n\nfunction* loadOptionsImpl(opts: InputOptions): Handler {\n const config = yield* loadFullConfig(opts);\n // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n return config?.options ?? null;\n}\nconst loadOptionsRunner = gensync(loadOptionsImpl);\nexport function loadOptionsAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.async)(...args);\n}\nexport function loadOptionsSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(loadOptionsRunner.sync)(...args);\n}\nexport function loadOptions(\n opts: Parameters[0],\n callback?: (err: Error, val: ResolvedOptions | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(loadOptionsRunner.errback)(opts, callback);\n } else if (typeof opts === \"function\") {\n beginHiddenCallStack(loadOptionsRunner.errback)(\n undefined,\n opts as (err: Error, val: ResolvedOptions | null) => void,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'loadOptions' function expects a callback. If you need to call it synchronously, please use 'loadOptionsSync'.\",\n );\n } else {\n return loadOptionsSync(opts);\n }\n }\n}\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\nexport function createConfigItemAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.async)(...args);\n}\nexport function createConfigItemSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(createConfigItemRunner.sync)(...args);\n}\nexport function createConfigItem(\n target: PluginTarget,\n options: Parameters[1],\n callback?: (err: Error, val: ConfigItem | null) => void,\n) {\n if (callback !== undefined) {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n options,\n callback,\n );\n } else if (typeof options === \"function\") {\n beginHiddenCallStack(createConfigItemRunner.errback)(\n target,\n undefined,\n callback,\n );\n } else {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'createConfigItem' function expects a callback. If you need to call it synchronously, please use 'createConfigItemSync'.\",\n );\n } else {\n return createConfigItemSync(target, options);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA4BA,IAAAE,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAQA,IAAAG,KAAA,GAAAH,OAAA;AAIA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,MAAMK,uBAAuB,GAAGC,SAAMA,CAAC,CAACC,0BAAqB,CAAC;AACvD,SAASC,sBAAsBA,CACpC,GAAGC,IAAsD,EACzD;EACA,OAAO,IAAAC,uCAAoB,EAACL,uBAAuB,CAACM,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACrE;AACO,SAASG,qBAAqBA,CACnC,GAAGH,IAAqD,EACxD;EACA,OAAO,IAAAC,uCAAoB,EAACL,uBAAuB,CAACQ,IAAI,CAAC,CAAC,GAAGJ,IAAI,CAAC;AACpE;AACO,SAASK,iBAAiBA,CAC/BC,IAAiD,EACjDC,QAA0D,EAC1D;EACA,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1B,IAAAP,uCAAoB,EAACL,uBAAuB,CAACa,OAAO,CAAC,CAACH,IAAI,EAAEC,QAAQ,CAAC;EACvE,CAAC,MAAM,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IACrC,IAAAL,uCAAoB,EAACL,uBAAuB,CAACa,OAAO,CAAC,CACnDD,SAAS,EACTF,IACF,CAAC;EACH,CAAC,MAAM;IAMH,OAAOH,qBAAqB,CAACG,IAAI,CAAC;EAEtC;AACF;AAEA,UAAUI,eAAeA,CAACJ,IAAkB,EAAmC;EAAA,IAAAK,eAAA;EAC7E,MAAMC,MAAM,GAAG,OAAO,IAAAC,aAAc,EAACP,IAAI,CAAC;EAE1C,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E,EAClE;EACA,IAAIA,QAAQ,KAAKC,SAAS,EAAE;IAC1B,IAAAP,uCAAoB,EAACkB,sBAAsB,CAACV,OAAO,CAAC,CAClDe,MAAM,EACNV,OAAO,EACPP,QACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAOO,OAAO,KAAK,UAAU,EAAE;IACxC,IAAAb,uCAAoB,EAACkB,sBAAsB,CAACV,OAAO,CAAC,CAClDe,MAAM,EACNhB,SAAS,EACTD,QACF,CAAC;EACH,CAAC,MAAM;IAMH,OAAOe,oBAAoB,CAACE,MAAM,EAAEV,OAAO,CAAC;EAEhD;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/item.js b/node_modules/@babel/core/lib/config/item.js deleted file mode 100644 index 69cf01f..0000000 --- a/node_modules/@babel/core/lib/config/item.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createConfigItem = createConfigItem; -exports.createItemFromDescriptor = createItemFromDescriptor; -exports.getItemDescriptor = getItemDescriptor; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -var _configDescriptors = require("./config-descriptors.js"); -function createItemFromDescriptor(desc) { - return new ConfigItem(desc); -} -function* createConfigItem(value, { - dirname = ".", - type -} = {}) { - const descriptor = yield* (0, _configDescriptors.createDescriptor)(value, _path().resolve(dirname), { - type, - alias: "programmatic item" - }); - return createItemFromDescriptor(descriptor); -} -const CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem"); -function getItemDescriptor(item) { - if (item != null && item[CONFIG_ITEM_BRAND]) { - return item._descriptor; - } - return undefined; -} -class ConfigItem { - constructor(descriptor) { - this._descriptor = void 0; - this[CONFIG_ITEM_BRAND] = true; - this.value = void 0; - this.options = void 0; - this.dirname = void 0; - this.name = void 0; - this.file = void 0; - this._descriptor = descriptor; - Object.defineProperty(this, "_descriptor", { - enumerable: false - }); - Object.defineProperty(this, CONFIG_ITEM_BRAND, { - enumerable: false - }); - this.value = this._descriptor.value; - this.options = this._descriptor.options; - this.dirname = this._descriptor.dirname; - this.name = this._descriptor.name; - this.file = this._descriptor.file ? { - request: this._descriptor.file.request, - resolved: this._descriptor.file.resolved - } : undefined; - Object.freeze(this); - } -} -Object.freeze(ConfigItem.prototype); -0 && 0; - -//# sourceMappingURL=item.js.map diff --git a/node_modules/@babel/core/lib/config/item.js.map b/node_modules/@babel/core/lib/config/item.js.map deleted file mode 100644 index 6bdc806..0000000 --- a/node_modules/@babel/core/lib/config/item.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","_configDescriptors","createItemFromDescriptor","desc","ConfigItem","createConfigItem","value","dirname","type","descriptor","createDescriptor","path","resolve","alias","CONFIG_ITEM_BRAND","Symbol","for","getItemDescriptor","item","_descriptor","undefined","constructor","options","name","file","Object","defineProperty","enumerable","request","resolved","freeze","prototype"],"sources":["../../src/config/item.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport type { PluginItem, PresetItem } from \"./validation/options.ts\";\n\nimport path from \"node:path\";\nimport { createDescriptor } from \"./config-descriptors.ts\";\n\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\n\nexport function createItemFromDescriptor(\n desc: UnloadedDescriptor,\n): ConfigItem {\n return new ConfigItem(desc);\n}\n\n/**\n * Create a config item using the same value format used in Babel's config\n * files. Items returned from this function should be cached by the caller\n * ideally, as recreating the config item will mean re-resolving the item\n * and re-evaluating the plugin/preset function.\n */\nexport function* createConfigItem(\n value: PluginItem | PresetItem,\n {\n dirname = \".\",\n type,\n }: {\n dirname?: string;\n type?: \"preset\" | \"plugin\";\n } = {},\n): Handler> {\n const descriptor = yield* createDescriptor(value, path.resolve(dirname), {\n type,\n alias: \"programmatic item\",\n });\n\n return createItemFromDescriptor(descriptor);\n}\n\nconst CONFIG_ITEM_BRAND = Symbol.for(\"@babel/core@7 - ConfigItem\");\n\nexport function getItemDescriptor(\n item: unknown,\n): UnloadedDescriptor | void {\n if ((item as any)?.[CONFIG_ITEM_BRAND]) {\n return (item as ConfigItem)._descriptor;\n }\n\n return undefined;\n}\n\nexport type { ConfigItem };\n\n/**\n * A public representation of a plugin/preset that will _eventually_ be load.\n * Users can use this to interact with the results of a loaded Babel\n * configuration.\n *\n * Any changes to public properties of this class should be considered a\n * breaking change to Babel's API.\n */\nclass ConfigItem {\n /**\n * The private underlying descriptor that Babel actually cares about.\n * If you access this, you are a bad person.\n */\n _descriptor: UnloadedDescriptor;\n\n // TODO(Babel 9): Check if this symbol needs to be updated\n /**\n * Used to detect ConfigItem instances from other Babel instances.\n */\n [CONFIG_ITEM_BRAND] = true;\n\n /**\n * The resolved value of the item itself.\n */\n value: object | Function;\n\n /**\n * The options, if any, that were passed to the item.\n * Mutating this will lead to undefined behavior.\n *\n * \"false\" means that this item has been disabled.\n */\n options: object | void | false;\n\n /**\n * The directory that the options for this item are relative to.\n */\n dirname: string;\n\n /**\n * Get the name of the plugin, if the user gave it one.\n */\n name: string | void;\n\n /**\n * Data about the file that the item was loaded from, if Babel knows it.\n */\n file: {\n // The requested path, e.g. \"@babel/env\".\n request: string;\n // The resolved absolute path of the file.\n resolved: string;\n } | void;\n\n constructor(descriptor: UnloadedDescriptor) {\n // Make people less likely to stumble onto this if they are exploring\n // programmatically, and also make sure that if people happen to\n // pass the item through JSON.stringify, it doesn't show up.\n this._descriptor = descriptor;\n Object.defineProperty(this, \"_descriptor\", { enumerable: false });\n\n Object.defineProperty(this, CONFIG_ITEM_BRAND, { enumerable: false });\n\n this.value = this._descriptor.value;\n this.options = this._descriptor.options;\n this.dirname = this._descriptor.dirname;\n this.name = this._descriptor.name;\n this.file = this._descriptor.file\n ? {\n request: this._descriptor.file.request,\n resolved: this._descriptor.file.resolved,\n }\n : undefined;\n\n // Freeze the object to make it clear that people shouldn't expect mutating\n // this object to do anything. A new item should be created if they want\n // to change something.\n Object.freeze(this);\n }\n}\n\nObject.freeze(ConfigItem.prototype);\n"],"mappings":";;;;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AE;MAAEa,UAAU,EAAE;IAAM,CAAC,CAAC;IAErE,IAAI,CAACrB,KAAK,GAAG,IAAI,CAACa,WAAW,CAACb,KAAK;IACnC,IAAI,CAACgB,OAAO,GAAG,IAAI,CAACH,WAAW,CAACG,OAAO;IACvC,IAAI,CAACf,OAAO,GAAG,IAAI,CAACY,WAAW,CAACZ,OAAO;IACvC,IAAI,CAACgB,IAAI,GAAG,IAAI,CAACJ,WAAW,CAACI,IAAI;IACjC,IAAI,CAACC,IAAI,GAAG,IAAI,CAACL,WAAW,CAACK,IAAI,GAC7B;MACEI,OAAO,EAAE,IAAI,CAACT,WAAW,CAACK,IAAI,CAACI,OAAO;MACtCC,QAAQ,EAAE,IAAI,CAACV,WAAW,CAACK,IAAI,CAACK;IAClC,CAAC,GACDT,SAAS;IAKbK,MAAM,CAACK,MAAM,CAAC,IAAI,CAAC;EACrB;AACF;AAEAL,MAAM,CAACK,MAAM,CAAC1B,UAAU,CAAC2B,SAAS,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/partial.js b/node_modules/@babel/core/lib/config/partial.js deleted file mode 100644 index a5a2f65..0000000 --- a/node_modules/@babel/core/lib/config/partial.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadPrivatePartialConfig; -exports.loadPartialConfig = loadPartialConfig; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -var _plugin = require("./plugin.js"); -var _util = require("./util.js"); -var _item = require("./item.js"); -var _configChain = require("./config-chain.js"); -var _environment = require("./helpers/environment.js"); -var _options = require("./validation/options.js"); -var _index = require("./files/index.js"); -var _resolveTargets = require("./resolve-targets.js"); -const _excluded = ["showIgnoredFiles"]; -function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; } -function resolveRootMode(rootDir, rootMode) { - switch (rootMode) { - case "root": - return rootDir; - case "upward-optional": - { - const upwardRootDir = (0, _index.findConfigUpwards)(rootDir); - return upwardRootDir === null ? rootDir : upwardRootDir; - } - case "upward": - { - const upwardRootDir = (0, _index.findConfigUpwards)(rootDir); - if (upwardRootDir !== null) return upwardRootDir; - throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_index.ROOT_CONFIG_FILENAMES.join(", ")}".`), { - code: "BABEL_ROOT_NOT_FOUND", - dirname: rootDir - }); - } - default: - throw new Error(`Assertion failure - unknown rootMode value.`); - } -} -function* loadPrivatePartialConfig(inputOpts) { - if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) { - throw new Error("Babel options must be an object, null, or undefined"); - } - const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; - const { - envName = (0, _environment.getEnv)(), - cwd = ".", - root: rootDir = ".", - rootMode = "root", - caller, - cloneInputAst = true - } = args; - const absoluteCwd = _path().resolve(cwd); - const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode); - const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined; - const showConfigPath = yield* (0, _index.resolveShowConfigPath)(absoluteCwd); - const context = { - filename, - cwd: absoluteCwd, - root: absoluteRootDir, - envName, - caller, - showConfig: showConfigPath === filename - }; - const configChain = yield* (0, _configChain.buildRootChain)(args, context); - if (!configChain) return null; - const merged = { - assumptions: {} - }; - configChain.options.forEach(opts => { - (0, _util.mergeOptions)(merged, opts); - }); - const options = Object.assign({}, merged, { - targets: (0, _resolveTargets.resolveTargets)(merged, absoluteRootDir), - cloneInputAst, - babelrc: false, - configFile: false, - browserslistConfigFile: false, - passPerPreset: false, - envName: context.envName, - cwd: context.cwd, - root: context.root, - rootMode: "root", - filename: typeof context.filename === "string" ? context.filename : undefined, - plugins: configChain.plugins.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)), - presets: configChain.presets.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)) - }); - return { - options, - context, - fileHandling: configChain.fileHandling, - ignore: configChain.ignore, - babelrc: configChain.babelrc, - config: configChain.config, - files: configChain.files - }; -} -function* loadPartialConfig(opts) { - let showIgnoredFiles = false; - if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) { - var _opts = opts; - ({ - showIgnoredFiles - } = _opts); - opts = _objectWithoutPropertiesLoose(_opts, _excluded); - _opts; - } - const result = yield* loadPrivatePartialConfig(opts); - if (!result) return null; - const { - options, - babelrc, - ignore, - config, - fileHandling, - files - } = result; - if (fileHandling === "ignored" && !showIgnoredFiles) { - return null; - } - (options.plugins || []).forEach(item => { - if (item.value instanceof _plugin.default) { - throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); - } - }); - return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files); -} -class PartialConfig { - constructor(options, babelrc, ignore, config, fileHandling, files) { - this.options = void 0; - this.babelrc = void 0; - this.babelignore = void 0; - this.config = void 0; - this.fileHandling = void 0; - this.files = void 0; - this.options = options; - this.babelignore = ignore; - this.babelrc = babelrc; - this.config = config; - this.fileHandling = fileHandling; - this.files = files; - Object.freeze(this); - } - hasFilesystemConfig() { - return this.babelrc !== undefined || this.config !== undefined; - } -} -Object.freeze(PartialConfig.prototype); -0 && 0; - -//# sourceMappingURL=partial.js.map diff --git a/node_modules/@babel/core/lib/config/partial.js.map b/node_modules/@babel/core/lib/config/partial.js.map deleted file mode 100644 index e54684d..0000000 --- a/node_modules/@babel/core/lib/config/partial.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","_plugin","_util","_item","_configChain","_environment","_options","_index","_resolveTargets","_excluded","_objectWithoutPropertiesLoose","r","e","t","n","hasOwnProperty","call","indexOf","resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","Object","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","showIgnoredFiles","_opts","result","item","value","Plugin","PartialConfig","filepath","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin.ts\";\nimport { mergeOptions } from \"./util.ts\";\nimport { createItemFromDescriptor } from \"./item.ts\";\nimport { buildRootChain } from \"./config-chain.ts\";\nimport type { ConfigContext, FileHandling } from \"./config-chain.ts\";\nimport { getEnv } from \"./helpers/environment.ts\";\nimport { validate } from \"./validation/options.ts\";\n\nimport type {\n RootMode,\n InputOptions,\n NormalizedOptions,\n} from \"./validation/options.ts\";\n\nimport {\n findConfigUpwards,\n resolveShowConfigPath,\n ROOT_CONFIG_FILENAMES,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile } from \"./files/index.ts\";\nimport { resolveTargets } from \"./resolve-targets.ts\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n switch (rootMode) {\n case \"root\":\n return rootDir;\n\n case \"upward-optional\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n return upwardRootDir === null ? rootDir : upwardRootDir;\n }\n\n case \"upward\": {\n const upwardRootDir = findConfigUpwards(rootDir);\n if (upwardRootDir !== null) return upwardRootDir;\n\n throw Object.assign(\n new Error(\n `Babel was run with rootMode:\"upward\" but a root could not ` +\n `be found when searching upward from \"${rootDir}\".\\n` +\n `One of the following config files must be in the directory tree: ` +\n `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n ) as any,\n {\n code: \"BABEL_ROOT_NOT_FOUND\",\n dirname: rootDir,\n },\n );\n }\n default:\n throw new Error(`Assertion failure - unknown rootMode value.`);\n }\n}\n\nexport type PrivPartialConfig = {\n showIgnoredFiles?: boolean;\n options: NormalizedOptions;\n context: ConfigContext;\n babelrc: ConfigFile | undefined;\n config: ConfigFile | undefined;\n ignore: IgnoreFile | undefined;\n fileHandling: FileHandling;\n files: Set;\n};\n\nexport default function* loadPrivatePartialConfig(\n inputOpts: InputOptions,\n): Handler {\n if (\n inputOpts != null &&\n (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n ) {\n throw new Error(\"Babel options must be an object, null, or undefined\");\n }\n\n const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n const {\n envName = getEnv(),\n cwd = \".\",\n root: rootDir = \".\",\n rootMode = \"root\",\n caller,\n cloneInputAst = true,\n } = args;\n const absoluteCwd = path.resolve(cwd);\n const absoluteRootDir = resolveRootMode(\n path.resolve(absoluteCwd, rootDir),\n rootMode,\n );\n\n const filename =\n typeof args.filename === \"string\"\n ? path.resolve(cwd, args.filename)\n : undefined;\n\n const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n const context: ConfigContext = {\n filename,\n cwd: absoluteCwd,\n root: absoluteRootDir,\n envName,\n caller,\n showConfig: showConfigPath === filename,\n };\n\n const configChain = yield* buildRootChain(args, context);\n if (!configChain) return null;\n\n const merged = {\n assumptions: {},\n };\n configChain.options.forEach(opts => {\n mergeOptions(merged as any, opts);\n });\n\n const options: NormalizedOptions = {\n ...merged,\n targets: resolveTargets(merged, absoluteRootDir),\n\n // Tack the passes onto the object itself so that, if this object is\n // passed back to Babel a second time, it will be in the right structure\n // to not change behavior.\n cloneInputAst,\n babelrc: false,\n configFile: false,\n browserslistConfigFile: false,\n passPerPreset: false,\n envName: context.envName,\n cwd: context.cwd,\n root: context.root,\n rootMode: \"root\",\n filename:\n typeof context.filename === \"string\" ? context.filename : undefined,\n\n plugins: configChain.plugins.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n presets: configChain.presets.map(descriptor =>\n createItemFromDescriptor(descriptor),\n ),\n };\n\n return {\n options,\n context,\n fileHandling: configChain.fileHandling,\n ignore: configChain.ignore,\n babelrc: configChain.babelrc,\n config: configChain.config,\n files: configChain.files,\n };\n}\n\nexport function* loadPartialConfig(\n opts?: InputOptions,\n): Handler {\n let showIgnoredFiles = false;\n // We only extract showIgnoredFiles if opts is an object, so that\n // loadPrivatePartialConfig can throw the appropriate error if it's not.\n if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n ({ showIgnoredFiles, ...opts } = opts);\n }\n\n const result: PrivPartialConfig | undefined | null =\n yield* loadPrivatePartialConfig(opts);\n if (!result) return null;\n\n const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n return null;\n }\n\n (options.plugins || []).forEach(item => {\n if (item.value instanceof Plugin) {\n throw new Error(\n \"Passing cached plugin instances is not supported in \" +\n \"babel.loadPartialConfig()\",\n );\n }\n });\n\n return new PartialConfig(\n options,\n babelrc ? babelrc.filepath : undefined,\n ignore ? ignore.filepath : undefined,\n config ? config.filepath : undefined,\n fileHandling,\n files,\n );\n}\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n /**\n * These properties are public, so any changes to them should be considered\n * a breaking change to Babel's API.\n */\n options: NormalizedOptions;\n babelrc: string | undefined;\n babelignore: string | undefined;\n config: string | undefined;\n fileHandling: FileHandling;\n files: Set;\n\n constructor(\n options: NormalizedOptions,\n babelrc: string | undefined,\n ignore: string | undefined,\n config: string | undefined,\n fileHandling: FileHandling,\n files: Set,\n ) {\n this.options = options;\n this.babelignore = ignore;\n this.babelrc = babelrc;\n this.config = config;\n this.fileHandling = fileHandling;\n this.files = files;\n\n // Freeze since this is a public API and it should be extremely obvious that\n // reassigning properties on here does nothing.\n Object.freeze(this);\n }\n\n /**\n * Returns true if there is a config file in the filesystem for this config.\n */\n hasFilesystemConfig(): boolean {\n return this.babelrc !== undefined || this.config !== undefined;\n }\n}\nObject.freeze(PartialConfig.prototype);\n"],"mappings":";;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAQA,IAAAO,MAAA,GAAAP,OAAA;AAMA,IAAAQ,eAAA,GAAAR,OAAA;AAAsD,MAAAS,SAAA;AAAA,SAAAC,8BAAAC,CAAA,EAAAC,CAAA,gBAAAD,CAAA,iBAAAE,CAAA,gBAAAC,CAAA,IAAAH,CAAA,SAAAI,cAAA,CAAAC,IAAA,CAAAL,CAAA,EAAAG,CAAA,gBAAAF,CAAA,CAAAK,OAAA,CAAAH,CAAA,aAAAD,CAAA,CAAAC,CAAA,IAAAH,CAAA,CAAAG,CAAA,YAAAD,CAAA;AAEtD,SAASK,eAAeA,CAACC,OAAe,EAAEC,QAAkB,EAAU;EACpE,QAAQA,QAAQ;IACd,KAAK,MAAM;MACT,OAAOD,OAAO;IAEhB,KAAK,iBAAiB;MAAE;QACtB,MAAME,aAAa,GAAG,IAAAC,wBAAiB,EAACH,OAAO,CAAC;QAChD,OAAOE,aAAa,KAAK,IAAI,GAAGF,OAAO,GAAGE,aAAa;MACzD;IAEA,KAAK,QAAQ;MAAE;QACb,MAAMA,aAAa,GAAG,IAAAC,wBAAiB,EAACH,OAAO,CAAC;QAChD,IAAIE,aAAa,KAAK,IAAI,EAAE,OAAOA,aAAa;QAEhD,MAAME,MAAM,CAACC,MAAM,CACjB,IAAIC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GAAGpC,SAAS,EACpCwB,YAAY,EACZG,KACF,CAAC;AACH;AAIA,MAAMQ,aAAa,CAAC;EAYlBE,WAAWA,CACT5B,OAA0B,EAC1BM,OAA2B,EAC3BU,MAA0B,EAC1BC,MAA0B,EAC1BF,YAA0B,EAC1BG,KAAkB,EAClB;IAAA,KAdFlB,OAAO;IAAA,KACPM,OAAO;IAAA,KACPuB,WAAW;IAAA,KACXZ,MAAM;IAAA,KACNF,YAAY;IAAA,KACZG,KAAK;IAUH,IAAI,CAAClB,OAAO,GAAGA,OAAO;IACtB,IAAI,CAAC6B,WAAW,GAAGb,MAAM;IACzB,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACW,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACG,KAAK,GAAGA,KAAK;IAIlBnD,MAAM,CAAC+D,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmBA,CAAA,EAAY;IAC7B,OAAO,IAAI,CAACzB,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAxB,MAAM,CAAC+D,MAAM,CAACJ,aAAa,CAACM,SAAS,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js b/node_modules/@babel/core/lib/config/pattern-to-regex.js deleted file mode 100644 index 32de02d..0000000 --- a/node_modules/@babel/core/lib/config/pattern-to-regex.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = pathToPattern; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -const sep = `\\${_path().sep}`; -const endSep = `(?:${sep}|$)`; -const substitution = `[^${sep}]+`; -const starPat = `(?:${substitution}${sep})`; -const starPatLast = `(?:${substitution}${endSep})`; -const starStarPat = `${starPat}*?`; -const starStarPatLast = `${starPat}*?${starPatLast}?`; -function escapeRegExp(string) { - return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"); -} -function pathToPattern(pattern, dirname) { - const parts = _path().resolve(dirname, pattern).split(_path().sep); - return new RegExp(["^", ...parts.map((part, i) => { - const last = i === parts.length - 1; - if (part === "**") return last ? starStarPatLast : starStarPat; - if (part === "*") return last ? starPatLast : starPat; - if (part.startsWith("*.")) { - return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep); - } - return escapeRegExp(part) + (last ? endSep : sep); - })].join("")); -} -0 && 0; - -//# sourceMappingURL=pattern-to-regex.js.map diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js.map b/node_modules/@babel/core/lib/config/pattern-to-regex.js.map deleted file mode 100644 index 0da14ff..0000000 --- a/node_modules/@babel/core/lib/config/pattern-to-regex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","sep","path","endSep","substitution","starPat","starPatLast","starStarPat","starStarPatLast","escapeRegExp","string","replace","pathToPattern","pattern","dirname","parts","resolve","split","RegExp","map","part","i","last","length","startsWith","slice","join"],"sources":["../../src/config/pattern-to-regex.ts"],"sourcesContent":["import path from \"node:path\";\n\nconst sep = `\\\\${path.sep}`;\nconst endSep = `(?:${sep}|$)`;\n\nconst substitution = `[^${sep}]+`;\n\nconst starPat = `(?:${substitution}${sep})`;\nconst starPatLast = `(?:${substitution}${endSep})`;\n\nconst starStarPat = `${starPat}*?`;\nconst starStarPatLast = `${starPat}*?${starPatLast}?`;\n\nfunction escapeRegExp(string: string) {\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\");\n}\n\n/**\n * Implement basic pattern matching that will allow users to do the simple\n * tests with * and **. If users want full complex pattern matching, then can\n * always use regex matching, or function validation.\n */\nexport default function pathToPattern(\n pattern: string,\n dirname: string,\n): RegExp {\n const parts = path.resolve(dirname, pattern).split(path.sep);\n\n return new RegExp(\n [\n \"^\",\n ...parts.map((part, i) => {\n const last = i === parts.length - 1;\n\n // ** matches 0 or more path parts.\n if (part === \"**\") return last ? starStarPatLast : starStarPat;\n\n // * matches 1 path part.\n if (part === \"*\") return last ? starPatLast : starPat;\n\n // *.ext matches a wildcard with an extension.\n if (part.startsWith(\"*.\")) {\n return (\n substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep)\n );\n }\n\n // Otherwise match the pattern text.\n return escapeRegExp(part) + (last ? endSep : sep);\n }),\n ].join(\"\"),\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAME,GAAG,GAAG,KAAKC,MAAGA,CAAC,CAACD,GAAG,EAAE;AAC3B,MAAME,MAAM,GAAG,MAAMF,GAAG,KAAK;AAE7B,MAAMG,YAAY,GAAG,KAAKH,GAAG,IAAI;AAEjC,MAAMI,OAAO,GAAG,MAAMD,YAAY,GAAGH,GAAG,GAAG;AAC3C,MAAMK,WAAW,GAAG,MAAMF,YAAY,GAAGD,MAAM,GAAG;AAElD,MAAMI,WAAW,GAAG,GAAGF,OAAO,IAAI;AAClC,MAAMG,eAAe,GAAG,GAAGH,OAAO,KAAKC,WAAW,GAAG;AAErD,SAASG,YAAYA,CAACC,MAAc,EAAE;EACpC,OAAOA,MAAM,CAACC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;AACtD;AAOe,SAASC,aAAaA,CACnCC,OAAe,EACfC,OAAe,EACP;EACR,MAAMC,KAAK,GAAGb,MAAGA,CAAC,CAACc,OAAO,CAACF,OAAO,EAAED,OAAO,CAAC,CAACI,KAAK,CAACf,MAAGA,CAAC,CAACD,GAAG,CAAC;EAE5D,OAAO,IAAIiB,MAAM,CACf,CACE,GAAG,EACH,GAAGH,KAAK,CAACI,GAAG,CAAC,CAACC,IAAI,EAAEC,CAAC,KAAK;IACxB,MAAMC,IAAI,GAAGD,CAAC,KAAKN,KAAK,CAACQ,MAAM,GAAG,CAAC;IAGnC,IAAIH,IAAI,KAAK,IAAI,EAAE,OAAOE,IAAI,GAAGd,eAAe,GAAGD,WAAW;IAG9D,IAAIa,IAAI,KAAK,GAAG,EAAE,OAAOE,IAAI,GAAGhB,WAAW,GAAGD,OAAO;IAGrD,IAAIe,IAAI,CAACI,UAAU,CAAC,IAAI,CAAC,EAAE;MACzB,OACEpB,YAAY,GAAGK,YAAY,CAACW,IAAI,CAACK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAIH,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;IAEtE;IAGA,OAAOQ,YAAY,CAACW,IAAI,CAAC,IAAIE,IAAI,GAAGnB,MAAM,GAAGF,GAAG,CAAC;EACnD,CAAC,CAAC,CACH,CAACyB,IAAI,CAAC,EAAE,CACX,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/plugin.js b/node_modules/@babel/core/lib/config/plugin.js deleted file mode 100644 index 21a28cd..0000000 --- a/node_modules/@babel/core/lib/config/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _deepArray = require("./helpers/deep-array.js"); -class Plugin { - constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) { - this.key = void 0; - this.manipulateOptions = void 0; - this.post = void 0; - this.pre = void 0; - this.visitor = void 0; - this.parserOverride = void 0; - this.generatorOverride = void 0; - this.options = void 0; - this.externalDependencies = void 0; - this.key = plugin.name || key; - this.manipulateOptions = plugin.manipulateOptions; - this.post = plugin.post; - this.pre = plugin.pre; - this.visitor = plugin.visitor || {}; - this.parserOverride = plugin.parserOverride; - this.generatorOverride = plugin.generatorOverride; - this.options = options; - this.externalDependencies = externalDependencies; - } -} -exports.default = Plugin; -0 && 0; - -//# sourceMappingURL=plugin.js.map diff --git a/node_modules/@babel/core/lib/config/plugin.js.map b/node_modules/@babel/core/lib/config/plugin.js.map deleted file mode 100644 index c3bccb5..0000000 --- a/node_modules/@babel/core/lib/config/plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: PluginObject[\"parserOverride\"];\n generatorOverride?: PluginObject[\"generatorOverride\"];\n\n options: object;\n\n externalDependencies: ReadonlyDeepArray;\n\n constructor(\n plugin: PluginObject,\n options: object,\n key?: string,\n externalDependencies: ReadonlyDeepArray = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAe,EACfC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/printer.js b/node_modules/@babel/core/lib/config/printer.js deleted file mode 100644 index 3ac2c07..0000000 --- a/node_modules/@babel/core/lib/config/printer.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ConfigPrinter = exports.ChainFormatter = void 0; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -const ChainFormatter = exports.ChainFormatter = { - Programmatic: 0, - Config: 1 -}; -const Formatter = { - title(type, callerName, filepath) { - let title = ""; - if (type === ChainFormatter.Programmatic) { - title = "programmatic options"; - if (callerName) { - title += " from " + callerName; - } - } else { - title = "config " + filepath; - } - return title; - }, - loc(index, envName) { - let loc = ""; - if (index != null) { - loc += `.overrides[${index}]`; - } - if (envName != null) { - loc += `.env["${envName}"]`; - } - return loc; - }, - *optionsAndDescriptors(opt) { - const content = Object.assign({}, opt.options); - delete content.overrides; - delete content.env; - const pluginDescriptors = [...(yield* opt.plugins())]; - if (pluginDescriptors.length) { - content.plugins = pluginDescriptors.map(d => descriptorToConfig(d)); - } - const presetDescriptors = [...(yield* opt.presets())]; - if (presetDescriptors.length) { - content.presets = [...presetDescriptors].map(d => descriptorToConfig(d)); - } - return JSON.stringify(content, undefined, 2); - } -}; -function descriptorToConfig(d) { - var _d$file; - let name = (_d$file = d.file) == null ? void 0 : _d$file.request; - if (name == null) { - if (typeof d.value === "object") { - name = d.value; - } else if (typeof d.value === "function") { - name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`; - } - } - if (name == null) { - name = "[Unknown]"; - } - if (d.options === undefined) { - return name; - } else if (d.name == null) { - return [name, d.options]; - } else { - return [name, d.options, d.name]; - } -} -class ConfigPrinter { - constructor() { - this._stack = []; - } - configure(enabled, type, { - callerName, - filepath - }) { - if (!enabled) return () => {}; - return (content, index, envName) => { - this._stack.push({ - type, - callerName, - filepath, - content, - index, - envName - }); - }; - } - static *format(config) { - let title = Formatter.title(config.type, config.callerName, config.filepath); - const loc = Formatter.loc(config.index, config.envName); - if (loc) title += ` ${loc}`; - const content = yield* Formatter.optionsAndDescriptors(config.content); - return `${title}\n${content}`; - } - *output() { - if (this._stack.length === 0) return ""; - const configs = yield* _gensync().all(this._stack.map(s => ConfigPrinter.format(s))); - return configs.join("\n\n"); - } -} -exports.ConfigPrinter = ConfigPrinter; -0 && 0; - -//# sourceMappingURL=printer.js.map diff --git a/node_modules/@babel/core/lib/config/printer.js.map b/node_modules/@babel/core/lib/config/printer.js.map deleted file mode 100644 index de47394..0000000 --- a/node_modules/@babel/core/lib/config/printer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","ChainFormatter","exports","Programmatic","Config","Formatter","title","type","callerName","filepath","loc","index","envName","optionsAndDescriptors","opt","content","Object","assign","options","overrides","env","pluginDescriptors","plugins","length","map","d","descriptorToConfig","presetDescriptors","presets","JSON","stringify","undefined","_d$file","name","file","request","value","toString","slice","ConfigPrinter","constructor","_stack","configure","enabled","push","format","config","output","configs","gensync","all","s","join"],"sources":["../../src/config/printer.ts"],"sourcesContent":["import gensync from \"gensync\";\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n OptionsAndDescriptors,\n UnloadedDescriptor,\n} from \"./config-descriptors.ts\";\n\n// todo: Use flow enums when @babel/transform-flow-types supports it\nexport const ChainFormatter = {\n Programmatic: 0,\n Config: 1,\n};\n\ntype PrintableConfig = {\n content: OptionsAndDescriptors;\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter];\n callerName: string | undefined | null;\n filepath: string | undefined | null;\n index: number | undefined | null;\n envName: string | undefined | null;\n};\n\nconst Formatter = {\n title(\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n callerName?: string | null,\n filepath?: string | null,\n ): string {\n let title = \"\";\n if (type === ChainFormatter.Programmatic) {\n title = \"programmatic options\";\n if (callerName) {\n title += \" from \" + callerName;\n }\n } else {\n title = \"config \" + filepath;\n }\n return title;\n },\n loc(index?: number | null, envName?: string | null): string {\n let loc = \"\";\n if (index != null) {\n loc += `.overrides[${index}]`;\n }\n if (envName != null) {\n loc += `.env[\"${envName}\"]`;\n }\n return loc;\n },\n\n *optionsAndDescriptors(opt: OptionsAndDescriptors) {\n const content = { ...opt.options };\n // overrides and env will be printed as separated config items\n delete content.overrides;\n delete content.env;\n // resolve to descriptors\n const pluginDescriptors = [...(yield* opt.plugins())];\n if (pluginDescriptors.length) {\n content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));\n }\n const presetDescriptors = [...(yield* opt.presets())];\n if (presetDescriptors.length) {\n content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));\n }\n return JSON.stringify(content, undefined, 2);\n },\n};\n\nfunction descriptorToConfig(\n d: UnloadedDescriptor,\n): string | [string, object] | [string, object, string] {\n let name: string = d.file?.request;\n if (name == null) {\n if (typeof d.value === \"object\") {\n // @ts-expect-error FIXME\n name = d.value;\n } else if (typeof d.value === \"function\") {\n // If the unloaded descriptor is a function, i.e. `plugins: [ require(\"my-plugin\") ]`,\n // we print the first 50 characters of the function source code and hopefully we can see\n // `name: 'my-plugin'` in the source\n name = `[Function: ${d.value.toString().slice(0, 50)} ... ]`;\n }\n }\n if (name == null) {\n name = \"[Unknown]\";\n }\n if (d.options === undefined) {\n return name;\n } else if (d.name == null) {\n return [name, d.options];\n } else {\n return [name, d.options, d.name];\n }\n}\n\nexport class ConfigPrinter {\n _stack: PrintableConfig[] = [];\n configure(\n enabled: boolean,\n type: (typeof ChainFormatter)[keyof typeof ChainFormatter],\n {\n callerName,\n filepath,\n }: {\n callerName?: string;\n filepath?: string;\n },\n ) {\n if (!enabled) return () => {};\n return (\n content: OptionsAndDescriptors,\n index?: number | null,\n envName?: string | null,\n ) => {\n this._stack.push({\n type,\n callerName,\n filepath,\n content,\n index,\n envName,\n });\n };\n }\n static *format(config: PrintableConfig): Handler {\n let title = Formatter.title(\n config.type,\n config.callerName,\n config.filepath,\n );\n const loc = Formatter.loc(config.index, config.envName);\n if (loc) title += ` ${loc}`;\n const content = yield* Formatter.optionsAndDescriptors(config.content);\n return `${title}\\n${content}`;\n }\n\n *output(): Handler {\n if (this._stack.length === 0) return \"\";\n const configs = yield* gensync.all(\n this._stack.map(s => ConfigPrinter.format(s)),\n );\n return configs.join(\"\\n\\n\");\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUO,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5BE,YAAY,EAAE,CAAC;EACfC,MAAM,EAAE;AACV,CAAC;AAWD,MAAMC,SAAS,GAAG;EAChBC,KAAKA,CACHC,IAA0D,EAC1DC,UAA0B,EAC1BC,QAAwB,EAChB;IACR,IAAIH,KAAK,GAAG,EAAE;IACd,IAAIC,IAAI,KAAKN,cAAc,CAACE,YAAY,EAAE;MACxCG,KAAK,GAAG,sBAAsB;MAC9B,IAAIE,UAAU,EAAE;QACdF,KAAK,IAAI,QAAQ,GAAG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D,IAAIxC,KAAK,GAAGD,SAAS,CAACC,KAAK,CACzBwC,MAAM,CAACvC,IAAI,EACXuC,MAAM,CAACtC,UAAU,EACjBsC,MAAM,CAACrC,QACT,CAAC;IACD,MAAMC,GAAG,GAAGL,SAAS,CAACK,GAAG,CAACoC,MAAM,CAACnC,KAAK,EAAEmC,MAAM,CAAClC,OAAO,CAAC;IACvD,IAAIF,GAAG,EAAEJ,KAAK,IAAI,IAAII,GAAG,EAAE;IAC3B,MAAMK,OAAO,GAAG,OAAOV,SAAS,CAACQ,qBAAqB,CAACiC,MAAM,CAAC/B,OAAO,CAAC;IACtE,OAAO,GAAGT,KAAK,KAAKS,OAAO,EAAE;EAC/B;EAEA,CAACgC,MAAMA,CAAA,EAAoB;IACzB,IAAI,IAAI,CAACN,MAAM,CAAClB,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;IACvC,MAAMyB,OAAO,GAAG,OAAOC,SAAMA,CAAC,CAACC,GAAG,CAChC,IAAI,CAACT,MAAM,CAACjB,GAAG,CAAC2B,CAAC,IAAIZ,aAAa,CAACM,MAAM,CAACM,CAAC,CAAC,CAC9C,CAAC;IACD,OAAOH,OAAO,CAACI,IAAI,CAAC,MAAM,CAAC;EAC7B;AACF;AAAClD,OAAA,CAAAqC,aAAA,GAAAA,aAAA;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js b/node_modules/@babel/core/lib/config/resolve-targets-browser.js deleted file mode 100644 index 3fdbd88..0000000 --- a/node_modules/@babel/core/lib/config/resolve-targets-browser.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile; -exports.resolveTargets = resolveTargets; -function _helperCompilationTargets() { - const data = require("@babel/helper-compilation-targets"); - _helperCompilationTargets = function () { - return data; - }; - return data; -} -function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) { - return undefined; -} -function resolveTargets(options, root) { - const optTargets = options.targets; - let targets; - if (typeof optTargets === "string" || Array.isArray(optTargets)) { - targets = { - browsers: optTargets - }; - } else if (optTargets) { - if ("esmodules" in optTargets) { - targets = Object.assign({}, optTargets, { - esmodules: "intersect" - }); - } else { - targets = optTargets; - } - } - return (0, _helperCompilationTargets().default)(targets, { - ignoreBrowserslistConfig: true, - browserslistEnv: options.browserslistEnv - }); -} -0 && 0; - -//# sourceMappingURL=resolve-targets-browser.js.map diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map b/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map deleted file mode 100644 index 57b49e3..0000000 --- a/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_helperCompilationTargets","data","require","resolveBrowserslistConfigFile","browserslistConfigFile","configFilePath","undefined","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","getTargets","ignoreBrowserslistConfig","browserslistEnv"],"sources":["../../src/config/resolve-targets-browser.ts"],"sourcesContent":["/* c8 ignore start */\n\nimport type { InputOptions } from \"./validation/options.ts\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n browserslistConfigFile: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n configFilePath: string,\n): string | void {\n return undefined;\n}\n\nexport function resolveTargets(\n options: InputOptions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n root: string,\n): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig: true,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AAGA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,yBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMO,SAASE,6BAA6BA,CAE3CC,sBAA8B,EAE9BC,cAAsB,EACP;EACf,OAAOC,SAAS;AAClB;AAEO,SAASC,cAAcA,CAC5BC,OAAqB,EAErBC,IAAY,EACH;EACT,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,OAAO,IAAAQ,mCAAU,EAACP,OAAO,EAAE;IACzBQ,wBAAwB,EAAE,IAAI;IAC9BC,eAAe,EAAEZ,OAAO,CAACY;EAC3B,CAAC,CAAC;AACJ;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js b/node_modules/@babel/core/lib/config/resolve-targets.js deleted file mode 100644 index 1fc539a..0000000 --- a/node_modules/@babel/core/lib/config/resolve-targets.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile; -exports.resolveTargets = resolveTargets; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _helperCompilationTargets() { - const data = require("@babel/helper-compilation-targets"); - _helperCompilationTargets = function () { - return data; - }; - return data; -} -({}); -function resolveBrowserslistConfigFile(browserslistConfigFile, configFileDir) { - return _path().resolve(configFileDir, browserslistConfigFile); -} -function resolveTargets(options, root) { - const optTargets = options.targets; - let targets; - if (typeof optTargets === "string" || Array.isArray(optTargets)) { - targets = { - browsers: optTargets - }; - } else if (optTargets) { - if ("esmodules" in optTargets) { - targets = Object.assign({}, optTargets, { - esmodules: "intersect" - }); - } else { - targets = optTargets; - } - } - const { - browserslistConfigFile - } = options; - let configFile; - let ignoreBrowserslistConfig = false; - if (typeof browserslistConfigFile === "string") { - configFile = browserslistConfigFile; - } else { - ignoreBrowserslistConfig = browserslistConfigFile === false; - } - return (0, _helperCompilationTargets().default)(targets, { - ignoreBrowserslistConfig, - configFile, - configPath: root, - browserslistEnv: options.browserslistEnv - }); -} -0 && 0; - -//# sourceMappingURL=resolve-targets.js.map diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js.map b/node_modules/@babel/core/lib/config/resolve-targets.js.map deleted file mode 100644 index 575fd4f..0000000 --- a/node_modules/@babel/core/lib/config/resolve-targets.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","_helperCompilationTargets","resolveBrowserslistConfigFile","browserslistConfigFile","configFileDir","path","resolve","resolveTargets","options","root","optTargets","targets","Array","isArray","browsers","Object","assign","esmodules","configFile","ignoreBrowserslistConfig","getTargets","configPath","browserslistEnv"],"sources":["../../src/config/resolve-targets.ts"],"sourcesContent":["type browserType = typeof import(\"./resolve-targets-browser\");\ntype nodeType = typeof import(\"./resolve-targets\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of index-browser, since this file may be replaced at bundle time with index-browser.\n// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n({}) as any as browserType as nodeType;\n\nimport type { InputOptions } from \"./validation/options.ts\";\nimport path from \"node:path\";\nimport getTargets, {\n type InputTargets,\n} from \"@babel/helper-compilation-targets\";\n\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nexport function resolveBrowserslistConfigFile(\n browserslistConfigFile: string,\n configFileDir: string,\n): string | undefined {\n return path.resolve(configFileDir, browserslistConfigFile);\n}\n\nexport function resolveTargets(options: InputOptions, root: string): Targets {\n const optTargets = options.targets;\n let targets: InputTargets;\n\n if (typeof optTargets === \"string\" || Array.isArray(optTargets)) {\n targets = { browsers: optTargets };\n } else if (optTargets) {\n if (\"esmodules\" in optTargets) {\n targets = { ...optTargets, esmodules: \"intersect\" };\n } else {\n // https://github.com/microsoft/TypeScript/issues/17002\n targets = optTargets as InputTargets;\n }\n }\n\n const { browserslistConfigFile } = options;\n let configFile;\n let ignoreBrowserslistConfig = false;\n if (typeof browserslistConfigFile === \"string\") {\n configFile = browserslistConfigFile;\n } else {\n ignoreBrowserslistConfig = browserslistConfigFile === false;\n }\n\n return getTargets(targets, {\n ignoreBrowserslistConfig,\n configFile,\n configPath: root,\n browserslistEnv: options.browserslistEnv,\n });\n}\n"],"mappings":";;;;;;;AASA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,0BAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,yBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAJA,CAAC,CAAC,CAAC;AAUI,SAASG,6BAA6BA,CAC3CC,sBAA8B,EAC9BC,aAAqB,EACD;EACpB,OAAOC,MAAGA,CAAC,CAACC,OAAO,CAACF,aAAa,EAAED,sBAAsB,CAAC;AAC5D;AAEO,SAASI,cAAcA,CAACC,OAAqB,EAAEC,IAAY,EAAW;EAC3E,MAAMC,UAAU,GAAGF,OAAO,CAACG,OAAO;EAClC,IAAIA,OAAqB;EAEzB,IAAI,OAAOD,UAAU,KAAK,QAAQ,IAAIE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EAAE;IAC/DC,OAAO,GAAG;MAAEG,QAAQ,EAAEJ;IAAW,CAAC;EACpC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACrB,IAAI,WAAW,IAAIA,UAAU,EAAE;MAC7BC,OAAO,GAAAI,MAAA,CAAAC,MAAA,KAAQN,UAAU;QAAEO,SAAS,EAAE;MAAW,EAAE;IACrD,CAAC,MAAM;MAELN,OAAO,GAAGD,UAA0B;IACtC;EACF;EAEA,MAAM;IAAEP;EAAuB,CAAC,GAAGK,OAAO;EAC1C,IAAIU,UAAU;EACd,IAAIC,wBAAwB,GAAG,KAAK;EACpC,IAAI,OAAOhB,sBAAsB,KAAK,QAAQ,EAAE;IAC9Ce,UAAU,GAAGf,sBAAsB;EACrC,CAAC,MAAM;IACLgB,wBAAwB,GAAGhB,sBAAsB,KAAK,KAAK;EAC7D;EAEA,OAAO,IAAAiB,mCAAU,EAACT,OAAO,EAAE;IACzBQ,wBAAwB;IACxBD,UAAU;IACVG,UAAU,EAAEZ,IAAI;IAChBa,eAAe,EAAEd,OAAO,CAACc;EAC3B,CAAC,CAAC;AACJ;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/util.js b/node_modules/@babel/core/lib/config/util.js deleted file mode 100644 index 077f1af..0000000 --- a/node_modules/@babel/core/lib/config/util.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isIterableIterator = isIterableIterator; -exports.mergeOptions = mergeOptions; -function mergeOptions(target, source) { - for (const k of Object.keys(source)) { - if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) { - const parserOpts = source[k]; - const targetObj = target[k] || (target[k] = {}); - mergeDefaultFields(targetObj, parserOpts); - } else { - const val = source[k]; - if (val !== undefined) target[k] = val; - } - } -} -function mergeDefaultFields(target, source) { - for (const k of Object.keys(source)) { - const val = source[k]; - if (val !== undefined) target[k] = val; - } -} -function isIterableIterator(value) { - return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function"; -} -0 && 0; - -//# sourceMappingURL=util.js.map diff --git a/node_modules/@babel/core/lib/config/util.js.map b/node_modules/@babel/core/lib/config/util.js.map deleted file mode 100644 index 2bdc742..0000000 --- a/node_modules/@babel/core/lib/config/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["mergeOptions","target","source","k","Object","keys","parserOpts","targetObj","mergeDefaultFields","val","undefined","isIterableIterator","value","next","Symbol","iterator"],"sources":["../../src/config/util.ts"],"sourcesContent":["import type { InputOptions, ResolvedOptions } from \"./validation/options.ts\";\n\nexport function mergeOptions(\n target: InputOptions | ResolvedOptions,\n source: InputOptions,\n): void {\n for (const k of Object.keys(source)) {\n if (\n (k === \"parserOpts\" || k === \"generatorOpts\" || k === \"assumptions\") &&\n source[k]\n ) {\n const parserOpts = source[k];\n const targetObj = target[k] || (target[k] = {});\n mergeDefaultFields(targetObj, parserOpts);\n } else {\n //@ts-expect-error k must index source\n const val = source[k];\n //@ts-expect-error assigning source to target\n if (val !== undefined) target[k] = val as any;\n }\n }\n}\n\nfunction mergeDefaultFields(target: T, source: T) {\n for (const k of Object.keys(source) as (keyof T)[]) {\n const val = source[k];\n if (val !== undefined) target[k] = val;\n }\n}\n\nexport function isIterableIterator(value: any): value is IterableIterator {\n return (\n !!value &&\n typeof value.next === \"function\" &&\n typeof value[Symbol.iterator] === \"function\"\n );\n}\n"],"mappings":";;;;;;;AAEO,SAASA,YAAYA,CAC1BC,MAAsC,EACtCC,MAAoB,EACd;EACN,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAE;IACnC,IACE,CAACC,CAAC,KAAK,YAAY,IAAIA,CAAC,KAAK,eAAe,IAAIA,CAAC,KAAK,aAAa,KACnED,MAAM,CAACC,CAAC,CAAC,EACT;MACA,MAAMG,UAAU,GAAGJ,MAAM,CAACC,CAAC,CAAC;MAC5B,MAAMI,SAAS,GAAGN,MAAM,CAACE,CAAC,CAAC,KAAKF,MAAM,CAACE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;MAC/CK,kBAAkB,CAACD,SAAS,EAAED,UAAU,CAAC;IAC3C,CAAC,MAAM;MAEL,MAAMG,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;MAErB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAU;IAC/C;EACF;AACF;AAEA,SAASD,kBAAkBA,CAAmBP,MAAS,EAAEC,MAAS,EAAE;EAClE,KAAK,MAAMC,CAAC,IAAIC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC,EAAiB;IAClD,MAAMO,GAAG,GAAGP,MAAM,CAACC,CAAC,CAAC;IACrB,IAAIM,GAAG,KAAKC,SAAS,EAAET,MAAM,CAACE,CAAC,CAAC,GAAGM,GAAG;EACxC;AACF;AAEO,SAASE,kBAAkBA,CAACC,KAAU,EAAkC;EAC7E,OACE,CAAC,CAACA,KAAK,IACP,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,KAAK,UAAU;AAEhD;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js b/node_modules/@babel/core/lib/config/validation/option-assertions.js deleted file mode 100644 index 0227971..0000000 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js +++ /dev/null @@ -1,277 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.access = access; -exports.assertArray = assertArray; -exports.assertAssumptions = assertAssumptions; -exports.assertBabelrcSearch = assertBabelrcSearch; -exports.assertBoolean = assertBoolean; -exports.assertCallerMetadata = assertCallerMetadata; -exports.assertCompact = assertCompact; -exports.assertConfigApplicableTest = assertConfigApplicableTest; -exports.assertConfigFileSearch = assertConfigFileSearch; -exports.assertFunction = assertFunction; -exports.assertIgnoreList = assertIgnoreList; -exports.assertInputSourceMap = assertInputSourceMap; -exports.assertObject = assertObject; -exports.assertPluginList = assertPluginList; -exports.assertRootMode = assertRootMode; -exports.assertSourceMaps = assertSourceMaps; -exports.assertSourceType = assertSourceType; -exports.assertString = assertString; -exports.assertTargets = assertTargets; -exports.msg = msg; -function _helperCompilationTargets() { - const data = require("@babel/helper-compilation-targets"); - _helperCompilationTargets = function () { - return data; - }; - return data; -} -var _options = require("./options.js"); -function msg(loc) { - switch (loc.type) { - case "root": - return ``; - case "env": - return `${msg(loc.parent)}.env["${loc.name}"]`; - case "overrides": - return `${msg(loc.parent)}.overrides[${loc.index}]`; - case "option": - return `${msg(loc.parent)}.${loc.name}`; - case "access": - return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`; - default: - throw new Error(`Assertion failure: Unknown type ${loc.type}`); - } -} -function access(loc, name) { - return { - type: "access", - name, - parent: loc - }; -} -function assertRootMode(loc, value) { - if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") { - throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`); - } - return value; -} -function assertSourceMaps(loc, value) { - if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") { - throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`); - } - return value; -} -function assertCompact(loc, value) { - if (value !== undefined && typeof value !== "boolean" && value !== "auto") { - throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`); - } - return value; -} -function assertSourceType(loc, value) { - if (value !== undefined && value !== "module" && value !== "commonjs" && value !== "script" && value !== "unambiguous") { - throw new Error(`${msg(loc)} must be "module", "commonjs", "script", "unambiguous", or undefined`); - } - return value; -} -function assertCallerMetadata(loc, value) { - const obj = assertObject(loc, value); - if (obj) { - if (typeof obj.name !== "string") { - throw new Error(`${msg(loc)} set but does not contain "name" property string`); - } - for (const prop of Object.keys(obj)) { - const propLoc = access(loc, prop); - const value = obj[prop]; - if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") { - throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`); - } - } - } - return value; -} -function assertInputSourceMap(loc, value) { - if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) { - throw new Error(`${msg(loc)} must be a boolean, object, or undefined`); - } - return value; -} -function assertString(loc, value) { - if (value !== undefined && typeof value !== "string") { - throw new Error(`${msg(loc)} must be a string, or undefined`); - } - return value; -} -function assertFunction(loc, value) { - if (value !== undefined && typeof value !== "function") { - throw new Error(`${msg(loc)} must be a function, or undefined`); - } - return value; -} -function assertBoolean(loc, value) { - if (value !== undefined && typeof value !== "boolean") { - throw new Error(`${msg(loc)} must be a boolean, or undefined`); - } - return value; -} -function assertObject(loc, value) { - if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { - throw new Error(`${msg(loc)} must be an object, or undefined`); - } - return value; -} -function assertArray(loc, value) { - if (value != null && !Array.isArray(value)) { - throw new Error(`${msg(loc)} must be an array, or undefined`); - } - return value; -} -function assertIgnoreList(loc, value) { - const arr = assertArray(loc, value); - arr == null || arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); - return arr; -} -function assertIgnoreItem(loc, value) { - if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { - throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`); - } - return value; -} -function assertConfigApplicableTest(loc, value) { - if (value === undefined) { - return value; - } - if (Array.isArray(value)) { - value.forEach((item, i) => { - if (!checkValidTest(item)) { - throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); - } - }); - } else if (!checkValidTest(value)) { - throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`); - } - return value; -} -function checkValidTest(value) { - return typeof value === "string" || typeof value === "function" || value instanceof RegExp; -} -function assertConfigFileSearch(loc, value) { - if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { - throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`); - } - return value; -} -function assertBabelrcSearch(loc, value) { - if (value === undefined || typeof value === "boolean") { - return value; - } - if (Array.isArray(value)) { - value.forEach((item, i) => { - if (!checkValidTest(item)) { - throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); - } - }); - } else if (!checkValidTest(value)) { - throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`); - } - return value; -} -function assertPluginList(loc, value) { - const arr = assertArray(loc, value); - if (arr) { - arr.forEach((item, i) => assertPluginItem(access(loc, i), item)); - } - return arr; -} -function assertPluginItem(loc, value) { - if (Array.isArray(value)) { - if (value.length === 0) { - throw new Error(`${msg(loc)} must include an object`); - } - if (value.length > 3) { - throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`); - } - assertPluginTarget(access(loc, 0), value[0]); - if (value.length > 1) { - const opts = value[1]; - if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) { - throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`); - } - } - if (value.length === 3) { - const name = value[2]; - if (name !== undefined && typeof name !== "string") { - throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`); - } - } - } else { - assertPluginTarget(loc, value); - } - return value; -} -function assertPluginTarget(loc, value) { - if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { - throw new Error(`${msg(loc)} must be a string, object, function`); - } - return value; -} -function assertTargets(loc, value) { - if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value; - if (typeof value !== "object" || !value || Array.isArray(value)) { - throw new Error(`${msg(loc)} must be a string, an array of strings or an object`); - } - const browsersLoc = access(loc, "browsers"); - const esmodulesLoc = access(loc, "esmodules"); - assertBrowsersList(browsersLoc, value.browsers); - assertBoolean(esmodulesLoc, value.esmodules); - for (const key of Object.keys(value)) { - const val = value[key]; - const subLoc = access(loc, key); - if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) { - const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", "); - throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`); - } else assertBrowserVersion(subLoc, val); - } - return value; -} -function assertBrowsersList(loc, value) { - if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) { - throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`); - } -} -function assertBrowserVersion(loc, value) { - if (typeof value === "number" && Math.round(value) === value) return; - if (typeof value === "string") return; - throw new Error(`${msg(loc)} must be a string or an integer number`); -} -function assertAssumptions(loc, value) { - if (value === undefined) return; - if (typeof value !== "object" || value === null) { - throw new Error(`${msg(loc)} must be an object or undefined.`); - } - let root = loc; - do { - root = root.parent; - } while (root.type !== "root"); - const inPreset = root.source === "preset"; - for (const name of Object.keys(value)) { - const subLoc = access(loc, name); - if (!_options.assumptionsNames.has(name)) { - throw new Error(`${msg(subLoc)} is not a supported assumption.`); - } - if (typeof value[name] !== "boolean") { - throw new Error(`${msg(subLoc)} must be a boolean.`); - } - if (inPreset && value[name] === false) { - throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`); - } - } - return value; -} -0 && 0; - -//# sourceMappingURL=option-assertions.js.map diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js.map b/node_modules/@babel/core/lib/config/validation/option-assertions.js.map deleted file mode 100644 index 38ba554..0000000 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_helperCompilationTargets","data","require","_options","msg","loc","type","parent","name","index","JSON","stringify","Error","access","assertRootMode","value","undefined","assertSourceMaps","assertCompact","assertSourceType","assertCallerMetadata","obj","assertObject","prop","Object","keys","propLoc","assertInputSourceMap","assertString","assertFunction","assertBoolean","Array","isArray","assertArray","assertIgnoreList","arr","forEach","item","i","assertIgnoreItem","RegExp","assertConfigApplicableTest","checkValidTest","assertConfigFileSearch","assertBabelrcSearch","assertPluginList","assertPluginItem","length","assertPluginTarget","opts","assertTargets","isBrowsersQueryValid","browsersLoc","esmodulesLoc","assertBrowsersList","browsers","esmodules","key","val","subLoc","hasOwnProperty","call","TargetNames","validTargets","join","assertBrowserVersion","Math","round","assertAssumptions","root","inPreset","source","assumptionsNames","has"],"sources":["../../../src/config/validation/option-assertions.ts"],"sourcesContent":["import {\n isBrowsersQueryValid,\n TargetNames,\n} from \"@babel/helper-compilation-targets\";\n\nimport type {\n ConfigFileSearch,\n BabelrcSearch,\n MatchItem,\n PluginTarget,\n ConfigApplicableTest,\n SourceMapsOption,\n SourceTypeOption,\n CompactOption,\n RootInputSourceMapOption,\n NestingPath,\n CallerMetadata,\n RootMode,\n TargetsListOrObject,\n AssumptionName,\n PluginItem,\n} from \"./options.ts\";\n\nimport { assumptionsNames } from \"./options.ts\";\n\nexport type { RootPath } from \"./options.ts\";\n\nexport type ValidatorSet = Record>;\n\nexport type Validator = (loc: OptionPath, value: unknown) => T;\n\nexport function msg(loc: NestingPath | GeneralPath): string {\n switch (loc.type) {\n case \"root\":\n return ``;\n case \"env\":\n return `${msg(loc.parent)}.env[\"${loc.name}\"]`;\n case \"overrides\":\n return `${msg(loc.parent)}.overrides[${loc.index}]`;\n case \"option\":\n return `${msg(loc.parent)}.${loc.name}`;\n case \"access\":\n return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;\n default:\n // @ts-expect-error should not happen when code is type checked\n throw new Error(`Assertion failure: Unknown type ${loc.type}`);\n }\n}\n\nexport function access(loc: GeneralPath, name: string | number): AccessPath {\n return {\n type: \"access\",\n name,\n parent: loc,\n };\n}\n\nexport type OptionPath = Readonly<{\n type: \"option\";\n name: string;\n parent: NestingPath;\n}>;\ntype AccessPath = Readonly<{\n type: \"access\";\n name: string | number;\n parent: GeneralPath;\n}>;\ntype GeneralPath = OptionPath | AccessPath;\n\nexport function assertRootMode(\n loc: OptionPath,\n value: unknown,\n): RootMode | void {\n if (\n value !== undefined &&\n value !== \"root\" &&\n value !== \"upward\" &&\n value !== \"upward-optional\"\n ) {\n throw new Error(\n `${msg(loc)} must be a \"root\", \"upward\", \"upward-optional\" or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceMaps(\n loc: OptionPath,\n value: unknown,\n): SourceMapsOption | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n value !== \"inline\" &&\n value !== \"both\"\n ) {\n throw new Error(\n `${msg(loc)} must be a boolean, \"inline\", \"both\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCompact(\n loc: OptionPath,\n value: unknown,\n): CompactOption | void {\n if (value !== undefined && typeof value !== \"boolean\" && value !== \"auto\") {\n throw new Error(`${msg(loc)} must be a boolean, \"auto\", or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertSourceType(\n loc: OptionPath,\n value: unknown,\n): SourceTypeOption | void {\n if (\n value !== undefined &&\n value !== \"module\" &&\n value !== \"commonjs\" &&\n value !== \"script\" &&\n value !== \"unambiguous\"\n ) {\n throw new Error(\n `${msg(loc)} must be \"module\", \"commonjs\", \"script\", \"unambiguous\", or undefined`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertCallerMetadata(\n loc: OptionPath,\n value: unknown,\n): CallerMetadata | undefined {\n const obj = assertObject(loc, value);\n if (obj) {\n if (typeof obj.name !== \"string\") {\n throw new Error(\n `${msg(loc)} set but does not contain \"name\" property string`,\n );\n }\n\n for (const prop of Object.keys(obj)) {\n const propLoc = access(loc, prop);\n const value = obj[prop];\n if (\n value != null &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\" &&\n typeof value !== \"number\"\n ) {\n // NOTE(logan): I'm limiting the type here so that we can guarantee that\n // the \"caller\" value will serialize to JSON nicely. We can always\n // allow more complex structures later though.\n throw new Error(\n `${msg(\n propLoc,\n )} must be null, undefined, a boolean, a string, or a number.`,\n );\n }\n }\n }\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n\nexport function assertInputSourceMap(\n loc: OptionPath,\n value: unknown,\n): RootInputSourceMapOption {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n (typeof value !== \"object\" || !value)\n ) {\n throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);\n }\n return value as RootInputSourceMapOption;\n}\n\nexport function assertString(loc: GeneralPath, value: unknown): string | void {\n if (value !== undefined && typeof value !== \"string\") {\n throw new Error(`${msg(loc)} must be a string, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertFunction(\n loc: GeneralPath,\n value: unknown,\n): Function | void {\n if (value !== undefined && typeof value !== \"function\") {\n throw new Error(`${msg(loc)} must be a function, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBoolean(\n loc: GeneralPath,\n value: unknown,\n): boolean | void {\n if (value !== undefined && typeof value !== \"boolean\") {\n throw new Error(`${msg(loc)} must be a boolean, or undefined`);\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertObject(\n loc: GeneralPath,\n value: unknown,\n): Readonly> | void {\n if (\n value !== undefined &&\n (typeof value !== \"object\" || Array.isArray(value) || !value)\n ) {\n throw new Error(`${msg(loc)} must be an object, or undefined`);\n }\n // @ts-expect-error todo(flow->ts) value is still typed as unknown, also assert function typically should not return a value\n return value;\n}\n\nexport function assertArray(\n loc: GeneralPath,\n value: T[] | undefined | null,\n): T[] | undefined | null {\n if (value != null && !Array.isArray(value)) {\n throw new Error(`${msg(loc)} must be an array, or undefined`);\n }\n return value;\n}\n\nexport function assertIgnoreList(\n loc: OptionPath,\n value: unknown[] | undefined,\n): MatchItem[] | void {\n const arr = assertArray(loc, value);\n arr?.forEach((item, i) => assertIgnoreItem(access(loc, i), item));\n // @ts-expect-error todo(flow->ts)\n return arr;\n}\nfunction assertIgnoreItem(loc: GeneralPath, value: unknown): MatchItem {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"function\" &&\n !(value instanceof RegExp)\n ) {\n throw new Error(\n `${msg(\n loc,\n )} must be an array of string/Function/RegExp values, or undefined`,\n );\n }\n return value as MatchItem;\n}\n\nexport function assertConfigApplicableTest(\n loc: OptionPath,\n value: unknown,\n): ConfigApplicableTest | void {\n if (value === undefined) {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a string/Function/RegExp, or an array of those`,\n );\n }\n return value as ConfigApplicableTest;\n}\n\nfunction checkValidTest(value: unknown): value is string | Function | RegExp {\n return (\n typeof value === \"string\" ||\n typeof value === \"function\" ||\n value instanceof RegExp\n );\n}\n\nexport function assertConfigFileSearch(\n loc: OptionPath,\n value: unknown,\n): ConfigFileSearch | void {\n if (\n value !== undefined &&\n typeof value !== \"boolean\" &&\n typeof value !== \"string\"\n ) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string, ` +\n `got ${JSON.stringify(value)}`,\n );\n }\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n}\n\nexport function assertBabelrcSearch(\n loc: OptionPath,\n value: unknown,\n): BabelrcSearch | void {\n if (value === undefined || typeof value === \"boolean\") {\n // @ts-expect-error: TS can only narrow down the type when \"strictNullCheck\" is true\n return value;\n }\n\n if (Array.isArray(value)) {\n value.forEach((item, i) => {\n if (!checkValidTest(item)) {\n throw new Error(\n `${msg(access(loc, i))} must be a string/Function/RegExp.`,\n );\n }\n });\n } else if (!checkValidTest(value)) {\n throw new Error(\n `${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` +\n `or an array of those, got ${JSON.stringify(value as any)}`,\n );\n }\n return value as BabelrcSearch;\n}\n\nexport function assertPluginList(\n loc: OptionPath,\n value: unknown[] | null | undefined,\n): PluginItem[] {\n const arr = assertArray(loc, value);\n if (arr) {\n // Loop instead of using `.map` in order to preserve object identity\n // for plugin array for use during config chain processing.\n arr.forEach((item, i) => assertPluginItem(access(loc, i), item));\n }\n return arr as PluginItem[];\n}\nfunction assertPluginItem(loc: GeneralPath, value: unknown): PluginItem {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n throw new Error(`${msg(loc)} must include an object`);\n }\n\n if (value.length > 3) {\n throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);\n }\n\n assertPluginTarget(access(loc, 0), value[0]);\n\n if (value.length > 1) {\n const opts = value[1];\n if (\n opts !== undefined &&\n opts !== false &&\n (typeof opts !== \"object\" || Array.isArray(opts) || opts === null)\n ) {\n throw new Error(\n `${msg(access(loc, 1))} must be an object, false, or undefined`,\n );\n }\n }\n if (value.length === 3) {\n const name = value[2];\n if (name !== undefined && typeof name !== \"string\") {\n throw new Error(\n `${msg(access(loc, 2))} must be a string, or undefined`,\n );\n }\n }\n } else {\n assertPluginTarget(loc, value);\n }\n\n return value as PluginItem;\n}\nfunction assertPluginTarget(loc: GeneralPath, value: unknown): PluginTarget {\n if (\n (typeof value !== \"object\" || !value) &&\n typeof value !== \"string\" &&\n typeof value !== \"function\"\n ) {\n throw new Error(`${msg(loc)} must be a string, object, function`);\n }\n return value as PluginTarget;\n}\n\nexport function assertTargets(\n loc: GeneralPath,\n value: any,\n): TargetsListOrObject {\n if (isBrowsersQueryValid(value)) return value;\n\n if (typeof value !== \"object\" || !value || Array.isArray(value)) {\n throw new Error(\n `${msg(loc)} must be a string, an array of strings or an object`,\n );\n }\n\n const browsersLoc = access(loc, \"browsers\");\n const esmodulesLoc = access(loc, \"esmodules\");\n\n assertBrowsersList(browsersLoc, value.browsers);\n assertBoolean(esmodulesLoc, value.esmodules);\n\n for (const key of Object.keys(value)) {\n const val = value[key];\n const subLoc = access(loc, key);\n\n if (key === \"esmodules\") assertBoolean(subLoc, val);\n else if (key === \"browsers\") assertBrowsersList(subLoc, val);\n else if (!Object.hasOwn(TargetNames, key)) {\n const validTargets = Object.keys(TargetNames).join(\", \");\n throw new Error(\n `${msg(\n subLoc,\n )} is not a valid target. Supported targets are ${validTargets}`,\n );\n } else assertBrowserVersion(subLoc, val);\n }\n\n return value;\n}\n\nfunction assertBrowsersList(loc: GeneralPath, value: unknown) {\n if (value !== undefined && !isBrowsersQueryValid(value)) {\n throw new Error(\n `${msg(loc)} must be undefined, a string or an array of strings`,\n );\n }\n}\n\nfunction assertBrowserVersion(loc: GeneralPath, value: unknown) {\n if (typeof value === \"number\" && Math.round(value) === value) return;\n if (typeof value === \"string\") return;\n\n throw new Error(`${msg(loc)} must be a string or an integer number`);\n}\n\nexport function assertAssumptions(\n loc: GeneralPath,\n value: Record,\n): Record | void {\n if (value === undefined) return;\n\n if (typeof value !== \"object\" || value === null) {\n throw new Error(`${msg(loc)} must be an object or undefined.`);\n }\n\n // todo(flow->ts): remove any\n let root: any = loc;\n do {\n root = root.parent;\n } while (root.type !== \"root\");\n const inPreset = root.source === \"preset\";\n\n for (const name of Object.keys(value)) {\n const subLoc = access(loc, name);\n if (!assumptionsNames.has(name as AssumptionName)) {\n throw new Error(`${msg(subLoc)} is not a supported assumption.`);\n }\n if (typeof value[name] !== \"boolean\") {\n throw new Error(`${msg(subLoc)} must be a boolean.`);\n }\n if (inPreset && value[name] === false) {\n throw new Error(\n `${msg(subLoc)} cannot be set to 'false' inside presets.`,\n );\n }\n }\n\n // @ts-expect-error todo(flow->ts)\n return value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,0BAAA;EAAA,MAAAC,IAAA,GAAAC,OA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C,qBAAqB,CAAC;IACtD;IACA,IAAIW,QAAQ,IAAIvD,KAAK,CAACP,IAAI,CAAC,KAAK,KAAK,EAAE;MACrC,MAAM,IAAII,KAAK,CACb,GAAGR,GAAG,CAACuD,MAAM,CAAC,2CAChB,CAAC;IACH;EACF;EAGA,OAAO5C,KAAK;AACd;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js deleted file mode 100644 index d694170..0000000 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assumptionsNames = void 0; -exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs; -exports.validate = validate; -var _removed = require("./removed.js"); -var _optionAssertions = require("./option-assertions.js"); -var _configError = require("../../errors/config-error.js"); -const ROOT_VALIDATORS = { - cwd: _optionAssertions.assertString, - root: _optionAssertions.assertString, - rootMode: _optionAssertions.assertRootMode, - configFile: _optionAssertions.assertConfigFileSearch, - caller: _optionAssertions.assertCallerMetadata, - filename: _optionAssertions.assertString, - filenameRelative: _optionAssertions.assertString, - code: _optionAssertions.assertBoolean, - ast: _optionAssertions.assertBoolean, - cloneInputAst: _optionAssertions.assertBoolean, - envName: _optionAssertions.assertString -}; -const BABELRC_VALIDATORS = { - babelrc: _optionAssertions.assertBoolean, - babelrcRoots: _optionAssertions.assertBabelrcSearch -}; -const NONPRESET_VALIDATORS = { - extends: _optionAssertions.assertString, - ignore: _optionAssertions.assertIgnoreList, - only: _optionAssertions.assertIgnoreList, - targets: _optionAssertions.assertTargets, - browserslistConfigFile: _optionAssertions.assertConfigFileSearch, - browserslistEnv: _optionAssertions.assertString -}; -const COMMON_VALIDATORS = { - inputSourceMap: _optionAssertions.assertInputSourceMap, - presets: _optionAssertions.assertPluginList, - plugins: _optionAssertions.assertPluginList, - passPerPreset: _optionAssertions.assertBoolean, - assumptions: _optionAssertions.assertAssumptions, - env: assertEnvSet, - overrides: assertOverridesList, - test: _optionAssertions.assertConfigApplicableTest, - include: _optionAssertions.assertConfigApplicableTest, - exclude: _optionAssertions.assertConfigApplicableTest, - retainLines: _optionAssertions.assertBoolean, - comments: _optionAssertions.assertBoolean, - shouldPrintComment: _optionAssertions.assertFunction, - compact: _optionAssertions.assertCompact, - minified: _optionAssertions.assertBoolean, - auxiliaryCommentBefore: _optionAssertions.assertString, - auxiliaryCommentAfter: _optionAssertions.assertString, - sourceType: _optionAssertions.assertSourceType, - wrapPluginVisitorMethod: _optionAssertions.assertFunction, - highlightCode: _optionAssertions.assertBoolean, - sourceMaps: _optionAssertions.assertSourceMaps, - sourceMap: _optionAssertions.assertSourceMaps, - sourceFileName: _optionAssertions.assertString, - sourceRoot: _optionAssertions.assertString, - parserOpts: _optionAssertions.assertObject, - generatorOpts: _optionAssertions.assertObject -}; -Object.assign(COMMON_VALIDATORS, { - getModuleId: _optionAssertions.assertFunction, - moduleRoot: _optionAssertions.assertString, - moduleIds: _optionAssertions.assertBoolean, - moduleId: _optionAssertions.assertString -}); -const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "noUninitializedPrivateFieldAccess", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; -const assumptionsNames = exports.assumptionsNames = new Set(knownAssumptions); -function getSource(loc) { - return loc.type === "root" ? loc.source : getSource(loc.parent); -} -function validate(type, opts, filename) { - try { - return validateNested({ - type: "root", - source: type - }, opts); - } catch (error) { - const configError = new _configError.default(error.message, filename); - if (error.code) configError.code = error.code; - throw configError; - } -} -function validateNested(loc, opts) { - const type = getSource(loc); - assertNoDuplicateSourcemap(opts); - Object.keys(opts).forEach(key => { - const optLoc = { - type: "option", - name: key, - parent: loc - }; - if (type === "preset" && NONPRESET_VALIDATORS[key]) { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`); - } - if (type !== "arguments" && ROOT_VALIDATORS[key]) { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`); - } - if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) { - if (type === "babelrcfile" || type === "extendsfile") { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`); - } - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`); - } - const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError; - validator(optLoc, opts[key]); - }); - return opts; -} -function throwUnknownError(loc) { - const key = loc.name; - if (_removed.default[key]) { - const { - message, - version = 5 - } = _removed.default[key]; - throw new Error(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`); - } else { - const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`); - unknownOptErr.code = "BABEL_UNKNOWN_OPTION"; - throw unknownOptErr; - } -} -function assertNoDuplicateSourcemap(opts) { - if (hasOwnProperty.call(opts, "sourceMap") && hasOwnProperty.call(opts, "sourceMaps")) { - throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both"); - } -} -function assertEnvSet(loc, value) { - if (loc.parent.type === "env") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`); - } - const parent = loc.parent; - const obj = (0, _optionAssertions.assertObject)(loc, value); - if (obj) { - for (const envName of Object.keys(obj)) { - const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]); - if (!env) continue; - const envLoc = { - type: "env", - name: envName, - parent - }; - validateNested(envLoc, env); - } - } - return obj; -} -function assertOverridesList(loc, value) { - if (loc.parent.type === "env") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`); - } - if (loc.parent.type === "overrides") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`); - } - const parent = loc.parent; - const arr = (0, _optionAssertions.assertArray)(loc, value); - if (arr) { - for (const [index, item] of arr.entries()) { - const objLoc = (0, _optionAssertions.access)(loc, index); - const env = (0, _optionAssertions.assertObject)(objLoc, item); - if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`); - const overridesLoc = { - type: "overrides", - index, - parent - }; - validateNested(overridesLoc, env); - } - } - return arr; -} -function checkNoUnwrappedItemOptionPairs(items, index, type, e) { - if (index === 0) return; - const lastItem = items[index - 1]; - const thisItem = items[index]; - if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") { - e.message += `\n- Maybe you meant to use\n` + `"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`; - } -} -0 && 0; - -//# sourceMappingURL=options.js.map diff --git a/node_modules/@babel/core/lib/config/validation/options.js.map b/node_modules/@babel/core/lib/config/validation/options.js.map deleted file mode 100644 index a1a5185..0000000 --- a/node_modules/@babel/core/lib/config/validation/options.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","exports","Set","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","hasOwnProperty","call","value","obj","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n msg,\n access,\n assertString,\n assertBoolean,\n assertObject,\n assertArray,\n assertCallerMetadata,\n assertInputSourceMap,\n assertIgnoreList,\n assertPluginList,\n assertConfigApplicableTest,\n assertConfigFileSearch,\n assertBabelrcSearch,\n assertFunction,\n assertRootMode,\n assertSourceMaps,\n assertCompact,\n assertSourceType,\n assertTargets,\n assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport type { VisitWrapper } from \"@babel/traverse\";\nimport ConfigError from \"../../errors/config-error.ts\";\nimport type { PluginObject } from \"./plugins.ts\";\nimport type Plugin from \"../plugin.ts\";\nimport type { PresetAPI } from \"../index.ts\";\nimport type { PresetObject } from \"../../index.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n cwd: assertString as Validator,\n root: assertString as Validator,\n rootMode: assertRootMode as Validator,\n configFile: assertConfigFileSearch as Validator,\n\n caller: assertCallerMetadata as Validator,\n filename: assertString as Validator,\n filenameRelative: assertString as Validator,\n code: assertBoolean as Validator,\n ast: assertBoolean as Validator,\n\n cloneInputAst: assertBoolean as Validator,\n\n envName: assertString as Validator,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n babelrc: assertBoolean as Validator,\n babelrcRoots: assertBabelrcSearch as Validator,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n extends: assertString as Validator,\n ignore: assertIgnoreList as Validator,\n only: assertIgnoreList as Validator,\n\n targets: assertTargets as Validator,\n browserslistConfigFile: assertConfigFileSearch as Validator<\n InputOptions[\"browserslistConfigFile\"]\n >,\n browserslistEnv: assertString as Validator,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n // We may want a boolean-only version to be a common option, with the\n // object only allowed as a root config argument.\n inputSourceMap: assertInputSourceMap as Validator<\n InputOptions[\"inputSourceMap\"]\n >,\n presets: assertPluginList as Validator,\n plugins: assertPluginList as Validator,\n passPerPreset: assertBoolean as Validator,\n assumptions: assertAssumptions as Validator,\n\n env: assertEnvSet as Validator,\n overrides: assertOverridesList as Validator,\n\n // We could limit these to 'overrides' blocks, but it's not clear why we'd\n // bother, when the ability to limit a config to a specific set of files\n // is a fairly general useful feature.\n test: assertConfigApplicableTest as Validator,\n include: assertConfigApplicableTest as Validator,\n exclude: assertConfigApplicableTest as Validator,\n\n retainLines: assertBoolean as Validator,\n comments: assertBoolean as Validator,\n shouldPrintComment: assertFunction as Validator<\n InputOptions[\"shouldPrintComment\"]\n >,\n compact: assertCompact as Validator,\n minified: assertBoolean as Validator,\n auxiliaryCommentBefore: assertString as Validator<\n InputOptions[\"auxiliaryCommentBefore\"]\n >,\n auxiliaryCommentAfter: assertString as Validator<\n InputOptions[\"auxiliaryCommentAfter\"]\n >,\n sourceType: assertSourceType as Validator,\n wrapPluginVisitorMethod: assertFunction as Validator<\n InputOptions[\"wrapPluginVisitorMethod\"]\n >,\n highlightCode: assertBoolean as Validator,\n sourceMaps: assertSourceMaps as Validator,\n sourceMap: assertSourceMaps as Validator,\n sourceFileName: assertString as Validator,\n sourceRoot: assertString as Validator,\n parserOpts: assertObject as Validator,\n generatorOpts: assertObject as Validator,\n};\nif (!process.env.BABEL_8_BREAKING) {\n Object.assign(COMMON_VALIDATORS, {\n getModuleId: assertFunction,\n moduleRoot: assertString,\n moduleIds: assertBoolean,\n moduleId: assertString,\n });\n}\n\ntype Assumptions = {\n arrayLikeIsIterable?: boolean;\n constantReexports?: boolean;\n constantSuper?: boolean;\n enumerableModuleMeta?: boolean;\n ignoreFunctionLength?: boolean;\n ignoreToPrimitiveHint?: boolean;\n iterableIsArray?: boolean;\n mutableTemplateObject?: boolean;\n noClassCalls?: boolean;\n noDocumentAll?: boolean;\n noIncompleteNsImportDetection?: boolean;\n noNewArrows?: boolean;\n noUninitializedPrivateFieldAccess?: boolean;\n objectRestNoSymbols?: boolean;\n privateFieldsAsProperties?: boolean;\n privateFieldsAsSymbols?: boolean;\n pureGetters?: boolean;\n setClassMethods?: boolean;\n setComputedProperties?: boolean;\n setPublicClassFields?: boolean;\n setSpreadProperties?: boolean;\n skipForOfIteratorClosing?: boolean;\n superIsCallableConstructor?: boolean;\n};\n\nexport type AssumptionName = keyof Assumptions;\n\nexport type InputOptions = {\n cwd?: string;\n filename?: string;\n filenameRelative?: string;\n babelrc?: boolean;\n babelrcRoots?: BabelrcSearch;\n configFile?: ConfigFileSearch;\n root?: string;\n rootMode?: RootMode;\n code?: boolean;\n ast?: boolean;\n cloneInputAst?: boolean;\n inputSourceMap?: RootInputSourceMapOption;\n envName?: string;\n caller?: CallerMetadata;\n extends?: string;\n env?: EnvSet;\n ignore?: MatchItem[];\n only?: MatchItem[];\n overrides?: InputOptions[];\n showIgnoredFiles?: boolean;\n // Generally verify if a given config object should be applied to the given file.\n test?: ConfigApplicableTest;\n include?: ConfigApplicableTest;\n exclude?: ConfigApplicableTest;\n presets?: PresetItem[];\n plugins?: PluginItem[];\n passPerPreset?: boolean;\n assumptions?: Assumptions;\n // browserslists-related options\n targets?: TargetsListOrObject;\n browserslistConfigFile?: ConfigFileSearch;\n browserslistEnv?: string;\n // Options for @babel/generator\n retainLines?: GeneratorOptions[\"retainLines\"];\n comments?: GeneratorOptions[\"comments\"];\n shouldPrintComment?: GeneratorOptions[\"shouldPrintComment\"];\n compact?: GeneratorOptions[\"compact\"];\n minified?: GeneratorOptions[\"minified\"];\n auxiliaryCommentBefore?: GeneratorOptions[\"auxiliaryCommentBefore\"];\n auxiliaryCommentAfter?: GeneratorOptions[\"auxiliaryCommentAfter\"];\n // Parser\n sourceType?: SourceTypeOption;\n wrapPluginVisitorMethod?: VisitWrapper | null;\n highlightCode?: boolean;\n // Sourcemap generation options.\n sourceMaps?: SourceMapsOption;\n sourceMap?: SourceMapsOption;\n sourceFileName?: string;\n sourceRoot?: string;\n // Todo(Babel 9): Deprecate top level parserOpts\n parserOpts?: ParserOptions;\n // Todo(Babel 9): Deprecate top level generatorOpts\n generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = Omit & {\n assumptions: Assumptions;\n targets: Targets;\n cloneInputAst: boolean;\n babelrc: false;\n configFile: false;\n browserslistConfigFile: false;\n passPerPreset: false;\n envName: string;\n cwd: string;\n root: string;\n rootMode: \"root\";\n filename: string | undefined;\n presets: ConfigItem[];\n plugins: ConfigItem[];\n};\n\nexport type ResolvedOptions = Omit<\n NormalizedOptions,\n \"presets\" | \"plugins\" | \"passPerPreset\"\n> & {\n presets: { plugins: Plugin[] }[];\n plugins: Plugin[];\n passPerPreset: boolean;\n};\n\nexport type ConfigChainOptions = Omit<\n InputOptions,\n | \"extends\"\n | \"env\"\n | \"overrides\"\n | \"plugins\"\n | \"presets\"\n | \"passPerPreset\"\n | \"ignore\"\n | \"only\"\n | \"test\"\n | \"include\"\n | \"exclude\"\n | \"sourceMap\"\n>;\n\nexport type CallerMetadata = {\n // If 'caller' is specified, require that the name is given for debugging\n // messages.\n name: string;\n supportsStaticESM?: boolean;\n supportsDynamicImport?: boolean;\n supportsTopLevelAwait?: boolean;\n supportsExportNamespaceFrom?: boolean;\n};\nexport type EnvSet = Record;\nexport type MatchItem =\n | string\n | RegExp\n | ((\n path: string | undefined,\n context: { dirname: string; caller: CallerMetadata; envName: string },\n ) => unknown);\n\nexport type MaybeDefaultProperty = T | { default: T };\n\nexport type PluginTarget =\n | string\n | MaybeDefaultProperty<\n (api: PluginAPI, options?: object, dirname?: string) => PluginObject\n >;\nexport type PluginItem =\n | ConfigItem\n | PluginTarget\n | [PluginTarget, object]\n | [PluginTarget, object, string];\n\nexport type PresetTarget =\n | string\n | MaybeDefaultProperty<\n (api: PresetAPI, options?: object, dirname?: string) => PresetObject\n >;\nexport type PresetItem =\n | ConfigItem\n | PresetTarget\n | [PresetTarget, object]\n | [PresetTarget, object, string];\n\nexport type ConfigApplicableTest = MatchItem | MatchItem[];\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | MatchItem | MatchItem[];\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"commonjs\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\n// https://github.com/mozilla/source-map/blob/801be934007c3ed0ef66c620641b1668e92c891d/source-map.d.ts#L15C8-L23C2\ninterface InputSourceMap {\n version: number;\n sources: string[];\n names: string[];\n sourceRoot?: string | undefined;\n sourcesContent?: string[] | undefined;\n mappings: string;\n file: string;\n}\nexport type RootInputSourceMapOption = InputSourceMap | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n | Targets\n | InputTargets\n | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n | \"arguments\"\n | \"configfile\"\n | \"babelrcfile\"\n | \"extendsfile\"\n | \"preset\"\n | \"plugin\";\n\nexport type RootPath = Readonly<{\n type: \"root\";\n source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n type: \"overrides\";\n index: number;\n parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n type: \"env\";\n name: string;\n parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n \"arrayLikeIsIterable\",\n \"constantReexports\",\n \"constantSuper\",\n \"enumerableModuleMeta\",\n \"ignoreFunctionLength\",\n \"ignoreToPrimitiveHint\",\n \"iterableIsArray\",\n \"mutableTemplateObject\",\n \"noClassCalls\",\n \"noDocumentAll\",\n \"noIncompleteNsImportDetection\",\n \"noNewArrows\",\n \"noUninitializedPrivateFieldAccess\",\n \"objectRestNoSymbols\",\n \"privateFieldsAsSymbols\",\n \"privateFieldsAsProperties\",\n \"pureGetters\",\n \"setClassMethods\",\n \"setComputedProperties\",\n \"setPublicClassFields\",\n \"setSpreadProperties\",\n \"skipForOfIteratorClosing\",\n \"superIsCallableConstructor\",\n] as const;\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n type: OptionsSource,\n opts: any,\n filename?: string,\n): InputOptions {\n try {\n return validateNested(\n {\n type: \"root\",\n source: type,\n },\n opts,\n );\n } catch (error) {\n const configError = new ConfigError(error.message, filename);\n // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n if (error.code) configError.code = error.code;\n throw configError;\n }\n}\n\nfunction validateNested(loc: NestingPath, opts: Record) {\n const type = getSource(loc);\n assertNoDuplicateSourcemap(opts);\n\n Object.keys(opts).forEach((key: string) => {\n const optLoc = {\n type: \"option\",\n name: key,\n parent: loc,\n } as const;\n\n if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n }\n if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n throw new Error(\n `${msg(optLoc)} is only allowed in root programmatic options`,\n );\n }\n if (\n type !== \"arguments\" &&\n type !== \"configfile\" &&\n BABELRC_VALIDATORS[key]\n ) {\n if (type === \"babelrcfile\" || type === \"extendsfile\") {\n throw new Error(\n `${msg(\n optLoc,\n )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n `or babel.config.js/config file options`,\n );\n }\n\n throw new Error(\n `${msg(\n optLoc,\n )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n );\n }\n\n const validator =\n COMMON_VALIDATORS[key] ||\n NONPRESET_VALIDATORS[key] ||\n BABELRC_VALIDATORS[key] ||\n ROOT_VALIDATORS[key] ||\n (throwUnknownError as Validator);\n\n validator(optLoc, opts[key]);\n });\n\n return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n const key = loc.name;\n\n if (removed[key]) {\n const { message, version = 5 } = removed[key];\n\n throw new Error(\n `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n );\n } else {\n const unknownOptErr = new Error(\n `Unknown option: ${msg(\n loc,\n )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n );\n // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n throw unknownOptErr;\n }\n}\n\nfunction assertNoDuplicateSourcemap(opts: any): void {\n if (Object.hasOwn(opts, \"sourceMap\") && Object.hasOwn(opts, \"sourceMaps\")) {\n throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n }\n}\n\nfunction assertEnvSet(\n loc: OptionPath,\n value: unknown,\n): void | EnvSet {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n }\n const parent: RootPath | OverridesPath = loc.parent;\n\n const obj = assertObject(loc, value);\n if (obj) {\n // Validate but don't copy the .env object in order to preserve\n // object identity for use during config chain processing.\n for (const envName of Object.keys(obj)) {\n const env = assertObject(access(loc, envName), obj[envName]);\n if (!env) continue;\n\n const envLoc = {\n type: \"env\",\n name: envName,\n parent,\n } as const;\n validateNested(envLoc, env);\n }\n }\n return obj;\n}\n\nfunction assertOverridesList(\n loc: OptionPath,\n value: unknown[],\n): undefined | InputOptions[] {\n if (loc.parent.type === \"env\") {\n throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n }\n if (loc.parent.type === \"overrides\") {\n throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n }\n const parent: RootPath = loc.parent;\n\n const arr = assertArray(loc, value);\n if (arr) {\n for (const [index, item] of arr.entries()) {\n const objLoc = access(loc, index);\n const env = assertObject(objLoc, item);\n if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n const overridesLoc = {\n type: \"overrides\",\n index,\n parent,\n } as const;\n validateNested(overridesLoc, env);\n }\n }\n return arr;\n}\n\nexport function checkNoUnwrappedItemOptionPairs(\n items: UnloadedDescriptor[],\n index: number,\n type: \"plugin\" | \"preset\",\n e: Error,\n): void {\n if (index === 0) return;\n\n const lastItem = items[index - 1];\n const thisItem = items[index];\n\n if (\n lastItem.file &&\n lastItem.options === undefined &&\n typeof thisItem.value === \"object\"\n ) {\n e.message +=\n `\\n- Maybe you meant to use\\n` +\n `\"${type}s\": [\\n [\"${lastItem.file.request}\", ${JSON.stringify(\n thisItem.value,\n undefined,\n 2,\n )}]\\n]\\n` +\n `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n }\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAgCA,IAAAE,YAAA,GAAAF,OAAA;AAMA,MAAMG,eAA6B,GAAG;EACpCC,GAAG,EAAEC,8BAA8C;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EF,IAAI,CAAC;MACtC,IAAI,CAACzE,GAAG,EAAE,MAAM,IAAIyD,KAAK,CAAC,GAAG,IAAAC,qBAAG,EAACiB,MAAM,CAAC,oBAAoB,CAAC;MAE7D,MAAMC,YAAY,GAAG;QACnBnC,IAAI,EAAE,WAAW;QACjB+B,KAAK;QACL7B;MACF,CAAU;MACVG,cAAc,CAAC8B,YAAY,EAAE5E,GAAG,CAAC;IACnC;EACF;EACA,OAAOsE,GAAG;AACZ;AAEO,SAASO,+BAA+BA,CAC7CC,KAAgC,EAChCN,KAAa,EACb/B,IAAyB,EACzBsC,CAAQ,EACF;EACN,IAAIP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACf,KAAK,KAAK,QAAQ,EAClC;IACAa,CAAC,CAAC7B,OAAO,IACP,8BAA8B,GAC9B,IAAIT,IAAI,cAAcuC,QAAQ,CAACE,IAAI,CAACG,OAAO,MAAMC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACf,KAAK,EACdkB,SAAS,EACT,CACF,CAAC,QAAQ,GACT,iBAAiB3C,IAAI,gEAAgE;EACzF;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js deleted file mode 100644 index d744ecc..0000000 --- a/node_modules/@babel/core/lib/config/validation/plugins.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validatePluginObject = validatePluginObject; -var _optionAssertions = require("./option-assertions.js"); -const VALIDATORS = { - name: _optionAssertions.assertString, - manipulateOptions: _optionAssertions.assertFunction, - pre: _optionAssertions.assertFunction, - post: _optionAssertions.assertFunction, - inherits: _optionAssertions.assertFunction, - visitor: assertVisitorMap, - parserOverride: _optionAssertions.assertFunction, - generatorOverride: _optionAssertions.assertFunction -}; -function assertVisitorMap(loc, value) { - const obj = (0, _optionAssertions.assertObject)(loc, value); - if (obj) { - Object.keys(obj).forEach(prop => { - if (prop !== "_exploded" && prop !== "_verified") { - assertVisitorHandler(prop, obj[prop]); - } - }); - if (obj.enter || obj.exit) { - throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); - } - } - return obj; -} -function assertVisitorHandler(key, value) { - if (value && typeof value === "object") { - Object.keys(value).forEach(handler => { - if (handler !== "enter" && handler !== "exit") { - throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`); - } - }); - } else if (typeof value !== "function") { - throw new Error(`.visitor["${key}"] must be a function`); - } -} -function validatePluginObject(obj) { - const rootPath = { - type: "root", - source: "plugin" - }; - Object.keys(obj).forEach(key => { - const validator = VALIDATORS[key]; - if (validator) { - const optLoc = { - type: "option", - name: key, - parent: rootPath - }; - validator(optLoc, obj[key]); - } else { - const invalidPluginPropertyError = new Error(`.${key} is not a valid Plugin property`); - invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY"; - throw invalidPluginPropertyError; - } - }); - return obj; -} -0 && 0; - -//# sourceMappingURL=plugins.js.map diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js.map b/node_modules/@babel/core/lib/config/validation/plugins.js.map deleted file mode 100644 index a11be98..0000000 --- a/node_modules/@babel/core/lib/config/validation/plugins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_optionAssertions","require","VALIDATORS","name","assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n assertString,\n assertFunction,\n assertObject,\n msg,\n} from \"./option-assertions.ts\";\n\nimport type {\n ValidatorSet,\n Validator,\n OptionPath,\n RootPath,\n} from \"./option-assertions.ts\";\nimport type { parse, ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ResolvedOptions } from \"./options.ts\";\nimport type { File, PluginAPI, PluginPass } from \"../../index.ts\";\nimport type { GeneratorOptions, GeneratorResult } from \"@babel/generator\";\nimport type babelGenerator from \"@babel/generator\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n name: assertString as Validator,\n manipulateOptions: assertFunction as Validator<\n PluginObject[\"manipulateOptions\"]\n >,\n pre: assertFunction as Validator,\n post: assertFunction as Validator,\n inherits: assertFunction as Validator,\n visitor: assertVisitorMap as Validator,\n\n parserOverride: assertFunction as Validator,\n generatorOverride: assertFunction as Validator<\n PluginObject[\"generatorOverride\"]\n >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n const obj = assertObject(loc, value);\n if (obj) {\n Object.keys(obj).forEach(prop => {\n if (prop !== \"_exploded\" && prop !== \"_verified\") {\n assertVisitorHandler(prop, obj[prop]);\n }\n });\n\n if (obj.enter || obj.exit) {\n throw new Error(\n `${msg(\n loc,\n )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n );\n }\n }\n return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n key: string,\n value: unknown,\n): asserts value is VisitorHandler {\n if (value && typeof value === \"object\") {\n Object.keys(value).forEach((handler: string) => {\n if (handler !== \"enter\" && handler !== \"exit\") {\n throw new Error(\n `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n );\n }\n });\n } else if (typeof value !== \"function\") {\n throw new Error(`.visitor[\"${key}\"] must be a function`);\n }\n}\n\ntype VisitorHandler =\n | Function\n | {\n enter?: Function;\n exit?: Function;\n };\n\nexport type PluginObject = {\n name?: string;\n manipulateOptions?: (\n options: ResolvedOptions,\n parserOpts: ParserOptions,\n ) => void;\n pre?: (this: S, file: File) => void | Promise;\n post?: (this: S, file: File) => void | Promise;\n inherits?: (\n api: PluginAPI,\n options: unknown,\n dirname: string,\n ) => PluginObject;\n visitor?: Visitor;\n parserOverride?: (\n ...args: [...Parameters, typeof parse]\n ) => ReturnType;\n generatorOverride?: (\n ast: File[\"ast\"],\n generatorOpts: GeneratorOptions,\n code: File[\"code\"],\n generate: typeof babelGenerator,\n ) => GeneratorResult;\n};\n\nexport function validatePluginObject(\n obj: Record,\n): PluginObject {\n const rootPath: RootPath = {\n type: \"root\",\n source: \"plugin\",\n };\n Object.keys(obj).forEach((key: string) => {\n const validator = VALIDATORS[key];\n\n if (validator) {\n const optLoc: OptionPath = {\n type: \"option\",\n name: key,\n parent: rootPath,\n };\n validator(optLoc, obj[key]);\n } else {\n const invalidPluginPropertyError = new Error(\n `.${key} is not a valid Plugin property`,\n );\n // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n throw invalidPluginPropertyError;\n }\n });\n\n return obj as any;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAuBA,MAAMC,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EAAEF,gCAAiD;EACvDG,QAAQ,EAAEH,gCAAqD;EAC/DI,OAAO,EAAEC,gBAAsD;EAE/DC,cAAc,EAAEN,gCAA2D;EAC3EO,iBAAiB,EAAEP;AAGrB,CAAC;AAED,SAASK,gBAAgBA,CAACG,GAAe,EAAEC,KAAc,EAAW;EAClE,MAAMC,GAAG,GAAG,IAAAC,8BAAY,EAAC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E,QAAQ;QACd5B,IAAI,EAAEwB,GAAG;QACTQ,MAAM,EAAEL;MACV,CAAC;MACDG,SAAS,CAACC,MAAM,EAAElB,GAAG,CAACW,GAAG,CAAC,CAAC;IAC7B,CAAC,MAAM;MACL,MAAMS,0BAA0B,GAAG,IAAIX,KAAK,CAC1C,IAAIE,GAAG,iCACT,CAAC;MAEDS,0BAA0B,CAACC,IAAI,GAAG,+BAA+B;MACjE,MAAMD,0BAA0B;IAClC;EACF,CAAC,CAAC;EAEF,OAAOpB,GAAG;AACZ;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/removed.js b/node_modules/@babel/core/lib/config/validation/removed.js deleted file mode 100644 index 9bd436e..0000000 --- a/node_modules/@babel/core/lib/config/validation/removed.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = exports.default = { - auxiliaryComment: { - message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" - }, - blacklist: { - message: "Put the specific transforms you want in the `plugins` option" - }, - breakConfig: { - message: "This is not a necessary option in Babel 6" - }, - experimental: { - message: "Put the specific transforms you want in the `plugins` option" - }, - externalHelpers: { - message: "Use the `external-helpers` plugin instead. " + "Check out http://babeljs.io/docs/plugins/external-helpers/" - }, - extra: { - message: "" - }, - jsxPragma: { - message: "use the `pragma` option in the `react-jsx` plugin. " + "Check out http://babeljs.io/docs/plugins/transform-react-jsx/" - }, - loose: { - message: "Specify the `loose` option for the relevant plugin you are using " + "or use a preset that sets the option." - }, - metadataUsedHelpers: { - message: "Not required anymore as this is enabled by default" - }, - modules: { - message: "Use the corresponding module transform plugin in the `plugins` option. " + "Check out http://babeljs.io/docs/plugins/#modules" - }, - nonStandard: { - message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. " + "Also check out the react preset http://babeljs.io/docs/plugins/preset-react/" - }, - optional: { - message: "Put the specific transforms you want in the `plugins` option" - }, - sourceMapName: { - message: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves." - }, - stage: { - message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets" - }, - whitelist: { - message: "Put the specific transforms you want in the `plugins` option" - }, - resolveModuleSource: { - version: 6, - message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options" - }, - metadata: { - version: 6, - message: "Generated plugin metadata is always included in the output result" - }, - sourceMapTarget: { - version: 6, - message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves." - } -}; -0 && 0; - -//# sourceMappingURL=removed.js.map diff --git a/node_modules/@babel/core/lib/config/validation/removed.js.map b/node_modules/@babel/core/lib/config/validation/removed.js.map deleted file mode 100644 index e1aa740..0000000 --- a/node_modules/@babel/core/lib/config/validation/removed.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["auxiliaryComment","message","blacklist","breakConfig","experimental","externalHelpers","extra","jsxPragma","loose","metadataUsedHelpers","modules","nonStandard","optional","sourceMapName","stage","whitelist","resolveModuleSource","version","metadata","sourceMapTarget"],"sources":["../../../src/config/validation/removed.ts"],"sourcesContent":["export default {\n auxiliaryComment: {\n message: \"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`\",\n },\n blacklist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n breakConfig: {\n message: \"This is not a necessary option in Babel 6\",\n },\n experimental: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n externalHelpers: {\n message:\n \"Use the `external-helpers` plugin instead. \" +\n \"Check out http://babeljs.io/docs/plugins/external-helpers/\",\n },\n extra: {\n message: \"\",\n },\n jsxPragma: {\n message:\n \"use the `pragma` option in the `react-jsx` plugin. \" +\n \"Check out http://babeljs.io/docs/plugins/transform-react-jsx/\",\n },\n loose: {\n message:\n \"Specify the `loose` option for the relevant plugin you are using \" +\n \"or use a preset that sets the option.\",\n },\n metadataUsedHelpers: {\n message: \"Not required anymore as this is enabled by default\",\n },\n modules: {\n message:\n \"Use the corresponding module transform plugin in the `plugins` option. \" +\n \"Check out http://babeljs.io/docs/plugins/#modules\",\n },\n nonStandard: {\n message:\n \"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. \" +\n \"Also check out the react preset http://babeljs.io/docs/plugins/preset-react/\",\n },\n optional: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n sourceMapName: {\n message:\n \"The `sourceMapName` option has been removed because it makes more sense for the \" +\n \"tooling that calls Babel to assign `map.file` themselves.\",\n },\n stage: {\n message:\n \"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets\",\n },\n whitelist: {\n message: \"Put the specific transforms you want in the `plugins` option\",\n },\n\n resolveModuleSource: {\n version: 6,\n message: \"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options\",\n },\n metadata: {\n version: 6,\n message:\n \"Generated plugin metadata is always included in the output result\",\n },\n sourceMapTarget: {\n version: 6,\n message:\n \"The `sourceMapTarget` option has been removed because it makes more sense for the tooling \" +\n \"that calls Babel to assign `map.file` themselves.\",\n },\n} as Record;\n"],"mappings":";;;;;;iCAAe;EACbA,gBAAgB,EAAE;IAChBC,OAAO,EAAE;EACX,CAAC;EACDC,SAAS,EAAE;IACTD,OAAO,EAAE;EACX,CAAC;EACDE,WAAW,EAAE;IACXF,OAAO,EAAE;EACX,CAAC;EACDG,YAAY,EAAE;IACZH,OAAO,EAAE;EACX,CAAC;EACDI,eAAe,EAAE;IACfJ,OAAO,EACL,6CAA6C,GAC7C;EACJ,CAAC;EACDK,KAAK,EAAE;IACLL,OAAO,EAAE;EACX,CAAC;EACDM,SAAS,EAAE;IACTN,OAAO,EACL,qDAAqD,GACrD;EACJ,CAAC;EACDO,KAAK,EAAE;IACLP,OAAO,EACL,mEAAmE,GACnE;EACJ,CAAC;EACDQ,mBAAmB,EAAE;IACnBR,OAAO,EAAE;EACX,CAAC;EACDS,OAAO,EAAE;IACPT,OAAO,EACL,yEAAyE,GACzE;EACJ,CAAC;EACDU,WAAW,EAAE;IACXV,OAAO,EACL,8EAA8E,GAC9E;EACJ,CAAC;EACDW,QAAQ,EAAE;IACRX,OAAO,EAAE;EACX,CAAC;EACDY,aAAa,EAAE;IACbZ,OAAO,EACL,kFAAkF,GAClF;EACJ,CAAC;EACDa,KAAK,EAAE;IACLb,OAAO,EACL;EACJ,CAAC;EACDc,SAAS,EAAE;IACTd,OAAO,EAAE;EACX,CAAC;EAEDe,mBAAmB,EAAE;IACnBC,OAAO,EAAE,CAAC;IACVhB,OAAO,EAAE;EACX,CAAC;EACDiB,QAAQ,EAAE;IACRD,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL;EACJ,CAAC;EACDkB,eAAe,EAAE;IACfF,OAAO,EAAE,CAAC;IACVhB,OAAO,EACL,4FAA4F,GAC5F;EACJ;AACF,CAAC;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/config-error.js b/node_modules/@babel/core/lib/errors/config-error.js deleted file mode 100644 index c290804..0000000 --- a/node_modules/@babel/core/lib/errors/config-error.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _rewriteStackTrace = require("./rewrite-stack-trace.js"); -class ConfigError extends Error { - constructor(message, filename) { - super(message); - (0, _rewriteStackTrace.expectedError)(this); - if (filename) (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename); - } -} -exports.default = ConfigError; -0 && 0; - -//# sourceMappingURL=config-error.js.map diff --git a/node_modules/@babel/core/lib/errors/config-error.js.map b/node_modules/@babel/core/lib/errors/config-error.js.map deleted file mode 100644 index 0045ded..0000000 --- a/node_modules/@babel/core/lib/errors/config-error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_rewriteStackTrace","require","ConfigError","Error","constructor","message","filename","expectedError","injectVirtualStackFrame","exports","default"],"sources":["../../src/errors/config-error.ts"],"sourcesContent":["import {\n injectVirtualStackFrame,\n expectedError,\n} from \"./rewrite-stack-trace.ts\";\n\nexport default class ConfigError extends Error {\n constructor(message: string, filename?: string) {\n super(message);\n expectedError(this);\n if (filename) injectVirtualStackFrame(this, filename);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAKe,MAAMC,WAAW,SAASC,KAAK,CAAC;EAC7CC,WAAWA,CAACC,OAAe,EAAEC,QAAiB,EAAE;IAC9C,KAAK,CAACD,OAAO,CAAC;IACd,IAAAE,gCAAa,EAAC,IAAI,CAAC;IACnB,IAAID,QAAQ,EAAE,IAAAE,0CAAuB,EAAC,IAAI,EAAEF,QAAQ,CAAC;EACvD;AACF;AAACG,OAAA,CAAAC,OAAA,GAAAR,WAAA;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js deleted file mode 100644 index 68896d3..0000000 --- a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.beginHiddenCallStack = beginHiddenCallStack; -exports.endHiddenCallStack = endHiddenCallStack; -exports.expectedError = expectedError; -exports.injectVirtualStackFrame = injectVirtualStackFrame; -var _Object$getOwnPropert; -const ErrorToString = Function.call.bind(Error.prototype.toString); -const SUPPORTED = !!Error.captureStackTrace && ((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit")) == null ? void 0 : _Object$getOwnPropert.writable) === true; -const START_HIDING = "startHiding - secret - don't use this - v1"; -const STOP_HIDING = "stopHiding - secret - don't use this - v1"; -const expectedErrors = new WeakSet(); -const virtualFrames = new WeakMap(); -function CallSite(filename) { - return Object.create({ - isNative: () => false, - isConstructor: () => false, - isToplevel: () => true, - getFileName: () => filename, - getLineNumber: () => undefined, - getColumnNumber: () => undefined, - getFunctionName: () => undefined, - getMethodName: () => undefined, - getTypeName: () => undefined, - toString: () => filename - }); -} -function injectVirtualStackFrame(error, filename) { - if (!SUPPORTED) return; - let frames = virtualFrames.get(error); - if (!frames) virtualFrames.set(error, frames = []); - frames.push(CallSite(filename)); - return error; -} -function expectedError(error) { - if (!SUPPORTED) return; - expectedErrors.add(error); - return error; -} -function beginHiddenCallStack(fn) { - if (!SUPPORTED) return fn; - return Object.defineProperty(function (...args) { - setupPrepareStackTrace(); - return fn(...args); - }, "name", { - value: STOP_HIDING - }); -} -function endHiddenCallStack(fn) { - if (!SUPPORTED) return fn; - return Object.defineProperty(function (...args) { - return fn(...args); - }, "name", { - value: START_HIDING - }); -} -function setupPrepareStackTrace() { - setupPrepareStackTrace = () => {}; - const { - prepareStackTrace = defaultPrepareStackTrace - } = Error; - const MIN_STACK_TRACE_LIMIT = 50; - Error.stackTraceLimit && (Error.stackTraceLimit = Math.max(Error.stackTraceLimit, MIN_STACK_TRACE_LIMIT)); - Error.prepareStackTrace = function stackTraceRewriter(err, trace) { - let newTrace = []; - const isExpected = expectedErrors.has(err); - let status = isExpected ? "hiding" : "unknown"; - for (let i = 0; i < trace.length; i++) { - const name = trace[i].getFunctionName(); - if (name === START_HIDING) { - status = "hiding"; - } else if (name === STOP_HIDING) { - if (status === "hiding") { - status = "showing"; - if (virtualFrames.has(err)) { - newTrace.unshift(...virtualFrames.get(err)); - } - } else if (status === "unknown") { - newTrace = trace; - break; - } - } else if (status !== "hiding") { - newTrace.push(trace[i]); - } - } - return prepareStackTrace(err, newTrace); - }; -} -function defaultPrepareStackTrace(err, trace) { - if (trace.length === 0) return ErrorToString(err); - return `${ErrorToString(err)}\n at ${trace.join("\n at ")}`; -} -0 && 0; - -//# sourceMappingURL=rewrite-stack-trace.js.map diff --git a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map b/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map deleted file mode 100644 index 25cce7a..0000000 --- a/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","_Object$getOwnPropert","Object","getOwnPropertyDescriptor","writable","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet();\nconst virtualFrames = new WeakMap();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n return fn(...args);\n },\n \"name\",\n { value: START_HIDING },\n );\n}\n\nfunction setupPrepareStackTrace() {\n // @ts-expect-error This function is a singleton\n setupPrepareStackTrace = () => {};\n\n const { prepareStackTrace = defaultPrepareStackTrace } = Error;\n\n // We add some extra frames to Error.stackTraceLimit, so that we can\n // always show some useful frames even after deleting ours.\n // STACK_TRACE_LIMIT_DELTA should be around the maximum expected number\n // of internal frames, and not too big because capturing the stack trace\n // is slow (this is why Error.stackTraceLimit does not default to Infinity!).\n // Increase it if needed.\n // However, we only do it if the user did not explicitly set it to 0.\n const MIN_STACK_TRACE_LIMIT = 50;\n Error.stackTraceLimit &&= Math.max(\n Error.stackTraceLimit,\n MIN_STACK_TRACE_LIMIT,\n );\n\n Error.prepareStackTrace = function stackTraceRewriter(err, trace) {\n let newTrace = [];\n\n const isExpected = expectedErrors.has(err);\n let status: \"showing\" | \"hiding\" | \"unknown\" = isExpected\n ? \"hiding\"\n : \"unknown\";\n for (let i = 0; i < trace.length; i++) {\n const name = trace[i].getFunctionName();\n if (name === START_HIDING) {\n status = \"hiding\";\n } else if (name === STOP_HIDING) {\n if (status === \"hiding\") {\n status = \"showing\";\n if (virtualFrames.has(err)) {\n newTrace.unshift(...virtualFrames.get(err));\n }\n } else if (status === \"unknown\") {\n // Unexpected internal error, show the full stack trace\n newTrace = trace;\n break;\n }\n } else if (status !== \"hiding\") {\n newTrace.push(trace[i]);\n }\n }\n\n return prepareStackTrace(err, newTrace);\n };\n}\n\nfunction defaultPrepareStackTrace(err: Error, trace: CallSite[]) {\n if (trace.length === 0) return ErrorToString(err);\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return `${ErrorToString(err)}\\n at ${trace.join(\"\\n at \")}`;\n}\n"],"mappings":";;;;;;;;;;AA4CA,MAAMA,aAAa,GAAGC,QAAQ,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAACC,SA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D,QAAQ,GACR,SAAS;IACb,KAAK,IAAIG,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,KAAK,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;MACrC,MAAME,IAAI,GAAGP,KAAK,CAACK,CAAC,CAAC,CAAC/B,eAAe,CAAC,CAAC;MACvC,IAAIiC,IAAI,KAAKjD,YAAY,EAAE;QACzB8C,MAAM,GAAG,QAAQ;MACnB,CAAC,MAAM,IAAIG,IAAI,KAAKhD,WAAW,EAAE;QAC/B,IAAI6C,MAAM,KAAK,QAAQ,EAAE;UACvBA,MAAM,GAAG,SAAS;UAClB,IAAI1C,aAAa,CAACyC,GAAG,CAACJ,GAAG,CAAC,EAAE;YAC1BE,QAAQ,CAACO,OAAO,CAAC,GAAG9C,aAAa,CAACkB,GAAG,CAACmB,GAAG,CAAC,CAAC;UAC7C;QACF,CAAC,MAAM,IAAIK,MAAM,KAAK,SAAS,EAAE;UAE/BH,QAAQ,GAAGD,KAAK;UAChB;QACF;MACF,CAAC,MAAM,IAAII,MAAM,KAAK,QAAQ,EAAE;QAC9BH,QAAQ,CAACnB,IAAI,CAACkB,KAAK,CAACK,CAAC,CAAC,CAAC;MACzB;IACF;IAEA,OAAOb,iBAAiB,CAACO,GAAG,EAAEE,QAAQ,CAAC;EACzC,CAAC;AACH;AAEA,SAASR,wBAAwBA,CAACM,GAAU,EAAEC,KAAiB,EAAE;EAC/D,IAAIA,KAAK,CAACM,MAAM,KAAK,CAAC,EAAE,OAAO7D,aAAa,CAACsD,GAAG,CAAC;EAEjD,OAAO,GAAGtD,aAAa,CAACsD,GAAG,CAAC,YAAYC,KAAK,CAACS,IAAI,CAAC,WAAW,CAAC,EAAE;AACnE;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js b/node_modules/@babel/core/lib/gensync-utils/async.js deleted file mode 100644 index 42946c6..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/async.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.forwardAsync = forwardAsync; -exports.isAsync = void 0; -exports.isThenable = isThenable; -exports.maybeAsync = maybeAsync; -exports.waitFor = exports.onFirstPause = void 0; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } -function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } -const runGenerator = _gensync()(function* (item) { - return yield* item; -}); -const isAsync = exports.isAsync = _gensync()({ - sync: () => false, - errback: cb => cb(null, true) -}); -function maybeAsync(fn, message) { - return _gensync()({ - sync(...args) { - const result = fn.apply(this, args); - if (isThenable(result)) throw new Error(message); - return result; - }, - async(...args) { - return Promise.resolve(fn.apply(this, args)); - } - }); -} -const withKind = _gensync()({ - sync: cb => cb("sync"), - async: function () { - var _ref = _asyncToGenerator(function* (cb) { - return cb("async"); - }); - return function async(_x) { - return _ref.apply(this, arguments); - }; - }() -}); -function forwardAsync(action, cb) { - const g = _gensync()(action); - return withKind(kind => { - const adapted = g[kind]; - return cb(adapted); - }); -} -const onFirstPause = exports.onFirstPause = _gensync()({ - name: "onFirstPause", - arity: 2, - sync: function (item) { - return runGenerator.sync(item); - }, - errback: function (item, firstPause, cb) { - let completed = false; - runGenerator.errback(item, (err, value) => { - completed = true; - cb(err, value); - }); - if (!completed) { - firstPause(); - } - } -}); -const waitFor = exports.waitFor = _gensync()({ - sync: x => x, - async: function () { - var _ref2 = _asyncToGenerator(function* (x) { - return x; - }); - return function async(_x2) { - return _ref2.apply(this, arguments); - }; - }() -}); -function isThenable(val) { - return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; -} -0 && 0; - -//# sourceMappingURL=async.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js.map b/node_modules/@babel/core/lib/gensync-utils/async.js.map deleted file mode 100644 index 595d757..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","runGenerator","gensync","item","isAsync","exports","sync","errback","cb","maybeAsync","fn","message","args","result","isThenable","Error","async","withKind","_ref","_x","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","err","waitFor","x","_ref2","_x2","val"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise = T | Promise;\n\nconst runGenerator: {\n sync(gen: Handler): Return;\n async(gen: Handler): Promise;\n errback(gen: Handler, cb: Callback): void;\n} = gensync(function* (item: Handler): Handler {\n return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n sync: () => false,\n errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync(\n fn: (...args: Args) => Return,\n message: string,\n): Gensync {\n return gensync({\n sync(...args) {\n const result = fn.apply(this, args);\n if (isThenable(result)) throw new Error(message);\n return result;\n },\n async(...args) {\n return Promise.resolve(fn.apply(this, args));\n },\n });\n}\n\nconst withKind = gensync({\n sync: cb => cb(\"sync\"),\n async: async cb => cb(\"async\"),\n}) as (cb: (kind: \"sync\" | \"async\") => MaybePromise) => Handler;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n// yield* forwardAsync(gensyncFn, wrappedFn =>\n// cache.using(x => {\n// // Here we don't know about gensync. wrappedFn is a\n// // normal sync or async function\n// return wrappedFn(x);\n// })\n// )\nexport function forwardAsync(\n action: (...args: Args) => Handler,\n cb: (\n adapted: (...args: Args) => MaybePromise,\n ) => MaybePromise,\n): Handler {\n const g = gensync(action);\n return withKind(kind => {\n const adapted = g[kind];\n return cb(adapted);\n });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n [gen: Handler, firstPause: () => void],\n unknown\n>({\n name: \"onFirstPause\",\n arity: 2,\n sync: function (item) {\n return runGenerator.sync(item);\n },\n errback: function (item, firstPause, cb) {\n let completed = false;\n\n runGenerator.errback(item, (err, value) => {\n completed = true;\n cb(err, value);\n });\n\n if (!completed) {\n firstPause();\n }\n },\n}) as (gen: Handler, firstPause: () => void) => Handler;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n sync: x => x,\n async: async x => x,\n}) as (p: T | Promise) => Handler;\n\nexport function isThenable(val: any): val is PromiseLike {\n return (\n !!val &&\n (typeof val === \"object\" || typeof val === \"function\") &&\n !!val.then &&\n typeof val.then === \"function\"\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAE,mBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,cAAAC,CAAA,GAAAP,CAAA,CAAAK,CAAA,EAAAC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SAAS,GAAG,IAAI;MAChBrB,EAAE,CAACsB,GAAG,EAAEvC,KAAK,CAAC;IAChB,CAAC,CAAC;IAEF,IAAI,CAACsC,SAAS,EAAE;MACdD,UAAU,CAAC,CAAC;IACd;EACF;AACF,CAAC,CAA+D;AAGzD,MAAMG,OAAO,GAAA1B,OAAA,CAAA0B,OAAA,GAAG7B,SAAMA,CAAC,CAAC;EAC7BI,IAAI,EAAE0B,CAAC,IAAIA,CAAC;EACZhB,KAAK;IAAA,IAAAiB,KAAA,GAAArC,iBAAA,CAAE,WAAMoC,CAAC;MAAA,OAAIA,CAAC;IAAA;IAAA,gBAAnBhB,KAAKA,CAAAkB,GAAA;MAAA,OAAAD,KAAA,CAAAnC,KAAA,OAAAD,SAAA;IAAA;EAAA;AACP,CAAC,CAAyC;AAEnC,SAASiB,UAAUA,CAAUqB,GAAQ,EAAyB;EACnE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACxC,IAAI,IACV,OAAOwC,GAAG,CAACxC,IAAI,KAAK,UAAU;AAElC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js b/node_modules/@babel/core/lib/gensync-utils/fs.js deleted file mode 100644 index b842df8..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/fs.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.stat = exports.readFile = void 0; -function _fs() { - const data = require("fs"); - _fs = function () { - return data; - }; - return data; -} -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -const readFile = exports.readFile = _gensync()({ - sync: _fs().readFileSync, - errback: _fs().readFile -}); -const stat = exports.stat = _gensync()({ - sync: _fs().statSync, - errback: _fs().stat -}); -0 && 0; - -//# sourceMappingURL=fs.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js.map b/node_modules/@babel/core/lib/gensync-utils/fs.js.map deleted file mode 100644 index ef4e8d9..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/fs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_fs","data","require","_gensync","readFile","exports","gensync","sync","fs","readFileSync","errback","stat","statSync"],"sources":["../../src/gensync-utils/fs.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport gensync from \"gensync\";\n\nexport const readFile = gensync<[filepath: string, encoding: \"utf8\"], string>({\n sync: fs.readFileSync,\n errback: fs.readFile,\n});\n\nexport const stat = gensync({\n sync: fs.statSync,\n errback: fs.stat,\n});\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAMG,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAGE,SAAMA,CAAC,CAA+C;EAC5EC,IAAI,EAAEC,IAACA,CAAC,CAACC,YAAY;EACrBC,OAAO,EAAEF,IAACA,CAAC,CAACJ;AACd,CAAC,CAAC;AAEK,MAAMO,IAAI,GAAAN,OAAA,CAAAM,IAAA,GAAGL,SAAMA,CAAC,CAAC;EAC1BC,IAAI,EAAEC,IAACA,CAAC,CAACI,QAAQ;EACjBF,OAAO,EAAEF,IAACA,CAAC,CAACG;AACd,CAAC,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/gensync-utils/functional.js b/node_modules/@babel/core/lib/gensync-utils/functional.js deleted file mode 100644 index d7f7755..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/functional.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.once = once; -var _async = require("./async.js"); -function once(fn) { - let result; - let resultP; - let promiseReferenced = false; - return function* () { - if (!result) { - if (resultP) { - promiseReferenced = true; - return yield* (0, _async.waitFor)(resultP); - } - if (!(yield* (0, _async.isAsync)())) { - try { - result = { - ok: true, - value: yield* fn() - }; - } catch (error) { - result = { - ok: false, - value: error - }; - } - } else { - let resolve, reject; - resultP = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - try { - result = { - ok: true, - value: yield* fn() - }; - resultP = null; - if (promiseReferenced) resolve(result.value); - } catch (error) { - result = { - ok: false, - value: error - }; - resultP = null; - if (promiseReferenced) reject(error); - } - } - } - if (result.ok) return result.value;else throw result.value; - }; -} -0 && 0; - -//# sourceMappingURL=functional.js.map diff --git a/node_modules/@babel/core/lib/gensync-utils/functional.js.map b/node_modules/@babel/core/lib/gensync-utils/functional.js.map deleted file mode 100644 index e8c5ed0..0000000 --- a/node_modules/@babel/core/lib/gensync-utils/functional.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_async","require","once","fn","result","resultP","promiseReferenced","waitFor","isAsync","ok","value","error","resolve","reject","Promise","res","rej"],"sources":["../../src/gensync-utils/functional.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { isAsync, waitFor } from \"./async.ts\";\n\nexport function once(fn: () => Handler): () => Handler {\n let result: { ok: true; value: R } | { ok: false; value: unknown };\n let resultP: Promise;\n let promiseReferenced = false;\n return function* () {\n if (!result) {\n if (resultP) {\n promiseReferenced = true;\n return yield* waitFor(resultP);\n }\n\n if (!(yield* isAsync())) {\n try {\n result = { ok: true, value: yield* fn() };\n } catch (error) {\n result = { ok: false, value: error };\n }\n } else {\n let resolve: (result: R) => void, reject: (error: unknown) => void;\n resultP = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n try {\n result = { ok: true, value: yield* fn() };\n // Avoid keeping the promise around\n // now that we have the result.\n resultP = null;\n // We only resolve/reject the promise if it has been actually\n // referenced. If there are no listeners we can forget about it.\n // In the reject case, this avoid uncatchable unhandledRejection\n // events.\n if (promiseReferenced) resolve(result.value);\n } catch (error) {\n result = { ok: false, value: error };\n resultP = null;\n if (promiseReferenced) reject(error);\n }\n }\n }\n\n if (result.ok) return result.value;\n else throw result.value;\n };\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,IAAIA,CAAIC,EAAoB,EAAoB;EAC9D,IAAIC,MAA8D;EAClE,IAAIC,OAAmB;EACvB,IAAIC,iBAAiB,GAAG,KAAK;EAC7B,OAAO,aAAa;IAClB,IAAI,CAACF,MAAM,EAAE;MACX,IAAIC,OAAO,EAAE;QACXC,iBAAiB,GAAG,IAAI;QACxB,OAAO,OAAO,IAAAC,cAAO,EAACF,OAAO,CAAC;MAChC;MAEA,IAAI,EAAE,OAAO,IAAAG,cAAO,EAAC,CAAC,CAAC,EAAE;QACvB,IAAI;UACFJ,MAAM,GAAG;YAAEK,EAAE,EAAE,IAAI;YAAEC,KAAK,EAAE,OAAOP,EAAE,CAAC;UAAE,CAAC;QAC3C,CAAC,CAAC,OAAOQ,KAAK,EAAE;UACdP,MAAM,GAAG;YAAEK,EAAE,EAAE,KAAK;YAAEC,KAAK,EAAEC;UAAM,CAAC;QACtC;MACF,CAAC,MAAM;QACL,IAAIC,OAA4B,EAAEC,MAAgC;QAClER,OAAO,GAAG,IAAIS,OAAO,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAK;UAClCJ,OAAO,GAAGG,GAAG;UACbF,MAAM,GAAGG,GAAG;QACd,CAAC,CAAC;QAEF,IAAI;UACFZ,MAAM,GAAG;YAAEK,EAAE,EAAE,IAAI;YAAEC,KAAK,EAAE,OAAOP,EAAE,CAAC;UAAE,CAAC;UAGzCE,OAAO,GAAG,IAAI;UAKd,IAAIC,iBAAiB,EAAEM,OAAO,CAACR,MAAM,CAACM,KAAK,CAAC;QAC9C,CAAC,CAAC,OAAOC,KAAK,EAAE;UACdP,MAAM,GAAG;YAAEK,EAAE,EAAE,KAAK;YAAEC,KAAK,EAAEC;UAAM,CAAC;UACpCN,OAAO,GAAG,IAAI;UACd,IAAIC,iBAAiB,EAAEO,MAAM,CAACF,KAAK,CAAC;QACtC;MACF;IACF;IAEA,IAAIP,MAAM,CAACK,EAAE,EAAE,OAAOL,MAAM,CAACM,KAAK,CAAC,KAC9B,MAAMN,MAAM,CAACM,KAAK;EACzB,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js deleted file mode 100644 index 2c15c49..0000000 --- a/node_modules/@babel/core/lib/index.js +++ /dev/null @@ -1,230 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DEFAULT_EXTENSIONS = void 0; -Object.defineProperty(exports, "File", { - enumerable: true, - get: function () { - return _file.default; - } -}); -Object.defineProperty(exports, "buildExternalHelpers", { - enumerable: true, - get: function () { - return _buildExternalHelpers.default; - } -}); -Object.defineProperty(exports, "createConfigItem", { - enumerable: true, - get: function () { - return _index2.createConfigItem; - } -}); -Object.defineProperty(exports, "createConfigItemAsync", { - enumerable: true, - get: function () { - return _index2.createConfigItemAsync; - } -}); -Object.defineProperty(exports, "createConfigItemSync", { - enumerable: true, - get: function () { - return _index2.createConfigItemSync; - } -}); -Object.defineProperty(exports, "getEnv", { - enumerable: true, - get: function () { - return _environment.getEnv; - } -}); -Object.defineProperty(exports, "loadOptions", { - enumerable: true, - get: function () { - return _index2.loadOptions; - } -}); -Object.defineProperty(exports, "loadOptionsAsync", { - enumerable: true, - get: function () { - return _index2.loadOptionsAsync; - } -}); -Object.defineProperty(exports, "loadOptionsSync", { - enumerable: true, - get: function () { - return _index2.loadOptionsSync; - } -}); -Object.defineProperty(exports, "loadPartialConfig", { - enumerable: true, - get: function () { - return _index2.loadPartialConfig; - } -}); -Object.defineProperty(exports, "loadPartialConfigAsync", { - enumerable: true, - get: function () { - return _index2.loadPartialConfigAsync; - } -}); -Object.defineProperty(exports, "loadPartialConfigSync", { - enumerable: true, - get: function () { - return _index2.loadPartialConfigSync; - } -}); -Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.parse; - } -}); -Object.defineProperty(exports, "parseAsync", { - enumerable: true, - get: function () { - return _parse.parseAsync; - } -}); -Object.defineProperty(exports, "parseSync", { - enumerable: true, - get: function () { - return _parse.parseSync; - } -}); -exports.resolvePreset = exports.resolvePlugin = void 0; -Object.defineProperty((0, exports), "template", { - enumerable: true, - get: function () { - return _template().default; - } -}); -Object.defineProperty((0, exports), "tokTypes", { - enumerable: true, - get: function () { - return _parser().tokTypes; - } -}); -Object.defineProperty(exports, "transform", { - enumerable: true, - get: function () { - return _transform.transform; - } -}); -Object.defineProperty(exports, "transformAsync", { - enumerable: true, - get: function () { - return _transform.transformAsync; - } -}); -Object.defineProperty(exports, "transformFile", { - enumerable: true, - get: function () { - return _transformFile.transformFile; - } -}); -Object.defineProperty(exports, "transformFileAsync", { - enumerable: true, - get: function () { - return _transformFile.transformFileAsync; - } -}); -Object.defineProperty(exports, "transformFileSync", { - enumerable: true, - get: function () { - return _transformFile.transformFileSync; - } -}); -Object.defineProperty(exports, "transformFromAst", { - enumerable: true, - get: function () { - return _transformAst.transformFromAst; - } -}); -Object.defineProperty(exports, "transformFromAstAsync", { - enumerable: true, - get: function () { - return _transformAst.transformFromAstAsync; - } -}); -Object.defineProperty(exports, "transformFromAstSync", { - enumerable: true, - get: function () { - return _transformAst.transformFromAstSync; - } -}); -Object.defineProperty(exports, "transformSync", { - enumerable: true, - get: function () { - return _transform.transformSync; - } -}); -Object.defineProperty((0, exports), "traverse", { - enumerable: true, - get: function () { - return _traverse().default; - } -}); -exports.version = exports.types = void 0; -var _file = require("./transformation/file/file.js"); -var _buildExternalHelpers = require("./tools/build-external-helpers.js"); -var resolvers = require("./config/files/index.js"); -var _environment = require("./config/helpers/environment.js"); -function _types() { - const data = require("@babel/types"); - _types = function () { - return data; - }; - return data; -} -Object.defineProperty((0, exports), "types", { - enumerable: true, - get: function () { - return _types(); - } -}); -function _parser() { - const data = require("@babel/parser"); - _parser = function () { - return data; - }; - return data; -} -function _traverse() { - const data = require("@babel/traverse"); - _traverse = function () { - return data; - }; - return data; -} -function _template() { - const data = require("@babel/template"); - _template = function () { - return data; - }; - return data; -} -var _index2 = require("./config/index.js"); -var _transform = require("./transform.js"); -var _transformFile = require("./transform-file.js"); -var _transformAst = require("./transform-ast.js"); -var _parse = require("./parse.js"); -const version = exports.version = "7.29.0"; -const resolvePlugin = (name, dirname) => resolvers.resolvePlugin(name, dirname, false).filepath; -exports.resolvePlugin = resolvePlugin; -const resolvePreset = (name, dirname) => resolvers.resolvePreset(name, dirname, false).filepath; -exports.resolvePreset = resolvePreset; -const DEFAULT_EXTENSIONS = exports.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); -exports.OptionManager = class OptionManager { - init(opts) { - return (0, _index2.loadOptionsSync)(opts); - } -}; -exports.Plugin = function Plugin(alias) { - throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`); -}; -0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0); - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/index.js.map b/node_modules/@babel/core/lib/index.js.map deleted file mode 100644 index a5f9ea5..0000000 --- a/node_modules/@babel/core/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_file","require","_buildExternalHelpers","resolvers","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_index2","_transform","_transformFile","_transformAst","_parse","version","resolvePlugin","name","dirname","filepath","resolvePreset","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\n\nimport * as resolvers from \"./config/files/index.ts\";\n// For backwards-compatibility, we expose the resolvers\n// with the old API.\nexport const resolvePlugin = (name: string, dirname: string) =>\n resolvers.resolvePlugin(name, dirname, false).filepath;\nexport const resolvePreset = (name: string, dirname: string) =>\n resolvers.resolvePreset(name, dirname, false).filepath;\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor = import(\"@babel/traverse\").Visitor;\n\nexport {\n createConfigItem,\n createConfigItemAsync,\n createConfigItemSync,\n} from \"./config/index.ts\";\n\nexport {\n loadOptions,\n loadOptionsAsync,\n loadPartialConfig,\n loadPartialConfigAsync,\n loadPartialConfigSync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nimport type {\n ConfigApplicableTest,\n PluginItem,\n} from \"./config/validation/options.ts\";\nexport { loadOptionsSync };\nexport type { PluginItem };\n\nexport type PresetObject = {\n overrides?: PresetObject[];\n test?: ConfigApplicableTest;\n plugins?: PluginItem[];\n};\n\nexport type {\n CallerMetadata,\n ConfigAPI,\n ConfigItem,\n InputOptions,\n NormalizedOptions,\n PartialConfig,\n PluginAPI,\n PluginObject,\n PresetAPI,\n} from \"./config/index.ts\";\n\nexport {\n type FileResult,\n transform,\n transformAsync,\n transformSync,\n} from \"./transform.ts\";\nexport {\n transformFile,\n transformFileAsync,\n transformFileSync,\n} from \"./transform-file.ts\";\nexport {\n transformFromAst,\n transformFromAstAsync,\n transformFromAstSync,\n} from \"./transform-ast.ts\";\nexport { parse, parseAsync, parseSync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n \".js\",\n \".jsx\",\n \".es6\",\n \".es\",\n \".mjs\",\n \".cjs\",\n] as const);\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n // eslint-disable-next-line no-restricted-globals\n exports.OptionManager = class OptionManager {\n init(opts: any) {\n return loadOptionsSync(opts);\n }\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.Plugin = function Plugin(alias: string) {\n throw new Error(\n `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n );\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAQA,IAAAG,YAAA,GAAAH,OAAA;AAAyD,SAAAI,OAAA;EAAA,MAAAC,IAAA,GAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAAC,MAAA,CAAAC,cAA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mB,aAAa,GAAG,MAAMA,aAAa,CAAC;EAC1CC,IAAIA,CAACC,IAAS,EAAE;IACd,OAAO,IAAAC,uBAAe,EAACD,IAAI,CAAC;EAC9B;AACF,CAAC;AAGDrB,OAAO,CAACuB,MAAM,GAAG,SAASA,MAAMA,CAACC,KAAa,EAAE;EAC9C,MAAM,IAAIC,KAAK,CACb,QAAQD,KAAK,kEACf,CAAC;AACH,CAAC;AAAC,MAAAxB,OAAA,CAAA0B,KAAA,GAAA1B,OAAA,CAAA2B,QAAA,GAAA3B,OAAA,CAAA4B,QAAA,GAAA5B,OAAA,CAAA6B,QAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parse.js b/node_modules/@babel/core/lib/parse.js deleted file mode 100644 index 5c4db4c..0000000 --- a/node_modules/@babel/core/lib/parse.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parse = void 0; -exports.parseAsync = parseAsync; -exports.parseSync = parseSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _index = require("./config/index.js"); -var _index2 = require("./parser/index.js"); -var _normalizeOpts = require("./transformation/normalize-opts.js"); -var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js"); -const parseRunner = _gensync()(function* parse(code, opts) { - const config = yield* (0, _index.default)(opts); - if (config === null) { - return null; - } - return yield* (0, _index2.default)(config.passes, (0, _normalizeOpts.default)(config), code); -}); -const parse = exports.parse = function parse(code, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - if (callback === undefined) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code, opts); - } - (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback); -}; -function parseSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args); -} -function parseAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args); -} -0 && 0; - -//# sourceMappingURL=parse.js.map diff --git a/node_modules/@babel/core/lib/parse.js.map b/node_modules/@babel/core/lib/parse.js.map deleted file mode 100644 index 91434fc..0000000 --- a/node_modules/@babel/core/lib/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_index","_index2","_normalizeOpts","_rewriteStackTrace","parseRunner","gensync","parse","code","opts","config","loadConfig","parser","passes","normalizeOptions","exports","callback","undefined","beginHiddenCallStack","sync","errback","parseSync","args","parseAsync","async"],"sources":["../src/parse.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig, { type InputOptions } from \"./config/index.ts\";\nimport parser, { type ParseResult } from \"./parser/index.ts\";\nimport normalizeOptions from \"./transformation/normalize-opts.ts\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\ntype FileParseCallback = {\n (err: Error, ast: null): void;\n (err: null, ast: ParseResult | null): void;\n};\n\ntype Parse = {\n (code: string, callback: FileParseCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileParseCallback,\n ): void;\n (code: string, opts?: InputOptions | null): ParseResult | null;\n};\n\nconst parseRunner = gensync(function* parse(\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config = yield* loadConfig(opts);\n\n if (config === null) {\n return null;\n }\n\n return yield* parser(config.passes, normalizeOptions(config), code);\n});\n\nexport const parse: Parse = function parse(\n code,\n opts?,\n callback?: FileParseCallback,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n opts = undefined as InputOptions;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'parse' function expects a callback. If you need to call it synchronously, please use 'parseSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'parse' function will expect a callback. If you need to call it synchronously, please use 'parseSync'.\",\n // );\n return beginHiddenCallStack(parseRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(parseRunner.errback)(code, opts, callback);\n};\n\nexport function parseSync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.sync)(...args);\n}\nexport function parseAsync(...args: Parameters) {\n return beginHiddenCallStack(parseRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAiBA,MAAMK,WAAW,GAAGC,SAAMA,CAAC,CAAC,UAAUC,KAAKA,CACzCC,IAAY,EACZC,IAAqC,EACR;EAC7B,MAAMC,MAAM,GAAG,OAAO,IAAAC,cAAU,EAACF,IAAI,CAAC;EAEtC,IAAIC,MAAM,KAAK,IAAI,EAAE;IACnB,OAAO,IAAI;EACb;EAEA,OAAO,OAAO,IAAAE,eAAM,EAACF,MAAM,CAACG,MAAM,EAAE,IAAAC,sBAAgB,EAACJ,MAAM,CAAC,EAAEF,IAAI,CAAC;AACrE,CAAC,CAAC;AAEK,MAAMD,KAAY,GAAAQ,OAAA,CAAAR,KAAA,GAAG,SAASA,KAAKA,CACxCC,IAAI,EACJC,IAAK,EACLO,QAA4B,EAC5B;EACA,IAAI,OAAOP,IAAI,KAAK,UAAU,EAAE;IAC9BO,QAAQ,GAAGP,IAAI;IACfA,IAAI,GAAGQ,SAAyB;EAClC;EAEA,IAAID,QAAQ,KAAKC,SAAS,EAAE;IASxB,OAAO,IAAAC,uCAAoB,EAACb,WAAW,CAACc,IAAI,CAAC,CAACX,IAAI,EAAEC,IAAI,CAAC;EAE7D;EAEA,IAAAS,uCAAoB,EAACb,WAAW,CAACe,OAAO,CAAC,CAACZ,IAAI,EAAEC,IAAI,EAAEO,QAAQ,CAAC;AACjE,CAAC;AAEM,SAASK,SAASA,CAAC,GAAGC,IAAyC,EAAE;EACtE,OAAO,IAAAJ,uCAAoB,EAACb,WAAW,CAACc,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AACxD;AACO,SAASC,UAAUA,CAAC,GAAGD,IAA0C,EAAE;EACxE,OAAO,IAAAJ,uCAAoB,EAACb,WAAW,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACzD;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/index.js b/node_modules/@babel/core/lib/parser/index.js deleted file mode 100644 index 690b343..0000000 --- a/node_modules/@babel/core/lib/parser/index.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parser; -function _parser() { - const data = require("@babel/parser"); - _parser = function () { - return data; - }; - return data; -} -function _codeFrame() { - const data = require("@babel/code-frame"); - _codeFrame = function () { - return data; - }; - return data; -} -var _missingPluginHelper = require("./util/missing-plugin-helper.js"); -function* parser(pluginPasses, { - parserOpts, - highlightCode = true, - filename = "unknown" -}, code) { - try { - const results = []; - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - parserOverride - } = plugin; - if (parserOverride) { - const ast = parserOverride(code, parserOpts, _parser().parse); - if (ast !== undefined) results.push(ast); - } - } - } - if (results.length === 0) { - return (0, _parser().parse)(code, parserOpts); - } else if (results.length === 1) { - yield* []; - if (typeof results[0].then === "function") { - throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - return results[0]; - } - throw new Error("More than one plugin attempted to override parsing."); - } catch (err) { - if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { - err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; - } - const startLine = parserOpts == null ? void 0 : parserOpts.startLine; - const startColumn = parserOpts == null ? void 0 : parserOpts.startColumn; - if (startColumn != null) { - code = " ".repeat(startColumn) + code; - } - const { - loc, - missingPlugin - } = err; - if (loc) { - const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { - start: { - line: loc.line, - column: loc.column + 1 - } - }, { - highlightCode, - startLine - }); - if (missingPlugin) { - err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame, filename); - } else { - err.message = `${filename}: ${err.message}\n\n` + codeFrame; - } - err.code = "BABEL_PARSE_ERROR"; - } - throw err; - } -} -0 && 0; - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/parser/index.js.map b/node_modules/@babel/core/lib/parser/index.js.map deleted file mode 100644 index d173041..0000000 --- a/node_modules/@babel/core/lib/parser/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","startLine","startColumn","repeat","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse, type ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: ResolvedOptions,\n code: string,\n): Handler {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // If we want to allow async parsers\n yield* [];\n if (typeof (results[0] as any).then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const startLine = parserOpts?.startLine;\n const startColumn = parserOpts?.startColumn;\n\n if (startColumn != null) {\n code = \" \".repeat(startColumn) + code;\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n startLine,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(\n missingPlugin[0],\n loc,\n codeFrame,\n filename,\n );\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAG,oBAAA,GAAAF,OAAA;AAMe,UAAUG,MAAMA,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAA2B,CAA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MAAM;MAAEiB,GAAG;MAAEC;IAAc,CAAC,GAAGN,GAAG;IAClC,IAAIK,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCpB,IAAI,EACJ;QACEqB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEzB,aAAa;QACbgB;MACF,CACF,CAAC;MACD,IAAII,aAAa,EAAE;QACjBN,GAAG,CAACC,OAAO,GACT,GAAGd,QAAQ,IAAI,GACf,IAAAyB,4BAA4B,EAC1BN,aAAa,CAAC,CAAC,CAAC,EAChBD,GAAG,EACHE,SAAS,EACTpB,QACF,CAAC;MACL,CAAC,MAAM;QACLa,GAAG,CAACC,OAAO,GAAG,GAAGd,QAAQ,KAAKa,GAAG,CAACC,OAAO,MAAM,GAAGM,SAAS;MAC7D;MACAP,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js deleted file mode 100644 index 0eb294c..0000000 --- a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js +++ /dev/null @@ -1,337 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateMissingPluginMessage; -const pluginNameMap = { - asyncDoExpressions: { - syntax: { - name: "@babel/plugin-syntax-async-do-expressions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions" - } - }, - decimal: { - syntax: { - name: "@babel/plugin-syntax-decimal", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal" - } - }, - decorators: { - syntax: { - name: "@babel/plugin-syntax-decorators", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators" - }, - transform: { - name: "@babel/plugin-proposal-decorators", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators" - } - }, - doExpressions: { - syntax: { - name: "@babel/plugin-syntax-do-expressions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions" - }, - transform: { - name: "@babel/plugin-proposal-do-expressions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions" - } - }, - exportDefaultFrom: { - syntax: { - name: "@babel/plugin-syntax-export-default-from", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from" - }, - transform: { - name: "@babel/plugin-proposal-export-default-from", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from" - } - }, - flow: { - syntax: { - name: "@babel/plugin-syntax-flow", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow" - }, - transform: { - name: "@babel/preset-flow", - url: "https://github.com/babel/babel/tree/main/packages/babel-preset-flow" - } - }, - functionBind: { - syntax: { - name: "@babel/plugin-syntax-function-bind", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind" - }, - transform: { - name: "@babel/plugin-proposal-function-bind", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind" - } - }, - functionSent: { - syntax: { - name: "@babel/plugin-syntax-function-sent", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent" - }, - transform: { - name: "@babel/plugin-proposal-function-sent", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent" - } - }, - jsx: { - syntax: { - name: "@babel/plugin-syntax-jsx", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx" - }, - transform: { - name: "@babel/preset-react", - url: "https://github.com/babel/babel/tree/main/packages/babel-preset-react" - } - }, - pipelineOperator: { - syntax: { - name: "@babel/plugin-syntax-pipeline-operator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator" - }, - transform: { - name: "@babel/plugin-proposal-pipeline-operator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator" - } - }, - recordAndTuple: { - syntax: { - name: "@babel/plugin-syntax-record-and-tuple", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple" - } - }, - throwExpressions: { - syntax: { - name: "@babel/plugin-syntax-throw-expressions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions" - }, - transform: { - name: "@babel/plugin-proposal-throw-expressions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions" - } - }, - typescript: { - syntax: { - name: "@babel/plugin-syntax-typescript", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript" - }, - transform: { - name: "@babel/preset-typescript", - url: "https://github.com/babel/babel/tree/main/packages/babel-preset-typescript" - } - } -}; -Object.assign(pluginNameMap, { - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators" - }, - transform: { - name: "@babel/plugin-transform-async-generator-functions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions" - } - }, - classProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" - }, - transform: { - name: "@babel/plugin-transform-class-properties", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" - } - }, - classPrivateProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" - }, - transform: { - name: "@babel/plugin-transform-class-properties", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties" - } - }, - classPrivateMethods: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties" - }, - transform: { - name: "@babel/plugin-transform-private-methods", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods" - } - }, - classStaticBlock: { - syntax: { - name: "@babel/plugin-syntax-class-static-block", - url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block" - }, - transform: { - name: "@babel/plugin-transform-class-static-block", - url: "https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block" - } - }, - dynamicImport: { - syntax: { - name: "@babel/plugin-syntax-dynamic-import", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import" - } - }, - exportNamespaceFrom: { - syntax: { - name: "@babel/plugin-syntax-export-namespace-from", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from" - }, - transform: { - name: "@babel/plugin-transform-export-namespace-from", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from" - } - }, - importAssertions: { - syntax: { - name: "@babel/plugin-syntax-import-assertions", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions" - } - }, - importAttributes: { - syntax: { - name: "@babel/plugin-syntax-import-attributes", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes" - } - }, - importMeta: { - syntax: { - name: "@babel/plugin-syntax-import-meta", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta" - } - }, - logicalAssignment: { - syntax: { - name: "@babel/plugin-syntax-logical-assignment-operators", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators" - }, - transform: { - name: "@babel/plugin-transform-logical-assignment-operators", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators" - } - }, - moduleStringNames: { - syntax: { - name: "@babel/plugin-syntax-module-string-names", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names" - } - }, - numericSeparator: { - syntax: { - name: "@babel/plugin-syntax-numeric-separator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator" - }, - transform: { - name: "@babel/plugin-transform-numeric-separator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator" - } - }, - nullishCoalescingOperator: { - syntax: { - name: "@babel/plugin-syntax-nullish-coalescing-operator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator" - }, - transform: { - name: "@babel/plugin-transform-nullish-coalescing-operator", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator" - } - }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread" - }, - transform: { - name: "@babel/plugin-transform-object-rest-spread", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread" - } - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding" - }, - transform: { - name: "@babel/plugin-transform-optional-catch-binding", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding" - } - }, - optionalChaining: { - syntax: { - name: "@babel/plugin-syntax-optional-chaining", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining" - }, - transform: { - name: "@babel/plugin-transform-optional-chaining", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining" - } - }, - privateIn: { - syntax: { - name: "@babel/plugin-syntax-private-property-in-object", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object" - }, - transform: { - name: "@babel/plugin-transform-private-property-in-object", - url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object" - } - }, - regexpUnicodeSets: { - syntax: { - name: "@babel/plugin-syntax-unicode-sets-regex", - url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md" - }, - transform: { - name: "@babel/plugin-transform-unicode-sets-regex", - url: "https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md" - } - } -}); -const getNameURLCombination = ({ - name, - url -}) => `${name} (${url})`; -function generateMissingPluginMessage(missingPluginName, loc, codeFrame, filename) { - let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; - const pluginInfo = pluginNameMap[missingPluginName]; - if (pluginInfo) { - const { - syntax: syntaxPlugin, - transform: transformPlugin - } = pluginInfo; - if (syntaxPlugin) { - const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - if (transformPlugin) { - const transformPluginInfo = getNameURLCombination(transformPlugin); - const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets"; - helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation. -If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`; - } else { - helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; - } - } - } - const msgFilename = filename === "unknown" ? "" : filename; - helpMessage += ` - -If you already added the plugin for this syntax to your config, it's possible that your config \ -isn't being loaded. -You can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \ -configuration: -\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} -See https://babeljs.io/docs/configuration#print-effective-configs for more info. -`; - return helpMessage; -} -0 && 0; - -//# sourceMappingURL=missing-plugin-helper.js.map diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map deleted file mode 100644 index b032bff..0000000 --- a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","pipelineOperator","recordAndTuple","throwExpressions","typescript","Object","assign","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importAssertions","importAttributes","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","regexpUnicodeSets","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","filename","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith","msgFilename"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n string,\n Partial>>\n> = {\n asyncDoExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-async-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n },\n },\n decimal: {\n syntax: {\n name: \"@babel/plugin-syntax-decimal\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n },\n },\n decorators: {\n syntax: {\n name: \"@babel/plugin-syntax-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n },\n transform: {\n name: \"@babel/plugin-proposal-decorators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n },\n },\n doExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-do-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n },\n },\n exportDefaultFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n },\n transform: {\n name: \"@babel/plugin-proposal-export-default-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n },\n },\n flow: {\n syntax: {\n name: \"@babel/plugin-syntax-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n },\n transform: {\n name: \"@babel/preset-flow\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n },\n },\n functionBind: {\n syntax: {\n name: \"@babel/plugin-syntax-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-bind\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n },\n },\n functionSent: {\n syntax: {\n name: \"@babel/plugin-syntax-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n },\n transform: {\n name: \"@babel/plugin-proposal-function-sent\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n },\n },\n jsx: {\n syntax: {\n name: \"@babel/plugin-syntax-jsx\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n },\n transform: {\n name: \"@babel/preset-react\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n },\n },\n pipelineOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n },\n transform: {\n name: \"@babel/plugin-proposal-pipeline-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n },\n },\n recordAndTuple: {\n syntax: {\n name: \"@babel/plugin-syntax-record-and-tuple\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n },\n },\n throwExpressions: {\n syntax: {\n name: \"@babel/plugin-syntax-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n },\n transform: {\n name: \"@babel/plugin-proposal-throw-expressions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n },\n },\n typescript: {\n syntax: {\n name: \"@babel/plugin-syntax-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n },\n transform: {\n name: \"@babel/preset-typescript\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n },\n },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n // TODO: This plugins are now supported by default by @babel/parser.\n Object.assign(pluginNameMap, {\n asyncGenerators: {\n syntax: {\n name: \"@babel/plugin-syntax-async-generators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n },\n transform: {\n name: \"@babel/plugin-transform-async-generator-functions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n },\n },\n classProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateProperties: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n },\n },\n classPrivateMethods: {\n syntax: {\n name: \"@babel/plugin-syntax-class-properties\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-methods\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n },\n },\n classStaticBlock: {\n syntax: {\n name: \"@babel/plugin-syntax-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n },\n transform: {\n name: \"@babel/plugin-transform-class-static-block\",\n url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n },\n },\n dynamicImport: {\n syntax: {\n name: \"@babel/plugin-syntax-dynamic-import\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n },\n },\n exportNamespaceFrom: {\n syntax: {\n name: \"@babel/plugin-syntax-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n },\n transform: {\n name: \"@babel/plugin-transform-export-namespace-from\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n },\n },\n // Will be removed\n importAssertions: {\n syntax: {\n name: \"@babel/plugin-syntax-import-assertions\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n },\n },\n importAttributes: {\n syntax: {\n name: \"@babel/plugin-syntax-import-attributes\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n },\n },\n importMeta: {\n syntax: {\n name: \"@babel/plugin-syntax-import-meta\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n },\n },\n logicalAssignment: {\n syntax: {\n name: \"@babel/plugin-syntax-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n },\n transform: {\n name: \"@babel/plugin-transform-logical-assignment-operators\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n },\n },\n moduleStringNames: {\n syntax: {\n name: \"@babel/plugin-syntax-module-string-names\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n },\n },\n numericSeparator: {\n syntax: {\n name: \"@babel/plugin-syntax-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n },\n transform: {\n name: \"@babel/plugin-transform-numeric-separator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n },\n },\n nullishCoalescingOperator: {\n syntax: {\n name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n },\n transform: {\n name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n },\n },\n objectRestSpread: {\n syntax: {\n name: \"@babel/plugin-syntax-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n },\n transform: {\n name: \"@babel/plugin-transform-object-rest-spread\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n },\n },\n optionalCatchBinding: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-catch-binding\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n },\n },\n optionalChaining: {\n syntax: {\n name: \"@babel/plugin-syntax-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n },\n transform: {\n name: \"@babel/plugin-transform-optional-chaining\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n },\n },\n privateIn: {\n syntax: {\n name: \"@babel/plugin-syntax-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n },\n transform: {\n name: \"@babel/plugin-transform-private-property-in-object\",\n url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n },\n },\n regexpUnicodeSets: {\n syntax: {\n name: \"@babel/plugin-syntax-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n },\n transform: {\n name: \"@babel/plugin-transform-unicode-sets-regex\",\n url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n },\n },\n });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n missingPluginName: string,\n loc: {\n line: number;\n column: number;\n },\n codeFrame: string,\n filename: string,\n): string {\n let helpMessage =\n `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n `(${loc.line}:${loc.column + 1}):\\n\\n` +\n codeFrame;\n const pluginInfo = pluginNameMap[missingPluginName];\n if (pluginInfo) {\n const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n if (syntaxPlugin) {\n const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n if (transformPlugin) {\n const transformPluginInfo = getNameURLCombination(transformPlugin);\n const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n ? \"plugins\"\n : \"presets\";\n helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n } else {\n helpMessage +=\n `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n `to enable parsing.`;\n }\n }\n }\n\n const msgFilename =\n filename === \"unknown\" ? \"\" : filename;\n helpMessage += `\n\nIf you already added the plugin for this syntax to your config, it's possible that your config \\\nisn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`;\n return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,mCAAmC;MACzCC,GAAG,EAAE;IACP;EACF,CAAC;EACDI,aAAa,EAAE;IACbN,MAAM,EAAE;MACNC,IAAI,EAAE,qCAAqC;MAC3CC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,uCAAuC;MAC7CC,GAAG,EAAE;IACP;EACF,CAAC;EACDK,iBAAiB,EAAE;IACjBP,MAAM,EAAE;MACNC,IAAI,EAAE,0CAA0C;MAChDC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,4CAA4C;MAClDC,GAAG,EAAE;IACP;EACF,CAAC;EACDM,IAAI,EAAE;IACJR,MAAM,EAAE;MACNC,IAAI,EAAE,2BAA2B;MACjCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,oBAAoB;MAC1BC,GAAG,EAAE;IACP;EACF,CAAC;EACDO,YAAY,EAAE;IACZT,MAAM,EAAE;MACNC,IAAI,EAAE,oCAAoC;MAC1CC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,sCAAsC;MAC5CC,GAAG,EAAE;IACP;EACF,CAAC;EACDQ,YAAY,EAAE;IACZV,MAAM,EAAE;MACNC,IAAI,EAAE,oCA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BAAoB;MACxB;IACF;EACF;EAEA,MAAMI,WAAW,GACfX,QAAQ,KAAK,SAAS,GAAG,0BAA0B,GAAGA,QAAQ;EAChEC,WAAW,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,wCAAwCU,WAAW;AACnD;AACA,CAAC;EACC,OAAOV,WAAW;AACpB;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js b/node_modules/@babel/core/lib/tools/build-external-helpers.js deleted file mode 100644 index 88c90dc..0000000 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js +++ /dev/null @@ -1,144 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -function helpers() { - const data = require("@babel/helpers"); - helpers = function () { - return data; - }; - return data; -} -function _generator() { - const data = require("@babel/generator"); - _generator = function () { - return data; - }; - return data; -} -function _template() { - const data = require("@babel/template"); - _template = function () { - return data; - }; - return data; -} -function _t() { - const data = require("@babel/types"); - _t = function () { - return data; - }; - return data; -} -const { - arrayExpression, - assignmentExpression, - binaryExpression, - blockStatement, - callExpression, - cloneNode, - conditionalExpression, - exportNamedDeclaration, - exportSpecifier, - expressionStatement, - functionExpression, - identifier, - memberExpression, - objectExpression, - program, - stringLiteral, - unaryExpression, - variableDeclaration, - variableDeclarator -} = _t(); -const buildUmdWrapper = replacements => _template().default.statement` - (function (root, factory) { - if (typeof define === "function" && define.amd) { - define(AMD_ARGUMENTS, factory); - } else if (typeof exports === "object") { - factory(COMMON_ARGUMENTS); - } else { - factory(BROWSER_ARGUMENTS); - } - })(UMD_ROOT, function (FACTORY_PARAMETERS) { - FACTORY_BODY - }); - `(replacements); -function buildGlobal(allowlist) { - const namespace = identifier("babelHelpers"); - const body = []; - const container = functionExpression(null, [identifier("global")], blockStatement(body)); - const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral("undefined")), identifier("self"), identifier("global"))]))]); - body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))])); - buildHelpers(body, namespace, allowlist); - return tree; -} -function buildModule(allowlist) { - const body = []; - const refs = buildHelpers(body, null, allowlist); - body.unshift(exportNamedDeclaration(null, Object.keys(refs).map(name => { - return exportSpecifier(cloneNode(refs[name]), identifier(name)); - }))); - return program(body, [], "module"); -} -function buildUmd(allowlist) { - const namespace = identifier("babelHelpers"); - const body = []; - body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))])); - buildHelpers(body, namespace, allowlist); - return program([buildUmdWrapper({ - FACTORY_PARAMETERS: identifier("global"), - BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])), - COMMON_ARGUMENTS: identifier("exports"), - AMD_ARGUMENTS: arrayExpression([stringLiteral("exports")]), - FACTORY_BODY: body, - UMD_ROOT: identifier("this") - })]); -} -function buildVar(allowlist) { - const namespace = identifier("babelHelpers"); - const body = []; - body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))])); - const tree = program(body); - buildHelpers(body, namespace, allowlist); - body.push(expressionStatement(namespace)); - return tree; -} -function buildHelpers(body, namespace, allowlist) { - const getHelperReference = name => { - return namespace ? memberExpression(namespace, identifier(name)) : identifier(`_${name}`); - }; - const refs = {}; - helpers().list.forEach(function (name) { - if (allowlist && !allowlist.includes(name)) return; - const ref = refs[name] = getHelperReference(name); - const { - nodes - } = helpers().get(name, getHelperReference, namespace ? null : `_${name}`, [], namespace ? (ast, exportName, mapExportBindingAssignments) => { - mapExportBindingAssignments(node => assignmentExpression("=", ref, node)); - ast.body.push(expressionStatement(assignmentExpression("=", ref, identifier(exportName)))); - } : null); - body.push(...nodes); - }); - return refs; -} -function _default(allowlist, outputType = "global") { - let tree; - const build = { - global: buildGlobal, - module: buildModule, - umd: buildUmd, - var: buildVar - }[outputType]; - if (build) { - tree = build(allowlist); - } else { - throw new Error(`Unsupported output type ${outputType}`); - } - return (0, _generator().default)(tree).code; -} -0 && 0; - -//# sourceMappingURL=build-external-helpers.js.map diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js.map b/node_modules/@babel/core/lib/tools/build-external-helpers.js.map deleted file mode 100644 index f856480..0000000 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["helpers","data","require","_generator","_template","_t","arrayExpression","assignmentExpression","binaryExpression","blockStatement","callExpression","cloneNode","conditionalExpression","exportNamedDeclaration","exportSpecifier","expressionStatement","functionExpression","identifier","memberExpression","objectExpression","program","stringLiteral","unaryExpression","variableDeclaration","variableDeclarator","buildUmdWrapper","replacements","template","statement","buildGlobal","allowlist","namespace","body","container","tree","push","buildHelpers","buildModule","refs","unshift","Object","keys","map","name","buildUmd","FACTORY_PARAMETERS","BROWSER_ARGUMENTS","COMMON_ARGUMENTS","AMD_ARGUMENTS","FACTORY_BODY","UMD_ROOT","buildVar","getHelperReference","list","forEach","includes","ref","nodes","get","ast","exportName","mapExportBindingAssignments","node","_default","outputType","build","global","module","umd","var","Error","generator","code"],"sources":["../../src/tools/build-external-helpers.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport generator from \"@babel/generator\";\nimport template from \"@babel/template\";\nimport {\n arrayExpression,\n assignmentExpression,\n binaryExpression,\n blockStatement,\n callExpression,\n cloneNode,\n conditionalExpression,\n exportNamedDeclaration,\n exportSpecifier,\n expressionStatement,\n functionExpression,\n identifier,\n memberExpression,\n objectExpression,\n program,\n stringLiteral,\n unaryExpression,\n variableDeclaration,\n variableDeclarator,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { Replacements } from \"@babel/template\";\n\n// Wrapped to avoid wasting time parsing this when almost no-one uses\n// build-external-helpers.\nconst buildUmdWrapper = (replacements: Replacements) =>\n template.statement`\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n `(replacements);\n\nfunction buildGlobal(allowlist?: string[]) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n const container = functionExpression(\n null,\n [identifier(\"global\")],\n blockStatement(body),\n );\n const tree = program([\n expressionStatement(\n callExpression(container, [\n // typeof global === \"undefined\" ? self : global\n conditionalExpression(\n binaryExpression(\n \"===\",\n unaryExpression(\"typeof\", identifier(\"global\")),\n stringLiteral(\"undefined\"),\n ),\n identifier(\"self\"),\n identifier(\"global\"),\n ),\n ]),\n ),\n ]);\n\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(\n namespace,\n assignmentExpression(\n \"=\",\n memberExpression(identifier(\"global\"), namespace),\n objectExpression([]),\n ),\n ),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return tree;\n}\n\nfunction buildModule(allowlist?: string[]) {\n const body: t.Statement[] = [];\n const refs = buildHelpers(body, null, allowlist);\n\n body.unshift(\n exportNamedDeclaration(\n null,\n Object.keys(refs).map(name => {\n return exportSpecifier(cloneNode(refs[name]), identifier(name));\n }),\n ),\n );\n\n return program(body, [], \"module\");\n}\n\nfunction buildUmd(allowlist?: string[]) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, identifier(\"global\")),\n ]),\n );\n\n buildHelpers(body, namespace, allowlist);\n\n return program([\n buildUmdWrapper({\n FACTORY_PARAMETERS: identifier(\"global\"),\n BROWSER_ARGUMENTS: assignmentExpression(\n \"=\",\n memberExpression(identifier(\"root\"), namespace),\n objectExpression([]),\n ),\n COMMON_ARGUMENTS: identifier(\"exports\"),\n AMD_ARGUMENTS: arrayExpression([stringLiteral(\"exports\")]),\n FACTORY_BODY: body,\n UMD_ROOT: identifier(\"this\"),\n }),\n ]);\n}\n\nfunction buildVar(allowlist?: string[]) {\n const namespace = identifier(\"babelHelpers\");\n\n const body: t.Statement[] = [];\n body.push(\n variableDeclaration(\"var\", [\n variableDeclarator(namespace, objectExpression([])),\n ]),\n );\n const tree = program(body);\n buildHelpers(body, namespace, allowlist);\n body.push(expressionStatement(namespace));\n return tree;\n}\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression,\n allowlist?: string[],\n): Record;\nfunction buildHelpers(\n body: t.Statement[],\n namespace: null,\n allowlist?: string[],\n): Record;\n\nfunction buildHelpers(\n body: t.Statement[],\n namespace: t.Expression | null,\n allowlist?: string[],\n) {\n const getHelperReference = (name: string) => {\n return namespace\n ? memberExpression(namespace, identifier(name))\n : identifier(`_${name}`);\n };\n\n const refs: Record = {};\n helpers.list.forEach(function (name) {\n if (allowlist && !allowlist.includes(name)) return;\n\n const ref = (refs[name] = getHelperReference(name));\n\n const { nodes } = helpers.get(\n name,\n getHelperReference,\n namespace ? null : `_${name}`,\n [],\n namespace\n ? (ast, exportName, mapExportBindingAssignments) => {\n mapExportBindingAssignments(node =>\n assignmentExpression(\"=\", ref, node),\n );\n ast.body.push(\n expressionStatement(\n assignmentExpression(\"=\", ref, identifier(exportName)),\n ),\n );\n }\n : null,\n );\n\n body.push(...nodes);\n });\n return refs;\n}\nexport default function (\n allowlist?: string[],\n outputType: \"global\" | \"module\" | \"umd\" | \"var\" = \"global\",\n) {\n let tree: t.Program;\n\n const build = {\n global: buildGlobal,\n module: buildModule,\n umd: buildUmd,\n var: buildVar,\n }[outputType];\n\n if (build) {\n tree = build(allowlist);\n } else {\n throw new Error(`Unsupported output type ${outputType}`);\n }\n\n return generator(tree).code;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,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,IAAIwC,KAAK,CAAC,2BAA2BN,UAAU,EAAE,CAAC;EAC1D;EAEA,OAAO,IAAAO,oBAAS,EAACrC,IAAI,CAAC,CAACsC,IAAI;AAC7B;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-ast.js b/node_modules/@babel/core/lib/transform-ast.js deleted file mode 100644 index f54b9c9..0000000 --- a/node_modules/@babel/core/lib/transform-ast.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFromAst = void 0; -exports.transformFromAstAsync = transformFromAstAsync; -exports.transformFromAstSync = transformFromAstSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _index = require("./config/index.js"); -var _index2 = require("./transformation/index.js"); -var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js"); -const transformFromAstRunner = _gensync()(function* (ast, code, opts) { - const config = yield* (0, _index.default)(opts); - if (config === null) return null; - if (!ast) throw new Error("No AST given"); - return yield* (0, _index2.run)(config, code, ast); -}); -const transformFromAst = exports.transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) { - let opts; - let callback; - if (typeof optsOrCallback === "function") { - callback = optsOrCallback; - opts = undefined; - } else { - opts = optsOrCallback; - callback = maybeCallback; - } - if (callback === undefined) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast, code, opts); - } - (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback); -}; -function transformFromAstSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args); -} -function transformFromAstAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args); -} -0 && 0; - -//# sourceMappingURL=transform-ast.js.map diff --git a/node_modules/@babel/core/lib/transform-ast.js.map b/node_modules/@babel/core/lib/transform-ast.js.map deleted file mode 100644 index e83787e..0000000 --- a/node_modules/@babel/core/lib/transform-ast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_index","_index2","_rewriteStackTrace","transformFromAstRunner","gensync","ast","code","opts","config","loadConfig","Error","run","transformFromAst","exports","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","transformFromAstSync","args","transformFromAstAsync","async"],"sources":["../src/transform-ast.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\nimport type * as t from \"@babel/types\";\n\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\ntype AstRoot = t.File | t.Program;\n\ntype TransformFromAst = {\n (ast: AstRoot, code: string, callback: FileResultCallback): void;\n (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (ast: AstRoot, code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformFromAstRunner = gensync(function* (\n ast: AstRoot,\n code: string,\n opts: InputOptions | undefined | null,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n if (!ast) throw new Error(\"No AST given\");\n\n return yield* run(config, code, ast);\n});\n\nexport const transformFromAst: TransformFromAst = function transformFromAst(\n ast,\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transformFromAst' function expects a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transformFromAst' function will expect a callback. If you need to call it synchronously, please use 'transformFromAstSync'.\",\n // );\n return beginHiddenCallStack(transformFromAstRunner.sync)(ast, code, opts);\n }\n }\n\n beginHiddenCallStack(transformFromAstRunner.errback)(\n ast,\n code,\n opts,\n callback,\n );\n};\n\nexport function transformFromAstSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.sync)(...args);\n}\n\nexport function transformFromAstAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformFromAstRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,kBAAA,GAAAH,OAAA;AAgBA,MAAMI,sBAAsB,GAAGC,SAAMA,CAAC,CAAC,WACrCC,GAAY,EACZC,IAAY,EACZC,IAAqC,EACT;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,cAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,IAAI,CAACH,GAAG,EAAE,MAAM,IAAIK,KAAK,CAAC,cAAc,CAAC;EAEzC,OAAO,OAAO,IAAAC,WAAG,EAACH,MAAM,EAAEF,IAAI,EAAED,GAAG,CAAC;AACtC,CAAC,CAAC;AAEK,MAAMO,gBAAkC,GAAAC,OAAA,CAAAD,gBAAA,GAAG,SAASA,gBAAgBA,CACzEP,GAAG,EACHC,IAAI,EACJQ,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIR,IAAqC;EACzC,IAAIS,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBP,IAAI,GAAGU,SAAS;EAClB,CAAC,MAAM;IACLV,IAAI,GAAGO,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IASxB,OAAO,IAAAC,uCAAoB,EAACf,sBAAsB,CAACgB,IAAI,CAAC,CAACd,GAAG,EAAEC,IAAI,EAAEC,IAAI,CAAC;EAE7E;EAEA,IAAAW,uCAAoB,EAACf,sBAAsB,CAACiB,OAAO,CAAC,CAClDf,GAAG,EACHC,IAAI,EACJC,IAAI,EACJS,QACF,CAAC;AACH,CAAC;AAEM,SAASK,oBAAoBA,CAClC,GAAGC,IAAoD,EACvD;EACA,OAAO,IAAAJ,uCAAoB,EAACf,sBAAsB,CAACgB,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AACnE;AAEO,SAASC,qBAAqBA,CACnC,GAAGD,IAAqD,EACxD;EACA,OAAO,IAAAJ,uCAAoB,EAACf,sBAAsB,CAACqB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AACpE;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-browser.js b/node_modules/@babel/core/lib/transform-file-browser.js deleted file mode 100644 index 8576809..0000000 --- a/node_modules/@babel/core/lib/transform-file-browser.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFile = void 0; -exports.transformFileAsync = transformFileAsync; -exports.transformFileSync = transformFileSync; -const transformFile = exports.transformFile = function transformFile(filename, opts, callback) { - if (typeof opts === "function") { - callback = opts; - } - callback(new Error("Transforming files is not supported in browsers"), null); -}; -function transformFileSync() { - throw new Error("Transforming files is not supported in browsers"); -} -function transformFileAsync() { - return Promise.reject(new Error("Transforming files is not supported in browsers")); -} -0 && 0; - -//# sourceMappingURL=transform-file-browser.js.map diff --git a/node_modules/@babel/core/lib/transform-file-browser.js.map b/node_modules/@babel/core/lib/transform-file-browser.js.map deleted file mode 100644 index b632a42..0000000 --- a/node_modules/@babel/core/lib/transform-file-browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["transformFile","exports","filename","opts","callback","Error","transformFileSync","transformFileAsync","Promise","reject"],"sources":["../src/transform-file-browser.ts"],"sourcesContent":["/* c8 ignore start */\n\n// duplicated from transform-file so we do not have to import anything here\ntype TransformFile = {\n (filename: string, callback: (error: Error, file: null) => void): void;\n (\n filename: string,\n opts: any,\n callback: (error: Error, file: null) => void,\n ): void;\n};\n\nexport const transformFile: TransformFile = function transformFile(\n filename,\n opts,\n callback?: (error: Error, file: null) => void,\n) {\n if (typeof opts === \"function\") {\n callback = opts;\n }\n\n callback(new Error(\"Transforming files is not supported in browsers\"), null);\n};\n\nexport function transformFileSync(): never {\n throw new Error(\"Transforming files is not supported in browsers\");\n}\n\nexport function transformFileAsync() {\n return Promise.reject(\n new Error(\"Transforming files is not supported in browsers\"),\n );\n}\n"],"mappings":";;;;;;;;AAYO,MAAMA,aAA4B,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAASA,aAAaA,CAChEE,QAAQ,EACRC,IAAI,EACJC,QAA6C,EAC7C;EACA,IAAI,OAAOD,IAAI,KAAK,UAAU,EAAE;IAC9BC,QAAQ,GAAGD,IAAI;EACjB;EAEAC,QAAQ,CAAC,IAAIC,KAAK,CAAC,iDAAiD,CAAC,EAAE,IAAI,CAAC;AAC9E,CAAC;AAEM,SAASC,iBAAiBA,CAAA,EAAU;EACzC,MAAM,IAAID,KAAK,CAAC,iDAAiD,CAAC;AACpE;AAEO,SAASE,kBAAkBA,CAAA,EAAG;EACnC,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIJ,KAAK,CAAC,iDAAiD,CAC7D,CAAC;AACH;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js deleted file mode 100644 index ce7f9f9..0000000 --- a/node_modules/@babel/core/lib/transform-file.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFile = transformFile; -exports.transformFileAsync = transformFileAsync; -exports.transformFileSync = transformFileSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _index = require("./config/index.js"); -var _index2 = require("./transformation/index.js"); -var fs = require("./gensync-utils/fs.js"); -({}); -const transformFileRunner = _gensync()(function* (filename, opts) { - const options = Object.assign({}, opts, { - filename - }); - const config = yield* (0, _index.default)(options); - if (config === null) return null; - const code = yield* fs.readFile(filename, "utf8"); - return yield* (0, _index2.run)(config, code); -}); -function transformFile(...args) { - transformFileRunner.errback(...args); -} -function transformFileSync(...args) { - return transformFileRunner.sync(...args); -} -function transformFileAsync(...args) { - return transformFileRunner.async(...args); -} -0 && 0; - -//# sourceMappingURL=transform-file.js.map diff --git a/node_modules/@babel/core/lib/transform-file.js.map b/node_modules/@babel/core/lib/transform-file.js.map deleted file mode 100644 index 36a85b1..0000000 --- a/node_modules/@babel/core/lib/transform-file.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_index","_index2","fs","transformFileRunner","gensync","filename","opts","options","Object","assign","config","loadConfig","code","readFile","run","transformFile","args","errback","transformFileSync","sync","transformFileAsync","async"],"sources":["../src/transform-file.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\nimport * as fs from \"./gensync-utils/fs.ts\";\n\ntype transformFileBrowserType = typeof import(\"./transform-file-browser\");\ntype transformFileType = typeof import(\"./transform-file\");\n\n// Kind of gross, but essentially asserting that the exports of this module are the same as the\n// exports of transform-file-browser, since this file may be replaced at bundle time with\n// transform-file-browser.\n// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n({}) as any as transformFileBrowserType as transformFileType;\n\nconst transformFileRunner = gensync(function* (\n filename: string,\n opts?: InputOptions,\n): Handler {\n const options = { ...opts, filename };\n\n const config: ResolvedConfig | null = yield* loadConfig(options);\n if (config === null) return null;\n\n const code = yield* fs.readFile(filename, \"utf8\");\n return yield* run(config, code);\n});\n\n// @ts-expect-error TS doesn't detect that this signature is compatible\nexport function transformFile(\n filename: string,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n filename: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n): void;\nexport function transformFile(\n ...args: Parameters\n) {\n transformFileRunner.errback(...args);\n}\n\nexport function transformFileSync(\n ...args: Parameters\n) {\n return transformFileRunner.sync(...args);\n}\nexport function transformFileAsync(\n ...args: Parameters\n) {\n return transformFileRunner.async(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,EAAA,GAAAH,OAAA;AASA,CAAC,CAAC,CAAC;AAEH,MAAMI,mBAAmB,GAAGC,SAAMA,CAAC,CAAC,WAClCC,QAAgB,EAChBC,IAAmB,EACS;EAC5B,MAAMC,OAAO,GAAAC,MAAA,CAAAC,MAAA,KAAQH,IAAI;IAAED;EAAQ,EAAE;EAErC,MAAMK,MAA6B,GAAG,OAAO,IAAAC,cAAU,EAACJ,OAAO,CAAC;EAChE,IAAIG,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,MAAME,IAAI,GAAG,OAAOV,EAAE,CAACW,QAAQ,CAACR,QAAQ,EAAE,MAAM,CAAC;EACjD,OAAO,OAAO,IAAAS,WAAG,EAACJ,MAAM,EAAEE,IAAI,CAAC;AACjC,CAAC,CAAC;AAYK,SAASG,aAAaA,CAC3B,GAAGC,IAAoD,EACvD;EACAb,mBAAmB,CAACc,OAAO,CAAC,GAAGD,IAAI,CAAC;AACtC;AAEO,SAASE,iBAAiBA,CAC/B,GAAGF,IAAiD,EACpD;EACA,OAAOb,mBAAmB,CAACgB,IAAI,CAAC,GAAGH,IAAI,CAAC;AAC1C;AACO,SAASI,kBAAkBA,CAChC,GAAGJ,IAAkD,EACrD;EACA,OAAOb,mBAAmB,CAACkB,KAAK,CAAC,GAAGL,IAAI,CAAC;AAC3C;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform.js b/node_modules/@babel/core/lib/transform.js deleted file mode 100644 index 3b496db..0000000 --- a/node_modules/@babel/core/lib/transform.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transform = void 0; -exports.transformAsync = transformAsync; -exports.transformSync = transformSync; -function _gensync() { - const data = require("gensync"); - _gensync = function () { - return data; - }; - return data; -} -var _index = require("./config/index.js"); -var _index2 = require("./transformation/index.js"); -var _rewriteStackTrace = require("./errors/rewrite-stack-trace.js"); -const transformRunner = _gensync()(function* transform(code, opts) { - const config = yield* (0, _index.default)(opts); - if (config === null) return null; - return yield* (0, _index2.run)(config, code); -}); -const transform = exports.transform = function transform(code, optsOrCallback, maybeCallback) { - let opts; - let callback; - if (typeof optsOrCallback === "function") { - callback = optsOrCallback; - opts = undefined; - } else { - opts = optsOrCallback; - callback = maybeCallback; - } - if (callback === undefined) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code, opts); - } - (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code, opts, callback); -}; -function transformSync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args); -} -function transformAsync(...args) { - return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args); -} -0 && 0; - -//# sourceMappingURL=transform.js.map diff --git a/node_modules/@babel/core/lib/transform.js.map b/node_modules/@babel/core/lib/transform.js.map deleted file mode 100644 index 6f3e9f0..0000000 --- a/node_modules/@babel/core/lib/transform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_gensync","data","require","_index","_index2","_rewriteStackTrace","transformRunner","gensync","transform","code","opts","config","loadConfig","run","exports","optsOrCallback","maybeCallback","callback","undefined","beginHiddenCallStack","sync","errback","transformSync","args","transformAsync","async"],"sources":["../src/transform.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nimport loadConfig from \"./config/index.ts\";\nimport type { InputOptions, ResolvedConfig } from \"./config/index.ts\";\nimport { run } from \"./transformation/index.ts\";\n\nimport type { FileResult, FileResultCallback } from \"./transformation/index.ts\";\nimport { beginHiddenCallStack } from \"./errors/rewrite-stack-trace.ts\";\n\nexport type { FileResult } from \"./transformation/index.ts\";\n\ntype Transform = {\n (code: string, callback: FileResultCallback): void;\n (\n code: string,\n opts: InputOptions | undefined | null,\n callback: FileResultCallback,\n ): void;\n (code: string, opts?: InputOptions | null): FileResult | null;\n};\n\nconst transformRunner = gensync(function* transform(\n code: string,\n opts?: InputOptions,\n): Handler {\n const config: ResolvedConfig | null = yield* loadConfig(opts);\n if (config === null) return null;\n\n return yield* run(config, code);\n});\n\nexport const transform: Transform = function transform(\n code,\n optsOrCallback?: InputOptions | null | undefined | FileResultCallback,\n maybeCallback?: FileResultCallback,\n) {\n let opts: InputOptions | undefined | null;\n let callback: FileResultCallback | undefined;\n if (typeof optsOrCallback === \"function\") {\n callback = optsOrCallback;\n opts = undefined;\n } else {\n opts = optsOrCallback;\n callback = maybeCallback;\n }\n\n if (callback === undefined) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"Starting from Babel 8.0.0, the 'transform' function expects a callback. If you need to call it synchronously, please use 'transformSync'.\",\n );\n } else {\n // console.warn(\n // \"Starting from Babel 8.0.0, the 'transform' function will expect a callback. If you need to call it synchronously, please use 'transformSync'.\",\n // );\n return beginHiddenCallStack(transformRunner.sync)(code, opts);\n }\n }\n\n beginHiddenCallStack(transformRunner.errback)(code, opts, callback);\n};\n\nexport function transformSync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.sync)(...args);\n}\nexport function transformAsync(\n ...args: Parameters\n) {\n return beginHiddenCallStack(transformRunner.async)(...args);\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAE,MAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAGA,IAAAG,kBAAA,GAAAH,OAAA;AAcA,MAAMI,eAAe,GAAGC,SAAMA,CAAC,CAAC,UAAUC,SAASA,CACjDC,IAAY,EACZC,IAAmB,EACS;EAC5B,MAAMC,MAA6B,GAAG,OAAO,IAAAC,cAAU,EAACF,IAAI,CAAC;EAC7D,IAAIC,MAAM,KAAK,IAAI,EAAE,OAAO,IAAI;EAEhC,OAAO,OAAO,IAAAE,WAAG,EAACF,MAAM,EAAEF,IAAI,CAAC;AACjC,CAAC,CAAC;AAEK,MAAMD,SAAoB,GAAAM,OAAA,CAAAN,SAAA,GAAG,SAASA,SAASA,CACpDC,IAAI,EACJM,cAAqE,EACrEC,aAAkC,EAClC;EACA,IAAIN,IAAqC;EACzC,IAAIO,QAAwC;EAC5C,IAAI,OAAOF,cAAc,KAAK,UAAU,EAAE;IACxCE,QAAQ,GAAGF,cAAc;IACzBL,IAAI,GAAGQ,SAAS;EAClB,CAAC,MAAM;IACLR,IAAI,GAAGK,cAAc;IACrBE,QAAQ,GAAGD,aAAa;EAC1B;EAEA,IAAIC,QAAQ,KAAKC,SAAS,EAAE;IASxB,OAAO,IAAAC,uCAAoB,EAACb,eAAe,CAACc,IAAI,CAAC,CAACX,IAAI,EAAEC,IAAI,CAAC;EAEjE;EAEA,IAAAS,uCAAoB,EAACb,eAAe,CAACe,OAAO,CAAC,CAACZ,IAAI,EAAEC,IAAI,EAAEO,QAAQ,CAAC;AACrE,CAAC;AAEM,SAASK,aAAaA,CAC3B,GAAGC,IAA6C,EAChD;EACA,OAAO,IAAAJ,uCAAoB,EAACb,eAAe,CAACc,IAAI,CAAC,CAAC,GAAGG,IAAI,CAAC;AAC5D;AACO,SAASC,cAAcA,CAC5B,GAAGD,IAA8C,EACjD;EACA,OAAO,IAAAJ,uCAAoB,EAACb,eAAe,CAACmB,KAAK,CAAC,CAAC,GAAGF,IAAI,CAAC;AAC7D;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js deleted file mode 100644 index ec22ee3..0000000 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadBlockHoistPlugin; -function _traverse() { - const data = require("@babel/traverse"); - _traverse = function () { - return data; - }; - return data; -} -var _plugin = require("../config/plugin.js"); -let LOADED_PLUGIN; -const blockHoistPlugin = { - name: "internal.blockHoist", - visitor: { - Block: { - exit({ - node - }) { - node.body = performHoisting(node.body); - } - }, - SwitchCase: { - exit({ - node - }) { - node.consequent = performHoisting(node.consequent); - } - } - } -}; -function performHoisting(body) { - let max = Math.pow(2, 30) - 1; - let hasChange = false; - for (let i = 0; i < body.length; i++) { - const n = body[i]; - const p = priority(n); - if (p > max) { - hasChange = true; - break; - } - max = p; - } - if (!hasChange) return body; - return stableSort(body.slice()); -} -function loadBlockHoistPlugin() { - if (!LOADED_PLUGIN) { - LOADED_PLUGIN = new _plugin.default(Object.assign({}, blockHoistPlugin, { - visitor: _traverse().default.explode(blockHoistPlugin.visitor) - }), {}); - } - return LOADED_PLUGIN; -} -function priority(bodyNode) { - const priority = bodyNode == null ? void 0 : bodyNode._blockHoist; - if (priority == null) return 1; - if (priority === true) return 2; - return priority; -} -function stableSort(body) { - const buckets = Object.create(null); - for (let i = 0; i < body.length; i++) { - const n = body[i]; - const p = priority(n); - const bucket = buckets[p] || (buckets[p] = []); - bucket.push(n); - } - const keys = Object.keys(buckets).map(k => +k).sort((a, b) => b - a); - let index = 0; - for (const key of keys) { - const bucket = buckets[key]; - for (const n of bucket) { - body[index++] = n; - } - } - return body; -} -0 && 0; - -//# sourceMappingURL=block-hoist-plugin.js.map diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map deleted file mode 100644 index 028e36a..0000000 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_traverse","data","require","_plugin","LOADED_PLUGIN","blockHoistPlugin","name","visitor","Block","exit","node","body","performHoisting","SwitchCase","consequent","max","Math","pow","hasChange","i","length","n","p","priority","stableSort","slice","loadBlockHoistPlugin","Plugin","Object","assign","traverse","explode","bodyNode","_blockHoist","buckets","create","bucket","push","keys","map","k","sort","a","b","index","key"],"sources":["../../src/transformation/block-hoist-plugin.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type { Statement } from \"@babel/types\";\nimport type { PluginObject } from \"../config/index.ts\";\nimport Plugin from \"../config/plugin.ts\";\n\nlet LOADED_PLUGIN: Plugin | void;\n\nconst blockHoistPlugin: PluginObject = {\n /**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Default node position\n * - 2 Priority over normal nodes\n * - 3 We want this to be at the **very** top\n * - 4 Reserved for the helpers used to implement module imports.\n */\n\n name: \"internal.blockHoist\",\n\n visitor: {\n Block: {\n exit({ node }) {\n node.body = performHoisting(node.body);\n },\n },\n SwitchCase: {\n exit({ node }) {\n // In case statements, hoisting is difficult to perform correctly due to\n // functions that are declared and referenced in different blocks.\n // Nevertheless, hoisting the statements *inside* of each case should at\n // least mitigate the failure cases.\n node.consequent = performHoisting(node.consequent);\n },\n },\n },\n};\n\nfunction performHoisting(body: Statement[]): Statement[] {\n // Largest SMI\n let max = 2 ** 30 - 1;\n let hasChange = false;\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n if (p > max) {\n hasChange = true;\n break;\n }\n max = p;\n }\n if (!hasChange) return body;\n\n // My kingdom for a stable sort!\n return stableSort(body.slice());\n}\n\nexport default function loadBlockHoistPlugin(): Plugin {\n if (!LOADED_PLUGIN) {\n // cache the loaded blockHoist plugin plugin\n LOADED_PLUGIN = new Plugin(\n {\n ...blockHoistPlugin,\n visitor: traverse.explode(blockHoistPlugin.visitor),\n },\n {},\n );\n }\n\n return LOADED_PLUGIN;\n}\n\nfunction priority(bodyNode: Statement & { _blockHoist?: number | true }) {\n const priority = bodyNode?._blockHoist;\n if (priority == null) return 1;\n if (priority === true) return 2;\n return priority;\n}\n\nfunction stableSort(body: Statement[]) {\n // By default, we use priorities of 0-4.\n const buckets = Object.create(null);\n\n // By collecting into buckets, we can guarantee a stable sort.\n for (let i = 0; i < body.length; i++) {\n const n = body[i];\n const p = priority(n);\n\n // In case some plugin is setting an unexpected priority.\n const bucket = buckets[p] || (buckets[p] = []);\n bucket.push(n);\n }\n\n // Sort our keys in descending order. Keys are unique, so we don't have to\n // worry about stability.\n const keys = Object.keys(buckets)\n .map(k => +k)\n .sort((a, b) => b - a);\n\n let index = 0;\n for (const key of keys) {\n const bucket = buckets[key];\n for (const n of bucket) {\n body[index++] = n;\n }\n }\n return body;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,OAAA,GAAAD,OAAA;AAEA,IAAIE,aAA4B;AAEhC,MAAMC,gBAA8B,GAAG;EAarCC,IAAI,EAAE,qBAAqB;EAE3BC,OAAO,EAAE;IACPC,KAAK,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ACtC,IAAIV,QAAQ,IAAI,IAAI,EAAE,OAAO,CAAC;EAC9B,IAAIA,QAAQ,KAAK,IAAI,EAAE,OAAO,CAAC;EAC/B,OAAOA,QAAQ;AACjB;AAEA,SAASC,UAAUA,CAACb,IAAiB,EAAE;EAErC,MAAMuB,OAAO,GAAGN,MAAM,CAACO,MAAM,CAAC,IAAI,CAAC;EAGnC,KAAK,IAAIhB,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGR,IAAI,CAACS,MAAM,EAAED,CAAC,EAAE,EAAE;IACpC,MAAME,CAAC,GAAGV,IAAI,CAACQ,CAAC,CAAC;IACjB,MAAMG,CAAC,GAAGC,QAAQ,CAACF,CAAC,CAAC;IAGrB,MAAMe,MAAM,GAAGF,OAAO,CAACZ,CAAC,CAAC,KAAKY,OAAO,CAACZ,CAAC,CAAC,GAAG,EAAE,CAAC;IAC9Cc,MAAM,CAACC,IAAI,CAAChB,CAAC,CAAC;EAChB;EAIA,MAAMiB,IAAI,GAAGV,MAAM,CAACU,IAAI,CAACJ,OAAO,CAAC,CAC9BK,GAAG,CAACC,CAAC,IAAI,CAACA,CAAC,CAAC,CACZC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,GAAGD,CAAC,CAAC;EAExB,IAAIE,KAAK,GAAG,CAAC;EACb,KAAK,MAAMC,GAAG,IAAIP,IAAI,EAAE;IACtB,MAAMF,MAAM,GAAGF,OAAO,CAACW,GAAG,CAAC;IAC3B,KAAK,MAAMxB,CAAC,IAAIe,MAAM,EAAE;MACtBzB,IAAI,CAACiC,KAAK,EAAE,CAAC,GAAGvB,CAAC;IACnB;EACF;EACA,OAAOV,IAAI;AACb;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs b/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs deleted file mode 100644 index a532ff1..0000000 --- a/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs +++ /dev/null @@ -1,4 +0,0 @@ -exports.getModuleName = () => require("@babel/helper-module-transforms").getModuleName; -0 && 0; - -//# sourceMappingURL=babel-7-helpers.cjs.map diff --git a/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs.map b/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs.map deleted file mode 100644 index 241ae7e..0000000 --- a/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["exports","getModuleName","require"],"sources":["../../../src/transformation/file/babel-7-helpers.cjs"],"sourcesContent":["// TODO(Babel 8): Remove this file\n\nif (!process.env.BABEL_8_BREAKING) {\n exports.getModuleName = () =>\n require(\"@babel/helper-module-transforms\").getModuleName;\n} else if (process.env.IS_PUBLISH) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n"],"mappings":"AAGEA,OAAO,CAACC,aAAa,GAAG,MACtBC,OAAO,CAAC,iCAAiC,CAAC,CAACD,aAAa;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/file.js b/node_modules/@babel/core/lib/transformation/file/file.js deleted file mode 100644 index a17be42..0000000 --- a/node_modules/@babel/core/lib/transformation/file/file.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -function helpers() { - const data = require("@babel/helpers"); - helpers = function () { - return data; - }; - return data; -} -function _traverse() { - const data = require("@babel/traverse"); - _traverse = function () { - return data; - }; - return data; -} -function _codeFrame() { - const data = require("@babel/code-frame"); - _codeFrame = function () { - return data; - }; - return data; -} -function _t() { - const data = require("@babel/types"); - _t = function () { - return data; - }; - return data; -} -function _semver() { - const data = require("semver"); - _semver = function () { - return data; - }; - return data; -} -var _babel7Helpers = require("./babel-7-helpers.cjs"); -const { - cloneNode, - interpreterDirective, - traverseFast -} = _t(); -class File { - constructor(options, { - code, - ast, - inputMap - }) { - this._map = new Map(); - this.opts = void 0; - this.declarations = {}; - this.path = void 0; - this.ast = void 0; - this.scope = void 0; - this.metadata = {}; - this.code = ""; - this.inputMap = void 0; - this.hub = { - file: this, - getCode: () => this.code, - getScope: () => this.scope, - addHelper: this.addHelper.bind(this), - buildError: this.buildCodeFrameError.bind(this) - }; - this.opts = options; - this.code = code; - this.ast = ast; - this.inputMap = inputMap; - this.path = _traverse().NodePath.get({ - hub: this.hub, - parentPath: null, - parent: this.ast, - container: this.ast, - key: "program" - }).setContext(); - this.scope = this.path.scope; - } - get shebang() { - const { - interpreter - } = this.path.node; - return interpreter ? interpreter.value : ""; - } - set shebang(value) { - if (value) { - this.path.get("interpreter").replaceWith(interpreterDirective(value)); - } else { - this.path.get("interpreter").remove(); - } - } - set(key, val) { - if (key === "helpersNamespace") { - throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'."); - } - this._map.set(key, val); - } - get(key) { - return this._map.get(key); - } - has(key) { - return this._map.has(key); - } - availableHelper(name, versionRange) { - if (helpers().isInternal(name)) return false; - let minVersion; - try { - minVersion = helpers().minVersion(name); - } catch (err) { - if (err.code !== "BABEL_HELPER_UNKNOWN") throw err; - return false; - } - if (typeof versionRange !== "string") return true; - if (_semver().valid(versionRange)) versionRange = `^${versionRange}`; - return !_semver().intersects(`<${minVersion}`, versionRange) && !_semver().intersects(`>=8.0.0`, versionRange); - } - addHelper(name) { - if (helpers().isInternal(name)) { - throw new Error("Cannot use internal helper " + name); - } - return this._addHelper(name); - } - _addHelper(name) { - const declar = this.declarations[name]; - if (declar) return cloneNode(declar); - const generator = this.get("helperGenerator"); - if (generator) { - const res = generator(name); - if (res) return res; - } - helpers().minVersion(name); - const uid = this.declarations[name] = this.scope.generateUidIdentifier(name); - const dependencies = {}; - for (const dep of helpers().getDependencies(name)) { - dependencies[dep] = this._addHelper(dep); - } - const { - nodes, - globals - } = helpers().get(name, dep => dependencies[dep], uid.name, Object.keys(this.scope.getAllBindings())); - globals.forEach(name => { - if (this.path.scope.hasBinding(name, true)) { - this.path.scope.rename(name); - } - }); - nodes.forEach(node => { - node._compact = true; - }); - const added = this.path.unshiftContainer("body", nodes); - for (const path of added) { - if (path.isVariableDeclaration()) this.scope.registerDeclaration(path); - } - return uid; - } - buildCodeFrameError(node, msg, _Error = SyntaxError) { - let loc = node == null ? void 0 : node.loc; - if (!loc && node) { - traverseFast(node, function (node) { - if (node.loc) { - loc = node.loc; - return traverseFast.stop; - } - }); - let txt = "This is an error on an internal node. Probably an internal error."; - if (loc) txt += " Location has been estimated."; - msg += ` (${txt})`; - } - if (loc) { - const { - highlightCode = true - } = this.opts; - msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, { - start: { - line: loc.start.line, - column: loc.start.column + 1 - }, - end: loc.end && loc.start.line === loc.end.line ? { - line: loc.end.line, - column: loc.end.column + 1 - } : undefined - }, { - highlightCode - }); - } - return new _Error(msg); - } -} -exports.default = File; -File.prototype.addImport = function addImport() { - throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'."); -}; -File.prototype.addTemplateObject = function addTemplateObject() { - throw new Error("This function has been moved into the template literal transform itself."); -}; -File.prototype.getModuleName = function getModuleName() { - return _babel7Helpers.getModuleName()(this.opts, this.opts); -}; -0 && 0; - -//# sourceMappingURL=file.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/file.js.map b/node_modules/@babel/core/lib/transformation/file/file.js.map deleted file mode 100644 index f20e621..0000000 --- a/node_modules/@babel/core/lib/transformation/file/file.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["helpers","data","require","_traverse","_codeFrame","_t","_semver","_babel7Helpers","cloneNode","interpreterDirective","traverseFast","File","constructor","options","code","ast","inputMap","_map","Map","opts","declarations","path","scope","metadata","hub","file","getCode","getScope","addHelper","bind","buildError","buildCodeFrameError","NodePath","get","parentPath","parent","container","key","setContext","shebang","interpreter","node","value","replaceWith","remove","set","val","Error","has","availableHelper","name","versionRange","isInternal","minVersion","err","semver","valid","intersects","_addHelper","declar","generator","res","uid","generateUidIdentifier","dependencies","dep","getDependencies","nodes","globals","Object","keys","getAllBindings","forEach","hasBinding","rename","_compact","added","unshiftContainer","isVariableDeclaration","registerDeclaration","msg","_Error","SyntaxError","loc","stop","txt","highlightCode","codeFrameColumns","start","line","column","end","undefined","exports","default","prototype","addImport","addTemplateObject","getModuleName","babel7"],"sources":["../../../src/transformation/file/file.ts"],"sourcesContent":["import * as helpers from \"@babel/helpers\";\nimport { NodePath } from \"@babel/traverse\";\nimport type { HubInterface, Scope } from \"@babel/traverse\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport { cloneNode, interpreterDirective, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport semver from \"semver\";\n\nimport type { NormalizedFile } from \"../normalize-file.ts\";\n\n// @ts-expect-error This file is `any`\nimport babel7 from \"./babel-7-helpers.cjs\" with { if: \"!process.env.BABEL_8_BREAKING && (!USE_ESM || IS_STANDALONE)\" };\nimport type { ResolvedOptions } from \"../../config/validation/options.ts\";\nimport type { SourceMapConverter } from \"convert-source-map\";\n\nexport default class File {\n _map = new Map();\n opts: ResolvedOptions;\n declarations: Record = {};\n path: NodePath;\n ast: t.File;\n scope: Scope;\n metadata: Record = {};\n code: string = \"\";\n inputMap: SourceMapConverter;\n\n hub: HubInterface & { file: File } = {\n // keep it for the usage in babel-core, ex: path.hub.file.opts.filename\n file: this,\n getCode: () => this.code,\n getScope: () => this.scope,\n addHelper: this.addHelper.bind(this),\n buildError: this.buildCodeFrameError.bind(this),\n };\n\n constructor(\n options: ResolvedOptions,\n { code, ast, inputMap }: NormalizedFile,\n ) {\n this.opts = options;\n this.code = code;\n this.ast = ast;\n this.inputMap = inputMap;\n\n this.path = NodePath.get({\n hub: this.hub,\n parentPath: null,\n parent: this.ast,\n container: this.ast,\n key: \"program\",\n }).setContext() as NodePath;\n this.scope = this.path.scope;\n }\n\n /**\n * Provide backward-compatible access to the interpreter directive handling\n * in Babel 6.x. If you are writing a plugin for Babel 7.x, it would be\n * best to use 'program.interpreter' directly.\n */\n get shebang(): string {\n const { interpreter } = this.path.node;\n return interpreter ? interpreter.value : \"\";\n }\n set shebang(value: string) {\n if (value) {\n this.path.get(\"interpreter\").replaceWith(interpreterDirective(value));\n } else {\n this.path.get(\"interpreter\").remove();\n }\n }\n\n set(key: unknown, val: unknown) {\n if (!process.env.BABEL_8_BREAKING) {\n if (key === \"helpersNamespace\") {\n throw new Error(\n \"Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.\" +\n \"If you are using @babel/plugin-external-helpers you will need to use a newer \" +\n \"version than the one you currently have installed. \" +\n \"If you have your own implementation, you'll want to explore using 'helperGenerator' \" +\n \"alongside 'file.availableHelper()'.\",\n );\n }\n }\n\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n has(key: unknown): boolean {\n return this._map.has(key);\n }\n\n /**\n * Check if a given helper is available in @babel/core's helper list.\n *\n * This _also_ allows you to pass a Babel version specifically. If the\n * helper exists, but was not available for the full given range, it will be\n * considered unavailable.\n */\n availableHelper(name: string, versionRange?: string | null): boolean {\n if (helpers.isInternal(name)) return false;\n\n let minVersion;\n try {\n minVersion = helpers.minVersion(name);\n } catch (err) {\n if (err.code !== \"BABEL_HELPER_UNKNOWN\") throw err;\n\n return false;\n }\n\n if (typeof versionRange !== \"string\") return true;\n\n // semver.intersects() has some surprising behavior with comparing ranges\n // with pre-release versions. We add '^' to ensure that we are always\n // comparing ranges with ranges, which sidesteps this logic.\n // For example:\n //\n // semver.intersects(`<7.0.1`, \"7.0.0-beta.0\") // false - surprising\n // semver.intersects(`<7.0.1`, \"^7.0.0-beta.0\") // true - expected\n //\n // This is because the first falls back to\n //\n // semver.satisfies(\"7.0.0-beta.0\", `<7.0.1`) // false - surprising\n //\n // and this fails because a prerelease version can only satisfy a range\n // if it is a prerelease within the same major/minor/patch range.\n //\n // Note: If this is found to have issues, please also revisit the logic in\n // transform-runtime's definitions.js file.\n if (semver.valid(versionRange)) versionRange = `^${versionRange}`;\n\n if (process.env.BABEL_8_BREAKING) {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=9.0.0`, versionRange)\n );\n } else {\n return (\n !semver.intersects(`<${minVersion}`, versionRange) &&\n !semver.intersects(`>=8.0.0`, versionRange)\n );\n }\n }\n\n addHelper(name: string): t.Identifier {\n if (helpers.isInternal(name)) {\n throw new Error(\"Cannot use internal helper \" + name);\n }\n return this._addHelper(name);\n }\n\n _addHelper(name: string): t.Identifier {\n const declar = this.declarations[name];\n if (declar) return cloneNode(declar);\n\n const generator = this.get(\"helperGenerator\");\n if (generator) {\n const res = generator(name);\n if (res) return res;\n }\n\n // make sure that the helper exists\n helpers.minVersion(name);\n\n const uid = (this.declarations[name] =\n this.scope.generateUidIdentifier(name));\n\n const dependencies: Record = {};\n for (const dep of helpers.getDependencies(name)) {\n dependencies[dep] = this._addHelper(dep);\n }\n\n const { nodes, globals } = helpers.get(\n name,\n dep => dependencies[dep],\n uid.name,\n Object.keys(this.scope.getAllBindings()),\n );\n\n globals.forEach(name => {\n if (this.path.scope.hasBinding(name, true /* noGlobals */)) {\n this.path.scope.rename(name);\n }\n });\n\n nodes.forEach(node => {\n // @ts-expect-error Fixme: document _compact node property\n node._compact = true;\n });\n\n const added = this.path.unshiftContainer(\"body\", nodes);\n // TODO: NodePath#unshiftContainer should automatically register new\n // bindings.\n for (const path of added) {\n if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);\n }\n\n return uid;\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error: typeof Error = SyntaxError,\n ): Error {\n let loc = node?.loc;\n\n if (!loc && node) {\n traverseFast(node, function (node) {\n if (node.loc) {\n loc = node.loc;\n return traverseFast.stop;\n }\n });\n\n let txt =\n \"This is an error on an internal node. Probably an internal error.\";\n if (loc) txt += \" Location has been estimated.\";\n\n msg += ` (${txt})`;\n }\n\n if (loc) {\n const { highlightCode = true } = this.opts;\n\n msg +=\n \"\\n\" +\n codeFrameColumns(\n this.code,\n {\n start: {\n line: loc.start.line,\n column: loc.start.column + 1,\n },\n end:\n loc.end && loc.start.line === loc.end.line\n ? {\n line: loc.end.line,\n column: loc.end.column + 1,\n }\n : undefined,\n },\n { highlightCode },\n );\n }\n\n return new _Error(msg);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-expect-error Babel 7\n File.prototype.addImport = function addImport() {\n throw new Error(\n \"This API has been removed. If you're looking for this \" +\n \"functionality in Babel 7, you should import the \" +\n \"'@babel/helper-module-imports' module and use the functions exposed \" +\n \" from that module, such as 'addNamed' or 'addDefault'.\",\n );\n };\n // @ts-expect-error Babel 7\n File.prototype.addTemplateObject = function addTemplateObject() {\n throw new Error(\n \"This function has been moved into the template literal transform itself.\",\n );\n };\n\n if (!USE_ESM || IS_STANDALONE) {\n // @ts-expect-error Babel 7\n File.prototype.getModuleName = function getModuleName() {\n return babel7.getModuleName()(this.opts, this.opts);\n };\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,UAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,GAAA;EAAA,MAAAJ,IA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G,SAASA,SAASA,CAAA,EAAG;EAC9C,MAAM,IAAIjD,KAAK,CACb,wDAAwD,GACtD,kDAAkD,GAClD,sEAAsE,GACtE,wDACJ,CAAC;AACH,CAAC;AAEDpC,IAAI,CAACoF,SAAS,CAACE,iBAAiB,GAAG,SAASA,iBAAiBA,CAAA,EAAG;EAC9D,MAAM,IAAIlD,KAAK,CACb,0EACF,CAAC;AACH,CAAC;AAICpC,IAAI,CAACoF,SAAS,CAACG,aAAa,GAAG,SAASA,aAAaA,CAAA,EAAG;EACtD,OAAOC,cAAM,CAACD,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC/E,IAAI,EAAE,IAAI,CAACA,IAAI,CAAC;AACrD,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js deleted file mode 100644 index 10b5b29..0000000 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateCode; -function _convertSourceMap() { - const data = require("convert-source-map"); - _convertSourceMap = function () { - return data; - }; - return data; -} -function _generator() { - const data = require("@babel/generator"); - _generator = function () { - return data; - }; - return data; -} -var _mergeMap = require("./merge-map.js"); -function generateCode(pluginPasses, file) { - const { - opts, - ast, - code, - inputMap - } = file; - const { - generatorOpts - } = opts; - generatorOpts.inputSourceMap = inputMap == null ? void 0 : inputMap.toObject(); - const results = []; - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - generatorOverride - } = plugin; - if (generatorOverride) { - const result = generatorOverride(ast, generatorOpts, code, _generator().default); - if (result !== undefined) results.push(result); - } - } - } - let result; - if (results.length === 0) { - result = (0, _generator().default)(ast, generatorOpts, code); - } else if (results.length === 1) { - result = results[0]; - if (typeof result.then === "function") { - throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); - } - } else { - throw new Error("More than one plugin attempted to override codegen."); - } - let { - code: outputCode, - decodedMap: outputMap = result.map - } = result; - if (result.__mergedMap) { - outputMap = Object.assign({}, result.map); - } else { - if (outputMap) { - if (inputMap) { - outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName); - } else { - outputMap = result.map; - } - } - } - if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { - outputCode += "\n" + _convertSourceMap().fromObject(outputMap).toComment(); - } - if (opts.sourceMaps === "inline") { - outputMap = null; - } - return { - outputCode, - outputMap - }; -} -0 && 0; - -//# sourceMappingURL=generate.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js.map b/node_modules/@babel/core/lib/transformation/file/generate.js.map deleted file mode 100644 index d857215..0000000 --- a/node_modules/@babel/core/lib/transformation/file/generate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_convertSourceMap","data","require","_generator","_mergeMap","generateCode","pluginPasses","file","opts","ast","code","inputMap","generatorOpts","inputSourceMap","toObject","results","plugins","plugin","generatorOverride","result","generate","undefined","push","length","then","Error","outputCode","decodedMap","outputMap","map","__mergedMap","Object","assign","mergeSourceMap","sourceFileName","sourceMaps","convertSourceMap","fromObject","toComment"],"sources":["../../../src/transformation/file/generate.ts"],"sourcesContent":["import type { PluginPasses } from \"../../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { GeneratorResult } from \"@babel/generator\";\nimport generate from \"@babel/generator\";\n\nimport type File from \"./file.ts\";\nimport mergeSourceMap from \"./merge-map.ts\";\n\nexport default function generateCode(\n pluginPasses: PluginPasses,\n file: File,\n): {\n outputCode: string;\n outputMap: GeneratorResult[\"map\"] | null;\n} {\n const { opts, ast, code, inputMap } = file;\n const { generatorOpts } = opts;\n\n generatorOpts.inputSourceMap = inputMap?.toObject();\n\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { generatorOverride } = plugin;\n if (generatorOverride) {\n const result = generatorOverride(ast, generatorOpts, code, generate);\n\n if (result !== undefined) results.push(result);\n }\n }\n }\n\n let result;\n if (results.length === 0) {\n result = generate(ast, generatorOpts, code);\n } else if (results.length === 1) {\n result = results[0];\n\n // @ts-expect-error check if generatorOverride returned a promise\n if (typeof result.then === \"function\") {\n throw new Error(\n `You appear to be using an async codegen plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, ` +\n `you may need to upgrade your @babel/core version.`,\n );\n }\n } else {\n throw new Error(\"More than one plugin attempted to override codegen.\");\n }\n\n // Decoded maps are faster to merge, so we attempt to get use the decodedMap\n // first. But to preserve backwards compat with older Generator, we'll fall\n // back to the encoded map.\n let { code: outputCode, decodedMap: outputMap = result.map } = result;\n\n // @ts-expect-error For backwards compat.\n if (result.__mergedMap) {\n /**\n * @see mergeSourceMap\n */\n outputMap = { ...result.map };\n } else {\n if (outputMap) {\n if (inputMap) {\n // mergeSourceMap returns an encoded map\n outputMap = mergeSourceMap(\n inputMap.toObject(),\n outputMap,\n generatorOpts.sourceFileName,\n );\n } else {\n // We cannot output a decoded map, so retrieve the encoded form. Because\n // the decoded form is free, it's fine to prioritize decoded first.\n outputMap = result.map;\n }\n }\n }\n\n if (opts.sourceMaps === \"inline\" || opts.sourceMaps === \"both\") {\n outputCode += \"\\n\" + convertSourceMap.fromObject(outputMap).toComment();\n }\n\n if (opts.sourceMaps === \"inline\") {\n outputMap = null;\n }\n\n // @ts-expect-error outputMap must be an EncodedSourceMap or null\n return { outputCode, outputMap };\n}\n"],"mappings":";;;;;;AACA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,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CAACU;EAAI,CAAC,GAAGV,MAAM;EAGrE,IAAIA,MAAM,CAACW,WAAW,EAAE;IAItBF,SAAS,GAAAG,MAAA,CAAAC,MAAA,KAAQb,MAAM,CAACU,GAAG,CAAE;EAC/B,CAAC,MAAM;IACL,IAAID,SAAS,EAAE;MACb,IAAIjB,QAAQ,EAAE;QAEZiB,SAAS,GAAG,IAAAK,iBAAc,EACxBtB,QAAQ,CAACG,QAAQ,CAAC,CAAC,EACnBc,SAAS,EACThB,aAAa,CAACsB,cAChB,CAAC;MACH,CAAC,MAAM;QAGLN,SAAS,GAAGT,MAAM,CAACU,GAAG;MACxB;IACF;EACF;EAEA,IAAIrB,IAAI,CAAC2B,UAAU,KAAK,QAAQ,IAAI3B,IAAI,CAAC2B,UAAU,KAAK,MAAM,EAAE;IAC9DT,UAAU,IAAI,IAAI,GAAGU,kBAAeA,CAAC,CAACC,UAAU,CAACT,SAAS,CAAC,CAACU,SAAS,CAAC,CAAC;EACzE;EAEA,IAAI9B,IAAI,CAAC2B,UAAU,KAAK,QAAQ,EAAE;IAChCP,SAAS,GAAG,IAAI;EAClB;EAGA,OAAO;IAAEF,UAAU;IAAEE;EAAU,CAAC;AAClC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js b/node_modules/@babel/core/lib/transformation/file/merge-map.js deleted file mode 100644 index 1b60d5c..0000000 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mergeSourceMap; -function _remapping() { - const data = require("@jridgewell/remapping"); - _remapping = function () { - return data; - }; - return data; -} -function mergeSourceMap(inputMap, map, sourceFileName) { - const source = sourceFileName.replace(/\\/g, "/"); - let found = false; - const result = _remapping()(rootless(map), (s, ctx) => { - if (s === source && !found) { - found = true; - ctx.source = ""; - return rootless(inputMap); - } - return null; - }); - if (typeof inputMap.sourceRoot === "string") { - result.sourceRoot = inputMap.sourceRoot; - } - return Object.assign({}, result); -} -function rootless(map) { - return Object.assign({}, map, { - sourceRoot: null - }); -} -0 && 0; - -//# sourceMappingURL=merge-map.js.map diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js.map b/node_modules/@babel/core/lib/transformation/file/merge-map.js.map deleted file mode 100644 index 5afc533..0000000 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_remapping","data","require","mergeSourceMap","inputMap","map","sourceFileName","source","replace","found","result","remapping","rootless","s","ctx","sourceRoot","Object","assign"],"sources":["../../../src/transformation/file/merge-map.ts"],"sourcesContent":["type SourceMap = any;\nimport remapping from \"@jridgewell/remapping\";\n\nexport default function mergeSourceMap(\n inputMap: SourceMap,\n map: SourceMap,\n sourceFileName: string,\n): SourceMap {\n // On win32 machines, the sourceFileName uses backslash paths like\n // `C:\\foo\\bar.js`. But sourcemaps are always posix paths, so we need to\n // normalize to regular slashes before we can merge (else we won't find the\n // source associated with our input map).\n // This mirrors code done while generating the output map at\n // https://github.com/babel/babel/blob/5c2fcadc9ae34fd20dd72b1111d5cf50476d700d/packages/babel-generator/src/source-map.ts#L102\n const source = sourceFileName.replace(/\\\\/g, \"/\");\n\n // Prevent an infinite recursion if one of the input map's sources has the\n // same resolved path as the input map. In the case, it would keep find the\n // input map, then get it's sources which will include a path like the input\n // map, on and on.\n let found = false;\n const result = remapping(rootless(map), (s, ctx) => {\n if (s === source && !found) {\n found = true;\n // We empty the source location, which will prevent the sourcemap from\n // becoming relative to the input's location. Eg, if we're transforming a\n // file 'foo/bar.js', and it is a transformation of a `baz.js` file in the\n // same directory, the expected output is just `baz.js`. Without this step,\n // it would become `foo/baz.js`.\n ctx.source = \"\";\n\n return rootless(inputMap);\n }\n\n return null;\n });\n\n if (typeof inputMap.sourceRoot === \"string\") {\n result.sourceRoot = inputMap.sourceRoot;\n }\n\n // remapping returns a SourceMap class type, but this breaks code downstream in\n // @babel/traverse and @babel/types that relies on data being plain objects.\n // When it encounters the sourcemap type it outputs a \"don't know how to turn\n // this value into a node\" error. As a result, we are converting the merged\n // sourcemap to a plain js object.\n return { ...result };\n}\n\nfunction rootless(map: SourceMap): SourceMap {\n return {\n ...map,\n\n // This is a bit hack. Remapping will create absolute sources in our\n // sourcemap, but we want to maintain sources relative to the sourceRoot.\n // We'll re-add the sourceRoot after remapping.\n sourceRoot: null,\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEe,SAASE,cAAcA,CACpCC,QAAmB,EACnBC,GAAc,EACdC,cAAsB,EACX;EAOX,MAAMC,MAAM,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EAMjD,IAAIC,KAAK,GAAG,KAAK;EACjB,MAAMC,MAAM,GAAGC,WAAQA,CAAC,CAACC,QAAQ,CAACP,GAAG,CAAC,EAAE,CAACQ,CAAC,EAAEC,GAAG,KAAK;IAClD,IAAID,CAAC,KAAKN,MAAM,IAAI,CAACE,KAAK,EAAE;MAC1BA,KAAK,GAAG,IAAI;MAMZK,GAAG,CAACP,MAAM,GAAG,EAAE;MAEf,OAAOK,QAAQ,CAACR,QAAQ,CAAC;IAC3B;IAEA,OAAO,IAAI;EACb,CAAC,CAAC;EAEF,IAAI,OAAOA,QAAQ,CAACW,UAAU,KAAK,QAAQ,EAAE;IAC3CL,MAAM,CAACK,UAAU,GAAGX,QAAQ,CAACW,UAAU;EACzC;EAOA,OAAAC,MAAA,CAAAC,MAAA,KAAYP,MAAM;AACpB;AAEA,SAASE,QAAQA,CAACP,GAAc,EAAa;EAC3C,OAAAW,MAAA,CAAAC,MAAA,KACKZ,GAAG;IAKNU,UAAU,EAAE;EAAI;AAEpB;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/index.js b/node_modules/@babel/core/lib/transformation/index.js deleted file mode 100644 index 3e4f5a5..0000000 --- a/node_modules/@babel/core/lib/transformation/index.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = run; -function _traverse() { - const data = require("@babel/traverse"); - _traverse = function () { - return data; - }; - return data; -} -var _pluginPass = require("./plugin-pass.js"); -var _blockHoistPlugin = require("./block-hoist-plugin.js"); -var _normalizeOpts = require("./normalize-opts.js"); -var _normalizeFile = require("./normalize-file.js"); -var _generate = require("./file/generate.js"); -var _deepArray = require("../config/helpers/deep-array.js"); -var _async = require("../gensync-utils/async.js"); -function* run(config, code, ast) { - const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); - const opts = file.opts; - try { - yield* transformFile(file, config.passes); - } catch (e) { - var _opts$filename; - e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown file"}: ${e.message}`; - if (!e.code) { - e.code = "BABEL_TRANSFORM_ERROR"; - } - throw e; - } - let outputCode, outputMap; - try { - if (opts.code !== false) { - ({ - outputCode, - outputMap - } = (0, _generate.default)(config.passes, file)); - } - } catch (e) { - var _opts$filename2; - e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown file"}: ${e.message}`; - if (!e.code) { - e.code = "BABEL_GENERATE_ERROR"; - } - throw e; - } - return { - metadata: file.metadata, - options: opts, - ast: opts.ast === true ? file.ast : null, - code: outputCode === undefined ? null : outputCode, - map: outputMap === undefined ? null : outputMap, - sourceType: file.ast.program.sourceType, - externalDependencies: (0, _deepArray.flattenToSet)(config.externalDependencies) - }; -} -function* transformFile(file, pluginPasses) { - const async = yield* (0, _async.isAsync)(); - for (const pluginPairs of pluginPasses) { - const passPairs = []; - const passes = []; - const visitors = []; - for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) { - const pass = new _pluginPass.default(file, plugin.key, plugin.options, async); - passPairs.push([plugin, pass]); - passes.push(pass); - visitors.push(plugin.visitor); - } - for (const [plugin, pass] of passPairs) { - if (plugin.pre) { - const fn = (0, _async.maybeAsync)(plugin.pre, `You appear to be using an async plugin/preset, but Babel has been called synchronously`); - yield* fn.call(pass, file); - } - } - const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); - (0, _traverse().default)(file.ast, visitor, file.scope); - for (const [plugin, pass] of passPairs) { - if (plugin.post) { - const fn = (0, _async.maybeAsync)(plugin.post, `You appear to be using an async plugin/preset, but Babel has been called synchronously`); - yield* fn.call(pass, file); - } - } - } -} -0 && 0; - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/core/lib/transformation/index.js.map b/node_modules/@babel/core/lib/transformation/index.js.map deleted file mode 100644 index 9f816e0..0000000 --- a/node_modules/@babel/core/lib/transformation/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","_async","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","async","isAsync","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","pre","fn","maybeAsync","call","traverse","merge","wrapPluginVisitorMethod","scope","post"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\nimport { isAsync, maybeAsync } from \"../gensync-utils/async.ts\";\nimport type { SourceTypeOption } from \"../config/validation/options.ts\";\n\nexport type FileResultCallback = {\n (err: Error, file: null): void;\n (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n metadata: Record;\n options: Record;\n ast: t.File | null;\n code: string | null;\n map: GeneratorResult[\"map\"];\n sourceType: Exclude;\n externalDependencies: Set;\n};\n\nexport function* run(\n config: ResolvedConfig,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n const file = yield* normalizeFile(\n config.passes,\n normalizeOptions(config),\n code,\n ast,\n );\n\n const opts = file.opts;\n try {\n yield* transformFile(file, config.passes);\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_TRANSFORM_ERROR\";\n }\n throw e;\n }\n\n let outputCode, outputMap;\n try {\n if (opts.code !== false) {\n ({ outputCode, outputMap } = generateCode(config.passes, file));\n }\n } catch (e) {\n e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n if (!e.code) {\n e.code = \"BABEL_GENERATE_ERROR\";\n }\n throw e;\n }\n\n return {\n metadata: file.metadata,\n options: opts,\n ast: opts.ast === true ? file.ast : null,\n code: outputCode === undefined ? null : outputCode,\n map: outputMap === undefined ? null : outputMap,\n sourceType: file.ast.program.sourceType,\n externalDependencies: flattenToSet(config.externalDependencies),\n };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler {\n const async = yield* isAsync();\n\n for (const pluginPairs of pluginPasses) {\n const passPairs: [Plugin, PluginPass][] = [];\n const passes = [];\n const visitors = [];\n\n for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n const pass = new PluginPass(file, plugin.key, plugin.options, async);\n\n passPairs.push([plugin, pass]);\n passes.push(pass);\n visitors.push(plugin.visitor);\n }\n\n for (const [plugin, pass] of passPairs) {\n if (plugin.pre) {\n const fn = maybeAsync(\n plugin.pre,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n yield* fn.call(pass, file);\n }\n }\n\n // merge all plugin visitors into a single visitor\n const visitor = traverse.visitors.merge(\n visitors,\n passes,\n file.opts.wrapPluginVisitorMethod,\n );\n if (process.env.BABEL_8_BREAKING) {\n traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n } else {\n traverse(file.ast, visitor, file.scope);\n }\n\n for (const [plugin, pass] of passPairs) {\n if (plugin.post) {\n const fn = maybeAsync(\n plugin.post,\n `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n );\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n yield* fn.call(pass, file);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,IAAAE,WAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAkBO,UAAUQ,GAAGA,CAClBC,MAAsB,EACtBC,IAAY,EACZC,GAA+B,EACV;EACrB,MAAMC,IAAI,GAAG,OAAO,IAAAC,sBAAa,EAC/BJ,MAAM,CAACK,MAAM,EACb,IAAAC,sBAAgB,EAACN,MAAM,CAAC,EACxBC,IAAI,EACJC,GACF,CAAC;EAED,MAAMK,IAAI,GAAGJ,IAAI,CAACI,IAAI;EACtB,IAAI;IACF,OAAOC,aAAa,CAACL,IAAI,EAAEH,MAAM,CAACK,MAAM,CAAC;EAC3C,CAAC,CAAC,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tC,IAAIE,MAAM,CAACgB,IAAI,EAAE;QACf,MAAMP,EAAE,GAAG,IAAAC,iBAAU,EACnBV,MAAM,CAACgB,IAAI,EACX,wFACF,CAAC;QAGD,OAAOP,EAAE,CAACE,IAAI,CAACR,IAAI,EAAE/B,IAAI,CAAC;MAC5B;IACF;EACF;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js deleted file mode 100644 index ba13031..0000000 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = normalizeFile; -function _fs() { - const data = require("fs"); - _fs = function () { - return data; - }; - return data; -} -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _debug() { - const data = require("debug"); - _debug = function () { - return data; - }; - return data; -} -function _t() { - const data = require("@babel/types"); - _t = function () { - return data; - }; - return data; -} -function _convertSourceMap() { - const data = require("convert-source-map"); - _convertSourceMap = function () { - return data; - }; - return data; -} -var _file = require("./file/file.js"); -var _index = require("../parser/index.js"); -var _cloneDeep = require("./util/clone-deep.js"); -const { - file, - traverseFast -} = _t(); -const debug = _debug()("babel:transform:file"); -const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,.*$/; -const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/; -function* normalizeFile(pluginPasses, options, code, ast) { - code = `${code || ""}`; - if (ast) { - if (ast.type === "Program") { - ast = file(ast, [], []); - } else if (ast.type !== "File") { - throw new Error("AST root must be a Program or File node"); - } - if (options.cloneInputAst) { - ast = (0, _cloneDeep.default)(ast); - } - } else { - ast = yield* (0, _index.default)(pluginPasses, options, code); - } - let inputMap = null; - if (options.inputSourceMap !== false) { - if (typeof options.inputSourceMap === "object") { - inputMap = _convertSourceMap().fromObject(options.inputSourceMap); - } - if (!inputMap) { - const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast); - if (lastComment) { - try { - inputMap = _convertSourceMap().fromComment("//" + lastComment); - } catch (err) { - debug("discarding unknown inline input sourcemap"); - } - } - } - if (!inputMap) { - const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast); - if (typeof options.filename === "string" && lastComment) { - try { - const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment); - const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]), "utf8"); - inputMap = _convertSourceMap().fromJSON(inputMapContent); - } catch (err) { - debug("discarding unknown file input sourcemap", err); - } - } else if (lastComment) { - debug("discarding un-loadable file input sourcemap"); - } - } - } - return new _file.default(options, { - code, - ast: ast, - inputMap - }); -} -function extractCommentsFromList(regex, comments, lastComment) { - if (comments) { - comments = comments.filter(({ - value - }) => { - if (regex.test(value)) { - lastComment = value; - return false; - } - return true; - }); - } - return [comments, lastComment]; -} -function extractComments(regex, ast) { - let lastComment = null; - traverseFast(ast, node => { - [node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment); - [node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment); - [node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment); - }); - return lastComment; -} -0 && 0; - -//# sourceMappingURL=normalize-file.js.map diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js.map b/node_modules/@babel/core/lib/transformation/normalize-file.js.map deleted file mode 100644 index 63f7d5e..0000000 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_fs","data","require","_path","_debug","_t","_convertSourceMap","_file","_index","_cloneDeep","file","traverseFast","debug","buildDebug","INLINE_SOURCEMAP_REGEX","EXTERNAL_SOURCEMAP_REGEX","normalizeFile","pluginPasses","options","code","ast","type","Error","cloneInputAst","cloneDeep","parser","inputMap","inputSourceMap","convertSourceMap","fromObject","lastComment","extractComments","fromComment","err","filename","match","exec","inputMapContent","fs","readFileSync","path","resolve","dirname","fromJSON","File","extractCommentsFromList","regex","comments","filter","value","test","node","leadingComments","innerComments","trailingComments"],"sources":["../../src/transformation/normalize-file.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport buildDebug from \"debug\";\nimport type { Handler } from \"gensync\";\nimport { file, traverseFast } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport convertSourceMap from \"convert-source-map\";\nimport type { SourceMapConverter as Converter } from \"convert-source-map\";\nimport File from \"./file/file.ts\";\nimport parser from \"../parser/index.ts\";\nimport cloneDeep from \"./util/clone-deep.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nconst debug = buildDebug(\"babel:transform:file\");\n\n// These regexps are copied from the convert-source-map package,\n// but without // or /* at the beginning of the comment.\n\nconst INLINE_SOURCEMAP_REGEX =\n /^[@#]\\s+sourceMappingURL=data:(?:application|text)\\/json;(?:charset[:=]\\S+?;)?base64,.*$/;\nconst EXTERNAL_SOURCEMAP_REGEX =\n /^[@#][ \\t]+sourceMappingURL=([^\\s'\"`]+)[ \\t]*$/;\n\nexport type NormalizedFile = {\n code: string;\n ast: t.File;\n inputMap: Converter | null;\n};\n\nexport default function* normalizeFile(\n pluginPasses: PluginPasses,\n options: ResolvedOptions,\n code: string,\n ast?: t.File | t.Program | null,\n): Handler {\n code = `${code || \"\"}`;\n\n if (ast) {\n if (ast.type === \"Program\") {\n ast = file(ast, [], []);\n } else if (ast.type !== \"File\") {\n throw new Error(\"AST root must be a Program or File node\");\n }\n\n if (options.cloneInputAst) {\n ast = cloneDeep(ast);\n }\n } else {\n ast = yield* parser(pluginPasses, options, code);\n }\n\n let inputMap = null;\n if (options.inputSourceMap !== false) {\n // If an explicit object is passed in, it overrides the processing of\n // source maps that may be in the file itself.\n if (typeof options.inputSourceMap === \"object\") {\n inputMap = convertSourceMap.fromObject(options.inputSourceMap);\n }\n\n if (!inputMap) {\n const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);\n if (lastComment) {\n try {\n inputMap = convertSourceMap.fromComment(\"//\" + lastComment);\n } catch (err) {\n if (process.env.BABEL_8_BREAKING) {\n console.warn(\n \"discarding unknown inline input sourcemap\",\n options.filename,\n err,\n );\n } else {\n debug(\"discarding unknown inline input sourcemap\");\n }\n }\n }\n }\n\n if (!inputMap) {\n const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);\n if (typeof options.filename === \"string\" && lastComment) {\n try {\n // when `lastComment` is non-null, EXTERNAL_SOURCEMAP_REGEX must have matches\n const match: [string, string] = EXTERNAL_SOURCEMAP_REGEX.exec(\n lastComment,\n ) as any;\n const inputMapContent = fs.readFileSync(\n path.resolve(path.dirname(options.filename), match[1]),\n \"utf8\",\n );\n inputMap = convertSourceMap.fromJSON(inputMapContent);\n } catch (err) {\n debug(\"discarding unknown file input sourcemap\", err);\n }\n } else if (lastComment) {\n debug(\"discarding un-loadable file input sourcemap\");\n }\n }\n }\n\n return new File(options, {\n code,\n ast: ast,\n inputMap,\n });\n}\n\nfunction extractCommentsFromList(\n regex: RegExp,\n comments: t.Comment[],\n lastComment: string | null,\n): [t.Comment[], string | null] {\n if (comments) {\n comments = comments.filter(({ value }) => {\n if (regex.test(value)) {\n lastComment = value;\n return false;\n }\n return true;\n });\n }\n return [comments, lastComment];\n}\n\nfunction extractComments(regex: RegExp, ast: t.Node) {\n let lastComment: string = null;\n traverseFast(ast, node => {\n [node.leadingComments, lastComment] = extractCommentsFromList(\n regex,\n node.leadingComments,\n lastComment,\n );\n [node.innerComments, lastComment] = extractCommentsFromList(\n regex,\n node.innerComments,\n lastComment,\n );\n [node.trailingComments, lastComment] = extractCommentsFromList(\n regex,\n node.trailingComments,\n lastComment,\n );\n });\n return lastComment;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAA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B,EACrBxB,WACF,CAAC;EACH,CAAC,CAAC;EACF,OAAOA,WAAW;AACpB;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js b/node_modules/@babel/core/lib/transformation/normalize-opts.js deleted file mode 100644 index c4d9d8b..0000000 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = normalizeOptions; -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function normalizeOptions(config) { - const { - filename, - cwd, - filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown", - sourceType = "module", - inputSourceMap, - sourceMaps = !!inputSourceMap, - sourceRoot = config.options.moduleRoot, - sourceFileName = _path().basename(filenameRelative), - comments = true, - compact = "auto" - } = config.options; - const opts = config.options; - const options = Object.assign({}, opts, { - parserOpts: Object.assign({ - sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType, - sourceFileName: filename, - plugins: [] - }, opts.parserOpts), - generatorOpts: Object.assign({ - filename, - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - retainLines: opts.retainLines, - comments, - shouldPrintComment: opts.shouldPrintComment, - compact, - minified: opts.minified, - sourceMaps: !!sourceMaps, - sourceRoot, - sourceFileName - }, opts.generatorOpts) - }); - for (const plugins of config.passes) { - for (const plugin of plugins) { - if (plugin.manipulateOptions) { - plugin.manipulateOptions(options, options.parserOpts); - } - } - } - return options; -} -0 && 0; - -//# sourceMappingURL=normalize-opts.js.map diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js.map b/node_modules/@babel/core/lib/transformation/normalize-opts.js.map deleted file mode 100644 index 1439fa9..0000000 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_path","data","require","normalizeOptions","config","filename","cwd","filenameRelative","path","relative","sourceType","inputSourceMap","sourceMaps","sourceRoot","options","moduleRoot","sourceFileName","basename","comments","compact","opts","Object","assign","parserOpts","extname","plugins","generatorOpts","auxiliaryCommentBefore","auxiliaryCommentAfter","retainLines","shouldPrintComment","minified","passes","plugin","manipulateOptions"],"sources":["../../src/transformation/normalize-opts.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { ResolvedConfig } from \"../config/index.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nexport default function normalizeOptions(\n config: ResolvedConfig,\n): ResolvedOptions {\n const {\n filename,\n cwd,\n filenameRelative = typeof filename === \"string\"\n ? path.relative(cwd, filename)\n : \"unknown\",\n sourceType = \"module\",\n inputSourceMap,\n sourceMaps = !!inputSourceMap,\n sourceRoot = process.env.BABEL_8_BREAKING\n ? undefined\n : // @ts-ignore(Babel 7 vs Babel 8) moduleRoot is a Babel 7 option\n config.options.moduleRoot,\n\n sourceFileName = path.basename(filenameRelative),\n\n comments = true,\n compact = \"auto\",\n } = config.options;\n\n const opts = config.options;\n\n const options: ResolvedOptions = {\n ...opts,\n\n parserOpts: {\n sourceType:\n path.extname(filenameRelative) === \".mjs\" ? \"module\" : sourceType,\n\n // @ts-expect-error We should have passed `sourceFilename` here\n // pending https://github.com/babel/babel/issues/15917#issuecomment-2789278964\n sourceFileName: filename,\n plugins: [],\n ...opts.parserOpts,\n },\n\n generatorOpts: {\n // General generator flags.\n filename,\n\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n retainLines: opts.retainLines,\n comments,\n shouldPrintComment: opts.shouldPrintComment,\n compact,\n minified: opts.minified,\n\n // Source-map generation flags.\n // babel-generator does not differentiate between `true`, `\"inline\"` or `\"both\"`\n sourceMaps: !!sourceMaps,\n sourceRoot,\n sourceFileName,\n\n ...opts.generatorOpts,\n },\n };\n\n for (const plugins of config.passes) {\n for (const plugin of plugins) {\n if (plugin.manipulateOptions) {\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V,IAAI,CAACU,kBAAkB;MAC3CX,OAAO;MACPY,QAAQ,EAAEX,IAAI,CAACW,QAAQ;MAIvBnB,UAAU,EAAE,CAAC,CAACA,UAAU;MACxBC,UAAU;MACVG;IAAc,GAEXI,IAAI,CAACM,aAAa;EACtB,EACF;EAED,KAAK,MAAMD,OAAO,IAAIrB,MAAM,CAAC4B,MAAM,EAAE;IACnC,KAAK,MAAMC,MAAM,IAAIR,OAAO,EAAE;MAC5B,IAAIQ,MAAM,CAACC,iBAAiB,EAAE;QAC5BD,MAAM,CAACC,iBAAiB,CAACpB,OAAO,EAAEA,OAAO,CAACS,UAAU,CAAC;MACvD;IACF;EACF;EAEA,OAAOT,OAAO;AAChB;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js deleted file mode 100644 index 1b91307..0000000 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -class PluginPass { - constructor(file, key, options, isAsync) { - this._map = new Map(); - this.key = void 0; - this.file = void 0; - this.opts = void 0; - this.cwd = void 0; - this.filename = void 0; - this.isAsync = void 0; - this.key = key; - this.file = file; - this.opts = options || {}; - this.cwd = file.opts.cwd; - this.filename = file.opts.filename; - this.isAsync = isAsync; - } - set(key, val) { - this._map.set(key, val); - } - get(key) { - return this._map.get(key); - } - availableHelper(name, versionRange) { - return this.file.availableHelper(name, versionRange); - } - addHelper(name) { - return this.file.addHelper(name); - } - buildCodeFrameError(node, msg, _Error) { - return this.file.buildCodeFrameError(node, msg, _Error); - } -} -exports.default = PluginPass; -PluginPass.prototype.getModuleName = function getModuleName() { - return this.file.getModuleName(); -}; -PluginPass.prototype.addImport = function addImport() { - this.file.addImport(); -}; -0 && 0; - -//# sourceMappingURL=plugin-pass.js.map diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js.map b/node_modules/@babel/core/lib/transformation/plugin-pass.js.map deleted file mode 100644 index 888f99e..0000000 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["PluginPass","constructor","file","key","options","isAsync","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass {\n _map = new Map();\n key: string | undefined | null;\n file: File;\n opts: Partial;\n\n /**\n * The working directory that Babel's programmatic options are loaded\n * relative to.\n */\n cwd: string;\n\n /** The absolute path of the file being compiled. */\n filename: string | void;\n\n /**\n * Is Babel executed in async mode or not.\n */\n isAsync: boolean;\n\n constructor(\n file: File,\n key: string | null,\n options: Options | undefined,\n isAsync: boolean,\n ) {\n this.key = key;\n this.file = file;\n this.opts = options || {};\n this.cwd = file.opts.cwd;\n this.filename = file.opts.filename;\n this.isAsync = isAsync;\n }\n\n set(key: unknown, val: unknown) {\n this._map.set(key, val);\n }\n\n get(key: unknown): any {\n return this._map.get(key);\n }\n\n availableHelper(name: string, versionRange?: string | null) {\n return this.file.availableHelper(name, versionRange);\n }\n\n addHelper(name: string) {\n return this.file.addHelper(name);\n }\n\n buildCodeFrameError(\n node: t.Node | undefined | null,\n msg: string,\n _Error?: typeof Error,\n ) {\n return this.file.buildCodeFrameError(node, msg, _Error);\n }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n (PluginPass as any).prototype.getModuleName = function getModuleName(\n this: PluginPass,\n ): string | undefined {\n // @ts-expect-error only exists in Babel 7\n return this.file.getModuleName();\n };\n (PluginPass as any).prototype.addImport = function addImport(\n this: PluginPass,\n ): void {\n // @ts-expect-error only exists in Babel 7\n this.file.addImport();\n };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAm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a,GAAG,SAASA,aAAaA,CAAA,EAE9C;EAEpB,OAAO,IAAI,CAACvB,IAAI,CAACuB,aAAa,CAAC,CAAC;AAClC,CAAC;AACAzB,UAAU,CAASwB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;EAEN,IAAI,CAACxB,IAAI,CAACwB,SAAS,CAAC,CAAC;AACvB,CAAC;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js b/node_modules/@babel/core/lib/transformation/util/clone-deep.js deleted file mode 100644 index a915149..0000000 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -const circleSet = new Set(); -let depth = 0; -function deepClone(value, cache, allowCircle) { - if (value !== null) { - if (allowCircle) { - if (cache.has(value)) return cache.get(value); - } else if (++depth > 250) { - if (circleSet.has(value)) { - depth = 0; - circleSet.clear(); - throw new Error("Babel-deepClone: Cycles are not allowed in AST"); - } - circleSet.add(value); - } - let cloned; - if (Array.isArray(value)) { - cloned = new Array(value.length); - if (allowCircle) cache.set(value, cloned); - for (let i = 0; i < value.length; i++) { - cloned[i] = typeof value[i] !== "object" ? value[i] : deepClone(value[i], cache, allowCircle); - } - } else { - cloned = {}; - if (allowCircle) cache.set(value, cloned); - const keys = Object.keys(value); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - cloned[key] = typeof value[key] !== "object" ? value[key] : deepClone(value[key], cache, allowCircle || key === "leadingComments" || key === "innerComments" || key === "trailingComments" || key === "extra"); - } - } - if (!allowCircle) { - if (depth-- > 250) circleSet.delete(value); - } - return cloned; - } - return value; -} -function _default(value) { - if (typeof value !== "object") return value; - try { - return deepClone(value, new Map(), true); - } catch (_) { - return structuredClone(value); - } -} -0 && 0; - -//# sourceMappingURL=clone-deep.js.map diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map b/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map deleted file mode 100644 index 947b6c9..0000000 --- a/node_modules/@babel/core/lib/transformation/util/clone-deep.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["circleSet","Set","depth","deepClone","value","cache","allowCircle","has","get","clear","Error","add","cloned","Array","isArray","length","set","i","keys","Object","key","delete","_default","Map","_","structuredClone"],"sources":["../../../src/transformation/util/clone-deep.ts"],"sourcesContent":["const circleSet = new Set();\nlet depth = 0;\n// https://github.com/babel/babel/pull/14583#discussion_r882828856\nfunction deepClone(\n value: any,\n cache: Map,\n allowCircle: boolean,\n): any {\n if (value !== null) {\n if (allowCircle) {\n if (cache.has(value)) return cache.get(value);\n } else if (++depth > 250) {\n if (circleSet.has(value)) {\n depth = 0;\n circleSet.clear();\n throw new Error(\"Babel-deepClone: Cycles are not allowed in AST\");\n }\n circleSet.add(value);\n }\n let cloned: any;\n if (Array.isArray(value)) {\n cloned = new Array(value.length);\n if (allowCircle) cache.set(value, cloned);\n for (let i = 0; i < value.length; i++) {\n cloned[i] =\n typeof value[i] !== \"object\"\n ? value[i]\n : deepClone(value[i], cache, allowCircle);\n }\n } else {\n cloned = {};\n if (allowCircle) cache.set(value, cloned);\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n cloned[key] =\n typeof value[key] !== \"object\"\n ? value[key]\n : deepClone(\n value[key],\n cache,\n allowCircle ||\n key === \"leadingComments\" ||\n key === \"innerComments\" ||\n key === \"trailingComments\" ||\n key === \"extra\",\n );\n }\n }\n if (!allowCircle) {\n if (depth-- > 250) circleSet.delete(value);\n }\n return cloned;\n }\n return value;\n}\n\nexport default function (value: T): T {\n if (typeof value !== \"object\") return value;\n\n if (process.env.BABEL_8_BREAKING) {\n if (!process.env.IS_PUBLISH && depth > 0) {\n throw new Error(\"depth > 0\");\n }\n return deepClone(value, new Map(), false);\n } else {\n try {\n return deepClone(value, new Map(), true);\n } catch (_) {\n return structuredClone(value);\n }\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AC;MACzC,MAAMM,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACd,KAAK,CAAC;MAC/B,KAAK,IAAIa,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,IAAI,CAACH,MAAM,EAAEE,CAAC,EAAE,EAAE;QACpC,MAAMG,GAAG,GAAGF,IAAI,CAACD,CAAC,CAAC;QACnBL,MAAM,CAACQ,GAAG,CAAC,GACT,OAAOhB,KAAK,CAACgB,GAAG,CAAC,KAAK,QAAQ,GAC1BhB,KAAK,CAACgB,GAAG,CAAC,GACVjB,SAAS,CACPC,KAAK,CAACgB,GAAG,CAAC,EACVf,KAAK,EACLC,WAAW,IACTc,GAAG,KAAK,iBAAiB,IACzBA,GAAG,KAAK,eAAe,IACvBA,GAAG,KAAK,kBAAkB,IAC1BA,GAAG,KAAK,OACZ,CAAC;MACT;IACF;IACA,IAAI,CAACd,WAAW,EAAE;MAChB,IAAIJ,KAAK,EAAE,GAAG,GAAG,EAAEF,SAAS,CAACqB,MAAM,CAACjB,KAAK,CAAC;IAC5C;IACA,OAAOQ,MAAM;EACf;EACA,OAAOR,KAAK;AACd;AAEe,SAAAkB,SAAalB,KAAQ,EAAK;EACvC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAQzC,IAAI;IACF,OAAOD,SAAS,CAACC,KAAK,EAAE,IAAImB,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC;EAC1C,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,OAAOC,eAAe,CAACrB,KAAK,CAAC;EAC/B;AAEJ;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js deleted file mode 100644 index 90a5911..0000000 --- a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +++ /dev/null @@ -1,1042 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.moduleResolve = moduleResolve; -exports.resolve = resolve; -function _assert() { - const data = require("assert"); - _assert = function () { - return data; - }; - return data; -} -function _fs() { - const data = _interopRequireWildcard(require("fs"), true); - _fs = function () { - return data; - }; - return data; -} -function _process() { - const data = require("process"); - _process = function () { - return data; - }; - return data; -} -function _url() { - const data = require("url"); - _url = function () { - return data; - }; - return data; -} -function _path() { - const data = require("path"); - _path = function () { - return data; - }; - return data; -} -function _module() { - const data = require("module"); - _module = function () { - return data; - }; - return data; -} -function _v() { - const data = require("v8"); - _v = function () { - return data; - }; - return data; -} -function _util() { - const data = require("util"); - _util = function () { - return data; - }; - return data; -} -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } -const own$1 = {}.hasOwnProperty; -const classRegExp = /^([A-Z][a-z\d]*)+$/; -const kTypes = new Set(['string', 'function', 'number', 'object', 'Function', 'Object', 'boolean', 'bigint', 'symbol']); -const codes = {}; -function formatList(array, type = 'and') { - return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`; -} -const messages = new Map(); -const nodeInternalPrefix = '__node_internal_'; -let userStackTraceLimit; -codes.ERR_INVALID_ARG_TYPE = createError('ERR_INVALID_ARG_TYPE', (name, expected, actual) => { - _assert()(typeof name === 'string', "'name' must be a string"); - if (!Array.isArray(expected)) { - expected = [expected]; - } - let message = 'The '; - if (name.endsWith(' argument')) { - message += `${name} `; - } else { - const type = name.includes('.') ? 'property' : 'argument'; - message += `"${name}" ${type} `; - } - message += 'must be '; - const types = []; - const instances = []; - const other = []; - for (const value of expected) { - _assert()(typeof value === 'string', 'All expected entries have to be of type string'); - if (kTypes.has(value)) { - types.push(value.toLowerCase()); - } else if (classRegExp.exec(value) === null) { - _assert()(value !== 'object', 'The value "object" should be written as "Object"'); - other.push(value); - } else { - instances.push(value); - } - } - if (instances.length > 0) { - const pos = types.indexOf('object'); - if (pos !== -1) { - types.slice(pos, 1); - instances.push('Object'); - } - } - if (types.length > 0) { - message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList(types, 'or')}`; - if (instances.length > 0 || other.length > 0) message += ' or '; - } - if (instances.length > 0) { - message += `an instance of ${formatList(instances, 'or')}`; - if (other.length > 0) message += ' or '; - } - if (other.length > 0) { - if (other.length > 1) { - message += `one of ${formatList(other, 'or')}`; - } else { - if (other[0].toLowerCase() !== other[0]) message += 'an '; - message += `${other[0]}`; - } - } - message += `. Received ${determineSpecificType(actual)}`; - return message; -}, TypeError); -codes.ERR_INVALID_MODULE_SPECIFIER = createError('ERR_INVALID_MODULE_SPECIFIER', (request, reason, base = undefined) => { - return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ''}`; -}, TypeError); -codes.ERR_INVALID_PACKAGE_CONFIG = createError('ERR_INVALID_PACKAGE_CONFIG', (path, base, message) => { - return `Invalid package config ${path}${base ? ` while importing ${base}` : ''}${message ? `. ${message}` : ''}`; -}, Error); -codes.ERR_INVALID_PACKAGE_TARGET = createError('ERR_INVALID_PACKAGE_TARGET', (packagePath, key, target, isImport = false, base = undefined) => { - const relatedError = typeof target === 'string' && !isImport && target.length > 0 && !target.startsWith('./'); - if (key === '.') { - _assert()(isImport === false); - return `Invalid "exports" main target ${JSON.stringify(target)} defined ` + `in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ''}${relatedError ? '; targets must start with "./"' : ''}`; - } - return `Invalid "${isImport ? 'imports' : 'exports'}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ''}${relatedError ? '; targets must start with "./"' : ''}`; -}, Error); -codes.ERR_MODULE_NOT_FOUND = createError('ERR_MODULE_NOT_FOUND', (path, base, exactUrl = false) => { - return `Cannot find ${exactUrl ? 'module' : 'package'} '${path}' imported from ${base}`; -}, Error); -codes.ERR_NETWORK_IMPORT_DISALLOWED = createError('ERR_NETWORK_IMPORT_DISALLOWED', "import of '%s' by %s is not supported: %s", Error); -codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError('ERR_PACKAGE_IMPORT_NOT_DEFINED', (specifier, packagePath, base) => { - return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ''} imported from ${base}`; -}, TypeError); -codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError('ERR_PACKAGE_PATH_NOT_EXPORTED', (packagePath, subpath, base = undefined) => { - if (subpath === '.') return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ''}`; - return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ''}`; -}, Error); -codes.ERR_UNSUPPORTED_DIR_IMPORT = createError('ERR_UNSUPPORTED_DIR_IMPORT', "Directory import '%s' is not supported " + 'resolving ES modules imported from %s', Error); -codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError('ERR_UNSUPPORTED_RESOLVE_REQUEST', 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError); -codes.ERR_UNKNOWN_FILE_EXTENSION = createError('ERR_UNKNOWN_FILE_EXTENSION', (extension, path) => { - return `Unknown file extension "${extension}" for ${path}`; -}, TypeError); -codes.ERR_INVALID_ARG_VALUE = createError('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { - let inspected = (0, _util().inspect)(value); - if (inspected.length > 128) { - inspected = `${inspected.slice(0, 128)}...`; - } - const type = name.includes('.') ? 'property' : 'argument'; - return `The ${type} '${name}' ${reason}. Received ${inspected}`; -}, TypeError); -function createError(sym, value, constructor) { - messages.set(sym, value); - return makeNodeErrorWithCode(constructor, sym); -} -function makeNodeErrorWithCode(Base, key) { - return NodeError; - function NodeError(...parameters) { - const limit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - const error = new Base(); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; - const message = getMessage(key, parameters, error); - Object.defineProperties(error, { - message: { - value: message, - enumerable: false, - writable: true, - configurable: true - }, - toString: { - value() { - return `${this.name} [${key}]: ${this.message}`; - }, - enumerable: false, - writable: true, - configurable: true - } - }); - captureLargerStackTrace(error); - error.code = key; - return error; - } -} -function isErrorStackTraceLimitWritable() { - try { - if (_v().startupSnapshot.isBuildingSnapshot()) { - return false; - } - } catch (_unused) {} - const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit'); - if (desc === undefined) { - return Object.isExtensible(Error); - } - return own$1.call(desc, 'writable') && desc.writable !== undefined ? desc.writable : desc.set !== undefined; -} -function hideStackFrames(wrappedFunction) { - const hidden = nodeInternalPrefix + wrappedFunction.name; - Object.defineProperty(wrappedFunction, 'name', { - value: hidden - }); - return wrappedFunction; -} -const captureLargerStackTrace = hideStackFrames(function (error) { - const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); - if (stackTraceLimitIsWritable) { - userStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Number.POSITIVE_INFINITY; - } - Error.captureStackTrace(error); - if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; - return error; -}); -function getMessage(key, parameters, self) { - const message = messages.get(key); - _assert()(message !== undefined, 'expected `message` to be found'); - if (typeof message === 'function') { - _assert()(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not ` + `match the required ones (${message.length}).`); - return Reflect.apply(message, self, parameters); - } - const regex = /%[dfijoOs]/g; - let expectedLength = 0; - while (regex.exec(message) !== null) expectedLength++; - _assert()(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not ` + `match the required ones (${expectedLength}).`); - if (parameters.length === 0) return message; - parameters.unshift(message); - return Reflect.apply(_util().format, null, parameters); -} -function determineSpecificType(value) { - if (value === null || value === undefined) { - return String(value); - } - if (typeof value === 'function' && value.name) { - return `function ${value.name}`; - } - if (typeof value === 'object') { - if (value.constructor && value.constructor.name) { - return `an instance of ${value.constructor.name}`; - } - return `${(0, _util().inspect)(value, { - depth: -1 - })}`; - } - let inspected = (0, _util().inspect)(value, { - colors: false - }); - if (inspected.length > 28) { - inspected = `${inspected.slice(0, 25)}...`; - } - return `type ${typeof value} (${inspected})`; -} -const hasOwnProperty$1 = {}.hasOwnProperty; -const { - ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 -} = codes; -const cache = new Map(); -function read(jsonPath, { - base, - specifier -}) { - const existing = cache.get(jsonPath); - if (existing) { - return existing; - } - let string; - try { - string = _fs().default.readFileSync(_path().toNamespacedPath(jsonPath), 'utf8'); - } catch (error) { - const exception = error; - if (exception.code !== 'ENOENT') { - throw exception; - } - } - const result = { - exists: false, - pjsonPath: jsonPath, - main: undefined, - name: undefined, - type: 'none', - exports: undefined, - imports: undefined - }; - if (string !== undefined) { - let parsed; - try { - parsed = JSON.parse(string); - } catch (error_) { - const cause = error_; - const error = new ERR_INVALID_PACKAGE_CONFIG$1(jsonPath, (base ? `"${specifier}" from ` : '') + (0, _url().fileURLToPath)(base || specifier), cause.message); - error.cause = cause; - throw error; - } - result.exists = true; - if (hasOwnProperty$1.call(parsed, 'name') && typeof parsed.name === 'string') { - result.name = parsed.name; - } - if (hasOwnProperty$1.call(parsed, 'main') && typeof parsed.main === 'string') { - result.main = parsed.main; - } - if (hasOwnProperty$1.call(parsed, 'exports')) { - result.exports = parsed.exports; - } - if (hasOwnProperty$1.call(parsed, 'imports')) { - result.imports = parsed.imports; - } - if (hasOwnProperty$1.call(parsed, 'type') && (parsed.type === 'commonjs' || parsed.type === 'module')) { - result.type = parsed.type; - } - } - cache.set(jsonPath, result); - return result; -} -function getPackageScopeConfig(resolved) { - let packageJSONUrl = new URL('package.json', resolved); - while (true) { - const packageJSONPath = packageJSONUrl.pathname; - if (packageJSONPath.endsWith('node_modules/package.json')) { - break; - } - const packageConfig = read((0, _url().fileURLToPath)(packageJSONUrl), { - specifier: resolved - }); - if (packageConfig.exists) { - return packageConfig; - } - const lastPackageJSONUrl = packageJSONUrl; - packageJSONUrl = new URL('../package.json', packageJSONUrl); - if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { - break; - } - } - const packageJSONPath = (0, _url().fileURLToPath)(packageJSONUrl); - return { - pjsonPath: packageJSONPath, - exists: false, - type: 'none' - }; -} -function getPackageType(url) { - return getPackageScopeConfig(url).type; -} -const { - ERR_UNKNOWN_FILE_EXTENSION -} = codes; -const hasOwnProperty = {}.hasOwnProperty; -const extensionFormatMap = { - __proto__: null, - '.cjs': 'commonjs', - '.js': 'module', - '.json': 'json', - '.mjs': 'module' -}; -function mimeToFormat(mime) { - if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return 'module'; - if (mime === 'application/json') return 'json'; - return null; -} -const protocolHandlers = { - __proto__: null, - 'data:': getDataProtocolModuleFormat, - 'file:': getFileProtocolModuleFormat, - 'http:': getHttpProtocolModuleFormat, - 'https:': getHttpProtocolModuleFormat, - 'node:'() { - return 'builtin'; - } -}; -function getDataProtocolModuleFormat(parsed) { - const { - 1: mime - } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null, null]; - return mimeToFormat(mime); -} -function extname(url) { - const pathname = url.pathname; - let index = pathname.length; - while (index--) { - const code = pathname.codePointAt(index); - if (code === 47) { - return ''; - } - if (code === 46) { - return pathname.codePointAt(index - 1) === 47 ? '' : pathname.slice(index); - } - } - return ''; -} -function getFileProtocolModuleFormat(url, _context, ignoreErrors) { - const value = extname(url); - if (value === '.js') { - const packageType = getPackageType(url); - if (packageType !== 'none') { - return packageType; - } - return 'commonjs'; - } - if (value === '') { - const packageType = getPackageType(url); - if (packageType === 'none' || packageType === 'commonjs') { - return 'commonjs'; - } - return 'module'; - } - const format = extensionFormatMap[value]; - if (format) return format; - if (ignoreErrors) { - return undefined; - } - const filepath = (0, _url().fileURLToPath)(url); - throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath); -} -function getHttpProtocolModuleFormat() {} -function defaultGetFormatWithoutErrors(url, context) { - const protocol = url.protocol; - if (!hasOwnProperty.call(protocolHandlers, protocol)) { - return null; - } - return protocolHandlers[protocol](url, context, true) || null; -} -const { - ERR_INVALID_ARG_VALUE -} = codes; -const DEFAULT_CONDITIONS = Object.freeze(['node', 'import']); -const DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); -function getDefaultConditions() { - return DEFAULT_CONDITIONS; -} -function getDefaultConditionsSet() { - return DEFAULT_CONDITIONS_SET; -} -function getConditionsSet(conditions) { - if (conditions !== undefined && conditions !== getDefaultConditions()) { - if (!Array.isArray(conditions)) { - throw new ERR_INVALID_ARG_VALUE('conditions', conditions, 'expected an array'); - } - return new Set(conditions); - } - return getDefaultConditionsSet(); -} -const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; -const { - ERR_NETWORK_IMPORT_DISALLOWED, - ERR_INVALID_MODULE_SPECIFIER, - ERR_INVALID_PACKAGE_CONFIG, - ERR_INVALID_PACKAGE_TARGET, - ERR_MODULE_NOT_FOUND, - ERR_PACKAGE_IMPORT_NOT_DEFINED, - ERR_PACKAGE_PATH_NOT_EXPORTED, - ERR_UNSUPPORTED_DIR_IMPORT, - ERR_UNSUPPORTED_RESOLVE_REQUEST -} = codes; -const own = {}.hasOwnProperty; -const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; -const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; -const invalidPackageNameRegEx = /^\.|%|\\/; -const patternRegEx = /\*/g; -const encodedSeparatorRegEx = /%2f|%5c/i; -const emittedPackageWarnings = new Set(); -const doubleSlashRegEx = /[/\\]{2}/; -function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { - if (_process().noDeprecation) { - return; - } - const pjsonPath = (0, _url().fileURLToPath)(packageJsonUrl); - const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; - _process().emitWarning(`Use of deprecated ${double ? 'double slash' : 'leading or trailing slash matching'} resolving "${target}" for module ` + `request "${request}" ${request === match ? '' : `matched to "${match}" `}in the "${internal ? 'imports' : 'exports'}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}.`, 'DeprecationWarning', 'DEP0166'); -} -function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { - if (_process().noDeprecation) { - return; - } - const format = defaultGetFormatWithoutErrors(url, { - parentURL: base.href - }); - if (format !== 'module') return; - const urlPath = (0, _url().fileURLToPath)(url.href); - const packagePath = (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)); - const basePath = (0, _url().fileURLToPath)(base); - if (!main) { - _process().emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', 'DEP0151'); - } else if (_path().resolve(packagePath, main) !== urlPath) { - _process().emitWarning(`Package ${packagePath} has a "main" field set to "${main}", ` + `excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is ` + 'deprecated for ES modules.', 'DeprecationWarning', 'DEP0151'); - } -} -function tryStatSync(path) { - try { - return (0, _fs().statSync)(path); - } catch (_unused2) {} -} -function fileExists(url) { - const stats = (0, _fs().statSync)(url, { - throwIfNoEntry: false - }); - const isFile = stats ? stats.isFile() : undefined; - return isFile === null || isFile === undefined ? false : isFile; -} -function legacyMainResolve(packageJsonUrl, packageConfig, base) { - let guess; - if (packageConfig.main !== undefined) { - guess = new (_url().URL)(packageConfig.main, packageJsonUrl); - if (fileExists(guess)) return guess; - const tries = [`./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node`]; - let i = -1; - while (++i < tries.length) { - guess = new (_url().URL)(tries[i], packageJsonUrl); - if (fileExists(guess)) break; - guess = undefined; - } - if (guess) { - emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); - return guess; - } - } - const tries = ['./index.js', './index.json', './index.node']; - let i = -1; - while (++i < tries.length) { - guess = new (_url().URL)(tries[i], packageJsonUrl); - if (fileExists(guess)) break; - guess = undefined; - } - if (guess) { - emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); - return guess; - } - throw new ERR_MODULE_NOT_FOUND((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base)); -} -function finalizeResolution(resolved, base, preserveSymlinks) { - if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) { - throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base)); - } - let filePath; - try { - filePath = (0, _url().fileURLToPath)(resolved); - } catch (error) { - const cause = error; - Object.defineProperty(cause, 'input', { - value: String(resolved) - }); - Object.defineProperty(cause, 'module', { - value: String(base) - }); - throw cause; - } - const stats = tryStatSync(filePath.endsWith('/') ? filePath.slice(-1) : filePath); - if (stats && stats.isDirectory()) { - const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, (0, _url().fileURLToPath)(base)); - error.url = String(resolved); - throw error; - } - if (!stats || !stats.isFile()) { - const error = new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && (0, _url().fileURLToPath)(base), true); - error.url = String(resolved); - throw error; - } - if (!preserveSymlinks) { - const real = (0, _fs().realpathSync)(filePath); - const { - search, - hash - } = resolved; - resolved = (0, _url().pathToFileURL)(real + (filePath.endsWith(_path().sep) ? '/' : '')); - resolved.search = search; - resolved.hash = hash; - } - return resolved; -} -function importNotDefined(specifier, packageJsonUrl, base) { - return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base)); -} -function exportsNotFound(subpath, packageJsonUrl, base) { - return new ERR_PACKAGE_PATH_NOT_EXPORTED((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, base && (0, _url().fileURLToPath)(base)); -} -function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { - const reason = `request is not a valid match in pattern "${match}" for the "${internal ? 'imports' : 'exports'}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`; - throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && (0, _url().fileURLToPath)(base)); -} -function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { - target = typeof target === 'object' && target !== null ? JSON.stringify(target, null, '') : `${target}`; - return new ERR_INVALID_PACKAGE_TARGET((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, target, internal, base && (0, _url().fileURLToPath)(base)); -} -function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { - if (subpath !== '' && !pattern && target[target.length - 1] !== '/') throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - if (!target.startsWith('./')) { - if (internal && !target.startsWith('../') && !target.startsWith('/')) { - let isURL = false; - try { - new (_url().URL)(target); - isURL = true; - } catch (_unused3) {} - if (!isURL) { - const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath; - return packageResolve(exportTarget, packageJsonUrl, conditions); - } - } - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - } - if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { - if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { - if (!isPathMap) { - const request = pattern ? match.replace('*', () => subpath) : match + subpath; - const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target; - emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, true); - } - } else { - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - } - } - const resolved = new (_url().URL)(target, packageJsonUrl); - const resolvedPath = resolved.pathname; - const packagePath = new (_url().URL)('.', packageJsonUrl).pathname; - if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - if (subpath === '') return resolved; - if (invalidSegmentRegEx.exec(subpath) !== null) { - const request = pattern ? match.replace('*', () => subpath) : match + subpath; - if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { - if (!isPathMap) { - const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target; - emitInvalidSegmentDeprecation(resolvedTarget, request, match, packageJsonUrl, internal, base, false); - } - } else { - throwInvalidSubpath(request, match, packageJsonUrl, internal, base); - } - } - if (pattern) { - return new (_url().URL)(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath)); - } - return new (_url().URL)(subpath, resolved); -} -function isArrayIndex(key) { - const keyNumber = Number(key); - if (`${keyNumber}` !== key) return false; - return keyNumber >= 0 && keyNumber < 0xffffffff; -} -function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { - if (typeof target === 'string') { - return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions); - } - if (Array.isArray(target)) { - const targetList = target; - if (targetList.length === 0) return null; - let lastException; - let i = -1; - while (++i < targetList.length) { - const targetItem = targetList[i]; - let resolveResult; - try { - resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); - } catch (error) { - const exception = error; - lastException = exception; - if (exception.code === 'ERR_INVALID_PACKAGE_TARGET') continue; - throw error; - } - if (resolveResult === undefined) continue; - if (resolveResult === null) { - lastException = null; - continue; - } - return resolveResult; - } - if (lastException === undefined || lastException === null) { - return null; - } - throw lastException; - } - if (typeof target === 'object' && target !== null) { - const keys = Object.getOwnPropertyNames(target); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - if (isArrayIndex(key)) { - throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain numeric property keys.'); - } - } - i = -1; - while (++i < keys.length) { - const key = keys[i]; - if (key === 'default' || conditions && conditions.has(key)) { - const conditionalTarget = target[key]; - const resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); - if (resolveResult === undefined) continue; - return resolveResult; - } - } - return null; - } - if (target === null) { - return null; - } - throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base); -} -function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { - if (typeof exports === 'string' || Array.isArray(exports)) return true; - if (typeof exports !== 'object' || exports === null) return false; - const keys = Object.getOwnPropertyNames(exports); - let isConditionalSugar = false; - let i = 0; - let keyIndex = -1; - while (++keyIndex < keys.length) { - const key = keys[keyIndex]; - const currentIsConditionalSugar = key === '' || key[0] !== '.'; - if (i++ === 0) { - isConditionalSugar = currentIsConditionalSugar; - } else if (isConditionalSugar !== currentIsConditionalSugar) { - throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain some keys starting with \'.\' and some not.' + ' The exports object must either be an object of package subpath keys' + ' or an object of main entry condition name keys only.'); - } - } - return isConditionalSugar; -} -function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { - if (_process().noDeprecation) { - return; - } - const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl); - if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return; - emittedPackageWarnings.add(pjsonPath + '|' + match); - _process().emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the ` + `"exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}. Mapping specifiers ending in "/" is no longer supported.`, 'DeprecationWarning', 'DEP0155'); -} -function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { - let exports = packageConfig.exports; - if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { - exports = { - '.': exports - }; - } - if (own.call(exports, packageSubpath) && !packageSubpath.includes('*') && !packageSubpath.endsWith('/')) { - const target = exports[packageSubpath]; - const resolveResult = resolvePackageTarget(packageJsonUrl, target, '', packageSubpath, base, false, false, false, conditions); - if (resolveResult === null || resolveResult === undefined) { - throw exportsNotFound(packageSubpath, packageJsonUrl, base); - } - return resolveResult; - } - let bestMatch = ''; - let bestMatchSubpath = ''; - const keys = Object.getOwnPropertyNames(exports); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - const patternIndex = key.indexOf('*'); - if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { - if (packageSubpath.endsWith('/')) { - emitTrailingSlashPatternDeprecation(packageSubpath, packageJsonUrl, base); - } - const patternTrailer = key.slice(patternIndex + 1); - if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf('*') === patternIndex) { - bestMatch = key; - bestMatchSubpath = packageSubpath.slice(patternIndex, packageSubpath.length - patternTrailer.length); - } - } - } - if (bestMatch) { - const target = exports[bestMatch]; - const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith('/'), conditions); - if (resolveResult === null || resolveResult === undefined) { - throw exportsNotFound(packageSubpath, packageJsonUrl, base); - } - return resolveResult; - } - throw exportsNotFound(packageSubpath, packageJsonUrl, base); -} -function patternKeyCompare(a, b) { - const aPatternIndex = a.indexOf('*'); - const bPatternIndex = b.indexOf('*'); - const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; - const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLengthA > baseLengthB) return -1; - if (baseLengthB > baseLengthA) return 1; - if (aPatternIndex === -1) return 1; - if (bPatternIndex === -1) return -1; - if (a.length > b.length) return -1; - if (b.length > a.length) return 1; - return 0; -} -function packageImportsResolve(name, base, conditions) { - if (name === '#' || name.startsWith('#/') || name.endsWith('/')) { - const reason = 'is not a valid internal imports specifier name'; - throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, (0, _url().fileURLToPath)(base)); - } - let packageJsonUrl; - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath); - const imports = packageConfig.imports; - if (imports) { - if (own.call(imports, name) && !name.includes('*')) { - const resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], '', name, base, false, true, false, conditions); - if (resolveResult !== null && resolveResult !== undefined) { - return resolveResult; - } - } else { - let bestMatch = ''; - let bestMatchSubpath = ''; - const keys = Object.getOwnPropertyNames(imports); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - const patternIndex = key.indexOf('*'); - if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { - const patternTrailer = key.slice(patternIndex + 1); - if (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf('*') === patternIndex) { - bestMatch = key; - bestMatchSubpath = name.slice(patternIndex, name.length - patternTrailer.length); - } - } - } - if (bestMatch) { - const target = imports[bestMatch]; - const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions); - if (resolveResult !== null && resolveResult !== undefined) { - return resolveResult; - } - } - } - } - } - throw importNotDefined(name, packageJsonUrl, base); -} -function parsePackageName(specifier, base) { - let separatorIndex = specifier.indexOf('/'); - let validPackageName = true; - let isScoped = false; - if (specifier[0] === '@') { - isScoped = true; - if (separatorIndex === -1 || specifier.length === 0) { - validPackageName = false; - } else { - separatorIndex = specifier.indexOf('/', separatorIndex + 1); - } - } - const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); - if (invalidPackageNameRegEx.exec(packageName) !== null) { - validPackageName = false; - } - if (!validPackageName) { - throw new ERR_INVALID_MODULE_SPECIFIER(specifier, 'is not a valid package name', (0, _url().fileURLToPath)(base)); - } - const packageSubpath = '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex)); - return { - packageName, - packageSubpath, - isScoped - }; -} -function packageResolve(specifier, base, conditions) { - if (_module().builtinModules.includes(specifier)) { - return new (_url().URL)('node:' + specifier); - } - const { - packageName, - packageSubpath, - isScoped - } = parsePackageName(specifier, base); - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - const packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath); - if (packageConfig.name === packageName && packageConfig.exports !== undefined && packageConfig.exports !== null) { - return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions); - } - } - let packageJsonUrl = new (_url().URL)('./node_modules/' + packageName + '/package.json', base); - let packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); - let lastPath; - do { - const stat = tryStatSync(packageJsonPath.slice(0, -13)); - if (!stat || !stat.isDirectory()) { - lastPath = packageJsonPath; - packageJsonUrl = new (_url().URL)((isScoped ? '../../../../node_modules/' : '../../../node_modules/') + packageName + '/package.json', packageJsonUrl); - packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); - continue; - } - const packageConfig = read(packageJsonPath, { - base, - specifier - }); - if (packageConfig.exports !== undefined && packageConfig.exports !== null) { - return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions); - } - if (packageSubpath === '.') { - return legacyMainResolve(packageJsonUrl, packageConfig, base); - } - return new (_url().URL)(packageSubpath, packageJsonUrl); - } while (packageJsonPath.length !== lastPath.length); - throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base), false); -} -function isRelativeSpecifier(specifier) { - if (specifier[0] === '.') { - if (specifier.length === 1 || specifier[1] === '/') return true; - if (specifier[1] === '.' && (specifier.length === 2 || specifier[2] === '/')) { - return true; - } - } - return false; -} -function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { - if (specifier === '') return false; - if (specifier[0] === '/') return true; - return isRelativeSpecifier(specifier); -} -function moduleResolve(specifier, base, conditions, preserveSymlinks) { - const protocol = base.protocol; - const isData = protocol === 'data:'; - const isRemote = isData || protocol === 'http:' || protocol === 'https:'; - let resolved; - if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - try { - resolved = new (_url().URL)(specifier, base); - } catch (error_) { - const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); - error.cause = error_; - throw error; - } - } else if (protocol === 'file:' && specifier[0] === '#') { - resolved = packageImportsResolve(specifier, base, conditions); - } else { - try { - resolved = new (_url().URL)(specifier); - } catch (error_) { - if (isRemote && !_module().builtinModules.includes(specifier)) { - const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); - error.cause = error_; - throw error; - } - resolved = packageResolve(specifier, base, conditions); - } - } - _assert()(resolved !== undefined, 'expected to be defined'); - if (resolved.protocol !== 'file:') { - return resolved; - } - return finalizeResolution(resolved, base, preserveSymlinks); -} -function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { - if (parsedParentURL) { - const parentProtocol = parsedParentURL.protocol; - if (parentProtocol === 'http:' || parentProtocol === 'https:') { - if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - const parsedProtocol = parsed == null ? void 0 : parsed.protocol; - if (parsedProtocol && parsedProtocol !== 'https:' && parsedProtocol !== 'http:') { - throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'remote imports cannot import from a local location.'); - } - return { - url: (parsed == null ? void 0 : parsed.href) || '' - }; - } - if (_module().builtinModules.includes(specifier)) { - throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'remote imports cannot import from a local location.'); - } - throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, 'only relative and absolute specifiers are supported.'); - } - } -} -function isURL(self) { - return Boolean(self && typeof self === 'object' && 'href' in self && typeof self.href === 'string' && 'protocol' in self && typeof self.protocol === 'string' && self.href && self.protocol); -} -function throwIfInvalidParentURL(parentURL) { - if (parentURL === undefined) { - return; - } - if (typeof parentURL !== 'string' && !isURL(parentURL)) { - throw new codes.ERR_INVALID_ARG_TYPE('parentURL', ['string', 'URL'], parentURL); - } -} -function defaultResolve(specifier, context = {}) { - const { - parentURL - } = context; - _assert()(parentURL !== undefined, 'expected `parentURL` to be defined'); - throwIfInvalidParentURL(parentURL); - let parsedParentURL; - if (parentURL) { - try { - parsedParentURL = new (_url().URL)(parentURL); - } catch (_unused4) {} - } - let parsed; - let protocol; - try { - parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new (_url().URL)(specifier, parsedParentURL) : new (_url().URL)(specifier); - protocol = parsed.protocol; - if (protocol === 'data:') { - return { - url: parsed.href, - format: null - }; - } - } catch (_unused5) {} - const maybeReturn = checkIfDisallowedImport(specifier, parsed, parsedParentURL); - if (maybeReturn) return maybeReturn; - if (protocol === undefined && parsed) { - protocol = parsed.protocol; - } - if (protocol === 'node:') { - return { - url: specifier - }; - } - if (parsed && parsed.protocol === 'node:') return { - url: specifier - }; - const conditions = getConditionsSet(context.conditions); - const url = moduleResolve(specifier, new (_url().URL)(parentURL), conditions, false); - return { - url: url.href, - format: defaultGetFormatWithoutErrors(url, { - parentURL - }) - }; -} -function resolve(specifier, parent) { - if (!parent) { - throw new Error('Please pass `parent`: `import-meta-resolve` cannot ponyfill that'); - } - try { - return defaultResolve(specifier, { - parentURL: parent - }).url; - } catch (error) { - const exception = error; - if ((exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' || exception.code === 'ERR_MODULE_NOT_FOUND') && typeof exception.url === 'string') { - return exception.url; - } - throw error; - } -} -0 && 0; - -//# sourceMappingURL=import-meta-resolve.js.map diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map deleted file mode 100644 index d9e5b42..0000000 --- a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_assert","data","require","_fs","_interopRequireWildcard","_process","_url","_path","_module","_v","_util","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","own$1","classRegExp","kTypes","Set","codes","formatList","array","type","length","join","slice","messages","Map","nodeInternalPrefix","userStackTraceLimit","ERR_INVALID_ARG_TYPE","createError","name","expected","actual","assert","Array","isArray","message","endsWith","includes","types","instances","other","value","push","toLowerCase","exec","pos","indexOf","determineSpecificType","TypeError","ERR_INVALID_MODULE_SPECIFIER","request","reason","base","undefined","ERR_INVALID_PACKAGE_CONFIG","path","Error","ERR_INVALID_PACKAGE_TARGET","packagePath","key","target","isImport","relatedError","startsWith","JSON","stringify","ERR_MODULE_NOT_FOUND","exactUrl","ERR_NETWORK_IMPORT_DISALLOWED","ERR_PACKAGE_IMPORT_NOT_DEFINED","specifier","ERR_PACKAGE_PATH_NOT_EXPORTED","subpath","ERR_UNSUPPORTED_DIR_IMPORT","ERR_UNSUPPORTED_RESOLVE_REQUEST","ERR_UNKNOWN_FILE_EXTENSION","extension","ERR_INVALID_ARG_VALUE","inspected","inspect","sym","constructor","makeNodeErrorWithCode","Base","NodeError","parameters","limit","stackTraceLimit","isErrorStackTraceLimitWritable","error","getMessage","defineProperties","enumerable","writable","configurable","toString","captureLargerStackTrace","code","v8","startupSnapshot","isBuildingSnapshot","_unused","desc","isExtensible","hideStackFrames","wrappedFunction","hidden","stackTraceLimitIsWritable","Number","POSITIVE_INFINITY","captureStackTrace","self","Reflect","apply","regex","expectedLength","unshift","format","String","depth","colors","hasOwnProperty$1","ERR_INVALID_PACKAGE_CONFIG$1","cache","read","jsonPath","existing","string","fs","readFileSync","toNamespacedPath","exception","result","exists","pjsonPath","main","exports","imports","parsed","parse","error_","cause","fileURLToPath","getPackageScopeConfig","resolved","packageJSONUrl","URL","packageJSONPath","pathname","packageConfig","lastPackageJSONUrl","getPackageType","url","extensionFormatMap","mimeToFormat","mime","test","protocolHandlers","getDataProtocolModuleFormat","getFileProtocolModuleFormat","getHttpProtocolModuleFormat","node:","extname","index","codePointAt","_context","ignoreErrors","packageType","filepath","defaultGetFormatWithoutErrors","context","protocol","DEFAULT_CONDITIONS","freeze","DEFAULT_CONDITIONS_SET","getDefaultConditions","getDefaultConditionsSet","getConditionsSet","conditions","RegExpPrototypeSymbolReplace","RegExp","prototype","Symbol","replace","own","invalidSegmentRegEx","deprecatedInvalidSegmentRegEx","invalidPackageNameRegEx","patternRegEx","encodedSeparatorRegEx","emittedPackageWarnings","doubleSlashRegEx","emitInvalidSegmentDeprecation","match","packageJsonUrl","internal","isTarget","process","noDeprecation","double","emitWarning","emitLegacyIndexDeprecation","parentURL","href","urlPath","URL$1","basePath","resolve","tryStatSync","statSync","_unused2","fileExists","stats","throwIfNoEntry","isFile","legacyMainResolve","guess","tries","finalizeResolution","preserveSymlinks","filePath","isDirectory","real","realpathSync","search","hash","pathToFileURL","sep","importNotDefined","exportsNotFound","throwInvalidSubpath","invalidPackageTarget","resolvePackageTargetString","pattern","isPathMap","isURL","_unused3","exportTarget","packageResolve","resolvedTarget","resolvedPath","isArrayIndex","keyNumber","resolvePackageTarget","packageSubpath","targetList","lastException","targetItem","resolveResult","keys","getOwnPropertyNames","conditionalTarget","isConditionalExportsMainSugar","isConditionalSugar","keyIndex","currentIsConditionalSugar","emitTrailingSlashPatternDeprecation","pjsonUrl","add","packageExportsResolve","bestMatch","bestMatchSubpath","patternIndex","patternTrailer","patternKeyCompare","lastIndexOf","a","b","aPatternIndex","bPatternIndex","baseLengthA","baseLengthB","packageImportsResolve","parsePackageName","separatorIndex","validPackageName","isScoped","packageName","builtinModules","packageJsonPath","lastPath","stat","isRelativeSpecifier","shouldBeTreatedAsRelativeOrAbsolutePath","moduleResolve","isData","isRemote","checkIfDisallowedImport","parsedParentURL","parentProtocol","parsedProtocol","Boolean","throwIfInvalidParentURL","defaultResolve","_unused4","_unused5","maybeReturn","parent"],"sources":["../../src/vendor/import-meta-resolve.js"],"sourcesContent":["\n/****************************************************************************\\\n * NOTE FROM BABEL AUTHORS *\n * This file is inlined from https://github.com/wooorm/import-meta-resolve, *\n * because we need to compile it to CommonJS. *\n\\****************************************************************************/\n\n/*\n(The MIT License)\n\nCopyright (c) 2021 Titus Wormer \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n---\n\nThis is a derivative work based on:\n.\nWhich is licensed:\n\n\"\"\"\nCopyright Node.js contributors. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n\nThis license applies to parts of Node.js originating from the\nhttps://github.com/joyent/node repository:\n\n\"\"\"\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\"\"\"\n*/\n\nimport assert from 'assert';\nimport fs, { realpathSync, statSync } from 'fs';\nimport process from 'process';\nimport { fileURLToPath, URL as URL$1, pathToFileURL } from 'url';\nimport path from 'path';\nimport { builtinModules } from 'module';\nimport v8 from 'v8';\nimport { format, inspect } from 'util';\n\n/**\n * @typedef ErrnoExceptionFields\n * @property {number | undefined} [errnode]\n * @property {string | undefined} [code]\n * @property {string | undefined} [path]\n * @property {string | undefined} [syscall]\n * @property {string | undefined} [url]\n *\n * @typedef {Error & ErrnoExceptionFields} ErrnoException\n */\n\n\nconst own$1 = {}.hasOwnProperty;\n\nconst classRegExp = /^([A-Z][a-z\\d]*)+$/;\n// Sorted by a rough estimate on most frequently used entries.\nconst kTypes = new Set([\n 'string',\n 'function',\n 'number',\n 'object',\n // Accept 'Function' and 'Object' as alternative to the lower cased version.\n 'Function',\n 'Object',\n 'boolean',\n 'bigint',\n 'symbol'\n]);\n\nconst codes = {};\n\n/**\n * Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.\n * We cannot use Intl.ListFormat because it's not available in\n * --without-intl builds.\n *\n * @param {Array} array\n * An array of strings.\n * @param {string} [type]\n * The list type to be inserted before the last element.\n * @returns {string}\n */\nfunction formatList(array, type = 'and') {\n return array.length < 3\n ? array.join(` ${type} `)\n : `${array.slice(0, -1).join(', ')}, ${type} ${array[array.length - 1]}`\n}\n\n/** @type {Map} */\nconst messages = new Map();\nconst nodeInternalPrefix = '__node_internal_';\n/** @type {number} */\nlet userStackTraceLimit;\n\ncodes.ERR_INVALID_ARG_TYPE = createError(\n 'ERR_INVALID_ARG_TYPE',\n /**\n * @param {string} name\n * @param {Array | string} expected\n * @param {unknown} actual\n */\n (name, expected, actual) => {\n assert(typeof name === 'string', \"'name' must be a string\");\n if (!Array.isArray(expected)) {\n expected = [expected];\n }\n\n let message = 'The ';\n if (name.endsWith(' argument')) {\n // For cases like 'first argument'\n message += `${name} `;\n } else {\n const type = name.includes('.') ? 'property' : 'argument';\n message += `\"${name}\" ${type} `;\n }\n\n message += 'must be ';\n\n /** @type {Array} */\n const types = [];\n /** @type {Array} */\n const instances = [];\n /** @type {Array} */\n const other = [];\n\n for (const value of expected) {\n assert(\n typeof value === 'string',\n 'All expected entries have to be of type string'\n );\n\n if (kTypes.has(value)) {\n types.push(value.toLowerCase());\n } else if (classRegExp.exec(value) === null) {\n assert(\n value !== 'object',\n 'The value \"object\" should be written as \"Object\"'\n );\n other.push(value);\n } else {\n instances.push(value);\n }\n }\n\n // Special handle `object` in case other instances are allowed to outline\n // the differences between each other.\n if (instances.length > 0) {\n const pos = types.indexOf('object');\n if (pos !== -1) {\n types.slice(pos, 1);\n instances.push('Object');\n }\n }\n\n if (types.length > 0) {\n message += `${types.length > 1 ? 'one of type' : 'of type'} ${formatList(\n types,\n 'or'\n )}`;\n if (instances.length > 0 || other.length > 0) message += ' or ';\n }\n\n if (instances.length > 0) {\n message += `an instance of ${formatList(instances, 'or')}`;\n if (other.length > 0) message += ' or ';\n }\n\n if (other.length > 0) {\n if (other.length > 1) {\n message += `one of ${formatList(other, 'or')}`;\n } else {\n if (other[0].toLowerCase() !== other[0]) message += 'an ';\n message += `${other[0]}`;\n }\n }\n\n message += `. Received ${determineSpecificType(actual)}`;\n\n return message\n },\n TypeError\n);\n\ncodes.ERR_INVALID_MODULE_SPECIFIER = createError(\n 'ERR_INVALID_MODULE_SPECIFIER',\n /**\n * @param {string} request\n * @param {string} reason\n * @param {string} [base]\n */\n (request, reason, base = undefined) => {\n return `Invalid module \"${request}\" ${reason}${\n base ? ` imported from ${base}` : ''\n }`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_PACKAGE_CONFIG = createError(\n 'ERR_INVALID_PACKAGE_CONFIG',\n /**\n * @param {string} path\n * @param {string} [base]\n * @param {string} [message]\n */\n (path, base, message) => {\n return `Invalid package config ${path}${\n base ? ` while importing ${base}` : ''\n }${message ? `. ${message}` : ''}`\n },\n Error\n);\n\ncodes.ERR_INVALID_PACKAGE_TARGET = createError(\n 'ERR_INVALID_PACKAGE_TARGET',\n /**\n * @param {string} packagePath\n * @param {string} key\n * @param {unknown} target\n * @param {boolean} [isImport=false]\n * @param {string} [base]\n */\n (packagePath, key, target, isImport = false, base = undefined) => {\n const relatedError =\n typeof target === 'string' &&\n !isImport &&\n target.length > 0 &&\n !target.startsWith('./');\n if (key === '.') {\n assert(isImport === false);\n return (\n `Invalid \"exports\" main target ${JSON.stringify(target)} defined ` +\n `in the package config ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }${relatedError ? '; targets must start with \"./\"' : ''}`\n )\n }\n\n return `Invalid \"${\n isImport ? 'imports' : 'exports'\n }\" target ${JSON.stringify(\n target\n )} defined for '${key}' in the package config ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }${relatedError ? '; targets must start with \"./\"' : ''}`\n },\n Error\n);\n\ncodes.ERR_MODULE_NOT_FOUND = createError(\n 'ERR_MODULE_NOT_FOUND',\n /**\n * @param {string} path\n * @param {string} base\n * @param {boolean} [exactUrl]\n */\n (path, base, exactUrl = false) => {\n return `Cannot find ${\n exactUrl ? 'module' : 'package'\n } '${path}' imported from ${base}`\n },\n Error\n);\n\ncodes.ERR_NETWORK_IMPORT_DISALLOWED = createError(\n 'ERR_NETWORK_IMPORT_DISALLOWED',\n \"import of '%s' by %s is not supported: %s\",\n Error\n);\n\ncodes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(\n 'ERR_PACKAGE_IMPORT_NOT_DEFINED',\n /**\n * @param {string} specifier\n * @param {string} packagePath\n * @param {string} base\n */\n (specifier, packagePath, base) => {\n return `Package import specifier \"${specifier}\" is not defined${\n packagePath ? ` in package ${packagePath}package.json` : ''\n } imported from ${base}`\n },\n TypeError\n);\n\ncodes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError(\n 'ERR_PACKAGE_PATH_NOT_EXPORTED',\n /**\n * @param {string} packagePath\n * @param {string} subpath\n * @param {string} [base]\n */\n (packagePath, subpath, base = undefined) => {\n if (subpath === '.')\n return `No \"exports\" main defined in ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n return `Package subpath '${subpath}' is not defined by \"exports\" in ${packagePath}package.json${\n base ? ` imported from ${base}` : ''\n }`\n },\n Error\n);\n\ncodes.ERR_UNSUPPORTED_DIR_IMPORT = createError(\n 'ERR_UNSUPPORTED_DIR_IMPORT',\n \"Directory import '%s' is not supported \" +\n 'resolving ES modules imported from %s',\n Error\n);\n\ncodes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(\n 'ERR_UNSUPPORTED_RESOLVE_REQUEST',\n 'Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.',\n TypeError\n);\n\ncodes.ERR_UNKNOWN_FILE_EXTENSION = createError(\n 'ERR_UNKNOWN_FILE_EXTENSION',\n /**\n * @param {string} extension\n * @param {string} path\n */\n (extension, path) => {\n return `Unknown file extension \"${extension}\" for ${path}`\n },\n TypeError\n);\n\ncodes.ERR_INVALID_ARG_VALUE = createError(\n 'ERR_INVALID_ARG_VALUE',\n /**\n * @param {string} name\n * @param {unknown} value\n * @param {string} [reason='is invalid']\n */\n (name, value, reason = 'is invalid') => {\n let inspected = inspect(value);\n\n if (inspected.length > 128) {\n inspected = `${inspected.slice(0, 128)}...`;\n }\n\n const type = name.includes('.') ? 'property' : 'argument';\n\n return `The ${type} '${name}' ${reason}. Received ${inspected}`\n },\n TypeError\n // Note: extra classes have been shaken out.\n // , RangeError\n);\n\n/**\n * Utility function for registering the error codes. Only used here. Exported\n * *only* to allow for testing.\n * @param {string} sym\n * @param {MessageFunction | string} value\n * @param {ErrorConstructor} constructor\n * @returns {new (...parameters: Array) => Error}\n */\nfunction createError(sym, value, constructor) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, value);\n\n return makeNodeErrorWithCode(constructor, sym)\n}\n\n/**\n * @param {ErrorConstructor} Base\n * @param {string} key\n * @returns {ErrorConstructor}\n */\nfunction makeNodeErrorWithCode(Base, key) {\n // @ts-expect-error It’s a Node error.\n return NodeError\n /**\n * @param {Array} parameters\n */\n function NodeError(...parameters) {\n const limit = Error.stackTraceLimit;\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;\n const error = new Base();\n // Reset the limit and setting the name property.\n if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;\n const message = getMessage(key, parameters, error);\n Object.defineProperties(error, {\n // Note: no need to implement `kIsNodeError` symbol, would be hard,\n // probably.\n message: {\n value: message,\n enumerable: false,\n writable: true,\n configurable: true\n },\n toString: {\n /** @this {Error} */\n value() {\n return `${this.name} [${key}]: ${this.message}`\n },\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n captureLargerStackTrace(error);\n // @ts-expect-error It’s a Node error.\n error.code = key;\n return error\n }\n}\n\n/**\n * @returns {boolean}\n */\nfunction isErrorStackTraceLimitWritable() {\n // Do no touch Error.stackTraceLimit as V8 would attempt to install\n // it again during deserialization.\n try {\n if (v8.startupSnapshot.isBuildingSnapshot()) {\n return false\n }\n } catch {}\n\n const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');\n if (desc === undefined) {\n return Object.isExtensible(Error)\n }\n\n return own$1.call(desc, 'writable') && desc.writable !== undefined\n ? desc.writable\n : desc.set !== undefined\n}\n\n/**\n * This function removes unnecessary frames from Node.js core errors.\n * @template {(...parameters: unknown[]) => unknown} T\n * @param {T} wrappedFunction\n * @returns {T}\n */\nfunction hideStackFrames(wrappedFunction) {\n // We rename the functions that will be hidden to cut off the stacktrace\n // at the outermost one\n const hidden = nodeInternalPrefix + wrappedFunction.name;\n Object.defineProperty(wrappedFunction, 'name', {value: hidden});\n return wrappedFunction\n}\n\nconst captureLargerStackTrace = hideStackFrames(\n /**\n * @param {Error} error\n * @returns {Error}\n */\n // @ts-expect-error: fine\n function (error) {\n const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();\n if (stackTraceLimitIsWritable) {\n userStackTraceLimit = Error.stackTraceLimit;\n Error.stackTraceLimit = Number.POSITIVE_INFINITY;\n }\n\n Error.captureStackTrace(error);\n\n // Reset the limit\n if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;\n\n return error\n }\n);\n\n/**\n * @param {string} key\n * @param {Array} parameters\n * @param {Error} self\n * @returns {string}\n */\nfunction getMessage(key, parameters, self) {\n const message = messages.get(key);\n assert(message !== undefined, 'expected `message` to be found');\n\n if (typeof message === 'function') {\n assert(\n message.length <= parameters.length, // Default options do not count.\n `Code: ${key}; The provided arguments length (${parameters.length}) does not ` +\n `match the required ones (${message.length}).`\n );\n return Reflect.apply(message, self, parameters)\n }\n\n const regex = /%[dfijoOs]/g;\n let expectedLength = 0;\n while (regex.exec(message) !== null) expectedLength++;\n assert(\n expectedLength === parameters.length,\n `Code: ${key}; The provided arguments length (${parameters.length}) does not ` +\n `match the required ones (${expectedLength}).`\n );\n if (parameters.length === 0) return message\n\n parameters.unshift(message);\n return Reflect.apply(format, null, parameters)\n}\n\n/**\n * Determine the specific type of a value for type-mismatch errors.\n * @param {unknown} value\n * @returns {string}\n */\nfunction determineSpecificType(value) {\n if (value === null || value === undefined) {\n return String(value)\n }\n\n if (typeof value === 'function' && value.name) {\n return `function ${value.name}`\n }\n\n if (typeof value === 'object') {\n if (value.constructor && value.constructor.name) {\n return `an instance of ${value.constructor.name}`\n }\n\n return `${inspect(value, {depth: -1})}`\n }\n\n let inspected = inspect(value, {colors: false});\n\n if (inspected.length > 28) {\n inspected = `${inspected.slice(0, 25)}...`;\n }\n\n return `type ${typeof value} (${inspected})`\n}\n\n// Manually “tree shaken” from:\n// \n// Last checked on: Apr 29, 2023.\n// Removed the native dependency.\n// Also: no need to cache, we do that in resolve already.\n\n\nconst hasOwnProperty$1 = {}.hasOwnProperty;\n\nconst {ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1} = codes;\n\n/** @type {Map} */\nconst cache = new Map();\n\n/**\n * @param {string} jsonPath\n * @param {{specifier: URL | string, base?: URL}} options\n * @returns {PackageConfig}\n */\nfunction read(jsonPath, {base, specifier}) {\n const existing = cache.get(jsonPath);\n\n if (existing) {\n return existing\n }\n\n /** @type {string | undefined} */\n let string;\n\n try {\n string = fs.readFileSync(path.toNamespacedPath(jsonPath), 'utf8');\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n\n if (exception.code !== 'ENOENT') {\n throw exception\n }\n }\n\n /** @type {PackageConfig} */\n const result = {\n exists: false,\n pjsonPath: jsonPath,\n main: undefined,\n name: undefined,\n type: 'none', // Ignore unknown types for forwards compatibility\n exports: undefined,\n imports: undefined\n };\n\n if (string !== undefined) {\n /** @type {Record} */\n let parsed;\n\n try {\n parsed = JSON.parse(string);\n } catch (error_) {\n const cause = /** @type {ErrnoException} */ (error_);\n const error = new ERR_INVALID_PACKAGE_CONFIG$1(\n jsonPath,\n (base ? `\"${specifier}\" from ` : '') + fileURLToPath(base || specifier),\n cause.message\n );\n error.cause = cause;\n throw error\n }\n\n result.exists = true;\n\n if (\n hasOwnProperty$1.call(parsed, 'name') &&\n typeof parsed.name === 'string'\n ) {\n result.name = parsed.name;\n }\n\n if (\n hasOwnProperty$1.call(parsed, 'main') &&\n typeof parsed.main === 'string'\n ) {\n result.main = parsed.main;\n }\n\n if (hasOwnProperty$1.call(parsed, 'exports')) {\n // @ts-expect-error: assume valid.\n result.exports = parsed.exports;\n }\n\n if (hasOwnProperty$1.call(parsed, 'imports')) {\n // @ts-expect-error: assume valid.\n result.imports = parsed.imports;\n }\n\n // Ignore unknown types for forwards compatibility\n if (\n hasOwnProperty$1.call(parsed, 'type') &&\n (parsed.type === 'commonjs' || parsed.type === 'module')\n ) {\n result.type = parsed.type;\n }\n }\n\n cache.set(jsonPath, result);\n\n return result\n}\n\n/**\n * @param {URL | string} resolved\n * @returns {PackageConfig}\n */\nfunction getPackageScopeConfig(resolved) {\n // Note: in Node, this is now a native module.\n let packageJSONUrl = new URL('package.json', resolved);\n\n while (true) {\n const packageJSONPath = packageJSONUrl.pathname;\n if (packageJSONPath.endsWith('node_modules/package.json')) {\n break\n }\n\n const packageConfig = read(fileURLToPath(packageJSONUrl), {\n specifier: resolved\n });\n\n if (packageConfig.exists) {\n return packageConfig\n }\n\n const lastPackageJSONUrl = packageJSONUrl;\n packageJSONUrl = new URL('../package.json', packageJSONUrl);\n\n // Terminates at root where ../package.json equals ../../package.json\n // (can't just check \"/package.json\" for Windows support).\n if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {\n break\n }\n }\n\n const packageJSONPath = fileURLToPath(packageJSONUrl);\n // ^^ Note: in Node, this is now a native module.\n\n return {\n pjsonPath: packageJSONPath,\n exists: false,\n type: 'none'\n }\n}\n\n/**\n * Returns the package type for a given URL.\n * @param {URL} url - The URL to get the package type for.\n * @returns {PackageType}\n */\nfunction getPackageType(url) {\n // To do @anonrig: Write a C++ function that returns only \"type\".\n return getPackageScopeConfig(url).type\n}\n\n// Manually “tree shaken” from:\n// \n// Last checked on: Apr 29, 2023.\n\n\nconst {ERR_UNKNOWN_FILE_EXTENSION} = codes;\n\nconst hasOwnProperty = {}.hasOwnProperty;\n\n/** @type {Record} */\nconst extensionFormatMap = {\n // @ts-expect-error: hush.\n __proto__: null,\n '.cjs': 'commonjs',\n '.js': 'module',\n '.json': 'json',\n '.mjs': 'module'\n};\n\n/**\n * @param {string | null} mime\n * @returns {string | null}\n */\nfunction mimeToFormat(mime) {\n if (\n mime &&\n /\\s*(text|application)\\/javascript\\s*(;\\s*charset=utf-?8\\s*)?/i.test(mime)\n )\n return 'module'\n if (mime === 'application/json') return 'json'\n return null\n}\n\n/**\n * @callback ProtocolHandler\n * @param {URL} parsed\n * @param {{parentURL: string, source?: Buffer}} context\n * @param {boolean} ignoreErrors\n * @returns {string | null | void}\n */\n\n/**\n * @type {Record}\n */\nconst protocolHandlers = {\n // @ts-expect-error: hush.\n __proto__: null,\n 'data:': getDataProtocolModuleFormat,\n 'file:': getFileProtocolModuleFormat,\n 'http:': getHttpProtocolModuleFormat,\n 'https:': getHttpProtocolModuleFormat,\n 'node:'() {\n return 'builtin'\n }\n};\n\n/**\n * @param {URL} parsed\n */\nfunction getDataProtocolModuleFormat(parsed) {\n const {1: mime} = /^([^/]+\\/[^;,]+)[^,]*?(;base64)?,/.exec(\n parsed.pathname\n ) || [null, null, null];\n return mimeToFormat(mime)\n}\n\n/**\n * Returns the file extension from a URL.\n *\n * Should give similar result to\n * `require('node:path').extname(require('node:url').fileURLToPath(url))`\n * when used with a `file:` URL.\n *\n * @param {URL} url\n * @returns {string}\n */\nfunction extname(url) {\n const pathname = url.pathname;\n let index = pathname.length;\n\n while (index--) {\n const code = pathname.codePointAt(index);\n\n if (code === 47 /* `/` */) {\n return ''\n }\n\n if (code === 46 /* `.` */) {\n return pathname.codePointAt(index - 1) === 47 /* `/` */\n ? ''\n : pathname.slice(index)\n }\n }\n\n return ''\n}\n\n/**\n * @type {ProtocolHandler}\n */\nfunction getFileProtocolModuleFormat(url, _context, ignoreErrors) {\n const value = extname(url);\n\n if (value === '.js') {\n const packageType = getPackageType(url);\n\n if (packageType !== 'none') {\n return packageType\n }\n\n return 'commonjs'\n }\n\n if (value === '') {\n const packageType = getPackageType(url);\n\n // Legacy behavior\n if (packageType === 'none' || packageType === 'commonjs') {\n return 'commonjs'\n }\n\n // Note: we don’t implement WASM, so we don’t need\n // `getFormatOfExtensionlessFile` from `formats`.\n return 'module'\n }\n\n const format = extensionFormatMap[value];\n if (format) return format\n\n // Explicit undefined return indicates load hook should rerun format check\n if (ignoreErrors) {\n return undefined\n }\n\n const filepath = fileURLToPath(url);\n throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath)\n}\n\nfunction getHttpProtocolModuleFormat() {\n // To do: HTTPS imports.\n}\n\n/**\n * @param {URL} url\n * @param {{parentURL: string}} context\n * @returns {string | null}\n */\nfunction defaultGetFormatWithoutErrors(url, context) {\n const protocol = url.protocol;\n\n if (!hasOwnProperty.call(protocolHandlers, protocol)) {\n return null\n }\n\n return protocolHandlers[protocol](url, context, true) || null\n}\n\n// Manually “tree shaken” from:\n// \n// Last checked on: Apr 29, 2023.\n\n\nconst {ERR_INVALID_ARG_VALUE} = codes;\n\n// In Node itself these values are populated from CLI arguments, before any\n// user code runs.\n// Here we just define the defaults.\nconst DEFAULT_CONDITIONS = Object.freeze(['node', 'import']);\nconst DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);\n\n/**\n * Returns the default conditions for ES module loading.\n */\nfunction getDefaultConditions() {\n return DEFAULT_CONDITIONS\n}\n\n/**\n * Returns the default conditions for ES module loading, as a Set.\n */\nfunction getDefaultConditionsSet() {\n return DEFAULT_CONDITIONS_SET\n}\n\n/**\n * @param {Array} [conditions]\n * @returns {Set}\n */\nfunction getConditionsSet(conditions) {\n if (conditions !== undefined && conditions !== getDefaultConditions()) {\n if (!Array.isArray(conditions)) {\n throw new ERR_INVALID_ARG_VALUE(\n 'conditions',\n conditions,\n 'expected an array'\n )\n }\n\n return new Set(conditions)\n }\n\n return getDefaultConditionsSet()\n}\n\n// Manually “tree shaken” from:\n// \n// Last checked on: Apr 29, 2023.\n\n\nconst RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];\n\nconst {\n ERR_NETWORK_IMPORT_DISALLOWED,\n ERR_INVALID_MODULE_SPECIFIER,\n ERR_INVALID_PACKAGE_CONFIG,\n ERR_INVALID_PACKAGE_TARGET,\n ERR_MODULE_NOT_FOUND,\n ERR_PACKAGE_IMPORT_NOT_DEFINED,\n ERR_PACKAGE_PATH_NOT_EXPORTED,\n ERR_UNSUPPORTED_DIR_IMPORT,\n ERR_UNSUPPORTED_RESOLVE_REQUEST\n} = codes;\n\nconst own = {}.hasOwnProperty;\n\nconst invalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\\\|\\/|$)/i;\nconst deprecatedInvalidSegmentRegEx =\n /(^|\\\\|\\/)((\\.|%2e)(\\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\\\|\\/|$)/i;\nconst invalidPackageNameRegEx = /^\\.|%|\\\\/;\nconst patternRegEx = /\\*/g;\nconst encodedSeparatorRegEx = /%2f|%5c/i;\n/** @type {Set} */\nconst emittedPackageWarnings = new Set();\n\nconst doubleSlashRegEx = /[/\\\\]{2}/;\n\n/**\n *\n * @param {string} target\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} base\n * @param {boolean} isTarget\n */\nfunction emitInvalidSegmentDeprecation(\n target,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n isTarget\n) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process.noDeprecation) {\n return\n }\n\n const pjsonPath = fileURLToPath(packageJsonUrl);\n const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;\n process.emitWarning(\n `Use of deprecated ${\n double ? 'double slash' : 'leading or trailing slash matching'\n } resolving \"${target}\" for module ` +\n `request \"${request}\" ${\n request === match ? '' : `matched to \"${match}\" `\n }in the \"${\n internal ? 'imports' : 'exports'\n }\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }.`,\n 'DeprecationWarning',\n 'DEP0166'\n );\n}\n\n/**\n * @param {URL} url\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {string} [main]\n * @returns {void}\n */\nfunction emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process.noDeprecation) {\n return\n }\n\n const format = defaultGetFormatWithoutErrors(url, {parentURL: base.href});\n if (format !== 'module') return\n const urlPath = fileURLToPath(url.href);\n const packagePath = fileURLToPath(new URL$1('.', packageJsonUrl));\n const basePath = fileURLToPath(base);\n if (!main) {\n process.emitWarning(\n `No \"main\" or \"exports\" field defined in the package.json for ${packagePath} resolving the main entry point \"${urlPath.slice(\n packagePath.length\n )}\", imported from ${basePath}.\\nDefault \"index\" lookups for the main are deprecated for ES modules.`,\n 'DeprecationWarning',\n 'DEP0151'\n );\n } else if (path.resolve(packagePath, main) !== urlPath) {\n process.emitWarning(\n `Package ${packagePath} has a \"main\" field set to \"${main}\", ` +\n `excluding the full filename and extension to the resolved file at \"${urlPath.slice(\n packagePath.length\n )}\", imported from ${basePath}.\\n Automatic extension resolution of the \"main\" field is ` +\n 'deprecated for ES modules.',\n 'DeprecationWarning',\n 'DEP0151'\n );\n }\n}\n\n/**\n * @param {string} path\n * @returns {Stats | undefined}\n */\nfunction tryStatSync(path) {\n // Note: from Node 15 onwards we can use `throwIfNoEntry: false` instead.\n try {\n return statSync(path)\n } catch {\n // Note: in Node code this returns `new Stats`,\n // but in Node 22 that’s marked as a deprecated internal API.\n // Which, well, we kinda are, but still to prevent that warning,\n // just yield `undefined`.\n }\n}\n\n/**\n * Legacy CommonJS main resolution:\n * 1. let M = pkg_url + (json main field)\n * 2. TRY(M, M.js, M.json, M.node)\n * 3. TRY(M/index.js, M/index.json, M/index.node)\n * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)\n * 5. NOT_FOUND\n *\n * @param {URL} url\n * @returns {boolean}\n */\nfunction fileExists(url) {\n const stats = statSync(url, {throwIfNoEntry: false});\n const isFile = stats ? stats.isFile() : undefined;\n return isFile === null || isFile === undefined ? false : isFile\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {PackageConfig} packageConfig\n * @param {URL} base\n * @returns {URL}\n */\nfunction legacyMainResolve(packageJsonUrl, packageConfig, base) {\n /** @type {URL | undefined} */\n let guess;\n if (packageConfig.main !== undefined) {\n guess = new URL$1(packageConfig.main, packageJsonUrl);\n // Note: fs check redundances will be handled by Descriptor cache here.\n if (fileExists(guess)) return guess\n\n const tries = [\n `./${packageConfig.main}.js`,\n `./${packageConfig.main}.json`,\n `./${packageConfig.main}.node`,\n `./${packageConfig.main}/index.js`,\n `./${packageConfig.main}/index.json`,\n `./${packageConfig.main}/index.node`\n ];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL$1(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(\n guess,\n packageJsonUrl,\n base,\n packageConfig.main\n );\n return guess\n }\n // Fallthrough.\n }\n\n const tries = ['./index.js', './index.json', './index.node'];\n let i = -1;\n\n while (++i < tries.length) {\n guess = new URL$1(tries[i], packageJsonUrl);\n if (fileExists(guess)) break\n guess = undefined;\n }\n\n if (guess) {\n emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);\n return guess\n }\n\n // Not found.\n throw new ERR_MODULE_NOT_FOUND(\n fileURLToPath(new URL$1('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {URL} resolved\n * @param {URL} base\n * @param {boolean} [preserveSymlinks]\n * @returns {URL}\n */\nfunction finalizeResolution(resolved, base, preserveSymlinks) {\n if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n resolved.pathname,\n 'must not include encoded \"/\" or \"\\\\\" characters',\n fileURLToPath(base)\n )\n }\n\n /** @type {string} */\n let filePath;\n\n try {\n filePath = fileURLToPath(resolved);\n } catch (error) {\n const cause = /** @type {ErrnoException} */ (error);\n Object.defineProperty(cause, 'input', {value: String(resolved)});\n Object.defineProperty(cause, 'module', {value: String(base)});\n throw cause\n }\n\n const stats = tryStatSync(\n filePath.endsWith('/') ? filePath.slice(-1) : filePath\n );\n\n if (stats && stats.isDirectory()) {\n const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base));\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!stats || !stats.isFile()) {\n const error = new ERR_MODULE_NOT_FOUND(\n filePath || resolved.pathname,\n base && fileURLToPath(base),\n true\n );\n // @ts-expect-error Add this for `import.meta.resolve`.\n error.url = String(resolved);\n throw error\n }\n\n if (!preserveSymlinks) {\n const real = realpathSync(filePath);\n const {search, hash} = resolved;\n resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? '/' : ''));\n resolved.search = search;\n resolved.hash = hash;\n }\n\n return resolved\n}\n\n/**\n * @param {string} specifier\n * @param {URL | undefined} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction importNotDefined(specifier, packageJsonUrl, base) {\n return new ERR_PACKAGE_IMPORT_NOT_DEFINED(\n specifier,\n packageJsonUrl && fileURLToPath(new URL$1('.', packageJsonUrl)),\n fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {Error}\n */\nfunction exportsNotFound(subpath, packageJsonUrl, base) {\n return new ERR_PACKAGE_PATH_NOT_EXPORTED(\n fileURLToPath(new URL$1('.', packageJsonUrl)),\n subpath,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} request\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {never}\n */\nfunction throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {\n const reason = `request is not a valid match in pattern \"${match}\" for the \"${\n internal ? 'imports' : 'exports'\n }\" resolution of ${fileURLToPath(packageJsonUrl)}`;\n throw new ERR_INVALID_MODULE_SPECIFIER(\n request,\n reason,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} subpath\n * @param {unknown} target\n * @param {URL} packageJsonUrl\n * @param {boolean} internal\n * @param {URL} [base]\n * @returns {Error}\n */\nfunction invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {\n target =\n typeof target === 'object' && target !== null\n ? JSON.stringify(target, null, '')\n : `${target}`;\n\n return new ERR_INVALID_PACKAGE_TARGET(\n fileURLToPath(new URL$1('.', packageJsonUrl)),\n subpath,\n target,\n internal,\n base && fileURLToPath(base)\n )\n}\n\n/**\n * @param {string} target\n * @param {string} subpath\n * @param {string} match\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction resolvePackageTargetString(\n target,\n subpath,\n match,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (subpath !== '' && !pattern && target[target.length - 1] !== '/')\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (!target.startsWith('./')) {\n if (internal && !target.startsWith('../') && !target.startsWith('/')) {\n let isURL = false;\n\n try {\n new URL$1(target);\n isURL = true;\n } catch {\n // Continue regardless of error.\n }\n\n if (!isURL) {\n const exportTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target + subpath;\n\n return packageResolve(exportTarget, packageJsonUrl, conditions)\n }\n }\n\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n\n if (invalidSegmentRegEx.exec(target.slice(2)) !== null) {\n if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {\n if (!isPathMap) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n true\n );\n }\n } else {\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n }\n }\n\n const resolved = new URL$1(target, packageJsonUrl);\n const resolvedPath = resolved.pathname;\n const packagePath = new URL$1('.', packageJsonUrl).pathname;\n\n if (!resolvedPath.startsWith(packagePath))\n throw invalidPackageTarget(match, target, packageJsonUrl, internal, base)\n\n if (subpath === '') return resolved\n\n if (invalidSegmentRegEx.exec(subpath) !== null) {\n const request = pattern\n ? match.replace('*', () => subpath)\n : match + subpath;\n if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {\n if (!isPathMap) {\n const resolvedTarget = pattern\n ? RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n target,\n () => subpath\n )\n : target;\n emitInvalidSegmentDeprecation(\n resolvedTarget,\n request,\n match,\n packageJsonUrl,\n internal,\n base,\n false\n );\n }\n } else {\n throwInvalidSubpath(request, match, packageJsonUrl, internal, base);\n }\n }\n\n if (pattern) {\n return new URL$1(\n RegExpPrototypeSymbolReplace.call(\n patternRegEx,\n resolved.href,\n () => subpath\n )\n )\n }\n\n return new URL$1(subpath, resolved)\n}\n\n/**\n * @param {string} key\n * @returns {boolean}\n */\nfunction isArrayIndex(key) {\n const keyNumber = Number(key);\n if (`${keyNumber}` !== key) return false\n return keyNumber >= 0 && keyNumber < 0xff_ff_ff_ff\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {unknown} target\n * @param {string} subpath\n * @param {string} packageSubpath\n * @param {URL} base\n * @param {boolean} pattern\n * @param {boolean} internal\n * @param {boolean} isPathMap\n * @param {Set | undefined} conditions\n * @returns {URL | null}\n */\nfunction resolvePackageTarget(\n packageJsonUrl,\n target,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n) {\n if (typeof target === 'string') {\n return resolvePackageTargetString(\n target,\n subpath,\n packageSubpath,\n packageJsonUrl,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n )\n }\n\n if (Array.isArray(target)) {\n /** @type {Array} */\n const targetList = target;\n if (targetList.length === 0) return null\n\n /** @type {ErrnoException | null | undefined} */\n let lastException;\n let i = -1;\n\n while (++i < targetList.length) {\n const targetItem = targetList[i];\n /** @type {URL | null} */\n let resolveResult;\n try {\n resolveResult = resolvePackageTarget(\n packageJsonUrl,\n targetItem,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n } catch (error) {\n const exception = /** @type {ErrnoException} */ (error);\n lastException = exception;\n if (exception.code === 'ERR_INVALID_PACKAGE_TARGET') continue\n throw error\n }\n\n if (resolveResult === undefined) continue\n\n if (resolveResult === null) {\n lastException = null;\n continue\n }\n\n return resolveResult\n }\n\n if (lastException === undefined || lastException === null) {\n return null\n }\n\n throw lastException\n }\n\n if (typeof target === 'object' && target !== null) {\n const keys = Object.getOwnPropertyNames(target);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (isArrayIndex(key)) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain numeric property keys.'\n )\n }\n }\n\n i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n if (key === 'default' || (conditions && conditions.has(key))) {\n // @ts-expect-error: indexable.\n const conditionalTarget = /** @type {unknown} */ (target[key]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n conditionalTarget,\n subpath,\n packageSubpath,\n base,\n pattern,\n internal,\n isPathMap,\n conditions\n );\n if (resolveResult === undefined) continue\n return resolveResult\n }\n }\n\n return null\n }\n\n if (target === null) {\n return null\n }\n\n throw invalidPackageTarget(\n packageSubpath,\n target,\n packageJsonUrl,\n internal,\n base\n )\n}\n\n/**\n * @param {unknown} exports\n * @param {URL} packageJsonUrl\n * @param {URL} base\n * @returns {boolean}\n */\nfunction isConditionalExportsMainSugar(exports, packageJsonUrl, base) {\n if (typeof exports === 'string' || Array.isArray(exports)) return true\n if (typeof exports !== 'object' || exports === null) return false\n\n const keys = Object.getOwnPropertyNames(exports);\n let isConditionalSugar = false;\n let i = 0;\n let keyIndex = -1;\n while (++keyIndex < keys.length) {\n const key = keys[keyIndex];\n const currentIsConditionalSugar = key === '' || key[0] !== '.';\n if (i++ === 0) {\n isConditionalSugar = currentIsConditionalSugar;\n } else if (isConditionalSugar !== currentIsConditionalSugar) {\n throw new ERR_INVALID_PACKAGE_CONFIG(\n fileURLToPath(packageJsonUrl),\n base,\n '\"exports\" cannot contain some keys starting with \\'.\\' and some not.' +\n ' The exports object must either be an object of package subpath keys' +\n ' or an object of main entry condition name keys only.'\n )\n }\n }\n\n return isConditionalSugar\n}\n\n/**\n * @param {string} match\n * @param {URL} pjsonUrl\n * @param {URL} base\n */\nfunction emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {\n // @ts-expect-error: apparently it does exist, TS.\n if (process.noDeprecation) {\n return\n }\n\n const pjsonPath = fileURLToPath(pjsonUrl);\n if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return\n emittedPackageWarnings.add(pjsonPath + '|' + match);\n process.emitWarning(\n `Use of deprecated trailing slash pattern mapping \"${match}\" in the ` +\n `\"exports\" field module resolution of the package at ${pjsonPath}${\n base ? ` imported from ${fileURLToPath(base)}` : ''\n }. Mapping specifiers ending in \"/\" is no longer supported.`,\n 'DeprecationWarning',\n 'DEP0155'\n );\n}\n\n/**\n * @param {URL} packageJsonUrl\n * @param {string} packageSubpath\n * @param {Record} packageConfig\n * @param {URL} base\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n) {\n let exports = packageConfig.exports;\n\n if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) {\n exports = {'.': exports};\n }\n\n if (\n own.call(exports, packageSubpath) &&\n !packageSubpath.includes('*') &&\n !packageSubpath.endsWith('/')\n ) {\n // @ts-expect-error: indexable.\n const target = exports[packageSubpath];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n '',\n packageSubpath,\n base,\n false,\n false,\n false,\n conditions\n );\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(exports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (\n patternIndex !== -1 &&\n packageSubpath.startsWith(key.slice(0, patternIndex))\n ) {\n // When this reaches EOL, this can throw at the top of the whole function:\n //\n // if (StringPrototypeEndsWith(packageSubpath, '/'))\n // throwInvalidSubpath(packageSubpath)\n //\n // To match \"imports\" and the spec.\n if (packageSubpath.endsWith('/')) {\n emitTrailingSlashPatternDeprecation(\n packageSubpath,\n packageJsonUrl,\n base\n );\n }\n\n const patternTrailer = key.slice(patternIndex + 1);\n\n if (\n packageSubpath.length >= key.length &&\n packageSubpath.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = packageSubpath.slice(\n patternIndex,\n packageSubpath.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n // @ts-expect-error: indexable.\n const target = /** @type {unknown} */ (exports[bestMatch]);\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n false,\n packageSubpath.endsWith('/'),\n conditions\n );\n\n if (resolveResult === null || resolveResult === undefined) {\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n }\n\n return resolveResult\n }\n\n throw exportsNotFound(packageSubpath, packageJsonUrl, base)\n}\n\n/**\n * @param {string} a\n * @param {string} b\n */\nfunction patternKeyCompare(a, b) {\n const aPatternIndex = a.indexOf('*');\n const bPatternIndex = b.indexOf('*');\n const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;\n const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;\n if (baseLengthA > baseLengthB) return -1\n if (baseLengthB > baseLengthA) return 1\n if (aPatternIndex === -1) return 1\n if (bPatternIndex === -1) return -1\n if (a.length > b.length) return -1\n if (b.length > a.length) return 1\n return 0\n}\n\n/**\n * @param {string} name\n * @param {URL} base\n * @param {Set} [conditions]\n * @returns {URL}\n */\nfunction packageImportsResolve(name, base, conditions) {\n if (name === '#' || name.startsWith('#/') || name.endsWith('/')) {\n const reason = 'is not a valid internal imports specifier name';\n throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base))\n }\n\n /** @type {URL | undefined} */\n let packageJsonUrl;\n\n const packageConfig = getPackageScopeConfig(base);\n\n if (packageConfig.exists) {\n packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n const imports = packageConfig.imports;\n if (imports) {\n if (own.call(imports, name) && !name.includes('*')) {\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n imports[name],\n '',\n name,\n base,\n false,\n true,\n false,\n conditions\n );\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n } else {\n let bestMatch = '';\n let bestMatchSubpath = '';\n const keys = Object.getOwnPropertyNames(imports);\n let i = -1;\n\n while (++i < keys.length) {\n const key = keys[i];\n const patternIndex = key.indexOf('*');\n\n if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) {\n const patternTrailer = key.slice(patternIndex + 1);\n if (\n name.length >= key.length &&\n name.endsWith(patternTrailer) &&\n patternKeyCompare(bestMatch, key) === 1 &&\n key.lastIndexOf('*') === patternIndex\n ) {\n bestMatch = key;\n bestMatchSubpath = name.slice(\n patternIndex,\n name.length - patternTrailer.length\n );\n }\n }\n }\n\n if (bestMatch) {\n const target = imports[bestMatch];\n const resolveResult = resolvePackageTarget(\n packageJsonUrl,\n target,\n bestMatchSubpath,\n bestMatch,\n base,\n true,\n true,\n false,\n conditions\n );\n\n if (resolveResult !== null && resolveResult !== undefined) {\n return resolveResult\n }\n }\n }\n }\n }\n\n throw importNotDefined(name, packageJsonUrl, base)\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n */\nfunction parsePackageName(specifier, base) {\n let separatorIndex = specifier.indexOf('/');\n let validPackageName = true;\n let isScoped = false;\n if (specifier[0] === '@') {\n isScoped = true;\n if (separatorIndex === -1 || specifier.length === 0) {\n validPackageName = false;\n } else {\n separatorIndex = specifier.indexOf('/', separatorIndex + 1);\n }\n }\n\n const packageName =\n separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);\n\n // Package name cannot have leading . and cannot have percent-encoding or\n // \\\\ separators.\n if (invalidPackageNameRegEx.exec(packageName) !== null) {\n validPackageName = false;\n }\n\n if (!validPackageName) {\n throw new ERR_INVALID_MODULE_SPECIFIER(\n specifier,\n 'is not a valid package name',\n fileURLToPath(base)\n )\n }\n\n const packageSubpath =\n '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));\n\n return {packageName, packageSubpath, isScoped}\n}\n\n/**\n * @param {string} specifier\n * @param {URL} base\n * @param {Set | undefined} conditions\n * @returns {URL}\n */\nfunction packageResolve(specifier, base, conditions) {\n if (builtinModules.includes(specifier)) {\n return new URL$1('node:' + specifier)\n }\n\n const {packageName, packageSubpath, isScoped} = parsePackageName(\n specifier,\n base\n );\n\n // ResolveSelf\n const packageConfig = getPackageScopeConfig(base);\n\n // Can’t test.\n /* c8 ignore next 16 */\n if (packageConfig.exists) {\n const packageJsonUrl = pathToFileURL(packageConfig.pjsonPath);\n if (\n packageConfig.name === packageName &&\n packageConfig.exports !== undefined &&\n packageConfig.exports !== null\n ) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n }\n\n let packageJsonUrl = new URL$1(\n './node_modules/' + packageName + '/package.json',\n base\n );\n let packageJsonPath = fileURLToPath(packageJsonUrl);\n /** @type {string} */\n let lastPath;\n do {\n const stat = tryStatSync(packageJsonPath.slice(0, -13));\n if (!stat || !stat.isDirectory()) {\n lastPath = packageJsonPath;\n packageJsonUrl = new URL$1(\n (isScoped ? '../../../../node_modules/' : '../../../node_modules/') +\n packageName +\n '/package.json',\n packageJsonUrl\n );\n packageJsonPath = fileURLToPath(packageJsonUrl);\n continue\n }\n\n // Package match.\n const packageConfig = read(packageJsonPath, {base, specifier});\n if (packageConfig.exports !== undefined && packageConfig.exports !== null) {\n return packageExportsResolve(\n packageJsonUrl,\n packageSubpath,\n packageConfig,\n base,\n conditions\n )\n }\n\n if (packageSubpath === '.') {\n return legacyMainResolve(packageJsonUrl, packageConfig, base)\n }\n\n return new URL$1(packageSubpath, packageJsonUrl)\n // Cross-platform root check.\n } while (packageJsonPath.length !== lastPath.length)\n\n throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false)\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction isRelativeSpecifier(specifier) {\n if (specifier[0] === '.') {\n if (specifier.length === 1 || specifier[1] === '/') return true\n if (\n specifier[1] === '.' &&\n (specifier.length === 2 || specifier[2] === '/')\n ) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @param {string} specifier\n * @returns {boolean}\n */\nfunction shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {\n if (specifier === '') return false\n if (specifier[0] === '/') return true\n return isRelativeSpecifier(specifier)\n}\n\n/**\n * The “Resolver Algorithm Specification” as detailed in the Node docs (which is\n * sync and slightly lower-level than `resolve`).\n *\n * @param {string} specifier\n * `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.\n * @param {URL} base\n * Full URL (to a file) that `specifier` is resolved relative from.\n * @param {Set} [conditions]\n * Conditions.\n * @param {boolean} [preserveSymlinks]\n * Keep symlinks instead of resolving them.\n * @returns {URL}\n * A URL object to the found thing.\n */\nfunction moduleResolve(specifier, base, conditions, preserveSymlinks) {\n // Note: The Node code supports `base` as a string (in this internal API) too,\n // we don’t.\n const protocol = base.protocol;\n const isData = protocol === 'data:';\n const isRemote = isData || protocol === 'http:' || protocol === 'https:';\n // Order swapped from spec for minor perf gain.\n // Ok since relative URLs cannot parse as URLs.\n /** @type {URL | undefined} */\n let resolved;\n\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n try {\n resolved = new URL$1(specifier, base);\n } catch (error_) {\n const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n error.cause = error_;\n throw error\n }\n } else if (protocol === 'file:' && specifier[0] === '#') {\n resolved = packageImportsResolve(specifier, base, conditions);\n } else {\n try {\n resolved = new URL$1(specifier);\n } catch (error_) {\n // Note: actual code uses `canBeRequiredWithoutScheme`.\n if (isRemote && !builtinModules.includes(specifier)) {\n const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base);\n error.cause = error_;\n throw error\n }\n\n resolved = packageResolve(specifier, base, conditions);\n }\n }\n\n assert(resolved !== undefined, 'expected to be defined');\n\n if (resolved.protocol !== 'file:') {\n return resolved\n }\n\n return finalizeResolution(resolved, base, preserveSymlinks)\n}\n\n/**\n * @param {string} specifier\n * @param {URL | undefined} parsed\n * @param {URL | undefined} parsedParentURL\n */\nfunction checkIfDisallowedImport(specifier, parsed, parsedParentURL) {\n if (parsedParentURL) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const parentProtocol = parsedParentURL.protocol;\n\n if (parentProtocol === 'http:' || parentProtocol === 'https:') {\n if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {\n // Avoid accessing the `protocol` property due to the lazy getters.\n const parsedProtocol = parsed?.protocol;\n\n // `data:` and `blob:` disallowed due to allowing file: access via\n // indirection\n if (\n parsedProtocol &&\n parsedProtocol !== 'https:' &&\n parsedProtocol !== 'http:'\n ) {\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'remote imports cannot import from a local location.'\n )\n }\n\n return {url: parsed?.href || ''}\n }\n\n if (builtinModules.includes(specifier)) {\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'remote imports cannot import from a local location.'\n )\n }\n\n throw new ERR_NETWORK_IMPORT_DISALLOWED(\n specifier,\n parsedParentURL,\n 'only relative and absolute specifiers are supported.'\n )\n }\n }\n}\n\n// Note: this is from:\n// \n/**\n * Checks if a value has the shape of a WHATWG URL object.\n *\n * Using a symbol or instanceof would not be able to recognize URL objects\n * coming from other implementations (e.g. in Electron), so instead we are\n * checking some well known properties for a lack of a better test.\n *\n * We use `href` and `protocol` as they are the only properties that are\n * easy to retrieve and calculate due to the lazy nature of the getters.\n *\n * @template {unknown} Value\n * @param {Value} self\n * @returns {Value is URL}\n */\nfunction isURL(self) {\n return Boolean(\n self &&\n typeof self === 'object' &&\n 'href' in self &&\n typeof self.href === 'string' &&\n 'protocol' in self &&\n typeof self.protocol === 'string' &&\n self.href &&\n self.protocol\n )\n}\n\n/**\n * Validate user-input in `context` supplied by a custom loader.\n *\n * @param {unknown} parentURL\n * @returns {asserts parentURL is URL | string | undefined}\n */\nfunction throwIfInvalidParentURL(parentURL) {\n if (parentURL === undefined) {\n return // Main entry point, so no parent\n }\n\n if (typeof parentURL !== 'string' && !isURL(parentURL)) {\n throw new codes.ERR_INVALID_ARG_TYPE(\n 'parentURL',\n ['string', 'URL'],\n parentURL\n )\n }\n}\n\n/**\n * @param {string} specifier\n * @param {{parentURL?: string, conditions?: Array}} context\n * @returns {{url: string, format?: string | null}}\n */\nfunction defaultResolve(specifier, context = {}) {\n const {parentURL} = context;\n assert(parentURL !== undefined, 'expected `parentURL` to be defined');\n throwIfInvalidParentURL(parentURL);\n\n /** @type {URL | undefined} */\n let parsedParentURL;\n if (parentURL) {\n try {\n parsedParentURL = new URL$1(parentURL);\n } catch {\n // Ignore exception\n }\n }\n\n /** @type {URL | undefined} */\n let parsed;\n /** @type {string | undefined} */\n let protocol;\n\n try {\n parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier)\n ? new URL$1(specifier, parsedParentURL)\n : new URL$1(specifier);\n\n // Avoid accessing the `protocol` property due to the lazy getters.\n protocol = parsed.protocol;\n\n if (protocol === 'data:') {\n return {url: parsed.href, format: null}\n }\n } catch {\n // Ignore exception\n }\n\n // There are multiple deep branches that can either throw or return; instead\n // of duplicating that deeply nested logic for the possible returns, DRY and\n // check for a return. This seems the least gnarly.\n const maybeReturn = checkIfDisallowedImport(\n specifier,\n parsed,\n parsedParentURL\n );\n\n if (maybeReturn) return maybeReturn\n\n // This must come after checkIfDisallowedImport\n if (protocol === undefined && parsed) {\n protocol = parsed.protocol;\n }\n\n if (protocol === 'node:') {\n return {url: specifier}\n }\n\n // This must come after checkIfDisallowedImport\n if (parsed && parsed.protocol === 'node:') return {url: specifier}\n\n const conditions = getConditionsSet(context.conditions);\n\n const url = moduleResolve(specifier, new URL$1(parentURL), conditions, false);\n\n return {\n // Do NOT cast `url` to a string: that will work even when there are real\n // problems, silencing them\n url: url.href,\n format: defaultGetFormatWithoutErrors(url, {parentURL})\n }\n}\n\n/**\n * @typedef {import('./lib/errors.js').ErrnoException} ErrnoException\n */\n\n\n/**\n * Match `import.meta.resolve` except that `parent` is required (you can pass\n * `import.meta.url`).\n *\n * @param {string} specifier\n * The module specifier to resolve relative to parent\n * (`/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`,\n * etc).\n * @param {string} parent\n * The absolute parent module URL to resolve from.\n * You must pass `import.meta.url` or something else.\n * @returns {string}\n * Returns a string to a full `file:`, `data:`, or `node:` URL\n * to the found thing.\n */\nfunction resolve(specifier, parent) {\n if (!parent) {\n throw new Error(\n 'Please pass `parent`: `import-meta-resolve` cannot ponyfill that'\n )\n }\n\n try {\n return defaultResolve(specifier, {parentURL: parent}).url\n } catch (error) {\n // See: \n const exception = /** @type {ErrnoException} */ (error);\n\n if (\n (exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' ||\n exception.code === 'ERR_MODULE_NOT_FOUND') &&\n typeof exception.url === 'string'\n ) {\n return exception.url\n }\n\n throw error\n }\n}\n\nexport { moduleResolve, resolve };\n"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K,CACb,kEACF,CAAC;EACH;EAEA,IAAI;IACF,OAAO6O,cAAc,CAAC/N,SAAS,EAAE;MAACoI,SAAS,EAAE+F;IAAM,CAAC,CAAC,CAACjJ,GAAG;EAC3D,CAAC,CAAC,OAAO/D,KAAK,EAAE;IAEd,MAAM0C,SAAS,GAAkC1C,KAAM;IAEvD,IACE,CAAC0C,SAAS,CAAClC,IAAI,KAAK,4BAA4B,IAC9CkC,SAAS,CAAClC,IAAI,KAAK,sBAAsB,KAC3C,OAAOkC,SAAS,CAACqB,GAAG,KAAK,QAAQ,EACjC;MACA,OAAOrB,SAAS,CAACqB,GAAG;IACtB;IAEA,MAAM/D,KAAK;EACb;AACF;AAAC","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json deleted file mode 100644 index 181350a..0000000 --- a/node_modules/@babel/core/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "@babel/core", - "version": "7.29.0", - "description": "Babel compiler core.", - "main": "./lib/index.js", - "author": "The Babel Team (https://babel.dev/team)", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel.git", - "directory": "packages/babel-core" - }, - "homepage": "https://babel.dev/docs/en/next/babel-core", - "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen", - "keywords": [ - "6to5", - "babel", - "classes", - "const", - "es6", - "harmony", - "let", - "modules", - "transpile", - "transpiler", - "var", - "babel-core", - "compiler" - ], - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - }, - "browser": { - "./lib/config/files/index.js": "./lib/config/files/index-browser.js", - "./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js", - "./lib/transform-file.js": "./lib/transform-file-browser.js", - "./src/config/files/index.ts": "./src/config/files/index-browser.ts", - "./src/config/resolve-targets.ts": "./src/config/resolve-targets-browser.ts", - "./src/transform-file.ts": "./src/transform-file-browser.ts" - }, - "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-module-transforms": "^7.28.6", - "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/traverse": "^7.29.0", - "@babel/types": "^7.29.0", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "^7.28.6", - "@babel/plugin-syntax-flow": "^7.28.6", - "@babel/plugin-transform-flow-strip-types": "^7.27.1", - "@babel/plugin-transform-modules-commonjs": "^7.28.6", - "@babel/preset-env": "^7.29.0", - "@babel/preset-typescript": "^7.28.5", - "@jridgewell/trace-mapping": "^0.3.28", - "@types/convert-source-map": "^2.0.0", - "@types/debug": "^4.1.0", - "@types/resolve": "^1.3.2", - "@types/semver": "^5.4.0", - "rimraf": "^3.0.0", - "ts-node": "^11.0.0-beta.1", - "tsx": "^4.20.3" - }, - "type": "commonjs" -} \ No newline at end of file diff --git a/node_modules/@babel/core/src/config/files/index-browser.ts b/node_modules/@babel/core/src/config/files/index-browser.ts deleted file mode 100644 index 435c068..0000000 --- a/node_modules/@babel/core/src/config/files/index-browser.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* c8 ignore start */ - -import type { Handler } from "gensync"; - -import type { - ConfigFile, - IgnoreFile, - RelativeConfig, - FilePackageData, -} from "./types.ts"; - -import type { CallerMetadata } from "../validation/options.ts"; - -export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData }; - -export function findConfigUpwards( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - rootDir: string, -): string | null { - return null; -} - -// eslint-disable-next-line require-yield -export function* findPackageData(filepath: string): Handler { - return { - filepath, - directories: [], - pkg: null, - isPackage: false, - }; -} - -// eslint-disable-next-line require-yield -export function* findRelativeConfig( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - pkgData: FilePackageData, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - envName: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - caller: CallerMetadata | undefined, -): Handler { - return { config: null, ignore: null }; -} - -// eslint-disable-next-line require-yield -export function* findRootConfig( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - dirname: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - envName: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - caller: CallerMetadata | undefined, -): Handler { - return null; -} - -// eslint-disable-next-line require-yield -export function* loadConfig( - name: string, - dirname: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - envName: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - caller: CallerMetadata | undefined, -): Handler { - throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); -} - -// eslint-disable-next-line require-yield -export function* resolveShowConfigPath( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - dirname: string, -): Handler { - return null; -} - -export const ROOT_CONFIG_FILENAMES: string[] = []; - -type Resolved = - | { loader: "require"; filepath: string } - | { loader: "import"; filepath: string }; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function resolvePlugin(name: string, dirname: string): Resolved | null { - return null; -} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function resolvePreset(name: string, dirname: string): Resolved | null { - return null; -} - -export function loadPlugin( - name: string, - dirname: string, -): Handler<{ - filepath: string; - value: unknown; -}> { - throw new Error( - `Cannot load plugin ${name} relative to ${dirname} in a browser`, - ); -} - -export function loadPreset( - name: string, - dirname: string, -): Handler<{ - filepath: string; - value: unknown; -}> { - throw new Error( - `Cannot load preset ${name} relative to ${dirname} in a browser`, - ); -} diff --git a/node_modules/@babel/core/src/config/files/index.ts b/node_modules/@babel/core/src/config/files/index.ts deleted file mode 100644 index 7b9bf3b..0000000 --- a/node_modules/@babel/core/src/config/files/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -type indexBrowserType = typeof import("./index-browser"); -type indexType = typeof import("./index"); - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of index-browser, since this file may be replaced at bundle time with index-browser. -// eslint-disable-next-line @typescript-eslint/no-unused-expressions -({}) as any as indexBrowserType as indexType; - -export { findPackageData } from "./package.ts"; - -export { - findConfigUpwards, - findRelativeConfig, - findRootConfig, - loadConfig, - resolveShowConfigPath, - ROOT_CONFIG_FILENAMES, -} from "./configuration.ts"; -export type { - ConfigFile, - IgnoreFile, - RelativeConfig, - FilePackageData, -} from "./types.ts"; -export { - loadPlugin, - loadPreset, - resolvePlugin, - resolvePreset, -} from "./plugins.ts"; diff --git a/node_modules/@babel/core/src/config/resolve-targets-browser.ts b/node_modules/@babel/core/src/config/resolve-targets-browser.ts deleted file mode 100644 index 89e4194..0000000 --- a/node_modules/@babel/core/src/config/resolve-targets-browser.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* c8 ignore start */ - -import type { InputOptions } from "./validation/options.ts"; -import getTargets, { - type InputTargets, -} from "@babel/helper-compilation-targets"; - -import type { Targets } from "@babel/helper-compilation-targets"; - -export function resolveBrowserslistConfigFile( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - browserslistConfigFile: string, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - configFilePath: string, -): string | void { - return undefined; -} - -export function resolveTargets( - options: InputOptions, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - root: string, -): Targets { - const optTargets = options.targets; - let targets: InputTargets; - - if (typeof optTargets === "string" || Array.isArray(optTargets)) { - targets = { browsers: optTargets }; - } else if (optTargets) { - if ("esmodules" in optTargets) { - targets = { ...optTargets, esmodules: "intersect" }; - } else { - // https://github.com/microsoft/TypeScript/issues/17002 - targets = optTargets as InputTargets; - } - } - - return getTargets(targets, { - ignoreBrowserslistConfig: true, - browserslistEnv: options.browserslistEnv, - }); -} diff --git a/node_modules/@babel/core/src/config/resolve-targets.ts b/node_modules/@babel/core/src/config/resolve-targets.ts deleted file mode 100644 index 4991f77..0000000 --- a/node_modules/@babel/core/src/config/resolve-targets.ts +++ /dev/null @@ -1,54 +0,0 @@ -type browserType = typeof import("./resolve-targets-browser"); -type nodeType = typeof import("./resolve-targets"); - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of index-browser, since this file may be replaced at bundle time with index-browser. -// eslint-disable-next-line @typescript-eslint/no-unused-expressions -({}) as any as browserType as nodeType; - -import type { InputOptions } from "./validation/options.ts"; -import path from "node:path"; -import getTargets, { - type InputTargets, -} from "@babel/helper-compilation-targets"; - -import type { Targets } from "@babel/helper-compilation-targets"; - -export function resolveBrowserslistConfigFile( - browserslistConfigFile: string, - configFileDir: string, -): string | undefined { - return path.resolve(configFileDir, browserslistConfigFile); -} - -export function resolveTargets(options: InputOptions, root: string): Targets { - const optTargets = options.targets; - let targets: InputTargets; - - if (typeof optTargets === "string" || Array.isArray(optTargets)) { - targets = { browsers: optTargets }; - } else if (optTargets) { - if ("esmodules" in optTargets) { - targets = { ...optTargets, esmodules: "intersect" }; - } else { - // https://github.com/microsoft/TypeScript/issues/17002 - targets = optTargets as InputTargets; - } - } - - const { browserslistConfigFile } = options; - let configFile; - let ignoreBrowserslistConfig = false; - if (typeof browserslistConfigFile === "string") { - configFile = browserslistConfigFile; - } else { - ignoreBrowserslistConfig = browserslistConfigFile === false; - } - - return getTargets(targets, { - ignoreBrowserslistConfig, - configFile, - configPath: root, - browserslistEnv: options.browserslistEnv, - }); -} diff --git a/node_modules/@babel/core/src/transform-file-browser.ts b/node_modules/@babel/core/src/transform-file-browser.ts deleted file mode 100644 index 0a15ca5..0000000 --- a/node_modules/@babel/core/src/transform-file-browser.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* c8 ignore start */ - -// duplicated from transform-file so we do not have to import anything here -type TransformFile = { - (filename: string, callback: (error: Error, file: null) => void): void; - ( - filename: string, - opts: any, - callback: (error: Error, file: null) => void, - ): void; -}; - -export const transformFile: TransformFile = function transformFile( - filename, - opts, - callback?: (error: Error, file: null) => void, -) { - if (typeof opts === "function") { - callback = opts; - } - - callback(new Error("Transforming files is not supported in browsers"), null); -}; - -export function transformFileSync(): never { - throw new Error("Transforming files is not supported in browsers"); -} - -export function transformFileAsync() { - return Promise.reject( - new Error("Transforming files is not supported in browsers"), - ); -} diff --git a/node_modules/@babel/core/src/transform-file.ts b/node_modules/@babel/core/src/transform-file.ts deleted file mode 100644 index 10a3140..0000000 --- a/node_modules/@babel/core/src/transform-file.ts +++ /dev/null @@ -1,56 +0,0 @@ -import gensync, { type Handler } from "gensync"; - -import loadConfig from "./config/index.ts"; -import type { InputOptions, ResolvedConfig } from "./config/index.ts"; -import { run } from "./transformation/index.ts"; -import type { FileResult, FileResultCallback } from "./transformation/index.ts"; -import * as fs from "./gensync-utils/fs.ts"; - -type transformFileBrowserType = typeof import("./transform-file-browser"); -type transformFileType = typeof import("./transform-file"); - -// Kind of gross, but essentially asserting that the exports of this module are the same as the -// exports of transform-file-browser, since this file may be replaced at bundle time with -// transform-file-browser. -// eslint-disable-next-line @typescript-eslint/no-unused-expressions -({}) as any as transformFileBrowserType as transformFileType; - -const transformFileRunner = gensync(function* ( - filename: string, - opts?: InputOptions, -): Handler { - const options = { ...opts, filename }; - - const config: ResolvedConfig | null = yield* loadConfig(options); - if (config === null) return null; - - const code = yield* fs.readFile(filename, "utf8"); - return yield* run(config, code); -}); - -// @ts-expect-error TS doesn't detect that this signature is compatible -export function transformFile( - filename: string, - callback: FileResultCallback, -): void; -export function transformFile( - filename: string, - opts: InputOptions | undefined | null, - callback: FileResultCallback, -): void; -export function transformFile( - ...args: Parameters -) { - transformFileRunner.errback(...args); -} - -export function transformFileSync( - ...args: Parameters -) { - return transformFileRunner.sync(...args); -} -export function transformFileAsync( - ...args: Parameters -) { - return transformFileRunner.async(...args); -} diff --git a/node_modules/@babel/generator/LICENSE b/node_modules/@babel/generator/LICENSE deleted file mode 100644 index f31575e..0000000 --- a/node_modules/@babel/generator/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/generator/README.md b/node_modules/@babel/generator/README.md deleted file mode 100644 index d56149a..0000000 --- a/node_modules/@babel/generator/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/generator - -> Turns an AST into code. - -See our website [@babel/generator](https://babeljs.io/docs/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/generator -``` - -or using yarn: - -```sh -yarn add @babel/generator --dev -``` diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js deleted file mode 100644 index 05b5279..0000000 --- a/node_modules/@babel/generator/lib/buffer.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -const spaceIndents = []; -for (let i = 0; i < 32; i++) { - spaceIndents.push(" ".repeat(i * 2)); -} -class Buffer { - constructor(map, indentChar) { - this._map = null; - this._buf = ""; - this._str = ""; - this._appendCount = 0; - this._last = 0; - this._canMarkIdName = true; - this._indentChar = ""; - this._queuedChar = 0; - this._position = { - line: 1, - column: 0 - }; - this._sourcePosition = { - identifierName: undefined, - identifierNamePos: undefined, - line: undefined, - column: undefined, - filename: undefined - }; - this._map = map; - this._indentChar = indentChar; - } - get() { - const { - _map, - _last - } = this; - if (this._queuedChar !== 32) { - this._flush(); - } - const code = _last === 10 ? (this._buf + this._str).trimRight() : this._buf + this._str; - if (_map === null) { - return { - code: code, - decodedMap: undefined, - map: null, - rawMappings: undefined - }; - } - const result = { - code: code, - decodedMap: _map.getDecoded(), - get __mergedMap() { - return this.map; - }, - get map() { - const resultMap = _map.get(); - result.map = resultMap; - return resultMap; - }, - set map(value) { - Object.defineProperty(result, "map", { - value, - writable: true - }); - }, - get rawMappings() { - const mappings = _map.getRawMappings(); - result.rawMappings = mappings; - return mappings; - }, - set rawMappings(value) { - Object.defineProperty(result, "rawMappings", { - value, - writable: true - }); - } - }; - return result; - } - append(str, maybeNewline) { - this._flush(); - this._append(str, maybeNewline); - } - appendChar(char) { - this._flush(); - this._appendChar(char, 1, true); - } - queue(char) { - this._flush(); - this._queuedChar = char; - } - _flush() { - const queuedChar = this._queuedChar; - if (queuedChar !== 0) { - this._appendChar(queuedChar, 1, true); - this._queuedChar = 0; - } - } - _appendChar(char, repeat, useSourcePos) { - this._last = char; - if (char === -1) { - const indent = repeat >= 64 ? this._indentChar.repeat(repeat) : spaceIndents[repeat / 2]; - this._str += indent; - } else { - this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char); - } - const isSpace = char === 32; - const position = this._position; - if (char !== 10) { - if (this._map) { - const sourcePos = this._sourcePosition; - if (useSourcePos && sourcePos) { - this._map.mark(position, sourcePos.line, sourcePos.column, isSpace ? undefined : sourcePos.identifierName, isSpace ? undefined : sourcePos.identifierNamePos, sourcePos.filename); - if (!isSpace && this._canMarkIdName) { - sourcePos.identifierName = undefined; - sourcePos.identifierNamePos = undefined; - } - } else { - this._map.mark(position); - } - } - position.column += repeat; - } else { - position.line++; - position.column = 0; - } - } - _append(str, maybeNewline) { - const len = str.length; - const position = this._position; - const sourcePos = this._sourcePosition; - this._last = -1; - if (++this._appendCount > 4096) { - +this._str; - this._buf += this._str; - this._str = str; - this._appendCount = 0; - } else { - this._str += str; - } - const hasMap = this._map !== null; - if (!maybeNewline && !hasMap) { - position.column += len; - return; - } - const { - column, - identifierName, - identifierNamePos, - filename - } = sourcePos; - let line = sourcePos.line; - if ((identifierName != null || identifierNamePos != null) && this._canMarkIdName) { - sourcePos.identifierName = undefined; - sourcePos.identifierNamePos = undefined; - } - let i = str.indexOf("\n"); - let last = 0; - if (hasMap && i !== 0) { - this._map.mark(position, line, column, identifierName, identifierNamePos, filename); - } - while (i !== -1) { - position.line++; - position.column = 0; - last = i + 1; - if (last < len && line !== undefined) { - line++; - if (hasMap) { - this._map.mark(position, line, 0, undefined, undefined, filename); - } - } - i = str.indexOf("\n", last); - } - position.column += len - last; - } - removeLastSemicolon() { - if (this._queuedChar === 59) { - this._queuedChar = 0; - } - } - getLastChar(checkQueue) { - if (!checkQueue) { - return this._last; - } - const queuedChar = this._queuedChar; - return queuedChar !== 0 ? queuedChar : this._last; - } - getNewlineCount() { - return this._queuedChar === 0 && this._last === 10 ? 1 : 0; - } - hasContent() { - return this._last !== 0; - } - exactSource(loc, cb) { - if (!this._map) { - cb(); - return; - } - this.source("start", loc); - const identifierName = loc.identifierName; - const sourcePos = this._sourcePosition; - if (identifierName != null) { - this._canMarkIdName = false; - sourcePos.identifierName = identifierName; - } - cb(); - if (identifierName != null) { - this._canMarkIdName = true; - sourcePos.identifierName = undefined; - sourcePos.identifierNamePos = undefined; - } - this.source("end", loc); - } - source(prop, loc) { - if (!this._map) return; - this._normalizePosition(prop, loc, 0); - } - sourceWithOffset(prop, loc, columnOffset) { - if (!this._map) return; - this._normalizePosition(prop, loc, columnOffset); - } - _normalizePosition(prop, loc, columnOffset) { - this._flush(); - const pos = loc[prop]; - const target = this._sourcePosition; - if (pos) { - target.line = pos.line; - target.column = Math.max(pos.column + columnOffset, 0); - target.filename = loc.filename; - } - } - getCurrentColumn() { - return this._position.column + (this._queuedChar ? 1 : 0); - } - getCurrentLine() { - return this._position.line; - } -} -exports.default = Buffer; - -//# sourceMappingURL=buffer.js.map diff --git a/node_modules/@babel/generator/lib/buffer.js.map b/node_modules/@babel/generator/lib/buffer.js.map deleted file mode 100644 index 804ea0a..0000000 --- a/node_modules/@babel/generator/lib/buffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["spaceIndents","i","push","repeat","Buffer","constructor","map","indentChar","_map","_buf","_str","_appendCount","_last","_canMarkIdName","_indentChar","_queuedChar","_position","line","column","_sourcePosition","identifierName","undefined","identifierNamePos","filename","get","_flush","code","trimRight","decodedMap","rawMappings","result","getDecoded","__mergedMap","resultMap","value","Object","defineProperty","writable","mappings","getRawMappings","append","str","maybeNewline","_append","appendChar","char","_appendChar","queue","queuedChar","useSourcePos","indent","String","fromCharCode","isSpace","position","sourcePos","mark","len","length","hasMap","indexOf","last","removeLastSemicolon","getLastChar","checkQueue","getNewlineCount","hasContent","exactSource","loc","cb","source","prop","_normalizePosition","sourceWithOffset","columnOffset","pos","target","Math","max","getCurrentColumn","getCurrentLine","exports","default"],"sources":["../src/buffer.ts"],"sourcesContent":["import type SourceMap from \"./source-map.ts\";\nimport type { SourceLocation } from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charcodes from \"charcodes\";\n\nexport type Loc = SourceLocation;\nexport type Pos = SourceLocation[\"start\"];\n\ntype SourcePosition = {\n line: number | undefined;\n column: number | undefined;\n identifierName: string | undefined;\n identifierNamePos: Pos | undefined;\n filename: string | undefined;\n};\n\nconst spaceIndents: string[] = [];\nfor (let i = 0; i < 32; i++) {\n spaceIndents.push(\" \".repeat(i * 2));\n}\n\nexport default class Buffer {\n constructor(map: SourceMap | null, indentChar: string) {\n this._map = map;\n this._indentChar = indentChar;\n }\n\n _map: SourceMap | null = null;\n _buf = \"\";\n _str = \"\";\n _appendCount = 0;\n _last = 0;\n _canMarkIdName = true;\n _indentChar = \"\";\n _queuedChar: typeof charcodes.space | typeof charcodes.semicolon | 0 = 0;\n\n _position = {\n line: 1,\n column: 0,\n };\n _sourcePosition: SourcePosition = {\n identifierName: undefined,\n identifierNamePos: undefined,\n line: undefined,\n column: undefined,\n filename: undefined,\n };\n\n /**\n * Get the final string output from the buffer, along with the sourcemap if one exists.\n */\n\n get() {\n const { _map, _last } = this;\n if (this._queuedChar !== charcodes.space) {\n this._flush();\n }\n\n // Whatever trim is used here should not execute a regex against the\n // source string since it may be arbitrarily large after all transformations\n const code =\n _last === charcodes.lineFeed\n ? (this._buf + this._str).trimRight()\n : this._buf + this._str;\n\n // Creating objects with getters is expensive.\n if (_map === null) {\n return {\n code: code,\n decodedMap: undefined,\n map: null,\n rawMappings: undefined,\n };\n }\n\n const result = {\n code: code,\n // Decoded sourcemap is free to generate.\n decodedMap: _map.getDecoded(),\n // Used as a marker for backwards compatibility. We moved input map merging\n // into the generator. We cannot merge the input map a second time, so the\n // presence of this field tells us we've already done the work.\n get __mergedMap() {\n return this.map;\n },\n // Encoding the sourcemap is moderately CPU expensive.\n get map() {\n const resultMap = _map.get();\n result.map = resultMap;\n return resultMap;\n },\n set map(value) {\n Object.defineProperty(result, \"map\", { value, writable: true });\n },\n // Retrieving the raw mappings is very memory intensive.\n get rawMappings() {\n const mappings = _map.getRawMappings();\n result.rawMappings = mappings;\n return mappings;\n },\n set rawMappings(value) {\n Object.defineProperty(result, \"rawMappings\", { value, writable: true });\n },\n };\n\n return result;\n }\n\n /**\n * Add a string to the buffer that cannot be reverted.\n */\n\n append(str: string, maybeNewline: boolean): void {\n this._flush();\n this._append(str, maybeNewline);\n }\n\n appendChar(char: number): void {\n this._flush();\n this._appendChar(char, 1, true);\n }\n\n /**\n * Add a string to the buffer than can be reverted.\n */\n queue(char: typeof charcodes.space | typeof charcodes.semicolon): void {\n this._flush();\n this._queuedChar = char;\n }\n\n _flush(): void {\n const queuedChar = this._queuedChar;\n if (queuedChar !== 0) {\n this._appendChar(queuedChar, 1, true);\n this._queuedChar = 0;\n }\n }\n\n _appendChar(char: number, repeat: number, useSourcePos: boolean): void {\n this._last = char;\n\n if (char === -1) {\n const indent =\n repeat >= 64\n ? this._indentChar.repeat(repeat)\n : spaceIndents[repeat / 2];\n this._str += indent;\n } else {\n this._str +=\n repeat > 1\n ? String.fromCharCode(char).repeat(repeat)\n : String.fromCharCode(char);\n }\n\n const isSpace = char === charcodes.space;\n const position = this._position;\n if (char !== charcodes.lineFeed) {\n if (this._map) {\n const sourcePos = this._sourcePosition;\n if (useSourcePos && sourcePos) {\n this._map.mark(\n position,\n sourcePos.line,\n sourcePos.column,\n isSpace ? undefined : sourcePos.identifierName,\n isSpace ? undefined : sourcePos.identifierNamePos,\n sourcePos.filename,\n );\n\n if (!isSpace && this._canMarkIdName) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n } else {\n this._map.mark(position);\n }\n }\n\n position.column += repeat;\n } else {\n position.line++;\n position.column = 0;\n }\n }\n\n _append(str: string, maybeNewline: boolean): void {\n const len = str.length;\n const position = this._position;\n const sourcePos = this._sourcePosition;\n\n this._last = -1; /* LAST_CHAR_KINDS.NORMAL */\n\n if (++this._appendCount > 4096) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n +this._str; // Unexplainable huge performance boost. Ref: https://github.com/davidmarkclements/flatstr License: MIT\n this._buf += this._str;\n this._str = str;\n this._appendCount = 0;\n } else {\n this._str += str;\n }\n\n const hasMap = this._map !== null;\n\n if (!maybeNewline && !hasMap) {\n position.column += len;\n return;\n }\n\n const { column, identifierName, identifierNamePos, filename } = sourcePos;\n let line = sourcePos.line;\n\n if (\n (identifierName != null || identifierNamePos != null) &&\n this._canMarkIdName\n ) {\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n\n // Search for newline chars. We search only for `\\n`, since both `\\r` and\n // `\\r\\n` are normalized to `\\n` during parse. We exclude `\\u2028` and\n // `\\u2029` for performance reasons, they're so uncommon that it's probably\n // ok. It's also unclear how other sourcemap utilities handle them...\n let i = str.indexOf(\"\\n\");\n let last = 0;\n\n // If the string starts with a newline char, then adding a mark is redundant.\n // This catches both \"no newlines\" and \"newline after several chars\".\n if (hasMap && i !== 0) {\n this._map!.mark(\n position,\n line,\n column,\n identifierName,\n identifierNamePos,\n filename,\n );\n }\n\n // Now, find each remaining newline char in the string.\n while (i !== -1) {\n position.line++;\n position.column = 0;\n last = i + 1;\n\n // We mark the start of each line, which happens directly after this newline char\n // unless this is the last char.\n // When manually adding multi-line content (such as a comment), `line` will be `undefined`.\n if (last < len && line !== undefined) {\n line++;\n if (hasMap) {\n this._map!.mark(position, line, 0, undefined, undefined, filename);\n }\n }\n i = str.indexOf(\"\\n\", last);\n }\n position.column += len - last;\n }\n\n removeLastSemicolon(): void {\n if (this._queuedChar === charcodes.semicolon) {\n this._queuedChar = 0;\n }\n }\n\n getLastChar(checkQueue?: boolean): number {\n if (!checkQueue) {\n return this._last;\n }\n const queuedChar = this._queuedChar;\n return queuedChar !== 0 ? queuedChar : this._last;\n }\n\n /**\n * This will only detect at most 1 newline after a call to `flush()`,\n * but this has not been found so far, and an accurate count can be achieved if needed later.\n */\n getNewlineCount(): number {\n return this._queuedChar === 0 && this._last === charcodes.lineFeed ? 1 : 0;\n }\n\n hasContent(): boolean {\n return this._last !== 0 /*|| this._queuedChar !== 0*/;\n }\n\n /**\n * Certain sourcemap usecases expect mappings to be more accurate than\n * Babel's generic sourcemap handling allows. For now, we special-case\n * identifiers to allow for the primary cases to work.\n * The goal of this line is to ensure that the map output from Babel will\n * have an exact range on identifiers in the output code. Without this\n * line, Babel would potentially include some number of trailing tokens\n * that are printed after the identifier, but before another location has\n * been assigned.\n * This allows tooling like Rollup and Webpack to more accurately perform\n * their own transformations. Most importantly, this allows the import/export\n * transformations performed by those tools to loose less information when\n * applying their own transformations on top of the code and map results\n * generated by Babel itself.\n *\n * The primary example of this is the snippet:\n *\n * import mod from \"mod\";\n * mod();\n *\n * With this line, there will be one mapping range over \"mod\" and another\n * over \"();\", where previously it would have been a single mapping.\n */\n exactSource(loc: Loc, cb: () => void) {\n if (!this._map) {\n cb();\n return;\n }\n\n this.source(\"start\", loc);\n const identifierName = loc.identifierName;\n const sourcePos = this._sourcePosition;\n if (identifierName != null) {\n this._canMarkIdName = false;\n sourcePos.identifierName = identifierName;\n }\n cb();\n\n if (identifierName != null) {\n this._canMarkIdName = true;\n sourcePos.identifierName = undefined;\n sourcePos.identifierNamePos = undefined;\n }\n this.source(\"end\", loc);\n }\n\n /**\n * Sets a given position as the current source location so generated code after this call\n * will be given this position in the sourcemap.\n */\n\n source(prop: \"start\" | \"end\", loc: Loc): void {\n if (!this._map) return;\n\n // Since this is called extremely often, we reuse the same _sourcePosition\n // object for the whole lifetime of the buffer.\n this._normalizePosition(prop, loc, 0);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc,\n columnOffset: number,\n ): void {\n if (!this._map) return;\n\n this._normalizePosition(prop, loc, columnOffset);\n }\n\n _normalizePosition(prop: \"start\" | \"end\", loc: Loc, columnOffset: number) {\n this._flush();\n\n const pos = loc[prop];\n const target = this._sourcePosition;\n\n if (pos) {\n target.line = pos.line;\n // TODO: Fix https://github.com/babel/babel/issues/15712 in downstream\n target.column = Math.max(pos.column + columnOffset, 0);\n target.filename = loc.filename;\n }\n }\n\n getCurrentColumn(): number {\n return this._position.column + (this._queuedChar ? 1 : 0);\n }\n\n getCurrentLine(): number {\n return this._position.line;\n }\n}\n"],"mappings":";;;;;;AAkBA,MAAMA,YAAsB,GAAG,EAAE;AACjC,KAAK,IAAIC,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CAAC;EACvC;EAEAK,gBAAgBA,CACdF,IAAqB,EACrBH,GAAQ,EACRM,YAAoB,EACd;IACN,IAAI,CAAC,IAAI,CAAClE,IAAI,EAAE;IAEhB,IAAI,CAACgE,kBAAkB,CAACD,IAAI,EAAEH,GAAG,EAAEM,YAAY,CAAC;EAClD;EAEAF,kBAAkBA,CAACD,IAAqB,EAAEH,GAAQ,EAAEM,YAAoB,EAAE;IACxE,IAAI,CAACjD,MAAM,CAAC,CAAC;IAEb,MAAMkD,GAAG,GAAGP,GAAG,CAACG,IAAI,CAAC;IACrB,MAAMK,MAAM,GAAG,IAAI,CAACzD,eAAe;IAEnC,IAAIwD,GAAG,EAAE;MACPC,MAAM,CAAC3D,IAAI,GAAG0D,GAAG,CAAC1D,IAAI;MAEtB2D,MAAM,CAAC1D,MAAM,GAAG2D,IAAI,CAACC,GAAG,CAACH,GAAG,CAACzD,MAAM,GAAGwD,YAAY,EAAE,CAAC,CAAC;MACtDE,MAAM,CAACrD,QAAQ,GAAG6C,GAAG,CAAC7C,QAAQ;IAChC;EACF;EAEAwD,gBAAgBA,CAAA,EAAW;IACzB,OAAO,IAAI,CAAC/D,SAAS,CAACE,MAAM,IAAI,IAAI,CAACH,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC;EAC3D;EAEAiE,cAAcA,CAAA,EAAW;IACvB,OAAO,IAAI,CAAChE,SAAS,CAACC,IAAI;EAC5B;AACF;AAACgE,OAAA,CAAAC,OAAA,GAAA9E,MAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/generator/lib/generators/base.js deleted file mode 100644 index 4768b9b..0000000 --- a/node_modules/@babel/generator/lib/generators/base.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.BlockStatement = BlockStatement; -exports.Directive = Directive; -exports.DirectiveLiteral = DirectiveLiteral; -exports.File = File; -exports.InterpreterDirective = InterpreterDirective; -exports.Placeholder = Placeholder; -exports.Program = Program; -function File(node) { - if (node.program) { - this.print(node.program.interpreter); - } - this.print(node.program); -} -function Program(node) { - var _node$directives; - this.printInnerComments(false); - const directivesLen = (_node$directives = node.directives) == null ? void 0 : _node$directives.length; - if (directivesLen) { - var _node$directives$trai; - const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, undefined, undefined, newline); - if (!((_node$directives$trai = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai.length)) { - this.newline(newline); - } - } - this.printSequence(node.body); -} -function BlockStatement(node) { - var _node$directives2; - this.tokenChar(123); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - const directivesLen = (_node$directives2 = node.directives) == null ? void 0 : _node$directives2.length; - if (directivesLen) { - var _node$directives$trai2; - const newline = node.body.length ? 2 : 1; - this.printSequence(node.directives, true, true, newline); - if (!((_node$directives$trai2 = node.directives[directivesLen - 1].trailingComments) != null && _node$directives$trai2.length)) { - this.newline(newline); - } - } - this.printSequence(node.body, true, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.rightBrace(node); -} -function Directive(node) { - this.print(node.value); - this.semicolon(); -} -const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/; -const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/; -function DirectiveLiteral(node) { - const raw = this.getPossibleRaw(node); - if (!this.format.minified && raw !== undefined) { - this.token(raw); - return; - } - const { - value - } = node; - if (!unescapedDoubleQuoteRE.test(value)) { - this.token(`"${value}"`); - } else if (!unescapedSingleQuoteRE.test(value)) { - this.token(`'${value}'`); - } else { - throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes."); - } -} -function InterpreterDirective(node) { - this.token(`#!${node.value}`); - this._newline(); -} -function Placeholder(node) { - this.token("%%"); - this.print(node.name); - this.token("%%"); - if (node.expectedNode === "Statement") { - this.semicolon(); - } -} - -//# sourceMappingURL=base.js.map diff --git a/node_modules/@babel/generator/lib/generators/base.js.map b/node_modules/@babel/generator/lib/generators/base.js.map deleted file mode 100644 index 1bf7773..0000000 --- a/node_modules/@babel/generator/lib/generators/base.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["File","node","program","print","interpreter","Program","_node$directives","printInnerComments","directivesLen","directives","length","_node$directives$trai","newline","body","printSequence","undefined","trailingComments","BlockStatement","_node$directives2","token","oldNoLineTerminatorAfterNode","enterDelimited","_node$directives$trai2","_noLineTerminatorAfterNode","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","test","Error","InterpreterDirective","_newline","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter);\n }\n\n this.print(node.program);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.printInnerComments(false);\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, undefined, undefined, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, true, true, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, true, true);\n\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightBrace(node);\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this._newline();\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGO,SAASA,IAAIA,CAAgBC,IAAY,EAAE;EAChD,IAAIA,IAAI,CAACC,OAAO,EAAE;IAGhB,IAAI,CAACC,KAAK,CAACF,IAAI,CAACC,OAAO,CAACE,WAAW,CAAC;EACtC;EAEA,IAAI,CAACD,KAAK,CAACF,IAAI,CAACC,OAAO,CAAC;AAC1B;AAEO,SAASG,OAAOA,CAAgBJ,IAAe,EAAE;EAAA,IAAAK,gBAAA;EAGtD,IAAI,CAACC,kBAAkB,CAAC,KAAK,CAAC;EAE9B,MAAMC,aAAa,IAAAF,gBAAA,GAAGL,IAAI,CAACQ,UAAU,qBAAfH,gBAAA,CAAiBI,MAAM;EAC7C,IAAIF,aAAa,EAAE;IAAA,IAAAG,qBA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IAAI,CAACwC,YAAY,KAAK,WAAW,EAAE;IACrC,IAAI,CAACd,SAAS,CAAC,CAAC;EAClB;AACF","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/generator/lib/generators/classes.js deleted file mode 100644 index 75272f8..0000000 --- a/node_modules/@babel/generator/lib/generators/classes.js +++ /dev/null @@ -1,215 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ClassAccessorProperty = ClassAccessorProperty; -exports.ClassBody = ClassBody; -exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; -exports.ClassMethod = ClassMethod; -exports.ClassPrivateMethod = ClassPrivateMethod; -exports.ClassPrivateProperty = ClassPrivateProperty; -exports.ClassProperty = ClassProperty; -exports.StaticBlock = StaticBlock; -exports._classMethodHead = _classMethodHead; -var _t = require("@babel/types"); -var _expressions = require("./expressions.js"); -var _typescript = require("./typescript.js"); -var _flow = require("./flow.js"); -var _methods = require("./methods.js"); -const { - isExportDefaultDeclaration, - isExportNamedDeclaration -} = _t; -function ClassDeclaration(node, parent) { - const inExport = isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent); - if (!inExport || !_expressions._shouldPrintDecoratorsBeforeExport.call(this, parent)) { - this.printJoin(node.decorators); - } - if (node.declare) { - this.word("declare"); - this.space(); - } - if (node.abstract) { - this.word("abstract"); - this.space(); - } - this.word("class"); - if (node.id) { - this.space(); - this.print(node.id); - } - this.print(node.typeParameters); - if (node.superClass) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.superClass); - this.print(node.superTypeParameters); - } - if (node.implements) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements); - } - this.space(); - this.print(node.body); -} -function ClassBody(node) { - this.tokenChar(123); - if (node.body.length === 0) { - this.tokenChar(125); - } else { - const separator = classBodyEmptySemicolonsPrinter(this, node); - separator == null || separator(-1); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.printJoin(node.body, true, true, separator, true, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - if (!this.endsWith(10)) this.newline(); - this.rightBrace(node); - } -} -function classBodyEmptySemicolonsPrinter(printer, node) { - if (!printer.tokenMap || node.start == null || node.end == null) { - return null; - } - const indexes = printer.tokenMap.getIndexes(node); - if (!indexes) return null; - let k = 1; - let occurrenceCount = 0; - let nextLocIndex = 0; - const advanceNextLocIndex = () => { - while (nextLocIndex < node.body.length && node.body[nextLocIndex].start == null) { - nextLocIndex++; - } - }; - advanceNextLocIndex(); - return i => { - if (nextLocIndex <= i) { - nextLocIndex = i + 1; - advanceNextLocIndex(); - } - const end = nextLocIndex === node.body.length ? node.end : node.body[nextLocIndex].start; - let tok; - while (k < indexes.length && printer.tokenMap.matchesOriginal(tok = printer._tokens[indexes[k]], ";") && tok.start < end) { - printer.tokenChar(59, occurrenceCount++); - k++; - } - }; -} -function ClassProperty(node) { - this.printJoin(node.decorators); - if (!node.static && !this.format.preserveFormat) { - var _node$key$loc; - const endLine = (_node$key$loc = node.key.loc) == null || (_node$key$loc = _node$key$loc.end) == null ? void 0 : _node$key$loc.line; - if (endLine) this.catchUp(endLine); - } - _typescript._tsPrintClassMemberModifiers.call(this, node); - if (node.computed) { - this.tokenChar(91); - this.print(node.key); - this.tokenChar(93); - } else { - _flow._variance.call(this, node); - this.print(node.key); - } - if (node.optional) { - this.tokenChar(63); - } - if (node.definite) { - this.tokenChar(33); - } - this.print(node.typeAnnotation); - if (node.value) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.value); - } - this.semicolon(); -} -function ClassAccessorProperty(node) { - var _node$key$loc2; - this.printJoin(node.decorators); - const endLine = (_node$key$loc2 = node.key.loc) == null || (_node$key$loc2 = _node$key$loc2.end) == null ? void 0 : _node$key$loc2.line; - if (endLine) this.catchUp(endLine); - _typescript._tsPrintClassMemberModifiers.call(this, node); - this.word("accessor", true); - this.space(); - if (node.computed) { - this.tokenChar(91); - this.print(node.key); - this.tokenChar(93); - } else { - _flow._variance.call(this, node); - this.print(node.key); - } - if (node.optional) { - this.tokenChar(63); - } - if (node.definite) { - this.tokenChar(33); - } - this.print(node.typeAnnotation); - if (node.value) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.value); - } - this.semicolon(); -} -function ClassPrivateProperty(node) { - this.printJoin(node.decorators); - _typescript._tsPrintClassMemberModifiers.call(this, node); - this.print(node.key); - if (node.optional) { - this.tokenChar(63); - } - if (node.definite) { - this.tokenChar(33); - } - this.print(node.typeAnnotation); - if (node.value) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.value); - } - this.semicolon(); -} -function ClassMethod(node) { - _classMethodHead.call(this, node); - this.space(); - this.print(node.body); -} -function ClassPrivateMethod(node) { - _classMethodHead.call(this, node); - this.space(); - this.print(node.body); -} -function _classMethodHead(node) { - this.printJoin(node.decorators); - if (!this.format.preserveFormat) { - var _node$key$loc3; - const endLine = (_node$key$loc3 = node.key.loc) == null || (_node$key$loc3 = _node$key$loc3.end) == null ? void 0 : _node$key$loc3.line; - if (endLine) this.catchUp(endLine); - } - _typescript._tsPrintClassMemberModifiers.call(this, node); - _methods._methodHead.call(this, node); -} -function StaticBlock(node) { - this.word("static"); - this.space(); - this.tokenChar(123); - if (node.body.length === 0) { - this.tokenChar(125); - } else { - this.newline(); - this.printSequence(node.body, true); - this.rightBrace(node); - } -} - -//# sourceMappingURL=classes.js.map diff --git a/node_modules/@babel/generator/lib/generators/classes.js.map b/node_modules/@babel/generator/lib/generators/classes.js.map deleted file mode 100644 index d764d73..0000000 --- a/node_modules/@babel/generator/lib/generators/classes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_expressions","_typescript","_flow","_methods","isExportDefaultDeclaration","isExportNamedDeclaration","ClassDeclaration","node","parent","inExport","_shouldPrintDecoratorsBeforeExport","call","printJoin","decorators","declare","word","space","abstract","id","print","typeParameters","superClass","superTypeParameters","implements","printList","body","ClassBody","token","length","separator","classBodyEmptySemicolonsPrinter","oldNoLineTerminatorAfterNode","enterDelimited","_noLineTerminatorAfterNode","endsWith","newline","rightBrace","printer","tokenMap","start","end","indexes","getIndexes","k","occurrenceCount","nextLocIndex","advanceNextLocIndex","i","tok","matchesOriginal","_tokens","tokenChar","ClassProperty","static","format","preserveFormat","_node$key$loc","endLine","key","loc","line","catchUp","_tsPrintClassMemberModifiers","computed","_variance","optional","definite","typeAnnotation","value","semicolon","ClassAccessorProperty","_node$key$loc2","ClassPrivateProperty","ClassMethod","_classMethodHead","ClassPrivateMethod","_node$key$loc3","_methodHead","StaticBlock","printSequence"],"sources":["../../src/generators/classes.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isExportDefaultDeclaration,\n isExportNamedDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport { _shouldPrintDecoratorsBeforeExport } from \"./expressions.ts\";\nimport { _tsPrintClassMemberModifiers } from \"./typescript.ts\";\nimport { _variance } from \"./flow.ts\";\nimport { _methodHead } from \"./methods.ts\";\n\nexport function ClassDeclaration(\n this: Printer,\n node: t.ClassDeclaration,\n parent: t.Node,\n) {\n const inExport =\n isExportDefaultDeclaration(parent) || isExportNamedDeclaration(parent);\n\n if (\n !inExport ||\n !_shouldPrintDecoratorsBeforeExport.call(\n this,\n parent as t.ExportDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n this.printJoin(node.decorators);\n }\n\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n if (node.abstract) {\n // TS\n this.word(\"abstract\");\n this.space();\n }\n\n this.word(\"class\");\n\n if (node.id) {\n this.space();\n this.print(node.id);\n }\n\n this.print(node.typeParameters);\n\n if (node.superClass) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.superClass);\n this.print(\n process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Renamed\n node.superTypeArguments\n : // @ts-ignore(Babel 7 vs Babel 8) Renamed\n node.superTypeParameters,\n );\n }\n\n if (node.implements) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements);\n }\n\n this.space();\n this.print(node.body);\n}\n\nexport { ClassDeclaration as ClassExpression };\n\nexport function ClassBody(this: Printer, node: t.ClassBody) {\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n const separator = classBodyEmptySemicolonsPrinter(this, node);\n separator?.(-1); // print leading semicolons in preserveFormat mode\n\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.printJoin(node.body, true, true, separator, true, true);\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n\n if (!this.endsWith(charCodes.lineFeed)) this.newline();\n\n this.rightBrace(node);\n }\n}\n\nfunction classBodyEmptySemicolonsPrinter(printer: Printer, node: t.ClassBody) {\n if (!printer.tokenMap || node.start == null || node.end == null) {\n return null;\n }\n\n // \"empty statements\" in class bodies are not represented in the AST.\n // Print them by checking if there are any ; tokens between the current AST\n // member and the next one.\n\n const indexes = printer.tokenMap.getIndexes(node);\n if (!indexes) return null;\n\n let k = 1; // start from 1 to skip '{'\n\n let occurrenceCount = 0;\n\n let nextLocIndex = 0;\n const advanceNextLocIndex = () => {\n while (\n nextLocIndex < node.body.length &&\n node.body[nextLocIndex].start == null\n ) {\n nextLocIndex++;\n }\n };\n advanceNextLocIndex();\n\n return (i: number) => {\n if (nextLocIndex <= i) {\n nextLocIndex = i + 1;\n advanceNextLocIndex();\n }\n\n const end =\n nextLocIndex === node.body.length\n ? node.end\n : node.body[nextLocIndex].start;\n\n let tok;\n while (\n k < indexes.length &&\n printer.tokenMap!.matchesOriginal(\n (tok = printer._tokens![indexes[k]]),\n \";\",\n ) &&\n tok.start < end!\n ) {\n printer.tokenChar(charCodes.semicolon, occurrenceCount++);\n k++;\n }\n };\n}\n\nexport function ClassProperty(this: Printer, node: t.ClassProperty) {\n this.printJoin(node.decorators);\n\n if (!node.static && !this.format.preserveFormat) {\n // catch up to property key, avoid line break\n // between member TS modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n }\n\n _tsPrintClassMemberModifiers.call(this, node);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n _variance.call(this, node);\n this.print(node.key);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassAccessorProperty(\n this: Printer,\n node: t.ClassAccessorProperty,\n) {\n this.printJoin(node.decorators);\n\n // catch up to property key, avoid line break\n // between member modifiers and the property key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n\n // TS does not support class accessor property yet\n _tsPrintClassMemberModifiers.call(this, node);\n\n this.word(\"accessor\", true);\n this.space();\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n // Todo: Flow does not support class accessor property yet.\n _variance.call(this, node);\n this.print(node.key);\n }\n\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassPrivateProperty(\n this: Printer,\n node: t.ClassPrivateProperty,\n) {\n this.printJoin(node.decorators);\n _tsPrintClassMemberModifiers.call(this, node);\n this.print(node.key);\n // TS\n if (node.optional) {\n this.token(\"?\");\n }\n if (node.definite) {\n this.token(\"!\");\n }\n this.print(node.typeAnnotation);\n if (node.value) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.value);\n }\n this.semicolon();\n}\n\nexport function ClassMethod(this: Printer, node: t.ClassMethod) {\n _classMethodHead.call(this, node);\n this.space();\n this.print(node.body);\n}\n\nexport function ClassPrivateMethod(this: Printer, node: t.ClassPrivateMethod) {\n _classMethodHead.call(this, node);\n this.space();\n this.print(node.body);\n}\n\nexport function _classMethodHead(\n this: Printer,\n node: t.ClassMethod | t.ClassPrivateMethod | t.TSDeclareMethod,\n) {\n this.printJoin(node.decorators);\n\n if (!this.format.preserveFormat) {\n // catch up to method key, avoid line break\n // between member modifiers/method heads and the method key.\n const endLine = node.key.loc?.end?.line;\n if (endLine) this.catchUp(endLine);\n }\n\n _tsPrintClassMemberModifiers.call(this, node);\n _methodHead.call(this, node);\n}\n\nexport function StaticBlock(this: Printer, node: t.StaticBlock) {\n this.word(\"static\");\n this.space();\n this.token(\"{\");\n if (node.body.length === 0) {\n this.token(\"}\");\n } else {\n this.newline();\n this.printSequence(node.body, true);\n this.rightBrace(node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AASA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAA2C;EAXzCK,0BAA0B;EAC1BC;AAAwB,IAAAP,EAAA;AAYnB,SAASQ,gBAAgBA,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EACA,MAAMC,QAAQ,GACZL,0BAA0B,CAACI,MAAM,CAAC,IAAIH,wBAAwB,CAACG,MAAM,CAAC;EAExE,IACE,CAACC,QAAQ,IACT,CAACC,+CAAkC,CAACC,IAAI,CACtC,IAAI,EACJH,MACF,CAAC,EACD;IACA,IAAI,CAACI,SAAS,CAACL,IAAI,CAACM,UAAU,CAAC;EACjC;EAEA,IAAIN,IAAI,CAACO,OAAO,EAAE;IAEhB,IAAI,CAACC,IAAI,CAAC,SAAS,CAAC;IACpB,IAAI,CAACC,KAAK,CAAC,CAAC;EACd;EAEA,IAAIT,IAAI,CAACU,QAAQ,EAAE;IAEjB,IAAI,CAACF,IAAI,CAAC,UAAU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AAI,CAAC;IACnC,IAAI,CAACW,UAAU,CAAC7B,IAAI,CAAC;EACvB;AACF","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/deprecated.js b/node_modules/@babel/generator/lib/generators/deprecated.js deleted file mode 100644 index bc1f409..0000000 --- a/node_modules/@babel/generator/lib/generators/deprecated.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.DecimalLiteral = DecimalLiteral; -exports.Noop = Noop; -exports.RecordExpression = RecordExpression; -exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.TupleExpression = TupleExpression; -function Noop() {} -function TSExpressionWithTypeArguments(node) { - this.print(node.expression); - this.print(node.typeParameters); -} -function DecimalLiteral(node) { - const raw = this.getPossibleRaw(node); - if (!this.format.minified && raw !== undefined) { - this.word(raw); - return; - } - this.word(node.value + "m"); -} -function RecordExpression(node) { - const props = node.properties; - let startToken; - let endToken; - if (this.format.recordAndTupleSyntaxType === "bar") { - startToken = "{|"; - endToken = "|}"; - } else if (this.format.recordAndTupleSyntaxType !== "hash" && this.format.recordAndTupleSyntaxType != null) { - throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`); - } else { - startToken = "#{"; - endToken = "}"; - } - this.token(startToken); - if (props.length) { - this.space(); - this.printList(props, this.shouldPrintTrailingComma(endToken), true, true); - this.space(); - } - this.token(endToken); -} -function TupleExpression(node) { - const elems = node.elements; - const len = elems.length; - let startToken; - let endToken; - if (this.format.recordAndTupleSyntaxType === "bar") { - startToken = "[|"; - endToken = "|]"; - } else if (this.format.recordAndTupleSyntaxType === "hash") { - startToken = "#["; - endToken = "]"; - } else { - throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`); - } - this.token(startToken); - for (let i = 0; i < elems.length; i++) { - const elem = elems[i]; - if (elem) { - if (i > 0) this.space(); - this.print(elem); - if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) { - this.token(",", false, i); - } - } - } - this.token(endToken); -} - -//# sourceMappingURL=deprecated.js.map diff --git a/node_modules/@babel/generator/lib/generators/deprecated.js.map b/node_modules/@babel/generator/lib/generators/deprecated.js.map deleted file mode 100644 index ceb91e9..0000000 --- a/node_modules/@babel/generator/lib/generators/deprecated.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["Noop","TSExpressionWithTypeArguments","node","print","expression","typeParameters","DecimalLiteral","raw","getPossibleRaw","format","minified","undefined","word","value","RecordExpression","props","properties","startToken","endToken","recordAndTupleSyntaxType","Error","JSON","stringify","token","length","space","printList","shouldPrintTrailingComma","TupleExpression","elems","elements","len","i","elem"],"sources":["../../src/generators/deprecated.ts"],"sourcesContent":["import type Printer from \"../printer\";\nimport type * as t from \"@babel/types\";\n\nexport type DeprecatedBabel7ASTTypes =\n | \"Noop\"\n | \"TSExpressionWithTypeArguments\"\n | \"DecimalLiteral\"\n | \"RecordExpression\"\n | \"TupleExpression\";\n\nexport function Noop(this: Printer) {}\n\nexport function TSExpressionWithTypeArguments(\n this: Printer,\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node: t.TSExpressionWithTypeArguments,\n) {\n this.print(node.expression);\n this.print(node.typeParameters);\n}\n\nexport function DecimalLiteral(this: Printer, node: any) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"m\");\n}\n\n// @ts-ignore(Babel 7 vs Babel 8) - t.RecordExpression only exists in Babel 7\nexport function RecordExpression(this: Printer, node: t.RecordExpression) {\n const props = node.properties;\n\n let startToken;\n let endToken;\n\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"{|\";\n endToken = \"|}\";\n } else if (\n this.format.recordAndTupleSyntaxType !== \"hash\" &&\n this.format.recordAndTupleSyntaxType != null\n ) {\n throw new Error(\n `The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (${JSON.stringify(\n this.format.recordAndTupleSyntaxType,\n )} received).`,\n );\n } else {\n startToken = \"#{\";\n endToken = \"}\";\n }\n\n this.token(startToken);\n\n if (props.length) {\n this.space();\n this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);\n this.space();\n }\n this.token(endToken);\n}\n\n// @ts-ignore(Babel 7 vs Babel 8) - t.TupleExpression only exists in Babel 7\nexport function TupleExpression(this: Printer, node: t.TupleExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n let startToken;\n let endToken;\n if (process.env.BABEL_8_BREAKING) {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n if (this.format.recordAndTupleSyntaxType === \"bar\") {\n startToken = \"[|\";\n endToken = \"|]\";\n } else if (this.format.recordAndTupleSyntaxType === \"hash\") {\n startToken = \"#[\";\n endToken = \"]\";\n } else {\n throw new Error(\n `${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`,\n );\n }\n }\n\n this.token(startToken);\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem);\n if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) {\n this.token(\",\", false, i);\n }\n }\n }\n\n this.token(endToken);\n}\n"],"mappings":";;;;;;;;;;AAUO,SAASA,IAAIA,CAAA,EAAgB,CAAC;AAE9B,SAASC,6BAA6BA,CAG3CC,IAAqC,EACrC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,UAAU,CAAC;EAC3B,IAAI,CAACD,KAAK,CAACD,IAAI,CAACG,cAAc,CAAC;AACjC;AAEO,SAASC,cAAcA,CAAgBJ,IAAS,EAAE;EACvD,MAAMK,GAAG,GAAG,IAAI,CAACC,cAAc,CAACN,IAAI,CAAC;EACrC,IAAI,CAAC,IAAI,CAACO,MAAM,CAACC,QAAQ,IAAIH,GAAG,KAAKI,SAAS,EAAE;IAC9C,IAAI,CAACC,IAAI,CAACL,GAAG,CAAC;IACd;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G,IAAI;EACjB,CAAC,MAAM,IAAI,IAAI,CAACT,MAAM,CAACU,wBAAwB,KAAK,MAAM,EAAE;IAC1DF,UAAU,GAAG,IAAI;IACjBC,QAAQ,GAAG,GAAG;EAChB,CAAC,MAAM;IACL,MAAM,IAAIE,KAAK,CACb,GAAG,IAAI,CAACX,MAAM,CAACU,wBAAwB,4CACzC,CAAC;EACH;EAGF,IAAI,CAACI,KAAK,CAACN,UAAU,CAAC;EAEtB,KAAK,IAAIe,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,KAAK,CAACL,MAAM,EAAEQ,CAAC,EAAE,EAAE;IACrC,MAAMC,IAAI,GAAGJ,KAAK,CAACG,CAAC,CAAC;IACrB,IAAIC,IAAI,EAAE;MACR,IAAID,CAAC,GAAG,CAAC,EAAE,IAAI,CAACP,KAAK,CAAC,CAAC;MACvB,IAAI,CAACtB,KAAK,CAAC8B,IAAI,CAAC;MAChB,IAAID,CAAC,GAAGD,GAAG,GAAG,CAAC,IAAI,IAAI,CAACJ,wBAAwB,CAACT,QAAQ,CAAC,EAAE;QAC1D,IAAI,CAACK,KAAK,CAAC,GAAG,EAAE,KAAK,EAAES,CAAC,CAAC;MAC3B;IACF;EACF;EAEA,IAAI,CAACT,KAAK,CAACL,QAAQ,CAAC;AACtB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/generator/lib/generators/expressions.js deleted file mode 100644 index 7448795..0000000 --- a/node_modules/@babel/generator/lib/generators/expressions.js +++ /dev/null @@ -1,309 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.LogicalExpression = exports.AssignmentExpression = AssignmentExpression; -exports.AssignmentPattern = AssignmentPattern; -exports.AwaitExpression = AwaitExpression; -exports.BinaryExpression = BinaryExpression; -exports.BindExpression = BindExpression; -exports.CallExpression = CallExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.Decorator = Decorator; -exports.DoExpression = DoExpression; -exports.EmptyStatement = EmptyStatement; -exports.ExpressionStatement = ExpressionStatement; -exports.Import = Import; -exports.MemberExpression = MemberExpression; -exports.MetaProperty = MetaProperty; -exports.ModuleExpression = ModuleExpression; -exports.NewExpression = NewExpression; -exports.OptionalCallExpression = OptionalCallExpression; -exports.OptionalMemberExpression = OptionalMemberExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.PrivateName = PrivateName; -exports.SequenceExpression = SequenceExpression; -exports.Super = Super; -exports.ThisExpression = ThisExpression; -exports.UnaryExpression = UnaryExpression; -exports.UpdateExpression = UpdateExpression; -exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; -exports.YieldExpression = YieldExpression; -exports._shouldPrintDecoratorsBeforeExport = _shouldPrintDecoratorsBeforeExport; -var _t = require("@babel/types"); -var _index = require("../node/index.js"); -const { - isCallExpression, - isLiteral, - isMemberExpression, - isNewExpression, - isPattern -} = _t; -function UnaryExpression(node) { - const { - operator - } = node; - const firstChar = operator.charCodeAt(0); - if (firstChar >= 97 && firstChar <= 122) { - this.word(operator); - this.space(); - } else { - this.tokenChar(firstChar); - } - this.print(node.argument); -} -function DoExpression(node) { - if (node.async) { - this.word("async", true); - this.space(); - } - this.word("do"); - this.space(); - this.print(node.body); -} -function ParenthesizedExpression(node) { - this.tokenChar(40); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.print(node.expression, undefined, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.rightParens(node); -} -function UpdateExpression(node) { - if (node.prefix) { - this.token(node.operator, false, 0, true); - this.print(node.argument); - } else { - this.print(node.argument, true); - this.token(node.operator, false, 0, true); - } -} -function ConditionalExpression(node) { - this.print(node.test); - this.space(); - this.tokenChar(63); - this.space(); - this.print(node.consequent); - this.space(); - this.tokenChar(58); - this.space(); - this.print(node.alternate); -} -function NewExpression(node, parent) { - this.word("new"); - this.space(); - this.print(node.callee); - if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, { - callee: node - }) && !isMemberExpression(parent) && !isNewExpression(parent)) { - return; - } - this.print(node.typeArguments); - this.print(node.typeParameters); - if (node.optional) { - this.token("?."); - } - if (node.arguments.length === 0 && this.tokenMap && !this.tokenMap.endMatches(node, ")")) { - return; - } - this.tokenChar(40); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.rightParens(node); -} -function SequenceExpression(node) { - this.printList(node.expressions); -} -function ThisExpression() { - this.word("this"); -} -function Super() { - this.word("super"); -} -function _shouldPrintDecoratorsBeforeExport(node) { - if (typeof this.format.decoratorsBeforeExport === "boolean") { - return this.format.decoratorsBeforeExport; - } - return typeof node.start === "number" && node.start === node.declaration.start; -} -function Decorator(node) { - this.tokenChar(64); - const { - expression - } = node; - this.print(expression); - this.newline(); -} -function OptionalMemberExpression(node) { - let { - computed - } = node; - const { - optional, - property - } = node; - this.print(node.object); - if (!computed && isMemberExpression(property)) { - throw new TypeError("Got a MemberExpression for MemberExpression property"); - } - if (isLiteral(property) && typeof property.value === "number") { - computed = true; - } - if (optional) { - this.token("?."); - } - if (computed) { - this.tokenChar(91); - this.print(property); - this.tokenChar(93); - } else { - if (!optional) { - this.tokenChar(46); - } - this.print(property); - } -} -function OptionalCallExpression(node) { - this.print(node.callee); - this.print(node.typeParameters); - if (node.optional) { - this.token("?."); - } - this.print(node.typeArguments); - this.tokenChar(40); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.printList(node.arguments, undefined, undefined, undefined, undefined, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.rightParens(node); -} -function CallExpression(node) { - this.print(node.callee); - this.print(node.typeArguments); - this.print(node.typeParameters); - this.tokenChar(40); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.rightParens(node); -} -function Import() { - this.word("import"); -} -function AwaitExpression(node) { - this.word("await"); - this.space(); - this.print(node.argument); -} -function YieldExpression(node) { - if (node.delegate) { - this.word("yield", true); - this.tokenChar(42); - if (node.argument) { - this.space(); - this.print(node.argument); - } - } else if (node.argument) { - this.word("yield", true); - this.space(); - this.print(node.argument); - } else { - this.word("yield"); - } -} -function EmptyStatement() { - this.semicolon(true); -} -function ExpressionStatement(node) { - this.tokenContext |= _index.TokenContext.expressionStatement; - this.print(node.expression); - this.semicolon(); -} -function AssignmentPattern(node) { - this.print(node.left); - if (node.left.type === "Identifier" || isPattern(node.left)) { - if (node.left.optional) this.tokenChar(63); - this.print(node.left.typeAnnotation); - } - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.right); -} -function AssignmentExpression(node) { - this.print(node.left); - this.space(); - this.token(node.operator, false, 0, true); - this.space(); - this.print(node.right); -} -function BinaryExpression(node) { - this.print(node.left); - this.space(); - const { - operator - } = node; - if (operator.charCodeAt(0) === 105) { - this.word(operator); - } else { - this.token(operator, false, 0, true); - this.setLastChar(operator.charCodeAt(operator.length - 1)); - } - this.space(); - this.print(node.right); -} -function BindExpression(node) { - this.print(node.object); - this.token("::"); - this.print(node.callee); -} -function MemberExpression(node) { - this.print(node.object); - if (!node.computed && isMemberExpression(node.property)) { - throw new TypeError("Got a MemberExpression for MemberExpression property"); - } - let computed = node.computed; - if (isLiteral(node.property) && typeof node.property.value === "number") { - computed = true; - } - if (computed) { - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.tokenChar(91); - this.print(node.property, undefined, true); - this.tokenChar(93); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - } else { - this.tokenChar(46); - this.print(node.property); - } -} -function MetaProperty(node) { - this.print(node.meta); - this.tokenChar(46); - this.print(node.property); -} -function PrivateName(node) { - this.tokenChar(35); - this.print(node.id); -} -function V8IntrinsicIdentifier(node) { - this.tokenChar(37); - this.word(node.name); -} -function ModuleExpression(node) { - this.word("module", true); - this.space(); - this.tokenChar(123); - this.indent(); - const { - body - } = node; - if (body.body.length || body.directives.length) { - this.newline(); - } - this.print(body); - this.dedent(); - this.rightBrace(node); -} - -//# sourceMappingURL=expressions.js.map diff --git a/node_modules/@babel/generator/lib/generators/expressions.js.map b/node_modules/@babel/generator/lib/generators/expressions.js.map deleted file mode 100644 index c9c6d85..0000000 --- a/node_modules/@babel/generator/lib/generators/expressions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_index","isCallExpression","isLiteral","isMemberExpression","isNewExpression","isPattern","UnaryExpression","node","operator","firstChar","charCodeAt","word","space","tokenChar","print","argument","DoExpression","async","body","ParenthesizedExpression","token","oldNoLineTerminatorAfterNode","enterDelimited","expression","undefined","_noLineTerminatorAfterNode","rightParens","UpdateExpression","prefix","ConditionalExpression","test","consequent","alternate","NewExpression","parent","callee","format","minified","arguments","length","optional","typeArguments","typeParameters","tokenMap","endMatches","printList","shouldPrintTrailingComma","SequenceExpression","expressions","ThisExpression","Super","_shouldPrintDecoratorsBeforeExport","decoratorsBeforeExport","start","declaration","Decorator","newline","OptionalMemberExpression","computed","property","object","TypeError","value","OptionalCallExpression","CallExpression","Import","AwaitExpression","YieldExpression","delegate","EmptyStatement","semicolon","ExpressionStatement","tokenContext","TokenContext","expressionStatement","AssignmentPattern","left","type","typeAnnotation","right","AssignmentExpression","BinaryExpression","setLastChar","BindExpression","MemberExpression","MetaProperty","meta","PrivateName","id","V8IntrinsicIdentifier","name","ModuleExpression","indent","directives","dedent","rightBrace"],"sources":["../../src/generators/expressions.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isCallExpression,\n isLiteral,\n isMemberExpression,\n isNewExpression,\n isPattern,\n} from \"@babel/types\";\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport type * as t from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function UnaryExpression(this: Printer, node: t.UnaryExpression) {\n const { operator } = node;\n const firstChar = operator.charCodeAt(0);\n if (firstChar >= charCodes.lowercaseA && firstChar <= charCodes.lowercaseZ) {\n this.word(operator);\n this.space();\n } else {\n this.tokenChar(firstChar);\n }\n\n this.print(node.argument);\n}\n\nexport function DoExpression(this: Printer, node: t.DoExpression) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n this.word(\"do\");\n this.space();\n this.print(node.body);\n}\n\nexport function ParenthesizedExpression(\n this: Printer,\n node: t.ParenthesizedExpression,\n) {\n this.token(\"(\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.print(node.expression, undefined, true);\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightParens(node);\n}\n\nexport function UpdateExpression(this: Printer, node: t.UpdateExpression) {\n if (node.prefix) {\n this.token(node.operator, false, 0, true);\n this.print(node.argument);\n } else {\n this.print(node.argument, true);\n this.token(node.operator, false, 0, true);\n }\n}\n\nexport function ConditionalExpression(\n this: Printer,\n node: t.ConditionalExpression,\n) {\n this.print(node.test);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.consequent);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.alternate);\n}\n\nexport function NewExpression(\n this: Printer,\n node: t.NewExpression,\n parent: t.Node,\n) {\n this.word(\"new\");\n this.space();\n this.print(node.callee);\n if (\n this.format.minified &&\n node.arguments.length === 0 &&\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n !node.optional &&\n !isCallExpression(parent, { callee: node }) &&\n !isMemberExpression(parent) &&\n !isNewExpression(parent)\n ) {\n return;\n }\n\n this.print(node.typeArguments);\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // Legacy TS AST\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n if (node.optional) {\n this.token(\"?.\");\n }\n }\n\n if (\n node.arguments.length === 0 &&\n this.tokenMap &&\n !this.tokenMap.endMatches(node, \")\")\n ) {\n return;\n }\n\n this.token(\"(\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.printList(\n node.arguments,\n this.shouldPrintTrailingComma(\")\"),\n undefined,\n undefined,\n undefined,\n true,\n );\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightParens(node);\n}\n\nexport function SequenceExpression(this: Printer, node: t.SequenceExpression) {\n this.printList(node.expressions);\n}\n\nexport function ThisExpression(this: Printer) {\n this.word(\"this\");\n}\n\nexport function Super(this: Printer) {\n this.word(\"super\");\n}\n\nexport function _shouldPrintDecoratorsBeforeExport(\n this: Printer,\n node: t.ExportDeclaration & { declaration: t.ClassDeclaration },\n) {\n if (typeof this.format.decoratorsBeforeExport === \"boolean\") {\n return this.format.decoratorsBeforeExport;\n }\n return (\n typeof node.start === \"number\" && node.start === node.declaration.start\n );\n}\n\nexport function Decorator(this: Printer, node: t.Decorator) {\n this.token(\"@\");\n const { expression } = node;\n this.print(expression);\n this.newline();\n}\n\nexport function OptionalMemberExpression(\n this: Printer,\n node: t.OptionalMemberExpression,\n) {\n let { computed } = node;\n const { optional, property } = node;\n\n this.print(node.object);\n\n if (!computed && isMemberExpression(property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n // @ts-expect-error todo(flow->ts) maybe instead of typeof check specific literal types?\n if (isLiteral(property) && typeof property.value === \"number\") {\n computed = true;\n }\n if (optional) {\n this.token(\"?.\");\n }\n\n if (computed) {\n this.token(\"[\");\n this.print(property);\n this.token(\"]\");\n } else {\n if (!optional) {\n this.token(\".\");\n }\n this.print(property);\n }\n}\n\nexport function OptionalCallExpression(\n this: Printer,\n node: t.OptionalCallExpression,\n) {\n this.print(node.callee);\n\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // legacy TS AST\n }\n\n if (node.optional) {\n this.token(\"?.\");\n }\n\n this.print(node.typeArguments);\n\n this.token(\"(\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.printList(\n node.arguments,\n undefined,\n undefined,\n undefined,\n undefined,\n true,\n );\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightParens(node);\n}\n\nexport function CallExpression(this: Printer, node: t.CallExpression) {\n this.print(node.callee);\n\n this.print(node.typeArguments);\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters); // legacy TS AST\n }\n this.token(\"(\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.printList(\n node.arguments,\n this.shouldPrintTrailingComma(\")\"),\n undefined,\n undefined,\n undefined,\n true,\n );\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightParens(node);\n}\n\nexport function Import(this: Printer) {\n this.word(\"import\");\n}\n\nexport function AwaitExpression(this: Printer, node: t.AwaitExpression) {\n this.word(\"await\");\n this.space();\n this.print(node.argument);\n}\n\nexport function YieldExpression(this: Printer, node: t.YieldExpression) {\n if (node.delegate) {\n this.word(\"yield\", true);\n this.token(\"*\");\n if (node.argument) {\n this.space();\n // line terminators are allowed after yield*\n this.print(node.argument);\n }\n } else if (node.argument) {\n this.word(\"yield\", true);\n this.space();\n this.print(node.argument);\n } else {\n this.word(\"yield\");\n }\n}\n\nexport function EmptyStatement(this: Printer) {\n this.semicolon(true /* force */);\n}\n\nexport function ExpressionStatement(\n this: Printer,\n node: t.ExpressionStatement,\n) {\n this.tokenContext |= TokenContext.expressionStatement;\n this.print(node.expression);\n this.semicolon();\n}\n\nexport function AssignmentPattern(this: Printer, node: t.AssignmentPattern) {\n this.print(node.left);\n if (node.left.type === \"Identifier\" || isPattern(node.left)) {\n if (node.left.optional) this.token(\"?\");\n this.print(node.left.typeAnnotation);\n }\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right);\n}\n\nexport function AssignmentExpression(\n this: Printer,\n node: t.AssignmentExpression | t.LogicalExpression,\n) {\n this.print(node.left);\n\n this.space();\n this.token(node.operator, false, 0, true);\n this.space();\n\n this.print(node.right);\n}\n\nexport { AssignmentExpression as LogicalExpression };\n\nexport function BinaryExpression(this: Printer, node: t.BinaryExpression) {\n this.print(node.left);\n\n this.space();\n const { operator } = node;\n if (operator.charCodeAt(0) === charCodes.lowercaseI) {\n this.word(operator);\n } else {\n this.token(operator, false, 0, true);\n this.setLastChar(operator.charCodeAt(operator.length - 1));\n }\n this.space();\n\n this.print(node.right);\n}\n\nexport function BindExpression(this: Printer, node: t.BindExpression) {\n this.print(node.object);\n this.token(\"::\");\n this.print(node.callee);\n}\n\nexport function MemberExpression(this: Printer, node: t.MemberExpression) {\n this.print(node.object);\n\n if (!node.computed && isMemberExpression(node.property)) {\n throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n }\n\n let computed = node.computed;\n // @ts-expect-error todo(flow->ts) maybe use specific literal types\n if (isLiteral(node.property) && typeof node.property.value === \"number\") {\n computed = true;\n }\n\n if (computed) {\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.token(\"[\");\n this.print(node.property, undefined, true);\n this.token(\"]\");\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n } else {\n this.token(\".\");\n this.print(node.property);\n }\n}\n\nexport function MetaProperty(this: Printer, node: t.MetaProperty) {\n this.print(node.meta);\n this.token(\".\");\n this.print(node.property);\n}\n\nexport function PrivateName(this: Printer, node: t.PrivateName) {\n this.token(\"#\");\n this.print(node.id);\n}\n\nexport function V8IntrinsicIdentifier(\n this: Printer,\n node: t.V8IntrinsicIdentifier,\n) {\n this.token(\"%\");\n this.word(node.name);\n}\n\nexport function ModuleExpression(this: Printer, node: t.ModuleExpression) {\n this.word(\"module\", true);\n this.space();\n this.token(\"{\");\n this.indent();\n const { body } = node;\n if (body.body.length || body.directives.length) {\n this.newline();\n }\n this.print(body);\n this.dedent();\n this.rightBrace(node);\n}\n"],"mappings":";;;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C;EACrB,IAAI,CAAClE,SAAK,GAAI,CAAC;EACf,IAAI,CAACN,KAAK,CAACP,IAAI,CAACoD,QAAQ,CAAC;AAC3B;AAEO,SAAS4B,WAAWA,CAAgBhF,IAAmB,EAAE;EAC9D,IAAI,CAACa,SAAK,GAAI,CAAC;EACf,IAAI,CAACN,KAAK,CAACP,IAAI,CAACiF,EAAE,CAAC;AACrB;AAEO,SAASC,qBAAqBA,CAEnClF,IAA6B,EAC7B;EACA,IAAI,CAACa,SAAK,GAAI,CAAC;EACf,IAAI,CAACT,IAAI,CAACJ,IAAI,CAACmF,IAAI,CAAC;AACtB;AAEO,SAASC,gBAAgBA,CAAgBpF,IAAwB,EAAE;EACxE,IAAI,CAACI,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;EACzB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACQ,SAAK,IAAI,CAAC;EACf,IAAI,CAACwE,MAAM,CAAC,CAAC;EACb,MAAM;IAAE1E;EAAK,CAAC,GAAGX,IAAI;EACrB,IAAIW,IAAI,CAACA,IAAI,CAACqB,MAAM,IAAIrB,IAAI,CAAC2E,UAAU,CAACtD,MAAM,EAAE;IAC9C,IAAI,CAACiB,OAAO,CAAC,CAAC;EAChB;EACA,IAAI,CAAC1C,KAAK,CAACI,IAAI,CAAC;EAChB,IAAI,CAAC4E,MAAM,CAAC,CAAC;EACb,IAAI,CAACC,UAAU,CAACxF,IAAI,CAAC;AACvB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/generator/lib/generators/flow.js deleted file mode 100644 index 62445cb..0000000 --- a/node_modules/@babel/generator/lib/generators/flow.js +++ /dev/null @@ -1,658 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.DeclareClass = DeclareClass; -exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.DeclareFunction = DeclareFunction; -exports.DeclareInterface = DeclareInterface; -exports.DeclareModule = DeclareModule; -exports.DeclareModuleExports = DeclareModuleExports; -exports.DeclareOpaqueType = DeclareOpaqueType; -exports.DeclareTypeAlias = DeclareTypeAlias; -exports.DeclareVariable = DeclareVariable; -exports.DeclaredPredicate = DeclaredPredicate; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.EnumBooleanBody = EnumBooleanBody; -exports.EnumBooleanMember = EnumBooleanMember; -exports.EnumDeclaration = EnumDeclaration; -exports.EnumDefaultedMember = EnumDefaultedMember; -exports.EnumNumberBody = EnumNumberBody; -exports.EnumNumberMember = EnumNumberMember; -exports.EnumStringBody = EnumStringBody; -exports.EnumStringMember = EnumStringMember; -exports.EnumSymbolBody = EnumSymbolBody; -exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.FunctionTypeParam = FunctionTypeParam; -exports.IndexedAccessType = IndexedAccessType; -exports.InferredPredicate = InferredPredicate; -exports.InterfaceDeclaration = InterfaceDeclaration; -exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; -exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.NumericLiteral; - } -}); -exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.ObjectTypeProperty = ObjectTypeProperty; -exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.OpaqueType = OpaqueType; -exports.OptionalIndexedAccessType = OptionalIndexedAccessType; -exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -Object.defineProperty(exports, "StringLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.StringLiteral; - } -}); -exports.StringTypeAnnotation = StringTypeAnnotation; -exports.SymbolTypeAnnotation = SymbolTypeAnnotation; -exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.TypeAlias = TypeAlias; -exports.TypeAnnotation = TypeAnnotation; -exports.TypeCastExpression = TypeCastExpression; -exports.TypeParameter = TypeParameter; -exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.Variance = Variance; -exports.VoidTypeAnnotation = VoidTypeAnnotation; -exports._interfaceish = _interfaceish; -exports._variance = _variance; -var _t = require("@babel/types"); -var _modules = require("./modules.js"); -var _index = require("../node/index.js"); -var _types2 = require("./types.js"); -const { - isDeclareExportDeclaration, - isStatement -} = _t; -function AnyTypeAnnotation() { - this.word("any"); -} -function ArrayTypeAnnotation(node) { - this.print(node.elementType, true); - this.tokenChar(91); - this.tokenChar(93); -} -function BooleanTypeAnnotation() { - this.word("boolean"); -} -function BooleanLiteralTypeAnnotation(node) { - this.word(node.value ? "true" : "false"); -} -function NullLiteralTypeAnnotation() { - this.word("null"); -} -function DeclareClass(node, parent) { - if (!isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("class"); - this.space(); - _interfaceish.call(this, node); -} -function DeclareFunction(node, parent) { - if (!isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("function"); - this.space(); - this.print(node.id); - this.print(node.id.typeAnnotation.typeAnnotation); - if (node.predicate) { - this.space(); - this.print(node.predicate); - } - this.semicolon(); -} -function InferredPredicate() { - this.tokenChar(37); - this.word("checks"); -} -function DeclaredPredicate(node) { - this.tokenChar(37); - this.word("checks"); - this.tokenChar(40); - this.print(node.value); - this.tokenChar(41); -} -function DeclareInterface(node) { - this.word("declare"); - this.space(); - InterfaceDeclaration.call(this, node); -} -function DeclareModule(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.space(); - this.print(node.id); - this.space(); - this.print(node.body); -} -function DeclareModuleExports(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.tokenChar(46); - this.word("exports"); - this.print(node.typeAnnotation); -} -function DeclareTypeAlias(node) { - this.word("declare"); - this.space(); - TypeAlias.call(this, node); -} -function DeclareOpaqueType(node, parent) { - if (!isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - OpaqueType.call(this, node); -} -function DeclareVariable(node, parent) { - if (!isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - this.word("var"); - this.space(); - this.print(node.id); - this.print(node.id.typeAnnotation); - this.semicolon(); -} -function DeclareExportDeclaration(node) { - this.word("declare"); - this.space(); - this.word("export"); - this.space(); - if (node.default) { - this.word("default"); - this.space(); - } - FlowExportDeclaration.call(this, node); -} -function DeclareExportAllDeclaration(node) { - this.word("declare"); - this.space(); - _modules.ExportAllDeclaration.call(this, node); -} -function EnumDeclaration(node) { - const { - id, - body - } = node; - this.word("enum"); - this.space(); - this.print(id); - this.print(body); -} -function enumExplicitType(context, name, hasExplicitType) { - if (hasExplicitType) { - context.space(); - context.word("of"); - context.space(); - context.word(name); - } - context.space(); -} -function enumBody(context, node) { - const { - members - } = node; - context.token("{"); - context.indent(); - context.newline(); - for (const member of members) { - context.print(member); - context.newline(); - } - if (node.hasUnknownMembers) { - context.token("..."); - context.newline(); - } - context.dedent(); - context.token("}"); -} -function EnumBooleanBody(node) { - const { - explicitType - } = node; - enumExplicitType(this, "boolean", explicitType); - enumBody(this, node); -} -function EnumNumberBody(node) { - const { - explicitType - } = node; - enumExplicitType(this, "number", explicitType); - enumBody(this, node); -} -function EnumStringBody(node) { - const { - explicitType - } = node; - enumExplicitType(this, "string", explicitType); - enumBody(this, node); -} -function EnumSymbolBody(node) { - enumExplicitType(this, "symbol", true); - enumBody(this, node); -} -function EnumDefaultedMember(node) { - const { - id - } = node; - this.print(id); - this.tokenChar(44); -} -function enumInitializedMember(context, node) { - context.print(node.id); - context.space(); - context.token("="); - context.space(); - context.print(node.init); - context.token(","); -} -function EnumBooleanMember(node) { - enumInitializedMember(this, node); -} -function EnumNumberMember(node) { - enumInitializedMember(this, node); -} -function EnumStringMember(node) { - enumInitializedMember(this, node); -} -function FlowExportDeclaration(node) { - if (node.declaration) { - const declar = node.declaration; - this.print(declar); - if (!isStatement(declar)) this.semicolon(); - } else { - this.tokenChar(123); - if (node.specifiers.length) { - this.space(); - this.printList(node.specifiers); - this.space(); - } - this.tokenChar(125); - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source); - } - this.semicolon(); - } -} -function ExistsTypeAnnotation() { - this.tokenChar(42); -} -function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters); - this.tokenChar(40); - if (node.this) { - this.word("this"); - this.tokenChar(58); - this.space(); - this.print(node.this.typeAnnotation); - if (node.params.length || node.rest) { - this.tokenChar(44); - this.space(); - } - } - this.printList(node.params); - if (node.rest) { - if (node.params.length) { - this.tokenChar(44); - this.space(); - } - this.token("..."); - this.print(node.rest); - } - this.tokenChar(41); - const type = parent == null ? void 0 : parent.type; - if (type != null && (type === "ObjectTypeCallProperty" || type === "ObjectTypeInternalSlot" || type === "DeclareFunction" || type === "ObjectTypeProperty" && parent.method)) { - this.tokenChar(58); - } else { - this.space(); - this.token("=>"); - } - this.space(); - this.print(node.returnType); -} -function FunctionTypeParam(node) { - this.print(node.name); - if (node.optional) this.tokenChar(63); - if (node.name) { - this.tokenChar(58); - this.space(); - } - this.print(node.typeAnnotation); -} -function InterfaceExtends(node) { - this.print(node.id); - this.print(node.typeParameters, true); -} -function _interfaceish(node) { - var _node$extends; - this.print(node.id); - this.print(node.typeParameters); - if ((_node$extends = node.extends) != null && _node$extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends); - } - if (node.type === "DeclareClass") { - var _node$mixins, _node$implements; - if ((_node$mixins = node.mixins) != null && _node$mixins.length) { - this.space(); - this.word("mixins"); - this.space(); - this.printList(node.mixins); - } - if ((_node$implements = node.implements) != null && _node$implements.length) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements); - } - } - this.space(); - this.print(node.body); -} -function _variance(node) { - var _node$variance; - const kind = (_node$variance = node.variance) == null ? void 0 : _node$variance.kind; - if (kind != null) { - if (kind === "plus") { - this.tokenChar(43); - } else if (kind === "minus") { - this.tokenChar(45); - } - } -} -function InterfaceDeclaration(node) { - this.word("interface"); - this.space(); - _interfaceish.call(this, node); -} -function andSeparator(occurrenceCount) { - this.space(); - this.token("&", false, occurrenceCount); - this.space(); -} -function InterfaceTypeAnnotation(node) { - var _node$extends2; - this.word("interface"); - if ((_node$extends2 = node.extends) != null && _node$extends2.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends); - } - this.space(); - this.print(node.body); -} -function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, undefined, undefined, andSeparator); -} -function MixedTypeAnnotation() { - this.word("mixed"); -} -function EmptyTypeAnnotation() { - this.word("empty"); -} -function NullableTypeAnnotation(node) { - this.tokenChar(63); - this.print(node.typeAnnotation); -} -function NumberTypeAnnotation() { - this.word("number"); -} -function StringTypeAnnotation() { - this.word("string"); -} -function ThisTypeAnnotation() { - this.word("this"); -} -function TupleTypeAnnotation(node) { - this.tokenChar(91); - this.printList(node.types); - this.tokenChar(93); -} -function TypeofTypeAnnotation(node) { - this.word("typeof"); - this.space(); - this.print(node.argument); -} -function TypeAlias(node) { - this.word("type"); - this.space(); - this.print(node.id); - this.print(node.typeParameters); - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.right); - this.semicolon(); -} -function TypeAnnotation(node, parent) { - this.tokenChar(58); - this.space(); - if (parent.type === "ArrowFunctionExpression") { - this.tokenContext |= _index.TokenContext.arrowFlowReturnType; - } else if (node.optional) { - this.tokenChar(63); - } - this.print(node.typeAnnotation); -} -function TypeParameterInstantiation(node) { - this.tokenChar(60); - this.printList(node.params); - this.tokenChar(62); -} -function TypeParameter(node) { - _variance.call(this, node); - this.word(node.name); - if (node.bound) { - this.print(node.bound); - } - if (node.default) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.default); - } -} -function OpaqueType(node) { - this.word("opaque"); - this.space(); - this.word("type"); - this.space(); - this.print(node.id); - this.print(node.typeParameters); - if (node.supertype) { - this.tokenChar(58); - this.space(); - this.print(node.supertype); - } - if (node.impltype) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.impltype); - } - this.semicolon(); -} -function ObjectTypeAnnotation(node) { - if (node.exact) { - this.token("{|"); - } else { - this.tokenChar(123); - } - const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])]; - if (props.length) { - this.newline(); - this.space(); - this.printJoin(props, true, true, () => { - if (props.length !== 1 || node.inexact) { - this.tokenChar(44); - this.space(); - } - }, true); - this.space(); - } - if (node.inexact) { - this.indent(); - this.token("..."); - if (props.length) { - this.newline(); - } - this.dedent(); - } - if (node.exact) { - this.token("|}"); - } else { - this.tokenChar(125); - } -} -function ObjectTypeInternalSlot(node) { - if (node.static) { - this.word("static"); - this.space(); - } - this.tokenChar(91); - this.tokenChar(91); - this.print(node.id); - this.tokenChar(93); - this.tokenChar(93); - if (node.optional) this.tokenChar(63); - if (!node.method) { - this.tokenChar(58); - this.space(); - } - this.print(node.value); -} -function ObjectTypeCallProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - this.print(node.value); -} -function ObjectTypeIndexer(node) { - if (node.static) { - this.word("static"); - this.space(); - } - _variance.call(this, node); - this.tokenChar(91); - if (node.id) { - this.print(node.id); - this.tokenChar(58); - this.space(); - } - this.print(node.key); - this.tokenChar(93); - this.tokenChar(58); - this.space(); - this.print(node.value); -} -function ObjectTypeProperty(node) { - if (node.proto) { - this.word("proto"); - this.space(); - } - if (node.static) { - this.word("static"); - this.space(); - } - if (node.kind === "get" || node.kind === "set") { - this.word(node.kind); - this.space(); - } - _variance.call(this, node); - this.print(node.key); - if (node.optional) this.tokenChar(63); - if (!node.method) { - this.tokenChar(58); - this.space(); - } - this.print(node.value); -} -function ObjectTypeSpreadProperty(node) { - this.token("..."); - this.print(node.argument); -} -function QualifiedTypeIdentifier(node) { - this.print(node.qualification); - this.tokenChar(46); - this.print(node.id); -} -function SymbolTypeAnnotation() { - this.word("symbol"); -} -function orSeparator(occurrenceCount) { - this.space(); - this.token("|", false, occurrenceCount); - this.space(); -} -function UnionTypeAnnotation(node) { - this.printJoin(node.types, undefined, undefined, orSeparator); -} -function TypeCastExpression(node) { - this.tokenChar(40); - this.print(node.expression); - this.print(node.typeAnnotation); - this.tokenChar(41); -} -function Variance(node) { - if (node.kind === "plus") { - this.tokenChar(43); - } else { - this.tokenChar(45); - } -} -function VoidTypeAnnotation() { - this.word("void"); -} -function IndexedAccessType(node) { - this.print(node.objectType, true); - this.tokenChar(91); - this.print(node.indexType); - this.tokenChar(93); -} -function OptionalIndexedAccessType(node) { - this.print(node.objectType); - if (node.optional) { - this.token("?."); - } - this.tokenChar(91); - this.print(node.indexType); - this.tokenChar(93); -} - -//# sourceMappingURL=flow.js.map diff --git a/node_modules/@babel/generator/lib/generators/flow.js.map b/node_modules/@babel/generator/lib/generators/flow.js.map deleted file mode 100644 index b44691a..0000000 --- a/node_modules/@babel/generator/lib/generators/flow.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_modules","_index","_types2","isDeclareExportDeclaration","isStatement","AnyTypeAnnotation","word","ArrayTypeAnnotation","node","print","elementType","token","BooleanTypeAnnotation","BooleanLiteralTypeAnnotation","value","NullLiteralTypeAnnotation","DeclareClass","parent","space","_interfaceish","call","DeclareFunction","id","typeAnnotation","predicate","semicolon","InferredPredicate","DeclaredPredicate","DeclareInterface","InterfaceDeclaration","DeclareModule","body","DeclareModuleExports","DeclareTypeAlias","TypeAlias","DeclareOpaqueType","OpaqueType","DeclareVariable","DeclareExportDeclaration","default","FlowExportDeclaration","DeclareExportAllDeclaration","ExportAllDeclaration","EnumDeclaration","enumExplicitType","context","name","hasExplicitType","enumBody","members","indent","newline","member","hasUnknownMembers","dedent","EnumBooleanBody","explicitType","EnumNumberBody","EnumStringBody","EnumSymbolBody","EnumDefaultedMember","enumInitializedMember","init","EnumBooleanMember","EnumNumberMember","EnumStringMember","declaration","declar","specifiers","length","printList","source","ExistsTypeAnnotation","FunctionTypeAnnotation","typeParameters","this","params","rest","type","method","returnType","FunctionTypeParam","optional","InterfaceExtends","_node$extends","extends","_node$mixins","_node$implements","mixins","implements","_variance","_node$variance","kind","variance","andSeparator","occurrenceCount","InterfaceTypeAnnotation","_node$extends2","IntersectionTypeAnnotation","printJoin","types","undefined","MixedTypeAnnotation","EmptyTypeAnnotation","NullableTypeAnnotation","NumberTypeAnnotation","StringTypeAnnotation","ThisTypeAnnotation","TupleTypeAnnotation","TypeofTypeAnnotation","argument","right","TypeAnnotation","tokenContext","TokenContext","arrowFlowReturnType","TypeParameterInstantiation","TypeParameter","bound","supertype","impltype","ObjectTypeAnnotation","exact","props","properties","callProperties","indexers","internalSlots","inexact","ObjectTypeInternalSlot","static","ObjectTypeCallProperty","ObjectTypeIndexer","key","ObjectTypeProperty","proto","ObjectTypeSpreadProperty","QualifiedTypeIdentifier","qualification","SymbolTypeAnnotation","orSeparator","UnionTypeAnnotation","TypeCastExpression","expression","Variance","VoidTypeAnnotation","IndexedAccessType","objectType","indexType","OptionalIndexedAccessType"],"sources":["../../src/generators/flow.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport { isDeclareExportDeclaration, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { ExportAllDeclaration } from \"./modules.ts\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function AnyTypeAnnotation(this: Printer) {\n this.word(\"any\");\n}\n\nexport function ArrayTypeAnnotation(\n this: Printer,\n node: t.ArrayTypeAnnotation,\n) {\n this.print(node.elementType, true);\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function BooleanTypeAnnotation(this: Printer) {\n this.word(\"boolean\");\n}\n\nexport function BooleanLiteralTypeAnnotation(\n this: Printer,\n node: t.BooleanLiteralTypeAnnotation,\n) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteralTypeAnnotation(this: Printer) {\n this.word(\"null\");\n}\n\nexport function DeclareClass(\n this: Printer,\n node: t.DeclareClass,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"class\");\n this.space();\n _interfaceish.call(this, node);\n}\n\nexport function DeclareFunction(\n this: Printer,\n node: t.DeclareFunction,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"function\");\n this.space();\n this.print(node.id);\n // @ts-ignore(Babel 7 vs Babel 8) TODO(Babel 8) Remove this comment, since we'll remove the Noop node\n this.print(node.id.typeAnnotation.typeAnnotation);\n\n if (node.predicate) {\n this.space();\n this.print(node.predicate);\n }\n\n this.semicolon();\n}\n\nexport function InferredPredicate(this: Printer) {\n this.token(\"%\");\n this.word(\"checks\");\n}\n\nexport function DeclaredPredicate(this: Printer, node: t.DeclaredPredicate) {\n this.token(\"%\");\n this.word(\"checks\");\n this.token(\"(\");\n this.print(node.value);\n this.token(\")\");\n}\n\nexport function DeclareInterface(this: Printer, node: t.DeclareInterface) {\n this.word(\"declare\");\n this.space();\n InterfaceDeclaration.call(this, node);\n}\n\nexport function DeclareModule(this: Printer, node: t.DeclareModule) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.space();\n this.print(node.id);\n this.space();\n this.print(node.body);\n}\n\nexport function DeclareModuleExports(\n this: Printer,\n node: t.DeclareModuleExports,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"module\");\n this.token(\".\");\n this.word(\"exports\");\n this.print(node.typeAnnotation);\n}\n\nexport function DeclareTypeAlias(this: Printer, node: t.DeclareTypeAlias) {\n this.word(\"declare\");\n this.space();\n TypeAlias.call(this, node);\n}\n\nexport function DeclareOpaqueType(\n this: Printer,\n node: t.DeclareOpaqueType,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n OpaqueType.call(this, node);\n}\n\nexport function DeclareVariable(\n this: Printer,\n node: t.DeclareVariable,\n parent: t.Node,\n) {\n if (!isDeclareExportDeclaration(parent)) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"var\");\n this.space();\n this.print(node.id);\n this.print(node.id.typeAnnotation);\n this.semicolon();\n}\n\nexport function DeclareExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n this.word(\"export\");\n this.space();\n if (node.default) {\n this.word(\"default\");\n this.space();\n }\n\n FlowExportDeclaration.call(this, node);\n}\n\nexport function DeclareExportAllDeclaration(\n this: Printer,\n node: t.DeclareExportAllDeclaration,\n) {\n this.word(\"declare\");\n this.space();\n ExportAllDeclaration.call(this, node);\n}\n\nexport function EnumDeclaration(this: Printer, node: t.EnumDeclaration) {\n const { id, body } = node;\n this.word(\"enum\");\n this.space();\n this.print(id);\n this.print(body);\n}\n\nfunction enumExplicitType(\n context: Printer,\n name: string,\n hasExplicitType: boolean,\n) {\n if (hasExplicitType) {\n context.space();\n context.word(\"of\");\n context.space();\n context.word(name);\n }\n context.space();\n}\n\nfunction enumBody(context: Printer, node: t.EnumBody) {\n const { members } = node;\n context.token(\"{\");\n context.indent();\n context.newline();\n for (const member of members) {\n context.print(member);\n context.newline();\n }\n if (node.hasUnknownMembers) {\n context.token(\"...\");\n context.newline();\n }\n context.dedent();\n context.token(\"}\");\n}\n\nexport function EnumBooleanBody(this: Printer, node: t.EnumBooleanBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"boolean\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumNumberBody(this: Printer, node: t.EnumNumberBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"number\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumStringBody(this: Printer, node: t.EnumStringBody) {\n const { explicitType } = node;\n enumExplicitType(this, \"string\", explicitType);\n enumBody(this, node);\n}\n\nexport function EnumSymbolBody(this: Printer, node: t.EnumSymbolBody) {\n enumExplicitType(this, \"symbol\", true);\n enumBody(this, node);\n}\n\nexport function EnumDefaultedMember(\n this: Printer,\n node: t.EnumDefaultedMember,\n) {\n const { id } = node;\n this.print(id);\n this.token(\",\");\n}\n\nfunction enumInitializedMember(\n context: Printer,\n node: t.EnumBooleanMember | t.EnumNumberMember | t.EnumStringMember,\n) {\n context.print(node.id);\n context.space();\n context.token(\"=\");\n context.space();\n context.print(node.init);\n context.token(\",\");\n}\n\nexport function EnumBooleanMember(this: Printer, node: t.EnumBooleanMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumNumberMember(this: Printer, node: t.EnumNumberMember) {\n enumInitializedMember(this, node);\n}\n\nexport function EnumStringMember(this: Printer, node: t.EnumStringMember) {\n enumInitializedMember(this, node);\n}\n\nfunction FlowExportDeclaration(\n this: Printer,\n node: t.DeclareExportDeclaration,\n) {\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n } else {\n this.token(\"{\");\n if (node.specifiers!.length) {\n this.space();\n this.printList(node.specifiers);\n this.space();\n }\n this.token(\"}\");\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n this.print(node.source);\n }\n\n this.semicolon();\n }\n}\n\nexport function ExistsTypeAnnotation(this: Printer) {\n this.token(\"*\");\n}\n\nexport function FunctionTypeAnnotation(\n this: Printer,\n node: t.FunctionTypeAnnotation,\n parent?: t.Node,\n) {\n this.print(node.typeParameters);\n this.token(\"(\");\n\n if (node.this) {\n this.word(\"this\");\n this.token(\":\");\n this.space();\n this.print(node.this.typeAnnotation);\n if (node.params.length || node.rest) {\n this.token(\",\");\n this.space();\n }\n }\n\n this.printList(node.params);\n\n if (node.rest) {\n if (node.params.length) {\n this.token(\",\");\n this.space();\n }\n this.token(\"...\");\n this.print(node.rest);\n }\n\n this.token(\")\");\n\n // this node type is overloaded, not sure why but it makes it EXTREMELY annoying\n\n const type = parent?.type;\n if (\n type != null &&\n (type === \"ObjectTypeCallProperty\" ||\n type === \"ObjectTypeInternalSlot\" ||\n type === \"DeclareFunction\" ||\n (type === \"ObjectTypeProperty\" && parent.method))\n ) {\n this.token(\":\");\n } else {\n this.space();\n this.token(\"=>\");\n }\n\n this.space();\n this.print(node.returnType);\n}\n\nexport function FunctionTypeParam(this: Printer, node: t.FunctionTypeParam) {\n this.print(node.name);\n if (node.optional) this.token(\"?\");\n if (node.name) {\n this.token(\":\");\n this.space();\n }\n this.print(node.typeAnnotation);\n}\n\nexport function InterfaceExtends(this: Printer, node: t.InterfaceExtends) {\n this.print(node.id);\n this.print(node.typeParameters, true);\n}\n\nexport {\n InterfaceExtends as ClassImplements,\n InterfaceExtends as GenericTypeAnnotation,\n};\n\nexport function _interfaceish(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface | t.DeclareClass,\n) {\n this.print(node.id);\n this.print(node.typeParameters);\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends);\n }\n if (node.type === \"DeclareClass\") {\n if (node.mixins?.length) {\n this.space();\n this.word(\"mixins\");\n this.space();\n this.printList(node.mixins);\n }\n if (node.implements?.length) {\n this.space();\n this.word(\"implements\");\n this.space();\n this.printList(node.implements);\n }\n }\n this.space();\n this.print(node.body);\n}\n\nexport function _variance(\n this: Printer,\n node:\n | t.TypeParameter\n | t.ObjectTypeIndexer\n | t.ObjectTypeProperty\n | t.ClassProperty\n | t.ClassPrivateProperty\n | t.ClassAccessorProperty,\n) {\n const kind = node.variance?.kind;\n if (kind != null) {\n if (kind === \"plus\") {\n this.token(\"+\");\n } else if (kind === \"minus\") {\n this.token(\"-\");\n }\n }\n}\n\nexport function InterfaceDeclaration(\n this: Printer,\n node: t.InterfaceDeclaration | t.DeclareInterface,\n) {\n this.word(\"interface\");\n this.space();\n _interfaceish.call(this, node);\n}\n\nfunction andSeparator(this: Printer, occurrenceCount: number) {\n this.space();\n this.token(\"&\", false, occurrenceCount);\n this.space();\n}\n\nexport function InterfaceTypeAnnotation(\n this: Printer,\n node: t.InterfaceTypeAnnotation,\n) {\n this.word(\"interface\");\n if (node.extends?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(node.extends);\n }\n this.space();\n this.print(node.body);\n}\n\nexport function IntersectionTypeAnnotation(\n this: Printer,\n node: t.IntersectionTypeAnnotation,\n) {\n this.printJoin(node.types, undefined, undefined, andSeparator);\n}\n\nexport function MixedTypeAnnotation(this: Printer) {\n this.word(\"mixed\");\n}\n\nexport function EmptyTypeAnnotation(this: Printer) {\n this.word(\"empty\");\n}\n\nexport function NullableTypeAnnotation(\n this: Printer,\n node: t.NullableTypeAnnotation,\n) {\n this.token(\"?\");\n this.print(node.typeAnnotation);\n}\n\nexport {\n NumericLiteral as NumberLiteralTypeAnnotation,\n StringLiteral as StringLiteralTypeAnnotation,\n} from \"./types.ts\";\n\nexport function NumberTypeAnnotation(this: Printer) {\n this.word(\"number\");\n}\n\nexport function StringTypeAnnotation(this: Printer) {\n this.word(\"string\");\n}\n\nexport function ThisTypeAnnotation(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TupleTypeAnnotation(\n this: Printer,\n node: t.TupleTypeAnnotation,\n) {\n this.token(\"[\");\n this.printList(node.types);\n this.token(\"]\");\n}\n\nexport function TypeofTypeAnnotation(\n this: Printer,\n node: t.TypeofTypeAnnotation,\n) {\n this.word(\"typeof\");\n this.space();\n this.print(node.argument);\n}\n\nexport function TypeAlias(\n this: Printer,\n node: t.TypeAlias | t.DeclareTypeAlias,\n) {\n this.word(\"type\");\n this.space();\n this.print(node.id);\n this.print(node.typeParameters);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.right);\n this.semicolon();\n}\n\nexport function TypeAnnotation(\n this: Printer,\n node: t.TypeAnnotation,\n parent: t.Node,\n) {\n this.token(\":\");\n this.space();\n if (parent.type === \"ArrowFunctionExpression\") {\n this.tokenContext |= TokenContext.arrowFlowReturnType;\n } else if (\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n node.optional\n ) {\n this.token(\"?\");\n }\n this.print(node.typeAnnotation);\n}\n\nexport function TypeParameterInstantiation(\n this: Printer,\n node: t.TypeParameterInstantiation,\n): void {\n this.token(\"<\");\n this.printList(node.params);\n this.token(\">\");\n}\n\nexport { TypeParameterInstantiation as TypeParameterDeclaration };\n\nexport function TypeParameter(this: Printer, node: t.TypeParameter) {\n _variance.call(this, node);\n\n this.word(node.name);\n\n if (node.bound) {\n this.print(node.bound);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default);\n }\n}\n\nexport function OpaqueType(\n this: Printer,\n node: t.OpaqueType | t.DeclareOpaqueType,\n) {\n this.word(\"opaque\");\n this.space();\n this.word(\"type\");\n this.space();\n this.print(node.id);\n this.print(node.typeParameters);\n if (node.supertype) {\n this.token(\":\");\n this.space();\n this.print(node.supertype);\n }\n\n if (node.impltype) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.impltype);\n }\n this.semicolon();\n}\n\nexport function ObjectTypeAnnotation(\n this: Printer,\n node: t.ObjectTypeAnnotation,\n) {\n if (node.exact) {\n this.token(\"{|\");\n } else {\n this.token(\"{\");\n }\n\n // TODO: remove the array fallbacks and instead enforce the types to require an array\n const props = [\n ...node.properties,\n ...(node.callProperties || []),\n ...(node.indexers || []),\n ...(node.internalSlots || []),\n ];\n\n if (props.length) {\n this.newline();\n\n this.space();\n\n this.printJoin(\n props,\n true,\n true,\n () => {\n if (props.length !== 1 || node.inexact) {\n this.token(\",\");\n this.space();\n }\n },\n true,\n );\n\n this.space();\n }\n\n if (node.inexact) {\n this.indent();\n this.token(\"...\");\n if (props.length) {\n this.newline();\n }\n this.dedent();\n }\n\n if (node.exact) {\n this.token(\"|}\");\n } else {\n this.token(\"}\");\n }\n}\n\nexport function ObjectTypeInternalSlot(\n this: Printer,\n node: t.ObjectTypeInternalSlot,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.token(\"[\");\n this.token(\"[\");\n this.print(node.id);\n this.token(\"]\");\n this.token(\"]\");\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeCallProperty(\n this: Printer,\n node: t.ObjectTypeCallProperty,\n) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeIndexer(this: Printer, node: t.ObjectTypeIndexer) {\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n _variance.call(this, node);\n this.token(\"[\");\n if (node.id) {\n this.print(node.id);\n this.token(\":\");\n this.space();\n }\n this.print(node.key);\n this.token(\"]\");\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ObjectTypeProperty(this: Printer, node: t.ObjectTypeProperty) {\n if (node.proto) {\n this.word(\"proto\");\n this.space();\n }\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n if (node.kind === \"get\" || node.kind === \"set\") {\n this.word(node.kind);\n this.space();\n }\n _variance.call(this, node);\n this.print(node.key);\n if (node.optional) this.token(\"?\");\n if (!node.method) {\n this.token(\":\");\n this.space();\n }\n this.print(node.value);\n}\n\nexport function ObjectTypeSpreadProperty(\n this: Printer,\n node: t.ObjectTypeSpreadProperty,\n) {\n this.token(\"...\");\n this.print(node.argument);\n}\n\nexport function QualifiedTypeIdentifier(\n this: Printer,\n node: t.QualifiedTypeIdentifier,\n) {\n this.print(node.qualification);\n this.token(\".\");\n this.print(node.id);\n}\n\nexport function SymbolTypeAnnotation(this: Printer) {\n this.word(\"symbol\");\n}\n\nfunction orSeparator(this: Printer, occurrenceCount: number) {\n this.space();\n this.token(\"|\", false, occurrenceCount);\n this.space();\n}\n\nexport function UnionTypeAnnotation(\n this: Printer,\n node: t.UnionTypeAnnotation,\n) {\n this.printJoin(node.types, undefined, undefined, orSeparator);\n}\n\nexport function TypeCastExpression(this: Printer, node: t.TypeCastExpression) {\n this.token(\"(\");\n this.print(node.expression);\n this.print(node.typeAnnotation);\n this.token(\")\");\n}\n\nexport function Variance(this: Printer, node: t.Variance) {\n if (node.kind === \"plus\") {\n this.token(\"+\");\n } else {\n this.token(\"-\");\n }\n}\n\nexport function VoidTypeAnnotation(this: Printer) {\n this.word(\"void\");\n}\n\nexport function IndexedAccessType(this: Printer, node: t.IndexedAccessType) {\n this.print(node.objectType, true);\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n\nexport function OptionalIndexedAccessType(\n this: Printer,\n node: t.OptionalIndexedAccessType,\n) {\n this.print(node.objectType);\n if (node.optional) {\n this.token(\"?.\");\n }\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAqdA,IAAAG,OAAA,GAAAH,OAAA;AAGoB;EA3dXI,0BAA0B;EAAEC;AAAW,IAAAN,EAAA;AAKzC,SAASO,iBAAiBA,CAAA,EAAgB;EAC/C,IAAI,CAACC,IAAI,CAAC,KAAK,CAAC;AAClB;AAEO,SAASC,mBAAmBA,CAEjCC,IAA2B,EA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G,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAACuI,UAAU,CAAC;EAC3B,IAAI,CAACtI,KAAK,CAACD,IAAI,CAACe,cAAc,CAAC;EAC/B,IAAI,CAACZ,SAAK,GAAI,CAAC;AACjB;AAEO,SAASqI,QAAQA,CAAgBxI,IAAgB,EAAE;EACxD,IAAIA,IAAI,CAACoF,IAAI,KAAK,MAAM,EAAE;IACxB,IAAI,CAACjF,SAAK,GAAI,CAAC;EACjB,CAAC,MAAM;IACL,IAAI,CAACA,SAAK,GAAI,CAAC;EACjB;AACF;AAEO,SAASsI,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAAC3I,IAAI,CAAC,MAAM,CAAC;AACnB;AAEO,SAAS4I,iBAAiBA,CAAgB1I,IAAyB,EAAE;EAC1E,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC2I,UAAU,EAAE,IAAI,CAAC;EACjC,IAAI,CAACxI,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAAC4I,SAAS,CAAC;EAC1B,IAAI,CAACzI,SAAK,GAAI,CAAC;AACjB;AAEO,SAAS0I,yBAAyBA,CAEvC7I,IAAiC,EACjC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC2I,UAAU,CAAC;EAC3B,IAAI3I,IAAI,CAAC0E,QAAQ,EAAE;IACjB,IAAI,CAACvE,KAAK,CAAC,IAAI,CAAC;EAClB;EACA,IAAI,CAACA,SAAK,GAAI,CAAC;EACf,IAAI,CAACF,KAAK,CAACD,IAAI,CAAC4I,SAAS,CAAC;EAC1B,IAAI,CAACzI,SAAK,GAAI,CAAC;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/index.js b/node_modules/@babel/generator/lib/generators/index.js deleted file mode 100644 index 331c73f..0000000 --- a/node_modules/@babel/generator/lib/generators/index.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _templateLiterals = require("./template-literals.js"); -Object.keys(_templateLiterals).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _templateLiterals[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _templateLiterals[key]; - } - }); -}); -var _expressions = require("./expressions.js"); -Object.keys(_expressions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _expressions[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _expressions[key]; - } - }); -}); -var _statements = require("./statements.js"); -Object.keys(_statements).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _statements[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _statements[key]; - } - }); -}); -var _classes = require("./classes.js"); -Object.keys(_classes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _classes[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _classes[key]; - } - }); -}); -var _methods = require("./methods.js"); -Object.keys(_methods).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _methods[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _methods[key]; - } - }); -}); -var _modules = require("./modules.js"); -Object.keys(_modules).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _modules[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _modules[key]; - } - }); -}); -var _types = require("./types.js"); -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _types[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; - } - }); -}); -var _flow = require("./flow.js"); -Object.keys(_flow).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _flow[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _flow[key]; - } - }); -}); -var _base = require("./base.js"); -Object.keys(_base).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _base[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _base[key]; - } - }); -}); -var _jsx = require("./jsx.js"); -Object.keys(_jsx).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _jsx[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _jsx[key]; - } - }); -}); -var _typescript = require("./typescript.js"); -Object.keys(_typescript).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === _typescript[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _typescript[key]; - } - }); -}); - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/generators/index.js.map b/node_modules/@babel/generator/lib/generators/index.js.map deleted file mode 100644 index e8b0341..0000000 --- a/node_modules/@babel/generator/lib/generators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_templateLiterals","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_expressions","_statements","_classes","_methods","_modules","_types","_flow","_base","_jsx","_typescript"],"sources":["../../src/generators/index.ts"],"sourcesContent":["export * from \"./template-literals.ts\";\nexport * from \"./expressions.ts\";\nexport * from \"./statements.ts\";\nexport * from \"./classes.ts\";\nexport * from \"./methods.ts\";\nexport * from \"./modules.ts\";\nexport * from \"./types.ts\";\nexport * from \"./flow.ts\";\nexport * from \"./base.ts\";\nexport * from \"./jsx.ts\";\nexport * from \"./typescript.ts\";\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CA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OAAAU,WAAA,CAAAd,GAAA;IAAA;EAAA;AAAA","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/jsx.js b/node_modules/@babel/generator/lib/generators/jsx.js deleted file mode 100644 index be7c512..0000000 --- a/node_modules/@babel/generator/lib/generators/jsx.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JSXAttribute = JSXAttribute; -exports.JSXClosingElement = JSXClosingElement; -exports.JSXClosingFragment = JSXClosingFragment; -exports.JSXElement = JSXElement; -exports.JSXEmptyExpression = JSXEmptyExpression; -exports.JSXExpressionContainer = JSXExpressionContainer; -exports.JSXFragment = JSXFragment; -exports.JSXIdentifier = JSXIdentifier; -exports.JSXMemberExpression = JSXMemberExpression; -exports.JSXNamespacedName = JSXNamespacedName; -exports.JSXOpeningElement = JSXOpeningElement; -exports.JSXOpeningFragment = JSXOpeningFragment; -exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.JSXSpreadChild = JSXSpreadChild; -exports.JSXText = JSXText; -function JSXAttribute(node) { - this.print(node.name); - if (node.value) { - this.tokenChar(61); - this.print(node.value); - } -} -function JSXIdentifier(node) { - this.word(node.name); -} -function JSXNamespacedName(node) { - this.print(node.namespace); - this.tokenChar(58); - this.print(node.name); -} -function JSXMemberExpression(node) { - this.print(node.object); - this.tokenChar(46); - this.print(node.property); -} -function JSXSpreadAttribute(node) { - this.tokenChar(123); - this.token("..."); - this.print(node.argument); - this.rightBrace(node); -} -function JSXExpressionContainer(node) { - this.tokenChar(123); - this.print(node.expression); - this.rightBrace(node); -} -function JSXSpreadChild(node) { - this.tokenChar(123); - this.token("..."); - this.print(node.expression); - this.rightBrace(node); -} -function JSXText(node) { - const raw = this.getPossibleRaw(node); - if (raw !== undefined) { - this.token(raw, true); - } else { - this.token(node.value, true); - } -} -function JSXElement(node) { - const open = node.openingElement; - this.print(open); - if (open.selfClosing) return; - this.indent(); - for (const child of node.children) { - this.print(child); - } - this.dedent(); - this.print(node.closingElement); -} -function spaceSeparator() { - this.space(); -} -function JSXOpeningElement(node) { - this.tokenChar(60); - this.print(node.name); - if (node.typeArguments) { - this.print(node.typeArguments); - } - this.print(node.typeParameters); - if (node.attributes.length > 0) { - this.space(); - this.printJoin(node.attributes, undefined, undefined, spaceSeparator); - } - if (node.selfClosing) { - this.space(); - this.tokenChar(47); - } - this.tokenChar(62); -} -function JSXClosingElement(node) { - this.tokenChar(60); - this.tokenChar(47); - this.print(node.name); - this.tokenChar(62); -} -function JSXEmptyExpression() { - this.printInnerComments(); -} -function JSXFragment(node) { - this.print(node.openingFragment); - this.indent(); - for (const child of node.children) { - this.print(child); - } - this.dedent(); - this.print(node.closingFragment); -} -function JSXOpeningFragment() { - this.tokenChar(60); - this.tokenChar(62); -} -function JSXClosingFragment() { - this.token(" 0) {\n this.space();\n this.printJoin(node.attributes, undefined, undefined, spaceSeparator);\n }\n if (node.selfClosing) {\n this.space();\n this.token(\"/\");\n }\n this.token(\">\");\n}\n\nexport function JSXClosingElement(this: Printer, node: t.JSXClosingElement) {\n this.token(\"<\");\n this.token(\"/\");\n this.print(node.name);\n this.token(\">\");\n}\n\nexport function JSXEmptyExpression(this: Printer) {\n // This node is empty, so forcefully print its inner comments.\n this.printInnerComments();\n}\n\nexport function JSXFragment(this: Printer, node: t.JSXFragment) {\n this.print(node.openingFragment);\n\n this.indent();\n for (const child of node.children) {\n this.print(child);\n }\n this.dedent();\n\n this.print(node.closingFragment);\n}\n\nexport function JSXOpeningFragment(this: Printer) {\n this.token(\"<\");\n this.token(\">\");\n}\n\nexport function JSXClosingFragment(this: Printer) {\n this.token(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,SAASA,YAAYA,CAAgBC,IAAoB,EAAE;EAChE,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;EACrB,IAAIF,IAAI,CAACG,KAAK,EAAE;IACd,IAAI,CAACC,SAAK,GAAI,CAA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U,cAAc,CAAC;EACvE;EACA,IAAI/B,IAAI,CAACyB,WAAW,EAAE;IACpB,IAAI,CAACO,KAAK,CAAC,CAAC;IACZ,IAAI,CAAC5B,SAAK,GAAI,CAAC;EACjB;EACA,IAAI,CAACA,SAAK,GAAI,CAAC;AACjB;AAEO,SAASmC,iBAAiBA,CAAgBvC,IAAyB,EAAE;EAC1E,IAAI,CAACI,SAAK,GAAI,CAAC;EACf,IAAI,CAACA,SAAK,GAAI,CAAC;EACf,IAAI,CAACH,KAAK,CAACD,IAAI,CAACE,IAAI,CAAC;EACrB,IAAI,CAACE,SAAK,GAAI,CAAC;AACjB;AAEO,SAASoC,kBAAkBA,CAAA,EAAgB;EAEhD,IAAI,CAACC,kBAAkB,CAAC,CAAC;AAC3B;AAEO,SAASC,WAAWA,CAAgB1C,IAAmB,EAAE;EAC9D,IAAI,CAACC,KAAK,CAACD,IAAI,CAAC2C,eAAe,CAAC;EAEhC,IAAI,CAACjB,MAAM,CAAC,CAAC;EACb,KAAK,MAAMC,KAAK,IAAI3B,IAAI,CAAC4B,QAAQ,EAAE;IACjC,IAAI,CAAC3B,KAAK,CAAC0B,KAAK,CAAC;EACnB;EACA,IAAI,CAACE,MAAM,CAAC,CAAC;EAEb,IAAI,CAAC5B,KAAK,CAACD,IAAI,CAAC4C,eAAe,CAAC;AAClC;AAEO,SAASC,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAACzC,SAAK,GAAI,CAAC;EACf,IAAI,CAACA,SAAK,GAAI,CAAC;AACjB;AAEO,SAAS0C,kBAAkBA,CAAA,EAAgB;EAChD,IAAI,CAAC1C,KAAK,CAAC,IAAI,CAAC;EAChB,IAAI,CAACA,SAAK,GAAI,CAAC;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/methods.js b/node_modules/@babel/generator/lib/generators/methods.js deleted file mode 100644 index 01b90aa..0000000 --- a/node_modules/@babel/generator/lib/generators/methods.js +++ /dev/null @@ -1,207 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; -exports._functionHead = _functionHead; -exports._methodHead = _methodHead; -exports._param = _param; -exports._parameters = _parameters; -exports._params = _params; -exports._predicate = _predicate; -exports._shouldPrintArrowParamsParens = _shouldPrintArrowParamsParens; -var _t = require("@babel/types"); -var _index = require("../node/index.js"); -const { - isIdentifier -} = _t; -function _params(node, noLineTerminator, idNode, parentNode) { - this.print(node.typeParameters); - if (idNode !== undefined || parentNode !== undefined) { - const nameInfo = _getFuncIdName.call(this, idNode, parentNode); - if (nameInfo) { - this.sourceIdentifierName(nameInfo.name, nameInfo.pos); - } - } - this.tokenChar(40); - _parameters.call(this, node.params, 41); - this.print(node.returnType, noLineTerminator); - this._noLineTerminator = noLineTerminator; -} -function _parameters(parameters, endToken) { - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - const trailingComma = this.shouldPrintTrailingComma(endToken); - const paramLength = parameters.length; - for (let i = 0; i < paramLength; i++) { - _param.call(this, parameters[i]); - if (trailingComma || i < paramLength - 1) { - this.tokenChar(44, i); - this.space(); - } - } - this.tokenChar(endToken); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; -} -function _param(parameter) { - this.printJoin(parameter.decorators, undefined, undefined, undefined, undefined, true); - this.print(parameter, undefined, true); - if (parameter.optional) { - this.tokenChar(63); - } - this.print(parameter.typeAnnotation, undefined, true); -} -function _methodHead(node) { - const kind = node.kind; - const key = node.key; - if (kind === "get" || kind === "set") { - this.word(kind); - this.space(); - } - if (node.async) { - this.word("async", true); - this.space(); - } - if (kind === "method" || kind === "init") { - if (node.generator) { - this.tokenChar(42); - } - } - if (node.computed) { - this.tokenChar(91); - this.print(key); - this.tokenChar(93); - } else { - this.print(key); - } - if (node.optional) { - this.tokenChar(63); - } - if (this._buf._map) { - _params.call(this, node, false, node.computed && node.key.type !== "StringLiteral" ? undefined : node.key); - } else { - _params.call(this, node, false); - } -} -function _predicate(node, noLineTerminatorAfter) { - if (node.predicate) { - if (!node.returnType) { - this.tokenChar(58); - } - this.space(); - this.print(node.predicate, noLineTerminatorAfter); - } -} -function _functionHead(node, parent, hasPredicate) { - if (node.async) { - this.word("async"); - if (!this.format.preserveFormat) { - this._innerCommentsState = 0; - } - this.space(); - } - this.word("function"); - if (node.generator) { - if (!this.format.preserveFormat) { - this._innerCommentsState = 0; - } - this.tokenChar(42); - } - this.space(); - if (node.id) { - this.print(node.id); - } - if (this._buf._map) { - _params.call(this, node, false, node.id, parent); - } else { - _params.call(this, node, false); - } - if (hasPredicate) { - _predicate.call(this, node); - } -} -function FunctionExpression(node, parent) { - _functionHead.call(this, node, parent, true); - this.space(); - this.print(node.body); -} -function ArrowFunctionExpression(node, parent) { - if (node.async) { - this.word("async", true); - this.space(); - } - if (_shouldPrintArrowParamsParens.call(this, node)) { - _params.call(this, node, true, undefined, this._buf._map ? parent : undefined); - } else { - this.print(node.params[0], true); - } - _predicate.call(this, node, true); - this.space(); - this.printInnerComments(); - this.token("=>"); - this.space(); - this.tokenContext |= _index.TokenContext.arrowBody; - this.print(node.body); -} -function _shouldPrintArrowParamsParens(node) { - var _firstParam$leadingCo, _firstParam$trailingC; - if (node.params.length !== 1) return true; - if (node.typeParameters || node.returnType || node.predicate) { - return true; - } - const firstParam = node.params[0]; - if (!isIdentifier(firstParam) || firstParam.typeAnnotation || firstParam.optional || (_firstParam$leadingCo = firstParam.leadingComments) != null && _firstParam$leadingCo.length || (_firstParam$trailingC = firstParam.trailingComments) != null && _firstParam$trailingC.length) { - return true; - } - if (this.tokenMap) { - if (node.loc == null) return true; - if (this.tokenMap.findMatching(node, "(") !== null) return true; - const arrowToken = this.tokenMap.findMatching(node, "=>"); - if ((arrowToken == null ? void 0 : arrowToken.loc) == null) return true; - return arrowToken.loc.start.line !== node.loc.start.line; - } - if (this.format.retainLines) return true; - return false; -} -function _getFuncIdName(idNode, parent) { - let id = idNode; - if (!id && parent) { - const parentType = parent.type; - if (parentType === "VariableDeclarator") { - id = parent.id; - } else if (parentType === "AssignmentExpression" || parentType === "AssignmentPattern") { - id = parent.left; - } else if (parentType === "ObjectProperty" || parentType === "ClassProperty") { - if (!parent.computed || parent.key.type === "StringLiteral") { - id = parent.key; - } - } else if (parentType === "ClassPrivateProperty" || parentType === "ClassAccessorProperty") { - id = parent.key; - } - } - if (!id) return; - let nameInfo; - if (id.type === "Identifier") { - var _id$loc, _id$loc2; - nameInfo = { - pos: (_id$loc = id.loc) == null ? void 0 : _id$loc.start, - name: ((_id$loc2 = id.loc) == null ? void 0 : _id$loc2.identifierName) || id.name - }; - } else if (id.type === "PrivateName") { - var _id$loc3; - nameInfo = { - pos: (_id$loc3 = id.loc) == null ? void 0 : _id$loc3.start, - name: "#" + id.id.name - }; - } else if (id.type === "StringLiteral") { - var _id$loc4; - nameInfo = { - pos: (_id$loc4 = id.loc) == null ? void 0 : _id$loc4.start, - name: id.value - }; - } - return nameInfo; -} - -//# sourceMappingURL=methods.js.map diff --git a/node_modules/@babel/generator/lib/generators/methods.js.map b/node_modules/@babel/generator/lib/generators/methods.js.map deleted file mode 100644 index d448e32..0000000 --- a/node_modules/@babel/generator/lib/generators/methods.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_index","isIdentifier","_params","node","noLineTerminator","idNode","parentNode","print","typeParameters","undefined","nameInfo","_getFuncIdName","call","sourceIdentifierName","name","pos","token","_parameters","params","returnType","_noLineTerminator","parameters","endToken","oldNoLineTerminatorAfterNode","enterDelimited","trailingComma","shouldPrintTrailingComma","paramLength","length","i","_param","tokenChar","space","_noLineTerminatorAfterNode","parameter","printJoin","decorators","optional","typeAnnotation","_methodHead","kind","key","word","async","generator","computed","_buf","_map","type","_predicate","noLineTerminatorAfter","predicate","_functionHead","parent","hasPredicate","format","preserveFormat","_innerCommentsState","id","FunctionExpression","body","ArrowFunctionExpression","_shouldPrintArrowParamsParens","printInnerComments","tokenContext","TokenContext","arrowBody","_firstParam$leadingCo","_firstParam$trailingC","firstParam","leadingComments","trailingComments","tokenMap","loc","findMatching","arrowToken","start","line","retainLines","parentType","left","_id$loc","_id$loc2","identifierName","_id$loc3","_id$loc4","value"],"sources":["../../src/generators/methods.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\nimport { isIdentifier, type ParentMaps } from \"@babel/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport { TokenContext } from \"../node/index.ts\";\n\ntype ParentsOf = ParentMaps[T[\"type\"]];\n\nexport function _params(\n this: Printer,\n node: t.Function | t.TSDeclareMethod | t.TSDeclareFunction,\n noLineTerminator: boolean,\n idNode?: t.Expression | t.PrivateName | null,\n parentNode?: ParentsOf,\n) {\n this.print(node.typeParameters);\n\n if (idNode !== undefined || parentNode !== undefined) {\n const nameInfo = _getFuncIdName.call(this, idNode, parentNode);\n if (nameInfo) {\n this.sourceIdentifierName(nameInfo.name, nameInfo.pos);\n }\n }\n\n this.token(\"(\");\n _parameters.call(this, node.params, charCodes.rightParenthesis);\n\n this.print(node.returnType, noLineTerminator);\n\n this._noLineTerminator = noLineTerminator;\n}\n\nexport function _parameters(\n this: Printer,\n parameters: t.Function[\"params\"],\n endToken: number,\n) {\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n\n const trailingComma = this.shouldPrintTrailingComma(endToken);\n\n const paramLength = parameters.length;\n for (let i = 0; i < paramLength; i++) {\n _param.call(this, parameters[i]);\n\n if (trailingComma || i < paramLength - 1) {\n this.tokenChar(charCodes.comma, i);\n this.space();\n }\n }\n\n this.tokenChar(endToken);\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n}\n\nexport function _param(\n this: Printer,\n parameter: t.Identifier | t.RestElement | t.Pattern | t.TSParameterProperty,\n) {\n this.printJoin(\n // @ts-expect-error decorators is not in VoidPattern\n parameter.decorators,\n undefined,\n undefined,\n undefined,\n undefined,\n true,\n );\n this.print(parameter, undefined, true);\n if (\n // @ts-expect-error optional is not in TSParameterProperty\n parameter.optional\n ) {\n this.token(\"?\"); // TS / flow\n }\n\n this.print(\n // @ts-expect-error typeAnnotation is not in TSParameterProperty\n parameter.typeAnnotation,\n undefined,\n true,\n ); // TS / flow\n}\n\nexport function _methodHead(this: Printer, node: t.Method | t.TSDeclareMethod) {\n const kind = node.kind;\n const key = node.key;\n\n if (kind === \"get\" || kind === \"set\") {\n this.word(kind);\n this.space();\n }\n\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (\n kind === \"method\" ||\n // @ts-expect-error Fixme: kind: \"init\" is not defined\n kind === \"init\"\n ) {\n if (node.generator) {\n this.token(\"*\");\n }\n }\n\n if (node.computed) {\n this.token(\"[\");\n this.print(key);\n this.token(\"]\");\n } else {\n this.print(key);\n }\n\n if (\n // @ts-expect-error optional is not in ObjectMethod\n node.optional\n ) {\n // TS\n this.token(\"?\");\n }\n\n if (this._buf._map) {\n _params.call(\n this,\n node,\n false,\n node.computed && node.key.type !== \"StringLiteral\" ? undefined : node.key,\n );\n } else {\n _params.call(this, node, false);\n }\n}\n\nexport function _predicate(\n this: Printer,\n node:\n | t.FunctionDeclaration\n | t.FunctionExpression\n | t.ArrowFunctionExpression,\n noLineTerminatorAfter?: boolean,\n) {\n if (node.predicate) {\n if (!node.returnType) {\n this.token(\":\");\n }\n this.space();\n this.print(node.predicate, noLineTerminatorAfter);\n }\n}\n\nexport function _functionHead(\n this: Printer,\n node: t.FunctionDeclaration | t.FunctionExpression | t.TSDeclareFunction,\n parent: ParentsOf,\n hasPredicate: boolean,\n) {\n if (node.async) {\n this.word(\"async\");\n if (!this.format.preserveFormat) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._innerCommentsState = 0 /* INNER_COMMENT_STATE.DISALLOWED */;\n }\n this.space();\n }\n this.word(\"function\");\n if (node.generator) {\n if (!this.format.preserveFormat) {\n // We prevent inner comments from being printed here,\n // so that they are always consistently printed in the\n // same place regardless of the function type.\n this._innerCommentsState = 0 /* INNER_COMMENT_STATE.DISALLOWED */;\n }\n this.token(\"*\");\n }\n\n this.space();\n if (node.id) {\n this.print(node.id);\n }\n\n if (this._buf._map) {\n _params.call(this, node, false, node.id, parent);\n } else {\n _params.call(this, node, false);\n }\n if (hasPredicate) {\n _predicate.call(this, node as t.FunctionDeclaration | t.FunctionExpression);\n }\n}\n\nexport function FunctionExpression(\n this: Printer,\n node: t.FunctionExpression,\n parent: ParentsOf,\n) {\n _functionHead.call(this, node, parent, true);\n this.space();\n this.print(node.body);\n}\n\nexport { FunctionExpression as FunctionDeclaration };\n\nexport function ArrowFunctionExpression(\n this: Printer,\n node: t.ArrowFunctionExpression,\n parent: ParentsOf,\n) {\n if (node.async) {\n this.word(\"async\", true);\n this.space();\n }\n\n if (_shouldPrintArrowParamsParens.call(this, node)) {\n _params.call(\n this,\n node,\n true,\n undefined,\n this._buf._map ? parent : undefined,\n );\n } else {\n this.print(node.params[0], true);\n }\n\n _predicate.call(this, node, true);\n this.space();\n // When printing (x)/*1*/=>{}, we remove the parentheses\n // and thus there aren't two contiguous inner tokens.\n // We forcefully print inner comments here.\n this.printInnerComments();\n this.token(\"=>\");\n\n this.space();\n\n this.tokenContext |= TokenContext.arrowBody;\n this.print(node.body);\n}\n\n// Try to avoid printing parens in simple cases, but only if we're pretty\n// sure that they aren't needed by type annotations or potential newlines.\nexport function _shouldPrintArrowParamsParens(\n this: Printer,\n node: t.ArrowFunctionExpression,\n): boolean {\n if (node.params.length !== 1) return true;\n\n if (node.typeParameters || node.returnType || node.predicate) {\n return true;\n }\n\n const firstParam = node.params[0];\n if (\n !isIdentifier(firstParam) ||\n firstParam.typeAnnotation ||\n firstParam.optional ||\n // Flow does not support `foo /*: string*/ => {};`\n firstParam.leadingComments?.length ||\n firstParam.trailingComments?.length\n ) {\n return true;\n }\n\n if (this.tokenMap) {\n if (node.loc == null) return true;\n if (this.tokenMap.findMatching(node, \"(\") !== null) return true;\n const arrowToken = this.tokenMap.findMatching(node, \"=>\");\n if (arrowToken?.loc == null) return true;\n return arrowToken.loc.start.line !== node.loc.start.line;\n }\n\n if (this.format.retainLines) return true;\n\n return false;\n}\n\nfunction _getFuncIdName(\n this: Printer,\n idNode: t.Expression | t.PrivateName,\n parent: ParentsOf,\n) {\n let id: t.Expression | t.PrivateName | t.LVal | t.VoidPattern = idNode;\n\n if (!id && parent) {\n const parentType = parent.type;\n\n if (parentType === \"VariableDeclarator\") {\n id = parent.id;\n } else if (\n parentType === \"AssignmentExpression\" ||\n parentType === \"AssignmentPattern\"\n ) {\n id = parent.left;\n } else if (\n parentType === \"ObjectProperty\" ||\n parentType === \"ClassProperty\"\n ) {\n if (!parent.computed || parent.key.type === \"StringLiteral\") {\n id = parent.key;\n }\n } else if (\n parentType === \"ClassPrivateProperty\" ||\n parentType === \"ClassAccessorProperty\"\n ) {\n id = parent.key;\n }\n }\n\n if (!id) return;\n\n let nameInfo;\n\n if (id.type === \"Identifier\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.loc?.identifierName || id.name,\n };\n } else if (id.type === \"PrivateName\") {\n nameInfo = {\n pos: id.loc?.start,\n name: \"#\" + id.id.name,\n };\n } else if (id.type === \"StringLiteral\") {\n nameInfo = {\n pos: id.loc?.start,\n name: id.value,\n };\n }\n\n return nameInfo;\n}\n"],"mappings":";;;;;;;;;;;;;;AAEA,IAAAA,EAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAAgD;EAHvCE;AAAY,IAAAH,EAAA;AAOd,SAASI,OAAOA,CAErBC,IAA0D,EAC1DC,gBAAyB,EACzBC,MAA4C,EAC5CC,UAAmC,EACnC;EACA,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,cAAc,CAAC;EAE/B,IAAIH,MAAM,KAAKI,SAAS,IAAIH,UAAU,KAAKG,SAAS,EAAE;IACpD,MAAMC,QAAQ,GAAGC,cAAc,CAACC,IA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AACV,IAAI,KAAK,aAAa,EAAE;IAAA,IAAAoC,QAAA;IACpC1E,QAAQ,GAAG;MACTK,GAAG,GAAAqE,QAAA,GAAE1B,EAAE,CAACe,GAAG,qBAANW,QAAA,CAAQR,KAAK;MAClB9D,IAAI,EAAE,GAAG,GAAG4C,EAAE,CAACA,EAAE,CAAC5C;IACpB,CAAC;EACH,CAAC,MAAM,IAAI4C,EAAE,CAACV,IAAI,KAAK,eAAe,EAAE;IAAA,IAAAqC,QAAA;IACtC3E,QAAQ,GAAG;MACTK,GAAG,GAAAsE,QAAA,GAAE3B,EAAE,CAACe,GAAG,qBAANY,QAAA,CAAQT,KAAK;MAClB9D,IAAI,EAAE4C,EAAE,CAAC4B;IACX,CAAC;EACH;EAEA,OAAO5E,QAAQ;AACjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/generator/lib/generators/modules.js deleted file mode 100644 index b787d42..0000000 --- a/node_modules/@babel/generator/lib/generators/modules.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ExportAllDeclaration = ExportAllDeclaration; -exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.ExportSpecifier = ExportSpecifier; -exports.ImportAttribute = ImportAttribute; -exports.ImportDeclaration = ImportDeclaration; -exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.ImportExpression = ImportExpression; -exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; -exports.ImportSpecifier = ImportSpecifier; -exports._printAttributes = _printAttributes; -var _t = require("@babel/types"); -var _index = require("../node/index.js"); -var _expressions = require("./expressions.js"); -const { - isClassDeclaration, - isExportDefaultSpecifier, - isExportNamespaceSpecifier, - isImportDefaultSpecifier, - isImportNamespaceSpecifier, - isStatement -} = _t; -function ImportSpecifier(node) { - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - this.print(node.imported); - if (node.local && node.local.name !== node.imported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.local); - } -} -function ImportDefaultSpecifier(node) { - this.print(node.local); -} -function ExportDefaultSpecifier(node) { - this.print(node.exported); -} -function ExportSpecifier(node) { - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - this.print(node.local); - if (node.exported && node.local.name !== node.exported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.exported); - } -} -function ExportNamespaceSpecifier(node) { - this.tokenChar(42); - this.space(); - this.word("as"); - this.space(); - this.print(node.exported); -} -let warningShown = false; -function _printAttributes(node, hasPreviousBrace) { - var _node$extra; - const { - attributes - } = node; - var { - assertions - } = node; - const { - importAttributesKeyword - } = this.format; - if (attributes && !importAttributesKeyword && node.extra && (node.extra.deprecatedAssertSyntax || node.extra.deprecatedWithLegacySyntax) && !warningShown) { - warningShown = true; - console.warn(`\ -You are using import attributes, without specifying the desired output syntax. -Please specify the "importAttributesKeyword" generator option, whose value can be one of: - - "with" : \`import { a } from "b" with { type: "json" };\` - - "assert" : \`import { a } from "b" assert { type: "json" };\` - - "with-legacy" : \`import { a } from "b" with type: "json";\` -`); - } - const useAssertKeyword = importAttributesKeyword === "assert" || !importAttributesKeyword && assertions; - this.word(useAssertKeyword ? "assert" : "with"); - this.space(); - if (!useAssertKeyword && (importAttributesKeyword === "with-legacy" || !importAttributesKeyword && (_node$extra = node.extra) != null && _node$extra.deprecatedWithLegacySyntax)) { - this.printList(attributes || assertions); - return; - } - const occurrenceCount = hasPreviousBrace ? 1 : 0; - this.token("{", undefined, occurrenceCount); - this.space(); - this.printList(attributes || assertions, this.shouldPrintTrailingComma("}")); - this.space(); - this.token("}", undefined, occurrenceCount); -} -function ExportAllDeclaration(node) { - var _node$attributes, _node$assertions; - this.word("export"); - this.space(); - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - this.tokenChar(42); - this.space(); - this.word("from"); - this.space(); - if ((_node$attributes = node.attributes) != null && _node$attributes.length || (_node$assertions = node.assertions) != null && _node$assertions.length) { - this.print(node.source, true); - this.space(); - _printAttributes.call(this, node, false); - } else { - this.print(node.source); - } - this.semicolon(); -} -function maybePrintDecoratorsBeforeExport(printer, node) { - if (isClassDeclaration(node.declaration) && _expressions._shouldPrintDecoratorsBeforeExport.call(printer, node)) { - printer.printJoin(node.declaration.decorators); - } -} -function ExportNamedDeclaration(node) { - maybePrintDecoratorsBeforeExport(this, node); - this.word("export"); - this.space(); - if (node.declaration) { - const declar = node.declaration; - this.print(declar); - if (!isStatement(declar)) this.semicolon(); - } else { - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - const specifiers = node.specifiers.slice(0); - let hasSpecial = false; - for (;;) { - const first = specifiers[0]; - if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) { - hasSpecial = true; - this.print(specifiers.shift()); - if (specifiers.length) { - this.tokenChar(44); - this.space(); - } - } else { - break; - } - } - let hasBrace = false; - if (specifiers.length || !specifiers.length && !hasSpecial) { - hasBrace = true; - this.tokenChar(123); - if (specifiers.length) { - this.space(); - this.printList(specifiers, this.shouldPrintTrailingComma("}")); - this.space(); - } - this.tokenChar(125); - } - if (node.source) { - var _node$attributes2, _node$assertions2; - this.space(); - this.word("from"); - this.space(); - if ((_node$attributes2 = node.attributes) != null && _node$attributes2.length || (_node$assertions2 = node.assertions) != null && _node$assertions2.length) { - this.print(node.source, true); - this.space(); - _printAttributes.call(this, node, hasBrace); - } else { - this.print(node.source); - } - } - this.semicolon(); - } -} -function ExportDefaultDeclaration(node) { - maybePrintDecoratorsBeforeExport(this, node); - this.word("export"); - this.noIndentInnerCommentsHere(); - this.space(); - this.word("default"); - this.space(); - this.tokenContext |= _index.TokenContext.exportDefault; - const declar = node.declaration; - this.print(declar); - if (!isStatement(declar)) this.semicolon(); -} -function ImportDeclaration(node) { - var _node$attributes3, _node$assertions3; - this.word("import"); - this.space(); - const isTypeKind = node.importKind === "type" || node.importKind === "typeof"; - if (isTypeKind) { - this.noIndentInnerCommentsHere(); - this.word(node.importKind); - this.space(); - } else if (node.module) { - this.noIndentInnerCommentsHere(); - this.word("module"); - this.space(); - } else if (node.phase) { - this.noIndentInnerCommentsHere(); - this.word(node.phase); - this.space(); - } - const specifiers = node.specifiers.slice(0); - const hasSpecifiers = !!specifiers.length; - while (hasSpecifiers) { - const first = specifiers[0]; - if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift()); - if (specifiers.length) { - this.tokenChar(44); - this.space(); - } - } else { - break; - } - } - let hasBrace = false; - if (specifiers.length) { - hasBrace = true; - this.tokenChar(123); - this.space(); - this.printList(specifiers, this.shouldPrintTrailingComma("}")); - this.space(); - this.tokenChar(125); - } else if (isTypeKind && !hasSpecifiers) { - hasBrace = true; - this.tokenChar(123); - this.tokenChar(125); - } - if (hasSpecifiers || isTypeKind) { - this.space(); - this.word("from"); - this.space(); - } - if ((_node$attributes3 = node.attributes) != null && _node$attributes3.length || (_node$assertions3 = node.assertions) != null && _node$assertions3.length) { - this.print(node.source, true); - this.space(); - _printAttributes.call(this, node, hasBrace); - } else { - this.print(node.source); - } - this.semicolon(); -} -function ImportAttribute(node) { - this.print(node.key); - this.tokenChar(58); - this.space(); - this.print(node.value); -} -function ImportNamespaceSpecifier(node) { - this.tokenChar(42); - this.space(); - this.word("as"); - this.space(); - this.print(node.local); -} -function ImportExpression(node) { - this.word("import"); - if (node.phase) { - this.tokenChar(46); - this.word(node.phase); - } - this.tokenChar(40); - const shouldPrintTrailingComma = this.shouldPrintTrailingComma(")"); - this.print(node.source); - if (node.options != null) { - this.tokenChar(44); - this.space(); - this.print(node.options); - } - if (shouldPrintTrailingComma) { - this.tokenChar(44); - } - this.rightParens(node); -} - -//# sourceMappingURL=modules.js.map diff --git a/node_modules/@babel/generator/lib/generators/modules.js.map b/node_modules/@babel/generator/lib/generators/modules.js.map deleted file mode 100644 index c642e93..0000000 --- a/node_modules/@babel/generator/lib/generators/modules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_index","_expressions","isClassDeclaration","isExportDefaultSpecifier","isExportNamespaceSpecifier","isImportDefaultSpecifier","isImportNamespaceSpecifier","isStatement","ImportSpecifier","node","importKind","word","space","print","imported","local","name","ImportDefaultSpecifier","ExportDefaultSpecifier","exported","ExportSpecifier","exportKind","ExportNamespaceSpecifier","token","warningShown","_printAttributes","hasPreviousBrace","_node$extra","attributes","assertions","importAttributesKeyword","format","extra","deprecatedAssertSyntax","deprecatedWithLegacySyntax","console","warn","useAssertKeyword","printList","occurrenceCount","undefined","shouldPrintTrailingComma","ExportAllDeclaration","_node$attributes","_node$assertions","length","source","call","semicolon","maybePrintDecoratorsBeforeExport","printer","declaration","_shouldPrintDecoratorsBeforeExport","printJoin","decorators","ExportNamedDeclaration","declar","specifiers","slice","hasSpecial","first","shift","hasBrace","_node$attributes2","_node$assertions2","ExportDefaultDeclaration","noIndentInnerCommentsHere","tokenContext","TokenContext","exportDefault","ImportDeclaration","_node$attributes3","_node$assertions3","isTypeKind","module","phase","hasSpecifiers","ImportAttribute","key","value","ImportNamespaceSpecifier","ImportExpression","options","rightParens"],"sources":["../../src/generators/modules.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isClassDeclaration,\n isExportDefaultSpecifier,\n isExportNamespaceSpecifier,\n isImportDefaultSpecifier,\n isImportNamespaceSpecifier,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport { TokenContext } from \"../node/index.ts\";\nimport { _shouldPrintDecoratorsBeforeExport } from \"./expressions.ts\";\n\nexport function ImportSpecifier(this: Printer, node: t.ImportSpecifier) {\n if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n this.word(node.importKind);\n this.space();\n }\n\n this.print(node.imported);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.local && node.local.name !== node.imported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local);\n }\n}\n\nexport function ImportDefaultSpecifier(\n this: Printer,\n node: t.ImportDefaultSpecifier,\n) {\n this.print(node.local);\n}\n\nexport function ExportDefaultSpecifier(\n this: Printer,\n node: t.ExportDefaultSpecifier,\n) {\n this.print(node.exported);\n}\n\nexport function ExportSpecifier(this: Printer, node: t.ExportSpecifier) {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n this.print(node.local);\n // @ts-expect-error todo(flow-ts) maybe check node type instead of relying on name to be undefined on t.StringLiteral\n if (node.exported && node.local.name !== node.exported.name) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported);\n }\n}\n\nexport function ExportNamespaceSpecifier(\n this: Printer,\n node: t.ExportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.exported);\n}\n\nlet warningShown = false;\n\nexport function _printAttributes(\n this: Printer,\n node: Extract,\n hasPreviousBrace: boolean,\n) {\n const { attributes } = node;\n\n if (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n // eslint-disable-next-line no-var\n var { assertions } = node;\n const { importAttributesKeyword } = this.format;\n\n if (\n attributes &&\n !importAttributesKeyword &&\n node.extra &&\n (node.extra.deprecatedAssertSyntax ||\n node.extra.deprecatedWithLegacySyntax) &&\n // In the production build only show the warning once.\n // We want to show it per-usage locally for tests.\n (!process.env.IS_PUBLISH || !warningShown)\n ) {\n warningShown = true;\n console.warn(`\\\nYou are using import attributes, without specifying the desired output syntax.\nPlease specify the \"importAttributesKeyword\" generator option, whose value can be one of:\n - \"with\" : \\`import { a } from \"b\" with { type: \"json\" };\\`\n - \"assert\" : \\`import { a } from \"b\" assert { type: \"json\" };\\`\n - \"with-legacy\" : \\`import { a } from \"b\" with type: \"json\";\\`\n`);\n }\n\n const useAssertKeyword =\n importAttributesKeyword === \"assert\" ||\n (!importAttributesKeyword && assertions);\n\n this.word(useAssertKeyword ? \"assert\" : \"with\");\n this.space();\n\n if (\n !useAssertKeyword &&\n (importAttributesKeyword === \"with-legacy\" ||\n (!importAttributesKeyword && node.extra?.deprecatedWithLegacySyntax))\n ) {\n // with-legacy\n this.printList(attributes || assertions);\n return;\n }\n } else {\n this.word(\"with\");\n this.space();\n }\n\n const occurrenceCount = hasPreviousBrace ? 1 : 0;\n\n this.token(\"{\", undefined, occurrenceCount);\n this.space();\n this.printList(\n process.env.BABEL_8_BREAKING ? attributes : attributes || assertions,\n this.shouldPrintTrailingComma(\"}\"),\n );\n this.space();\n this.token(\"}\", undefined, occurrenceCount);\n}\n\nexport function ExportAllDeclaration(\n this: Printer,\n node: t.ExportAllDeclaration | t.DeclareExportAllDeclaration,\n) {\n this.word(\"export\");\n this.space();\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n this.token(\"*\");\n this.space();\n this.word(\"from\");\n this.space();\n if (\n node.attributes?.length ||\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n (!process.env.BABEL_8_BREAKING && node.assertions?.length)\n ) {\n this.print(node.source, true);\n this.space();\n _printAttributes.call(this, node, false);\n } else {\n this.print(node.source);\n }\n\n this.semicolon();\n}\n\nfunction maybePrintDecoratorsBeforeExport(\n printer: Printer,\n node: t.ExportNamedDeclaration | t.ExportDefaultDeclaration,\n) {\n if (\n isClassDeclaration(node.declaration) &&\n _shouldPrintDecoratorsBeforeExport.call(\n printer,\n node as t.ExportNamedDeclaration & { declaration: t.ClassDeclaration },\n )\n ) {\n printer.printJoin(node.declaration.decorators);\n }\n}\n\nexport function ExportNamedDeclaration(\n this: Printer,\n node: t.ExportNamedDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.space();\n if (node.declaration) {\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n } else {\n if (node.exportKind === \"type\") {\n this.word(\"type\");\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n\n // print \"special\" specifiers first\n let hasSpecial = false;\n for (;;) {\n const first = specifiers[0];\n if (\n isExportDefaultSpecifier(first) ||\n isExportNamespaceSpecifier(first)\n ) {\n hasSpecial = true;\n this.print(specifiers.shift());\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n let hasBrace = false;\n if (specifiers.length || (!specifiers.length && !hasSpecial)) {\n hasBrace = true;\n this.token(\"{\");\n if (specifiers.length) {\n this.space();\n this.printList(specifiers, this.shouldPrintTrailingComma(\"}\"));\n this.space();\n }\n this.token(\"}\");\n }\n\n if (node.source) {\n this.space();\n this.word(\"from\");\n this.space();\n if (\n node.attributes?.length ||\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n (!process.env.BABEL_8_BREAKING && node.assertions?.length)\n ) {\n this.print(node.source, true);\n this.space();\n _printAttributes.call(this, node, hasBrace);\n } else {\n this.print(node.source);\n }\n }\n\n this.semicolon();\n }\n}\n\nexport function ExportDefaultDeclaration(\n this: Printer,\n node: t.ExportDefaultDeclaration,\n) {\n maybePrintDecoratorsBeforeExport(this, node);\n\n this.word(\"export\");\n this.noIndentInnerCommentsHere();\n this.space();\n this.word(\"default\");\n this.space();\n this.tokenContext |= TokenContext.exportDefault;\n const declar = node.declaration;\n this.print(declar);\n if (!isStatement(declar)) this.semicolon();\n}\n\nexport function ImportDeclaration(this: Printer, node: t.ImportDeclaration) {\n this.word(\"import\");\n this.space();\n\n const isTypeKind = node.importKind === \"type\" || node.importKind === \"typeof\";\n if (isTypeKind) {\n this.noIndentInnerCommentsHere();\n this.word(node.importKind!);\n this.space();\n } else if (node.module) {\n this.noIndentInnerCommentsHere();\n this.word(\"module\");\n this.space();\n } else if (node.phase) {\n this.noIndentInnerCommentsHere();\n this.word(node.phase);\n this.space();\n }\n\n const specifiers = node.specifiers.slice(0);\n const hasSpecifiers = !!specifiers.length;\n // print \"special\" specifiers first. The loop condition is constant,\n // but there is a \"break\" in the body.\n while (hasSpecifiers) {\n const first = specifiers[0];\n if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n this.print(specifiers.shift());\n if (specifiers.length) {\n this.token(\",\");\n this.space();\n }\n } else {\n break;\n }\n }\n\n let hasBrace = false;\n if (specifiers.length) {\n hasBrace = true;\n this.token(\"{\");\n this.space();\n this.printList(specifiers, this.shouldPrintTrailingComma(\"}\"));\n this.space();\n this.token(\"}\");\n } else if (isTypeKind && !hasSpecifiers) {\n hasBrace = true;\n this.token(\"{\");\n this.token(\"}\");\n }\n\n if (hasSpecifiers || isTypeKind) {\n this.space();\n this.word(\"from\");\n this.space();\n }\n\n if (\n node.attributes?.length ||\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n (!process.env.BABEL_8_BREAKING && node.assertions?.length)\n ) {\n this.print(node.source, true);\n this.space();\n _printAttributes.call(this, node, hasBrace);\n } else {\n this.print(node.source);\n }\n\n this.semicolon();\n}\n\nexport function ImportAttribute(this: Printer, node: t.ImportAttribute) {\n this.print(node.key);\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ImportNamespaceSpecifier(\n this: Printer,\n node: t.ImportNamespaceSpecifier,\n) {\n this.token(\"*\");\n this.space();\n this.word(\"as\");\n this.space();\n this.print(node.local);\n}\n\nexport function ImportExpression(this: Printer, node: t.ImportExpression) {\n this.word(\"import\");\n if (node.phase) {\n this.token(\".\");\n this.word(node.phase);\n }\n this.token(\"(\");\n const shouldPrintTrailingComma = this.shouldPrintTrailingComma(\")\");\n this.print(node.source);\n if (node.options != null) {\n this.token(\",\");\n this.space();\n this.print(node.options);\n }\n if (shouldPrintTrailingComma) {\n this.token(\",\");\n }\n this.rightParens(node);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAAsE;EATp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EACnB,IAAIF,IAAI,CAACkE,KAAK,EAAE;IACd,IAAI,CAACpD,SAAK,GAAI,CAAC;IACf,IAAI,CAACZ,IAAI,CAACF,IAAI,CAACkE,KAAK,CAAC;EACvB;EACA,IAAI,CAACpD,SAAK,GAAI,CAAC;EACf,MAAMkB,wBAAwB,GAAG,IAAI,CAACA,wBAAwB,CAAC,GAAG,CAAC;EACnE,IAAI,CAAC5B,KAAK,CAACJ,IAAI,CAACqC,MAAM,CAAC;EACvB,IAAIrC,IAAI,CAACyE,OAAO,IAAI,IAAI,EAAE;IACxB,IAAI,CAAC3D,SAAK,GAAI,CAAC;IACf,IAAI,CAACX,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACyE,OAAO,CAAC;EAC1B;EACA,IAAIzC,wBAAwB,EAAE;IAC5B,IAAI,CAAClB,SAAK,GAAI,CAAC;EACjB;EACA,IAAI,CAAC4D,WAAW,CAAC1E,IAAI,CAAC;AACxB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/generator/lib/generators/statements.js deleted file mode 100644 index ab139b3..0000000 --- a/node_modules/@babel/generator/lib/generators/statements.js +++ /dev/null @@ -1,297 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.BreakStatement = BreakStatement; -exports.CatchClause = CatchClause; -exports.ContinueStatement = ContinueStatement; -exports.DebuggerStatement = DebuggerStatement; -exports.DoWhileStatement = DoWhileStatement; -exports.ForInStatement = ForInStatement; -exports.ForOfStatement = ForOfStatement; -exports.ForStatement = ForStatement; -exports.IfStatement = IfStatement; -exports.LabeledStatement = LabeledStatement; -exports.ReturnStatement = ReturnStatement; -exports.SwitchCase = SwitchCase; -exports.SwitchStatement = SwitchStatement; -exports.ThrowStatement = ThrowStatement; -exports.TryStatement = TryStatement; -exports.VariableDeclaration = VariableDeclaration; -exports.VariableDeclarator = VariableDeclarator; -exports.WhileStatement = WhileStatement; -exports.WithStatement = WithStatement; -var _t = require("@babel/types"); -var _index = require("../node/index.js"); -const { - isFor, - isIfStatement, - isStatement -} = _t; -function WithStatement(node) { - this.word("with"); - this.space(); - this.tokenChar(40); - this.print(node.object); - this.tokenChar(41); - this.printBlock(node.body); -} -function IfStatement(node) { - this.word("if"); - this.space(); - this.tokenChar(40); - this.print(node.test); - this.tokenChar(41); - this.space(); - const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent)); - if (needsBlock) { - this.tokenChar(123); - this.newline(); - this.indent(); - } - this.printAndIndentOnComments(node.consequent); - if (needsBlock) { - this.dedent(); - this.newline(); - this.tokenChar(125); - } - if (node.alternate) { - if (this.endsWith(125)) this.space(); - this.word("else"); - this.space(); - this.printAndIndentOnComments(node.alternate); - } -} -function getLastStatement(statement) { - const { - body - } = statement; - if (isStatement(body) === false) { - return statement; - } - return getLastStatement(body); -} -function ForStatement(node) { - this.word("for"); - this.space(); - this.tokenChar(40); - this.tokenContext |= _index.TokenContext.forInitHead | _index.TokenContext.forInOrInitHeadAccumulate; - this.print(node.init); - this.tokenContext = _index.TokenContext.normal; - this.tokenChar(59); - if (node.test) { - this.space(); - this.print(node.test); - } - this.tokenChar(59, 1); - if (node.update) { - this.space(); - this.print(node.update); - } - this.tokenChar(41); - this.printBlock(node.body); -} -function WhileStatement(node) { - this.word("while"); - this.space(); - this.tokenChar(40); - this.print(node.test); - this.tokenChar(41); - this.printBlock(node.body); -} -function ForInStatement(node) { - this.word("for"); - this.space(); - this.noIndentInnerCommentsHere(); - this.tokenChar(40); - this.tokenContext |= _index.TokenContext.forInHead | _index.TokenContext.forInOrInitHeadAccumulate; - this.print(node.left); - this.tokenContext = _index.TokenContext.normal; - this.space(); - this.word("in"); - this.space(); - this.print(node.right); - this.tokenChar(41); - this.printBlock(node.body); -} -function ForOfStatement(node) { - this.word("for"); - this.space(); - if (node.await) { - this.word("await"); - this.space(); - } - this.noIndentInnerCommentsHere(); - this.tokenChar(40); - this.tokenContext |= _index.TokenContext.forOfHead; - this.print(node.left); - this.space(); - this.word("of"); - this.space(); - this.print(node.right); - this.tokenChar(41); - this.printBlock(node.body); -} -function DoWhileStatement(node) { - this.word("do"); - this.space(); - this.print(node.body); - this.space(); - this.word("while"); - this.space(); - this.tokenChar(40); - this.print(node.test); - this.tokenChar(41); - this.semicolon(); -} -function printStatementAfterKeyword(printer, node) { - if (node) { - printer.space(); - printer.printTerminatorless(node); - } - printer.semicolon(); -} -function BreakStatement(node) { - this.word("break"); - printStatementAfterKeyword(this, node.label); -} -function ContinueStatement(node) { - this.word("continue"); - printStatementAfterKeyword(this, node.label); -} -function ReturnStatement(node) { - this.word("return"); - printStatementAfterKeyword(this, node.argument); -} -function ThrowStatement(node) { - this.word("throw"); - printStatementAfterKeyword(this, node.argument); -} -function LabeledStatement(node) { - this.print(node.label); - this.tokenChar(58); - this.space(); - this.print(node.body); -} -function TryStatement(node) { - this.word("try"); - this.space(); - this.print(node.block); - this.space(); - if (node.handlers) { - this.print(node.handlers[0]); - } else { - this.print(node.handler); - } - if (node.finalizer) { - this.space(); - this.word("finally"); - this.space(); - this.print(node.finalizer); - } -} -function CatchClause(node) { - this.word("catch"); - this.space(); - if (node.param) { - this.tokenChar(40); - this.print(node.param); - this.print(node.param.typeAnnotation); - this.tokenChar(41); - this.space(); - } - this.print(node.body); -} -function SwitchStatement(node) { - this.word("switch"); - this.space(); - this.tokenChar(40); - this.print(node.discriminant); - this.tokenChar(41); - this.space(); - this.tokenChar(123); - this.printSequence(node.cases, true); - this.rightBrace(node); -} -function SwitchCase(node) { - if (node.test) { - this.word("case"); - this.space(); - this.print(node.test); - this.tokenChar(58); - } else { - this.word("default"); - this.tokenChar(58); - } - if (node.consequent.length) { - this.newline(); - this.printSequence(node.consequent, true); - } -} -function DebuggerStatement() { - this.word("debugger"); - this.semicolon(); -} -function commaSeparatorWithNewline(occurrenceCount) { - this.tokenChar(44, occurrenceCount); - this.newline(); -} -function VariableDeclaration(node, parent) { - if (node.declare) { - this.word("declare"); - this.space(); - } - const { - kind - } = node; - switch (kind) { - case "await using": - this.word("await"); - this.space(); - case "using": - this.word("using", true); - break; - default: - this.word(kind); - } - this.space(); - let hasInits = false; - if (!isFor(parent)) { - for (const declar of node.declarations) { - if (declar.init) { - hasInits = true; - break; - } - } - } - this.printList(node.declarations, undefined, undefined, node.declarations.length > 1, hasInits ? commaSeparatorWithNewline : undefined); - if (parent != null) { - switch (parent.type) { - case "ForStatement": - if (parent.init === node) { - return; - } - break; - case "ForInStatement": - case "ForOfStatement": - if (parent.left === node) { - return; - } - } - } - this.semicolon(); -} -function VariableDeclarator(node) { - this.print(node.id); - if (node.definite) this.tokenChar(33); - this.print(node.id.typeAnnotation); - if (node.init) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.init); - } -} - -//# sourceMappingURL=statements.js.map diff --git a/node_modules/@babel/generator/lib/generators/statements.js.map b/node_modules/@babel/generator/lib/generators/statements.js.map deleted file mode 100644 index b01021c..0000000 --- a/node_modules/@babel/generator/lib/generators/statements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_index","isFor","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","body","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","ForStatement","tokenContext","TokenContext","forInitHead","forInOrInitHeadAccumulate","init","normal","tokenChar","update","WhileStatement","ForInStatement","noIndentInnerCommentsHere","forInHead","left","right","ForOfStatement","await","forOfHead","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","rightBrace","SwitchCase","length","DebuggerStatement","commaSeparatorWithNewline","occurrenceCount","VariableDeclaration","parent","declare","kind","hasInits","declar","declarations","printList","undefined","type","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport { isFor, isIfStatement, isStatement } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport { TokenContext } from \"../node/index.ts\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object);\n this.token(\")\");\n this.printBlock(node.body);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n this.tokenContext |=\n TokenContext.forInitHead | TokenContext.forInOrInitHeadAccumulate;\n this.print(node.init);\n this.tokenContext = TokenContext.normal;\n\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test);\n }\n this.tokenChar(charCodes.semicolon, 1);\n\n if (node.update) {\n this.space();\n this.print(node.update);\n }\n\n this.token(\")\");\n this.printBlock(node.body);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.printBlock(node.body);\n}\n\nexport function ForInStatement(this: Printer, node: t.ForInStatement) {\n this.word(\"for\");\n this.space();\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n this.tokenContext |=\n TokenContext.forInHead | TokenContext.forInOrInitHeadAccumulate;\n this.print(node.left);\n this.tokenContext = TokenContext.normal;\n this.space();\n this.word(\"in\");\n this.space();\n this.print(node.right);\n this.token(\")\");\n this.printBlock(node.body);\n}\n\nexport function ForOfStatement(this: Printer, node: t.ForOfStatement) {\n this.word(\"for\");\n this.space();\n if (node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n this.tokenContext |= TokenContext.forOfHead;\n this.print(node.left);\n this.space();\n this.word(\"of\");\n this.space();\n this.print(node.right);\n this.token(\")\");\n this.printBlock(node.body);\n}\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(\n printer: Printer,\n node: t.Node | null | undefined,\n) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label);\n}\n\nexport function ReturnStatement(this: Printer, node: t.ReturnStatement) {\n this.word(\"return\");\n printStatementAfterKeyword(this, node.argument);\n}\n\nexport function ThrowStatement(this: Printer, node: t.ThrowStatement) {\n this.word(\"throw\");\n printStatementAfterKeyword(this, node.argument);\n}\n\nexport function LabeledStatement(this: Printer, node: t.LabeledStatement) {\n this.print(node.label);\n this.token(\":\");\n this.space();\n this.print(node.body);\n}\n\nexport function TryStatement(this: Printer, node: t.TryStatement) {\n this.word(\"try\");\n this.space();\n this.print(node.block);\n this.space();\n\n // Esprima bug puts the catch clause in a `handlers` array.\n // see https://code.google.com/p/esprima/issues/detail?id=433\n // We run into this from regenerator generated ast.\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n if (node.handlers) {\n // @ts-expect-error todo(flow->ts) should ast node type be updated to support this?\n this.print(node.handlers[0]);\n } else {\n this.print(node.handler);\n }\n\n if (node.finalizer) {\n this.space();\n this.word(\"finally\");\n this.space();\n this.print(node.finalizer);\n }\n}\n\nexport function CatchClause(this: Printer, node: t.CatchClause) {\n this.word(\"catch\");\n this.space();\n if (node.param) {\n this.token(\"(\");\n this.print(node.param);\n this.print(node.param.typeAnnotation);\n this.token(\")\");\n this.space();\n }\n this.print(node.body);\n}\n\nexport function SwitchStatement(this: Printer, node: t.SwitchStatement) {\n this.word(\"switch\");\n this.space();\n this.token(\"(\");\n this.print(node.discriminant);\n this.token(\")\");\n this.space();\n this.token(\"{\");\n\n this.printSequence(node.cases, true);\n\n this.rightBrace(node);\n}\n\nexport function SwitchCase(this: Printer, node: t.SwitchCase) {\n if (node.test) {\n this.word(\"case\");\n this.space();\n this.print(node.test);\n this.token(\":\");\n } else {\n this.word(\"default\");\n this.token(\":\");\n }\n\n if (node.consequent.length) {\n this.newline();\n this.printSequence(node.consequent, true);\n }\n}\n\nexport function DebuggerStatement(this: Printer) {\n this.word(\"debugger\");\n this.semicolon();\n}\n\nfunction commaSeparatorWithNewline(this: Printer, occurrenceCount: number) {\n this.tokenChar(charCodes.comma, occurrenceCount);\n this.newline();\n}\n\nexport function VariableDeclaration(\n this: Printer,\n node: t.VariableDeclaration,\n parent: t.Node,\n) {\n if (node.declare) {\n // TS\n this.word(\"declare\");\n this.space();\n }\n\n const { kind } = node;\n switch (kind) {\n case \"await using\":\n this.word(\"await\");\n this.space();\n // fallthrough\n case \"using\":\n this.word(\"using\", true);\n break;\n default:\n this.word(kind);\n }\n this.space();\n\n let hasInits = false;\n // don't add whitespace to loop heads\n if (!isFor(parent)) {\n for (const declar of node.declarations) {\n if (declar.init) {\n // has an init so let's split it up over multiple lines\n hasInits = true;\n break;\n }\n }\n }\n\n //\n // use a pretty separator when we aren't in compact mode, have initializers and don't have retainLines on\n // this will format declarations like:\n //\n // let foo = \"bar\", bar = \"foo\";\n //\n // into\n //\n // let foo = \"bar\",\n // bar = \"foo\";\n //\n\n this.printList(\n node.declarations,\n undefined,\n undefined,\n node.declarations.length > 1,\n hasInits ? commaSeparatorWithNewline : undefined,\n );\n\n if (parent != null) {\n switch (parent.type) {\n case \"ForStatement\":\n if (parent.init === node) {\n return;\n }\n break;\n case \"ForInStatement\":\n case \"ForOfStatement\":\n if (parent.left === node) {\n return;\n }\n }\n }\n\n this.semicolon();\n}\n\nexport function VariableDeclarator(this: Printer, node: t.VariableDeclarator) {\n this.print(node.id);\n if (node.definite) this.token(\"!\"); // TS\n // @ts-ignore(Babel 7 vs Babel 8) Property 'typeAnnotation' does not exist on type 'MemberExpression'.\n this.print(node.id.typeAnnotation);\n if (node.init) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.init);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AAAgD;EANvCE,KAAK;EAAEC,aAAa;EAAEC;AAAW,IAAAL,EAAA;AAQnC,SAASM,aAAaA,CAAgBC,IAAqB,EAAE;EAClE,IAAI,CAACC,IAAI,CAAC,MAAM,CAAC;EACjB,IAAI,CAACC,KAAK,CAAC,CAAC;EACZ,IAAI,CAACC,SAAK,GAAI,CAAC;EACf,IAAI,CAACC,KAAK,CAACJ,IAAI,CAACK,MAAM,CAAC;EACvB,IAAI,CAACF,SAAK,GAAI,CAAC;EACf,IAAI,CAACG,UAAU,CAACN,IAAI,CAACO,IAAI,CAAC;AAC5B;AAEO,SAASC,WAAWA,CAAgBR,IAAmB,EAAE;EAC9D,IA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nB,IAAIqE,MAAM,CAACpC,IAAI,KAAKjC,IAAI,EAAE;UACxB;QACF;IACJ;EACF;EAEA,IAAI,CAACuC,SAAS,CAAC,CAAC;AAClB;AAEO,SAASuC,kBAAkBA,CAAgB9E,IAA0B,EAAE;EAC5E,IAAI,CAACI,KAAK,CAACJ,IAAI,CAAC+E,EAAE,CAAC;EACnB,IAAI/E,IAAI,CAACgF,QAAQ,EAAE,IAAI,CAAC7E,SAAK,GAAI,CAAC;EAElC,IAAI,CAACC,KAAK,CAACJ,IAAI,CAAC+E,EAAE,CAACtB,cAAc,CAAC;EAClC,IAAIzD,IAAI,CAACyB,IAAI,EAAE;IACb,IAAI,CAACvB,KAAK,CAAC,CAAC;IACZ,IAAI,CAACC,SAAK,GAAI,CAAC;IACf,IAAI,CAACD,KAAK,CAAC,CAAC;IACZ,IAAI,CAACE,KAAK,CAACJ,IAAI,CAACyB,IAAI,CAAC;EACvB;AACF","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js b/node_modules/@babel/generator/lib/generators/template-literals.js deleted file mode 100644 index b0c029c..0000000 --- a/node_modules/@babel/generator/lib/generators/template-literals.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.TemplateElement = TemplateElement; -exports.TemplateLiteral = TemplateLiteral; -exports._printTemplate = _printTemplate; -function TaggedTemplateExpression(node) { - this.print(node.tag); - this.print(node.typeParameters); - this.print(node.quasi); -} -function TemplateElement() { - throw new Error("TemplateElement printing is handled in TemplateLiteral"); -} -function _printTemplate(node, substitutions) { - const quasis = node.quasis; - let partRaw = "`"; - for (let i = 0; i < quasis.length - 1; i++) { - partRaw += quasis[i].value.raw; - this.token(partRaw + "${", true); - this.print(substitutions[i]); - partRaw = "}"; - if (this.tokenMap) { - const token = this.tokenMap.findMatching(node, "}", i); - if (token) this._catchUpTo(token.loc.start); - } - } - partRaw += quasis[quasis.length - 1].value.raw; - this.token(partRaw + "`", true); -} -function TemplateLiteral(node) { - _printTemplate.call(this, node, node.expressions); -} - -//# sourceMappingURL=template-literals.js.map diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js.map b/node_modules/@babel/generator/lib/generators/template-literals.js.map deleted file mode 100644 index 59fa221..0000000 --- a/node_modules/@babel/generator/lib/generators/template-literals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["TaggedTemplateExpression","node","print","tag","typeParameters","quasi","TemplateElement","Error","_printTemplate","substitutions","quasis","partRaw","i","length","value","raw","token","tokenMap","findMatching","_catchUpTo","loc","start","TemplateLiteral","call","expressions"],"sources":["../../src/generators/template-literals.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function TaggedTemplateExpression(\n this: Printer,\n node: t.TaggedTemplateExpression,\n) {\n this.print(node.tag);\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n this.print(node.typeParameters);\n }\n this.print(node.quasi);\n}\n\nexport function TemplateElement(this: Printer) {\n throw new Error(\"TemplateElement printing is handled in TemplateLiteral\");\n}\n\nexport type TemplateLiteralBase = t.Node & {\n quasis: t.TemplateElement[];\n};\n\nexport function _printTemplate(\n this: Printer,\n node: TemplateLiteralBase,\n substitutions: T[],\n) {\n const quasis = node.quasis;\n let partRaw = \"`\";\n for (let i = 0; i < quasis.length - 1; i++) {\n partRaw += quasis[i].value.raw;\n this.token(partRaw + \"${\", true);\n this.print(substitutions[i]);\n partRaw = \"}\";\n\n // In Babel 7 we have individual tokens for ${ and }, so the automatic\n // catchup logic does not work. Manually look for those tokens.\n if (!process.env.BABEL_8_BREAKING && this.tokenMap) {\n const token = this.tokenMap.findMatching(node, \"}\", i);\n if (token) this._catchUpTo(token.loc.start);\n }\n }\n partRaw += quasis[quasis.length - 1].value.raw;\n this.token(partRaw + \"`\", true);\n}\n\nexport function TemplateLiteral(this: Printer, node: t.TemplateLiteral) {\n _printTemplate.call(this, node, node.expressions);\n}\n"],"mappings":";;;;;;;;;AAGO,SAASA,wBAAwBA,CAEtCC,IAAgC,EAChC;EACA,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,GAAG,CAAC;EAMlB,IAAI,CAACD,KAAK,CAACD,IAAI,CAACG,cAAc,CAAC;EAEjC,IAAI,CAACF,KAAK,CAACD,IAAI,CAACI,KAAK,CAAC;AACxB;AAEO,SAASC,eAAeA,CAAA,EAAgB;EAC7C,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;AAC3E;AAMO,SAASC,cAAcA,CAE5BP,IAAyB,EACzBQ,aAAkB,EAClB;EACA,MAAMC,MAAM,GAAGT,IAAI,CAACS,MAAM;EAC1B,IAAIC,OAAO,GAAG,GAAG;EACjB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,GAAG,CAAC,EAAED,CAAC,EAAE,EAAE;IAC1CD,OAAO,IAAID,MAAM,CAACE,CAAC,CAAC,CAACE,KAAK,CAACC,GAAG;IAC9B,IAAI,CAACC,KAAK,CAACL,OAAO,GAAG,IAAI,EAAE,IAAI,CAAC;IAChC,IAAI,CAACT,KAAK,CAACO,aAAa,CAACG,CAAC,CAAC,CAAC;IAC5BD,OAAO,GAAG,GAAG;IAIb,IAAqC,IAAI,CAACM,QAAQ,EAAE;MAClD,MAAMD,KAAK,GAAG,IAAI,CAACC,QAAQ,CAACC,YAAY,CAACjB,IAAI,EAAE,GAAG,EAAEW,CAAC,CAAC;MACtD,IAAII,KAAK,EAAE,IAAI,CAACG,UAAU,CAACH,KAAK,CAACI,GAAG,CAACC,KAAK,CAAC;IAC7C;EACF;EACAV,OAAO,IAAID,MAAM,CAACA,MAAM,CAACG,MAAM,GAAG,CAAC,CAAC,CAACC,KAAK,CAACC,GAAG;EAC9C,IAAI,CAACC,KAAK,CAACL,OAAO,GAAG,GAAG,EAAE,IAAI,CAAC;AACjC;AAEO,SAASW,eAAeA,CAAgBrB,IAAuB,EAAE;EACtEO,cAAc,CAACe,IAAI,CAAC,IAAI,EAAEtB,IAAI,EAAEA,IAAI,CAACuB,WAAW,CAAC;AACnD","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/generator/lib/generators/types.js deleted file mode 100644 index cfe9618..0000000 --- a/node_modules/@babel/generator/lib/generators/types.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; -exports.BigIntLiteral = BigIntLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.Identifier = Identifier; -exports.NullLiteral = NullLiteral; -exports.NumericLiteral = NumericLiteral; -exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; -exports.ObjectMethod = ObjectMethod; -exports.ObjectProperty = ObjectProperty; -exports.PipelineBareFunction = PipelineBareFunction; -exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; -exports.PipelineTopicExpression = PipelineTopicExpression; -exports.RegExpLiteral = RegExpLiteral; -exports.SpreadElement = exports.RestElement = RestElement; -exports.StringLiteral = StringLiteral; -exports.TopicReference = TopicReference; -exports.VoidPattern = VoidPattern; -exports._getRawIdentifier = _getRawIdentifier; -var _t = require("@babel/types"); -var _jsesc = require("jsesc"); -var _methods = require("./methods.js"); -const { - isAssignmentPattern, - isIdentifier -} = _t; -let lastRawIdentResult = ""; -function _getRawIdentifier(node) { - const { - name - } = node; - const token = this.tokenMap.find(node, tok => tok.value === name); - if (token) { - lastRawIdentResult = this._originalCode.slice(token.start, token.end); - return lastRawIdentResult; - } - return lastRawIdentResult = node.name; -} -function Identifier(node) { - if (this._buf._map) { - var _node$loc; - this.sourceIdentifierName(((_node$loc = node.loc) == null ? void 0 : _node$loc.identifierName) || node.name); - } - this.word(this.tokenMap ? lastRawIdentResult : node.name); -} -function ArgumentPlaceholder() { - this.tokenChar(63); -} -function RestElement(node) { - this.token("..."); - this.print(node.argument); -} -function ObjectExpression(node) { - const props = node.properties; - this.tokenChar(123); - if (props.length) { - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.space(); - this.printList(props, this.shouldPrintTrailingComma("}"), true, true, undefined, true); - this.space(); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - } - this.rightBrace(node); -} -function ObjectMethod(node) { - this.printJoin(node.decorators); - _methods._methodHead.call(this, node); - this.space(); - this.print(node.body); -} -function ObjectProperty(node) { - this.printJoin(node.decorators); - if (node.computed) { - this.tokenChar(91); - this.print(node.key); - this.tokenChar(93); - } else { - if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value); - return; - } - this.print(node.key); - if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) { - return; - } - } - this.tokenChar(58); - this.space(); - this.print(node.value); -} -function ArrayExpression(node) { - const elems = node.elements; - const len = elems.length; - this.tokenChar(91); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - for (let i = 0; i < elems.length; i++) { - const elem = elems[i]; - if (elem) { - if (i > 0) this.space(); - this.print(elem, undefined, true); - if (i < len - 1 || this.shouldPrintTrailingComma("]")) { - this.tokenChar(44, i); - } - } else { - this.tokenChar(44, i); - } - } - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.tokenChar(93); -} -function RegExpLiteral(node) { - this.word(`/${node.pattern}/${node.flags}`, false); -} -function BooleanLiteral(node) { - this.word(node.value ? "true" : "false"); -} -function NullLiteral() { - this.word("null"); -} -function NumericLiteral(node) { - const raw = this.getPossibleRaw(node); - const opts = this.format.jsescOption; - const value = node.value; - const str = value + ""; - if (opts.numbers) { - this.number(_jsesc(value, opts), value); - } else if (raw == null) { - this.number(str, value); - } else if (this.format.minified) { - this.number(raw.length < str.length ? raw : str, value); - } else { - this.number(raw, value); - } -} -function StringLiteral(node) { - const raw = this.getPossibleRaw(node); - if (!this.format.minified && raw !== undefined) { - this.token(raw); - return; - } - const val = _jsesc(node.value, this.format.jsescOption); - this.token(val); -} -function BigIntLiteral(node) { - const raw = this.getPossibleRaw(node); - if (!this.format.minified && raw !== undefined) { - this.word(raw); - return; - } - this.word(node.value + "n"); -} -const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]); -function TopicReference() { - const { - topicToken - } = this.format; - if (validTopicTokenSet.has(topicToken)) { - this.token(topicToken); - } else { - const givenTopicTokenJSON = JSON.stringify(topicToken); - const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v)); - throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`); - } -} -function PipelineTopicExpression(node) { - this.print(node.expression); -} -function PipelineBareFunction(node) { - this.print(node.callee); -} -function PipelinePrimaryTopicReference() { - this.tokenChar(35); -} -function VoidPattern() { - this.word("void"); -} - -//# sourceMappingURL=types.js.map diff --git a/node_modules/@babel/generator/lib/generators/types.js.map b/node_modules/@babel/generator/lib/generators/types.js.map deleted file mode 100644 index 9f27ab1..0000000 --- a/node_modules/@babel/generator/lib/generators/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_jsesc","_methods","isAssignmentPattern","isIdentifier","lastRawIdentResult","_getRawIdentifier","node","name","token","tokenMap","find","tok","value","_originalCode","slice","start","end","Identifier","_buf","_map","_node$loc","sourceIdentifierName","loc","identifierName","word","ArgumentPlaceholder","RestElement","print","argument","ObjectExpression","props","properties","length","oldNoLineTerminatorAfterNode","enterDelimited","space","printList","shouldPrintTrailingComma","undefined","_noLineTerminatorAfterNode","rightBrace","ObjectMethod","printJoin","decorators","_methodHead","call","body","ObjectProperty","computed","key","left","shorthand","ArrayExpression","elems","elements","len","i","elem","tokenChar","RegExpLiteral","pattern","flags","BooleanLiteral","NullLiteral","NumericLiteral","raw","getPossibleRaw","opts","format","jsescOption","str","numbers","number","jsesc","minified","StringLiteral","val","BigIntLiteral","validTopicTokenSet","Set","TopicReference","topicToken","has","givenTopicTokenJSON","JSON","stringify","validTopics","Array","from","v","Error","join","PipelineTopicExpression","expression","PipelineBareFunction","callee","PipelinePrimaryTopicReference","VoidPattern"],"sources":["../../src/generators/types.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport { isAssignmentPattern, isIdentifier } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport jsesc from \"jsesc\";\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport { _methodHead } from \"./methods.ts\";\n\nlet lastRawIdentResult: string = \"\";\nexport function _getRawIdentifier(this: Printer, node: t.Identifier) {\n const { name } = node;\n const token = this.tokenMap!.find(node, tok => tok.value === name);\n if (token) {\n lastRawIdentResult = this._originalCode!.slice(token.start, token.end);\n return lastRawIdentResult;\n }\n return (lastRawIdentResult = node.name);\n}\n\nexport function Identifier(this: Printer, node: t.Identifier) {\n if (this._buf._map) {\n this.sourceIdentifierName(node.loc?.identifierName || node.name);\n }\n\n this.word(this.tokenMap ? lastRawIdentResult : node.name);\n}\n\nexport function ArgumentPlaceholder(this: Printer) {\n this.token(\"?\");\n}\n\nexport function RestElement(this: Printer, node: t.RestElement) {\n this.token(\"...\");\n this.print(node.argument);\n}\n\nexport { RestElement as SpreadElement };\n\nexport function ObjectExpression(this: Printer, node: t.ObjectExpression) {\n const props = node.properties;\n\n this.token(\"{\");\n\n if (props.length) {\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.space();\n this.printList(\n props,\n this.shouldPrintTrailingComma(\"}\"),\n true,\n true,\n undefined,\n true,\n );\n this.space();\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n }\n\n this.rightBrace(node);\n}\n\nexport { ObjectExpression as ObjectPattern };\n\nexport function ObjectMethod(this: Printer, node: t.ObjectMethod) {\n this.printJoin(node.decorators);\n _methodHead.call(this, node);\n this.space();\n this.print(node.body);\n}\n\nexport function ObjectProperty(this: Printer, node: t.ObjectProperty) {\n this.printJoin(node.decorators);\n\n if (node.computed) {\n this.token(\"[\");\n this.print(node.key);\n this.token(\"]\");\n } else {\n // print `({ foo: foo = 5 } = {})` as `({ foo = 5 } = {});`\n if (\n isAssignmentPattern(node.value) &&\n isIdentifier(node.key) &&\n // @ts-expect-error todo(flow->ts) `.name` does not exist on some types in union\n node.key.name === node.value.left.name\n ) {\n this.print(node.value);\n return;\n }\n\n this.print(node.key);\n\n // shorthand!\n if (\n node.shorthand &&\n isIdentifier(node.key) &&\n isIdentifier(node.value) &&\n node.key.name === node.value.name\n ) {\n return;\n }\n }\n\n this.token(\":\");\n this.space();\n this.print(node.value);\n}\n\nexport function ArrayExpression(this: Printer, node: t.ArrayExpression) {\n const elems = node.elements;\n const len = elems.length;\n\n this.token(\"[\");\n\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n\n for (let i = 0; i < elems.length; i++) {\n const elem = elems[i];\n if (elem) {\n if (i > 0) this.space();\n this.print(elem, undefined, true);\n if (i < len - 1 || this.shouldPrintTrailingComma(\"]\")) {\n this.tokenChar(charCodes.comma, i);\n }\n } else {\n // If the array expression ends with a hole, that hole\n // will be ignored by the interpreter, but if it ends with\n // two (or more) holes, we need to write out two (or more)\n // commas so that the resulting code is interpreted with\n // both (all) of the holes.\n this.tokenChar(charCodes.comma, i);\n }\n }\n\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n\n this.token(\"]\");\n}\n\nexport { ArrayExpression as ArrayPattern };\n\nexport function RegExpLiteral(this: Printer, node: t.RegExpLiteral) {\n this.word(`/${node.pattern}/${node.flags}`, false);\n}\n\nexport function BooleanLiteral(this: Printer, node: t.BooleanLiteral) {\n this.word(node.value ? \"true\" : \"false\");\n}\n\nexport function NullLiteral(this: Printer) {\n this.word(\"null\");\n}\n\nexport function NumericLiteral(this: Printer, node: t.NumericLiteral) {\n const raw = this.getPossibleRaw(node);\n const opts = this.format.jsescOption;\n const value = node.value;\n const str = value + \"\";\n if (opts.numbers) {\n this.number(jsesc(value, opts), value);\n } else if (raw == null) {\n this.number(str, value); // normalize\n } else if (this.format.minified) {\n this.number(raw.length < str.length ? raw : str, value);\n } else {\n this.number(raw, value);\n }\n}\n\nexport function StringLiteral(this: Printer, node: t.StringLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const val = jsesc(node.value, this.format.jsescOption);\n\n this.token(val);\n}\n\nexport function BigIntLiteral(this: Printer, node: t.BigIntLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.word(raw);\n return;\n }\n this.word(node.value + \"n\");\n}\n\n// Hack pipe operator\nconst validTopicTokenSet = new Set([\n \"^^\",\n \"@@\",\n \"^\",\n \"%\",\n \"#\",\n]);\nexport function TopicReference(this: Printer) {\n const { topicToken } = this.format;\n\n if (validTopicTokenSet.has(topicToken)) {\n this.token(topicToken!);\n } else {\n const givenTopicTokenJSON = JSON.stringify(topicToken);\n const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));\n throw new Error(\n `The \"topicToken\" generator option must be one of ` +\n `${validTopics.join(\", \")} (${givenTopicTokenJSON} received instead).`,\n );\n }\n}\n\n// Smart-mix pipe operator\nexport function PipelineTopicExpression(\n this: Printer,\n node: t.PipelineTopicExpression,\n) {\n this.print(node.expression);\n}\n\nexport function PipelineBareFunction(\n this: Printer,\n node: t.PipelineBareFunction,\n) {\n this.print(node.callee);\n}\n\nexport function PipelinePrimaryTopicReference(this: Printer) {\n this.token(\"#\");\n}\n\n// discard binding\nexport function VoidPattern(this: Printer) {\n this.word(\"void\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,EAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAA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AM,IAAIC,KAAK,CACb,mDAAmD,GACjD,GAAGJ,WAAW,CAACK,IAAI,CAAC,IAAI,CAAC,KAAKR,mBAAmB,qBACrD,CAAC;EACH;AACF;AAGO,SAASS,uBAAuBA,CAErCtF,IAA+B,EAC/B;EACA,IAAI,CAACqB,KAAK,CAACrB,IAAI,CAACuF,UAAU,CAAC;AAC7B;AAEO,SAASC,oBAAoBA,CAElCxF,IAA4B,EAC5B;EACA,IAAI,CAACqB,KAAK,CAACrB,IAAI,CAACyF,MAAM,CAAC;AACzB;AAEO,SAASC,6BAA6BA,CAAA,EAAgB;EAC3D,IAAI,CAACxF,SAAK,GAAI,CAAC;AACjB;AAGO,SAASyF,WAAWA,CAAA,EAAgB;EACzC,IAAI,CAACzE,IAAI,CAAC,MAAM,CAAC;AACnB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/generator/lib/generators/typescript.js deleted file mode 100644 index ca9edb8..0000000 --- a/node_modules/@babel/generator/lib/generators/typescript.js +++ /dev/null @@ -1,726 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSAnyKeyword = TSAnyKeyword; -exports.TSArrayType = TSArrayType; -exports.TSAsExpression = TSAsExpression; -exports.TSBigIntKeyword = TSBigIntKeyword; -exports.TSBooleanKeyword = TSBooleanKeyword; -exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.TSInterfaceHeritage = exports.TSClassImplements = TSClassImplements; -exports.TSConditionalType = TSConditionalType; -exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.TSConstructorType = TSConstructorType; -exports.TSDeclareFunction = TSDeclareFunction; -exports.TSDeclareMethod = TSDeclareMethod; -exports.TSEnumBody = TSEnumBody; -exports.TSEnumDeclaration = TSEnumDeclaration; -exports.TSEnumMember = TSEnumMember; -exports.TSExportAssignment = TSExportAssignment; -exports.TSExternalModuleReference = TSExternalModuleReference; -exports.TSFunctionType = TSFunctionType; -exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.TSImportType = TSImportType; -exports.TSIndexSignature = TSIndexSignature; -exports.TSIndexedAccessType = TSIndexedAccessType; -exports.TSInferType = TSInferType; -exports.TSInstantiationExpression = TSInstantiationExpression; -exports.TSInterfaceBody = TSInterfaceBody; -exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.TSIntersectionType = TSIntersectionType; -exports.TSIntrinsicKeyword = TSIntrinsicKeyword; -exports.TSLiteralType = TSLiteralType; -exports.TSMappedType = TSMappedType; -exports.TSMethodSignature = TSMethodSignature; -exports.TSModuleBlock = TSModuleBlock; -exports.TSModuleDeclaration = TSModuleDeclaration; -exports.TSNamedTupleMember = TSNamedTupleMember; -exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.TSNeverKeyword = TSNeverKeyword; -exports.TSNonNullExpression = TSNonNullExpression; -exports.TSNullKeyword = TSNullKeyword; -exports.TSNumberKeyword = TSNumberKeyword; -exports.TSObjectKeyword = TSObjectKeyword; -exports.TSOptionalType = TSOptionalType; -exports.TSParameterProperty = TSParameterProperty; -exports.TSParenthesizedType = TSParenthesizedType; -exports.TSPropertySignature = TSPropertySignature; -exports.TSQualifiedName = TSQualifiedName; -exports.TSRestType = TSRestType; -exports.TSSatisfiesExpression = TSSatisfiesExpression; -exports.TSStringKeyword = TSStringKeyword; -exports.TSSymbolKeyword = TSSymbolKeyword; -exports.TSTemplateLiteralType = TSTemplateLiteralType; -exports.TSThisType = TSThisType; -exports.TSTupleType = TSTupleType; -exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.TSTypeAnnotation = TSTypeAnnotation; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSTypeLiteral = TSTypeLiteral; -exports.TSTypeOperator = TSTypeOperator; -exports.TSTypeParameter = TSTypeParameter; -exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.TSTypePredicate = TSTypePredicate; -exports.TSTypeQuery = TSTypeQuery; -exports.TSTypeReference = TSTypeReference; -exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.TSUnionType = TSUnionType; -exports.TSUnknownKeyword = TSUnknownKeyword; -exports.TSVoidKeyword = TSVoidKeyword; -exports._tsPrintClassMemberModifiers = _tsPrintClassMemberModifiers; -var _methods = require("./methods.js"); -var _classes = require("./classes.js"); -var _templateLiterals = require("./template-literals.js"); -function TSTypeAnnotation(node, parent) { - this.token((parent.type === "TSFunctionType" || parent.type === "TSConstructorType") && parent.typeAnnotation === node ? "=>" : ":"); - this.space(); - if (node.optional) this.tokenChar(63); - this.print(node.typeAnnotation); -} -function TSTypeParameterInstantiation(node, parent) { - this.tokenChar(60); - let printTrailingSeparator = parent.type === "ArrowFunctionExpression" && node.params.length === 1; - if (this.tokenMap && node.start != null && node.end != null) { - printTrailingSeparator && (printTrailingSeparator = !!this.tokenMap.find(node, t => this.tokenMap.matchesOriginal(t, ","))); - printTrailingSeparator || (printTrailingSeparator = this.shouldPrintTrailingComma(">")); - } - this.printList(node.params, printTrailingSeparator); - this.tokenChar(62); -} -function TSTypeParameter(node) { - if (node.const) { - this.word("const"); - this.space(); - } - if (node.in) { - this.word("in"); - this.space(); - } - if (node.out) { - this.word("out"); - this.space(); - } - this.word(node.name); - if (node.constraint) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.constraint); - } - if (node.default) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.default); - } -} -function TSParameterProperty(node) { - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - if (node.readonly) { - this.word("readonly"); - this.space(); - } - _methods._param.call(this, node.parameter); -} -function TSDeclareFunction(node, parent) { - if (node.declare) { - this.word("declare"); - this.space(); - } - _methods._functionHead.call(this, node, parent, false); - this.semicolon(); -} -function TSDeclareMethod(node) { - _classes._classMethodHead.call(this, node); - this.semicolon(); -} -function TSQualifiedName(node) { - this.print(node.left); - this.tokenChar(46); - this.print(node.right); -} -function TSCallSignatureDeclaration(node) { - tsPrintSignatureDeclarationBase.call(this, node); - maybePrintTrailingCommaOrSemicolon(this, node); -} -function maybePrintTrailingCommaOrSemicolon(printer, node) { - if (!printer.tokenMap || !node.start || !node.end) { - printer.semicolon(); - return; - } - if (printer.tokenMap.endMatches(node, ",")) { - printer.token(","); - } else if (printer.tokenMap.endMatches(node, ";")) { - printer.semicolon(); - } -} -function TSConstructSignatureDeclaration(node) { - this.word("new"); - this.space(); - tsPrintSignatureDeclarationBase.call(this, node); - maybePrintTrailingCommaOrSemicolon(this, node); -} -function TSPropertySignature(node) { - const { - readonly - } = node; - if (readonly) { - this.word("readonly"); - this.space(); - } - tsPrintPropertyOrMethodName.call(this, node); - this.print(node.typeAnnotation); - maybePrintTrailingCommaOrSemicolon(this, node); -} -function tsPrintPropertyOrMethodName(node) { - if (node.computed) { - this.tokenChar(91); - } - this.print(node.key); - if (node.computed) { - this.tokenChar(93); - } - if (node.optional) { - this.tokenChar(63); - } -} -function TSMethodSignature(node) { - const { - kind - } = node; - if (kind === "set" || kind === "get") { - this.word(kind); - this.space(); - } - tsPrintPropertyOrMethodName.call(this, node); - tsPrintSignatureDeclarationBase.call(this, node); - maybePrintTrailingCommaOrSemicolon(this, node); -} -function TSIndexSignature(node) { - const { - readonly, - static: isStatic - } = node; - if (isStatic) { - this.word("static"); - this.space(); - } - if (readonly) { - this.word("readonly"); - this.space(); - } - this.tokenChar(91); - _methods._parameters.call(this, node.parameters, 93); - this.print(node.typeAnnotation); - maybePrintTrailingCommaOrSemicolon(this, node); -} -function TSAnyKeyword() { - this.word("any"); -} -function TSBigIntKeyword() { - this.word("bigint"); -} -function TSUnknownKeyword() { - this.word("unknown"); -} -function TSNumberKeyword() { - this.word("number"); -} -function TSObjectKeyword() { - this.word("object"); -} -function TSBooleanKeyword() { - this.word("boolean"); -} -function TSStringKeyword() { - this.word("string"); -} -function TSSymbolKeyword() { - this.word("symbol"); -} -function TSVoidKeyword() { - this.word("void"); -} -function TSUndefinedKeyword() { - this.word("undefined"); -} -function TSNullKeyword() { - this.word("null"); -} -function TSNeverKeyword() { - this.word("never"); -} -function TSIntrinsicKeyword() { - this.word("intrinsic"); -} -function TSThisType() { - this.word("this"); -} -function TSFunctionType(node) { - tsPrintFunctionOrConstructorType.call(this, node); -} -function TSConstructorType(node) { - if (node.abstract) { - this.word("abstract"); - this.space(); - } - this.word("new"); - this.space(); - tsPrintFunctionOrConstructorType.call(this, node); -} -function tsPrintFunctionOrConstructorType(node) { - const { - typeParameters - } = node; - const parameters = node.parameters; - this.print(typeParameters); - this.tokenChar(40); - _methods._parameters.call(this, parameters, 41); - this.space(); - const returnType = node.typeAnnotation; - this.print(returnType); -} -function TSTypeReference(node) { - const typeArguments = node.typeParameters; - this.print(node.typeName, !!typeArguments); - this.print(typeArguments); -} -function TSTypePredicate(node) { - if (node.asserts) { - this.word("asserts"); - this.space(); - } - this.print(node.parameterName); - if (node.typeAnnotation) { - this.space(); - this.word("is"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation); - } -} -function TSTypeQuery(node) { - this.word("typeof"); - this.space(); - this.print(node.exprName); - const typeArguments = node.typeParameters; - if (typeArguments) { - this.print(typeArguments); - } -} -function TSTypeLiteral(node) { - printBraced(this, node, () => this.printJoin(node.members, true, true, undefined, undefined, true)); -} -function TSArrayType(node) { - this.print(node.elementType, true); - this.tokenChar(91); - this.tokenChar(93); -} -function TSTupleType(node) { - this.tokenChar(91); - this.printList(node.elementTypes, this.shouldPrintTrailingComma("]")); - this.tokenChar(93); -} -function TSOptionalType(node) { - this.print(node.typeAnnotation); - this.tokenChar(63); -} -function TSRestType(node) { - this.token("..."); - this.print(node.typeAnnotation); -} -function TSNamedTupleMember(node) { - this.print(node.label); - if (node.optional) this.tokenChar(63); - this.tokenChar(58); - this.space(); - this.print(node.elementType); -} -function TSUnionType(node) { - tsPrintUnionOrIntersectionType(this, node, "|"); -} -function TSIntersectionType(node) { - tsPrintUnionOrIntersectionType(this, node, "&"); -} -function tsPrintUnionOrIntersectionType(printer, node, sep) { - var _printer$tokenMap; - let hasLeadingToken = 0; - if ((_printer$tokenMap = printer.tokenMap) != null && _printer$tokenMap.startMatches(node, sep)) { - hasLeadingToken = 1; - printer.token(sep); - } - printer.printJoin(node.types, undefined, undefined, function (i) { - this.space(); - this.token(sep, undefined, i + hasLeadingToken); - this.space(); - }); -} -function TSConditionalType(node) { - this.print(node.checkType); - this.space(); - this.word("extends"); - this.space(); - this.print(node.extendsType); - this.space(); - this.tokenChar(63); - this.space(); - this.print(node.trueType); - this.space(); - this.tokenChar(58); - this.space(); - this.print(node.falseType); -} -function TSInferType(node) { - this.word("infer"); - this.print(node.typeParameter); -} -function TSParenthesizedType(node) { - this.tokenChar(40); - this.print(node.typeAnnotation); - this.tokenChar(41); -} -function TSTypeOperator(node) { - this.word(node.operator); - this.space(); - this.print(node.typeAnnotation); -} -function TSIndexedAccessType(node) { - this.print(node.objectType, true); - this.tokenChar(91); - this.print(node.indexType); - this.tokenChar(93); -} -function TSMappedType(node) { - const { - nameType, - optional, - readonly, - typeAnnotation - } = node; - this.tokenChar(123); - const oldNoLineTerminatorAfterNode = this.enterDelimited(); - this.space(); - if (readonly) { - tokenIfPlusMinus(this, readonly); - this.word("readonly"); - this.space(); - } - this.tokenChar(91); - this.word(node.typeParameter.name); - this.space(); - this.word("in"); - this.space(); - this.print(node.typeParameter.constraint, undefined, true); - if (nameType) { - this.space(); - this.word("as"); - this.space(); - this.print(nameType, undefined, true); - } - this.tokenChar(93); - if (optional) { - tokenIfPlusMinus(this, optional); - this.tokenChar(63); - } - if (typeAnnotation) { - this.tokenChar(58); - this.space(); - this.print(typeAnnotation, undefined, true); - } - this.space(); - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - this.tokenChar(125); -} -function tokenIfPlusMinus(self, tok) { - if (tok !== true) { - self.token(tok); - } -} -function TSTemplateLiteralType(node) { - _templateLiterals._printTemplate.call(this, node, node.types); -} -function TSLiteralType(node) { - this.print(node.literal); -} -function TSClassImplements(node) { - this.print(node.expression); - this.print(node.typeArguments); -} -function TSInterfaceDeclaration(node) { - const { - declare, - id, - typeParameters, - extends: extendz, - body - } = node; - if (declare) { - this.word("declare"); - this.space(); - } - this.word("interface"); - this.space(); - this.print(id); - this.print(typeParameters); - if (extendz != null && extendz.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(extendz); - } - this.space(); - this.print(body); -} -function TSInterfaceBody(node) { - printBraced(this, node, () => this.printJoin(node.body, true, true, undefined, undefined, true)); -} -function TSTypeAliasDeclaration(node) { - const { - declare, - id, - typeParameters, - typeAnnotation - } = node; - if (declare) { - this.word("declare"); - this.space(); - } - this.word("type"); - this.space(); - this.print(id); - this.print(typeParameters); - this.space(); - this.tokenChar(61); - this.space(); - this.print(typeAnnotation); - this.semicolon(); -} -function TSAsExpression(node) { - const { - expression, - typeAnnotation - } = node; - this.print(expression, true); - this.space(); - this.word("as"); - this.space(); - this.print(typeAnnotation); -} -function TSSatisfiesExpression(node) { - const { - expression, - typeAnnotation - } = node; - this.print(expression, true); - this.space(); - this.word("satisfies"); - this.space(); - this.print(typeAnnotation); -} -function TSTypeAssertion(node) { - const { - typeAnnotation, - expression - } = node; - this.tokenChar(60); - this.print(typeAnnotation); - this.tokenChar(62); - this.space(); - this.print(expression); -} -function TSInstantiationExpression(node) { - this.print(node.expression); - this.print(node.typeParameters); -} -function TSEnumDeclaration(node) { - const { - declare, - const: isConst, - id - } = node; - if (declare) { - this.word("declare"); - this.space(); - } - if (isConst) { - this.word("const"); - this.space(); - } - this.word("enum"); - this.space(); - this.print(id); - this.space(); - TSEnumBody.call(this, node); -} -function TSEnumBody(node) { - printBraced(this, node, () => { - var _this$shouldPrintTrai; - return this.printList(node.members, (_this$shouldPrintTrai = this.shouldPrintTrailingComma("}")) != null ? _this$shouldPrintTrai : true, true, true, undefined, true); - }); -} -function TSEnumMember(node) { - const { - id, - initializer - } = node; - this.print(id); - if (initializer) { - this.space(); - this.tokenChar(61); - this.space(); - this.print(initializer); - } -} -function TSModuleDeclaration(node) { - const { - declare, - id, - kind - } = node; - if (declare) { - this.word("declare"); - this.space(); - } - if (!node.global) { - this.word(kind != null ? kind : id.type === "Identifier" ? "namespace" : "module"); - this.space(); - } - this.print(id); - if (!node.body) { - this.semicolon(); - return; - } - let body = node.body; - while (body.type === "TSModuleDeclaration") { - this.tokenChar(46); - this.print(body.id); - body = body.body; - } - this.space(); - this.print(body); -} -function TSModuleBlock(node) { - printBraced(this, node, () => this.printSequence(node.body, true, true)); -} -function TSImportType(node) { - const { - qualifier, - options - } = node; - this.word("import"); - this.tokenChar(40); - this.print(node.argument); - if (options) { - this.tokenChar(44); - this.print(options); - } - this.tokenChar(41); - if (qualifier) { - this.tokenChar(46); - this.print(qualifier); - } - const typeArguments = node.typeParameters; - if (typeArguments) { - this.print(typeArguments); - } -} -function TSImportEqualsDeclaration(node) { - const { - id, - moduleReference - } = node; - if (node.isExport) { - this.word("export"); - this.space(); - } - this.word("import"); - this.space(); - this.print(id); - this.space(); - this.tokenChar(61); - this.space(); - this.print(moduleReference); - this.semicolon(); -} -function TSExternalModuleReference(node) { - this.token("require("); - this.print(node.expression); - this.tokenChar(41); -} -function TSNonNullExpression(node) { - this.print(node.expression); - this.tokenChar(33); - this.setLastChar(33); -} -function TSExportAssignment(node) { - this.word("export"); - this.space(); - this.tokenChar(61); - this.space(); - this.print(node.expression); - this.semicolon(); -} -function TSNamespaceExportDeclaration(node) { - this.word("export"); - this.space(); - this.word("as"); - this.space(); - this.word("namespace"); - this.space(); - this.print(node.id); - this.semicolon(); -} -function tsPrintSignatureDeclarationBase(node) { - const { - typeParameters - } = node; - const parameters = node.parameters; - this.print(typeParameters); - this.tokenChar(40); - _methods._parameters.call(this, parameters, 41); - const returnType = node.typeAnnotation; - this.print(returnType); -} -function _tsPrintClassMemberModifiers(node) { - const isPrivateField = node.type === "ClassPrivateProperty"; - const isPublicField = node.type === "ClassAccessorProperty" || node.type === "ClassProperty"; - printModifiersList(this, node, [isPublicField && node.declare && "declare", !isPrivateField && node.accessibility]); - if (node.static) { - this.word("static"); - this.space(); - } - printModifiersList(this, node, [!isPrivateField && node.abstract && "abstract", !isPrivateField && node.override && "override", (isPublicField || isPrivateField) && node.readonly && "readonly"]); -} -function printBraced(printer, node, cb) { - printer.token("{"); - const oldNoLineTerminatorAfterNode = printer.enterDelimited(); - cb(); - printer._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - printer.rightBrace(node); -} -function printModifiersList(printer, node, modifiers) { - var _printer$tokenMap2; - const modifiersSet = new Set(); - for (const modifier of modifiers) { - if (modifier) modifiersSet.add(modifier); - } - (_printer$tokenMap2 = printer.tokenMap) == null || _printer$tokenMap2.find(node, tok => { - if (modifiersSet.has(tok.value)) { - printer.token(tok.value); - printer.space(); - modifiersSet.delete(tok.value); - return modifiersSet.size === 0; - } - return false; - }); - for (const modifier of modifiersSet) { - printer.word(modifier); - printer.space(); - } -} - -//# sourceMappingURL=typescript.js.map diff --git a/node_modules/@babel/generator/lib/generators/typescript.js.map b/node_modules/@babel/generator/lib/generators/typescript.js.map deleted file mode 100644 index 5e9bd15..0000000 --- a/node_modules/@babel/generator/lib/generators/typescript.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_methods","require","_classes","_templateLiterals","TSTypeAnnotation","node","parent","token","type","typeAnnotation","space","optional","print","TSTypeParameterInstantiation","printTrailingSeparator","params","length","tokenMap","start","end","find","t","matchesOriginal","shouldPrintTrailingComma","printList","TSTypeParameter","const","word","in","out","name","constraint","default","TSParameterProperty","accessibility","readonly","_param","call","parameter","TSDeclareFunction","declare","_functionHead","semicolon","TSDeclareMethod","_classMethodHead","TSQualifiedName","left","right","TSCallSignatureDeclaration","tsPrintSignatureDeclarationBase","maybePrintTrailingCommaOrSemicolon","printer","endMatches","TSConstructSignatureDeclaration","TSPropertySignature","tsPrintPropertyOrMethodName","computed","key","TSMethodSignature","kind","TSIndexSignature","static","isStatic","_parameters","parameters","TSAnyKeyword","TSBigIntKeyword","TSUnknownKeyword","TSNumberKeyword","TSObjectKeyword","TSBooleanKeyword","TSStringKeyword","TSSymbolKeyword","TSVoidKeyword","TSUndefinedKeyword","TSNullKeyword","TSNeverKeyword","TSIntrinsicKeyword","TSThisType","TSFunctionType","tsPrintFunctionOrConstructorType","TSConstructorType","abstract","typeParameters","returnType","TSTypeReference","typeArguments","typeName","TSTypePredicate","asserts","parameterName","TSTypeQuery","exprName","TSTypeLiteral","printBraced","printJoin","members","undefined","TSArrayType","elementType","TSTupleType","elementTypes","TSOptionalType","TSRestType","TSNamedTupleMember","label","TSUnionType","tsPrintUnionOrIntersectionType","TSIntersectionType","sep","_printer$tokenMap","hasLeadingToken","startMatches","types","i","TSConditionalType","checkType","extendsType","trueType","falseType","TSInferType","typeParameter","TSParenthesizedType","TSTypeOperator","operator","TSIndexedAccessType","objectType","indexType","TSMappedType","nameType","oldNoLineTerminatorAfterNode","enterDelimited","tokenIfPlusMinus","_noLineTerminatorAfterNode","self","tok","TSTemplateLiteralType","_printTemplate","TSLiteralType","literal","TSClassImplements","expression","TSInterfaceDeclaration","id","extends","extendz","body","TSInterfaceBody","TSTypeAliasDeclaration","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSInstantiationExpression","TSEnumDeclaration","isConst","TSEnumBody","_this$shouldPrintTrai","TSEnumMember","initializer","TSModuleDeclaration","global","TSModuleBlock","printSequence","TSImportType","qualifier","options","argument","TSImportEqualsDeclaration","moduleReference","isExport","TSExternalModuleReference","TSNonNullExpression","setLastChar","TSExportAssignment","TSNamespaceExportDeclaration","_tsPrintClassMemberModifiers","isPrivateField","isPublicField","printModifiersList","override","cb","rightBrace","modifiers","_printer$tokenMap2","modifiersSet","Set","modifier","add","has","value","delete","size"],"sources":["../../src/generators/typescript.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\nimport { _functionHead, _param, _parameters } from \"./methods.ts\";\nimport { _classMethodHead } from \"./classes.ts\";\nimport { _printTemplate } from \"./template-literals.ts\";\n\nexport function TSTypeAnnotation(\n this: Printer,\n node: t.TSTypeAnnotation,\n parent: t.Node,\n) {\n // TODO(@nicolo-ribaudo): investigate not including => in the range\n // of the return type of an arrow function type\n this.token(\n (parent.type === \"TSFunctionType\" || parent.type === \"TSConstructorType\") &&\n (process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n parent.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n parent.typeAnnotation) === node\n ? \"=>\"\n : \":\",\n );\n this.space();\n // @ts-expect-error todo(flow->ts) can this be removed? `.optional` looks to be not existing property\n if (node.optional) this.token(\"?\");\n this.print(node.typeAnnotation);\n}\n\nexport function TSTypeParameterInstantiation(\n this: Printer,\n node: t.TSTypeParameterInstantiation,\n parent: t.Node,\n): void {\n this.token(\"<\");\n\n let printTrailingSeparator: boolean | null =\n parent.type === \"ArrowFunctionExpression\" && node.params.length === 1;\n if (this.tokenMap && node.start != null && node.end != null) {\n // Only force the trailing comma for pre-existing nodes if they\n // already had a comma (either because they were multi-param, or\n // because they had a trailing comma)\n printTrailingSeparator &&= !!this.tokenMap.find(node, t =>\n this.tokenMap!.matchesOriginal(t, \",\"),\n );\n // Preserve the trailing comma if it was there before\n printTrailingSeparator ||= this.shouldPrintTrailingComma(\">\");\n }\n\n this.printList(node.params, printTrailingSeparator);\n this.token(\">\");\n}\n\nexport { TSTypeParameterInstantiation as TSTypeParameterDeclaration };\n\nexport function TSTypeParameter(this: Printer, node: t.TSTypeParameter) {\n if (node.const) {\n this.word(\"const\");\n this.space();\n }\n\n if (node.in) {\n this.word(\"in\");\n this.space();\n }\n\n if (node.out) {\n this.word(\"out\");\n this.space();\n }\n\n this.word(\n !process.env.BABEL_8_BREAKING\n ? (node.name as unknown as string)\n : (node.name as unknown as t.Identifier).name,\n );\n\n if (node.constraint) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.constraint);\n }\n\n if (node.default) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.default);\n }\n}\n\nexport function TSParameterProperty(\n this: Printer,\n node: t.TSParameterProperty,\n) {\n if (node.accessibility) {\n this.word(node.accessibility);\n this.space();\n }\n\n if (node.readonly) {\n this.word(\"readonly\");\n this.space();\n }\n\n _param.call(this, node.parameter);\n}\n\nexport function TSDeclareFunction(\n this: Printer,\n node: t.TSDeclareFunction,\n parent: t.ParentMaps[\"TSDeclareFunction\"],\n) {\n if (node.declare) {\n this.word(\"declare\");\n this.space();\n }\n _functionHead.call(this, node, parent, false);\n this.semicolon();\n}\n\nexport function TSDeclareMethod(this: Printer, node: t.TSDeclareMethod) {\n _classMethodHead.call(this, node);\n this.semicolon();\n}\n\nexport function TSQualifiedName(this: Printer, node: t.TSQualifiedName) {\n this.print(node.left);\n this.token(\".\");\n this.print(node.right);\n}\n\nexport function TSCallSignatureDeclaration(\n this: Printer,\n node: t.TSCallSignatureDeclaration,\n) {\n tsPrintSignatureDeclarationBase.call(this, node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nfunction maybePrintTrailingCommaOrSemicolon(printer: Printer, node: t.Node) {\n if (!printer.tokenMap || !node.start || !node.end) {\n printer.semicolon();\n return;\n }\n\n if (printer.tokenMap.endMatches(node, \",\")) {\n printer.token(\",\");\n } else if (printer.tokenMap.endMatches(node, \";\")) {\n printer.semicolon();\n }\n}\n\nexport function TSConstructSignatureDeclaration(\n this: Printer,\n node: t.TSConstructSignatureDeclaration,\n) {\n this.word(\"new\");\n this.space();\n tsPrintSignatureDeclarationBase.call(this, node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSPropertySignature(\n this: Printer,\n node: t.TSPropertySignature,\n) {\n const { readonly } = node;\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n tsPrintPropertyOrMethodName.call(this, node);\n this.print(node.typeAnnotation);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nfunction tsPrintPropertyOrMethodName(\n this: Printer,\n node: t.TSPropertySignature | t.TSMethodSignature,\n) {\n if (node.computed) {\n this.token(\"[\");\n }\n this.print(node.key);\n if (node.computed) {\n this.token(\"]\");\n }\n if (node.optional) {\n this.token(\"?\");\n }\n}\n\nexport function TSMethodSignature(this: Printer, node: t.TSMethodSignature) {\n const { kind } = node;\n if (kind === \"set\" || kind === \"get\") {\n this.word(kind);\n this.space();\n }\n tsPrintPropertyOrMethodName.call(this, node);\n tsPrintSignatureDeclarationBase.call(this, node);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSIndexSignature(this: Printer, node: t.TSIndexSignature) {\n const { readonly, static: isStatic } = node;\n if (isStatic) {\n this.word(\"static\");\n this.space();\n }\n if (readonly) {\n this.word(\"readonly\");\n this.space();\n }\n this.token(\"[\");\n _parameters.call(this, node.parameters, charCodes.rightSquareBracket);\n this.print(node.typeAnnotation);\n maybePrintTrailingCommaOrSemicolon(this, node);\n}\n\nexport function TSAnyKeyword(this: Printer) {\n this.word(\"any\");\n}\nexport function TSBigIntKeyword(this: Printer) {\n this.word(\"bigint\");\n}\nexport function TSUnknownKeyword(this: Printer) {\n this.word(\"unknown\");\n}\nexport function TSNumberKeyword(this: Printer) {\n this.word(\"number\");\n}\nexport function TSObjectKeyword(this: Printer) {\n this.word(\"object\");\n}\nexport function TSBooleanKeyword(this: Printer) {\n this.word(\"boolean\");\n}\nexport function TSStringKeyword(this: Printer) {\n this.word(\"string\");\n}\nexport function TSSymbolKeyword(this: Printer) {\n this.word(\"symbol\");\n}\nexport function TSVoidKeyword(this: Printer) {\n this.word(\"void\");\n}\nexport function TSUndefinedKeyword(this: Printer) {\n this.word(\"undefined\");\n}\nexport function TSNullKeyword(this: Printer) {\n this.word(\"null\");\n}\nexport function TSNeverKeyword(this: Printer) {\n this.word(\"never\");\n}\nexport function TSIntrinsicKeyword(this: Printer) {\n this.word(\"intrinsic\");\n}\n\nexport function TSThisType(this: Printer) {\n this.word(\"this\");\n}\n\nexport function TSFunctionType(this: Printer, node: t.TSFunctionType) {\n tsPrintFunctionOrConstructorType.call(this, node);\n}\n\nexport function TSConstructorType(this: Printer, node: t.TSConstructorType) {\n if (node.abstract) {\n this.word(\"abstract\");\n this.space();\n }\n this.word(\"new\");\n this.space();\n tsPrintFunctionOrConstructorType.call(this, node);\n}\n\nfunction tsPrintFunctionOrConstructorType(\n this: Printer,\n node: t.TSFunctionType | t.TSConstructorType,\n) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.params\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.parameters;\n this.print(typeParameters);\n this.token(\"(\");\n _parameters.call(this, parameters, charCodes.rightParenthesis);\n this.space();\n const returnType = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.returnType\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeAnnotation;\n this.print(returnType);\n}\n\nexport function TSTypeReference(this: Printer, node: t.TSTypeReference) {\n const typeArguments = process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n node.typeArguments\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n node.typeParameters;\n this.print(node.typeName, !!typeArguments);\n this.print(typeArguments);\n}\n\nexport function TSTypePredicate(this: Printer, node: t.TSTypePredicate) {\n if (node.asserts) {\n this.word(\"asserts\");\n this.space();\n }\n this.print(node.parameterName);\n if (node.typeAnnotation) {\n this.space();\n this.word(\"is\");\n this.space();\n this.print(node.typeAnnotation.typeAnnotation);\n }\n}\n\nexport function TSTypeQuery(this: Printer, node: t.TSTypeQuery) {\n this.word(\"typeof\");\n this.space();\n this.print(node.exprName);\n\n const typeArguments = process.env.BABEL_8_BREAKING\n ? //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n node.typeArguments\n : //@ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.typeParameters;\n if (typeArguments) {\n this.print(typeArguments);\n }\n}\n\nexport function TSTypeLiteral(this: Printer, node: t.TSTypeLiteral) {\n printBraced(this, node, () =>\n this.printJoin(node.members, true, true, undefined, undefined, true),\n );\n}\n\nexport function TSArrayType(this: Printer, node: t.TSArrayType) {\n this.print(node.elementType, true);\n\n this.token(\"[\");\n this.token(\"]\");\n}\n\nexport function TSTupleType(this: Printer, node: t.TSTupleType) {\n this.token(\"[\");\n this.printList(node.elementTypes, this.shouldPrintTrailingComma(\"]\"));\n this.token(\"]\");\n}\n\nexport function TSOptionalType(this: Printer, node: t.TSOptionalType) {\n this.print(node.typeAnnotation);\n this.token(\"?\");\n}\n\nexport function TSRestType(this: Printer, node: t.TSRestType) {\n this.token(\"...\");\n this.print(node.typeAnnotation);\n}\n\nexport function TSNamedTupleMember(this: Printer, node: t.TSNamedTupleMember) {\n this.print(node.label);\n if (node.optional) this.token(\"?\");\n this.token(\":\");\n this.space();\n this.print(node.elementType);\n}\n\nexport function TSUnionType(this: Printer, node: t.TSUnionType) {\n tsPrintUnionOrIntersectionType(this, node, \"|\");\n}\n\nexport function TSIntersectionType(this: Printer, node: t.TSIntersectionType) {\n tsPrintUnionOrIntersectionType(this, node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(\n printer: Printer,\n node: t.TSUnionType | t.TSIntersectionType,\n sep: \"|\" | \"&\",\n) {\n let hasLeadingToken = 0;\n if (printer.tokenMap?.startMatches(node, sep)) {\n hasLeadingToken = 1;\n printer.token(sep);\n }\n\n printer.printJoin(node.types, undefined, undefined, function (i) {\n this.space();\n this.token(sep, undefined, i + hasLeadingToken);\n this.space();\n });\n}\n\nexport function TSConditionalType(this: Printer, node: t.TSConditionalType) {\n this.print(node.checkType);\n this.space();\n this.word(\"extends\");\n this.space();\n this.print(node.extendsType);\n this.space();\n this.token(\"?\");\n this.space();\n this.print(node.trueType);\n this.space();\n this.token(\":\");\n this.space();\n this.print(node.falseType);\n}\n\nexport function TSInferType(this: Printer, node: t.TSInferType) {\n this.word(\"infer\");\n this.print(node.typeParameter);\n}\n\nexport function TSParenthesizedType(\n this: Printer,\n node: t.TSParenthesizedType,\n) {\n this.token(\"(\");\n this.print(node.typeAnnotation);\n this.token(\")\");\n}\n\nexport function TSTypeOperator(this: Printer, node: t.TSTypeOperator) {\n this.word(node.operator);\n this.space();\n this.print(node.typeAnnotation);\n}\n\nexport function TSIndexedAccessType(\n this: Printer,\n node: t.TSIndexedAccessType,\n) {\n this.print(node.objectType, true);\n this.token(\"[\");\n this.print(node.indexType);\n this.token(\"]\");\n}\n\nexport function TSMappedType(this: Printer, node: t.TSMappedType) {\n const { nameType, optional, readonly, typeAnnotation } = node;\n this.token(\"{\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n this.space();\n if (readonly) {\n tokenIfPlusMinus(this, readonly);\n this.word(\"readonly\");\n this.space();\n }\n\n this.token(\"[\");\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n this.word(node.key.name);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.word(node.typeParameter.name);\n }\n\n this.space();\n this.word(\"in\");\n this.space();\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST shape\n this.print(node.constraint, undefined, true);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.print(node.typeParameter.constraint, undefined, true);\n }\n\n if (nameType) {\n this.space();\n this.word(\"as\");\n this.space();\n this.print(nameType, undefined, true);\n }\n\n this.token(\"]\");\n\n if (optional) {\n tokenIfPlusMinus(this, optional);\n this.token(\"?\");\n }\n\n if (typeAnnotation) {\n this.token(\":\");\n this.space();\n this.print(typeAnnotation, undefined, true);\n }\n this.space();\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self: Printer, tok: true | \"+\" | \"-\") {\n if (tok !== true) {\n self.token(tok);\n }\n}\n\nexport function TSTemplateLiteralType(\n this: Printer,\n node: t.TSTemplateLiteralType,\n) {\n _printTemplate.call(this, node, node.types);\n}\n\nexport function TSLiteralType(this: Printer, node: t.TSLiteralType) {\n this.print(node.literal);\n}\n\nexport function TSClassImplements(\n this: Printer,\n // TODO(Babel 8): Just use t.TSClassImplements\n node: t.Node & {\n expression: t.TSEntityName;\n typeArguments?: t.TSTypeParameterInstantiation;\n },\n) {\n this.print(node.expression);\n this.print(node.typeArguments);\n}\n\nexport { TSClassImplements as TSInterfaceHeritage };\n\nexport function TSInterfaceDeclaration(\n this: Printer,\n node: t.TSInterfaceDeclaration,\n) {\n const { declare, id, typeParameters, extends: extendz, body } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"interface\");\n this.space();\n this.print(id);\n this.print(typeParameters);\n if (extendz?.length) {\n this.space();\n this.word(\"extends\");\n this.space();\n this.printList(extendz);\n }\n this.space();\n this.print(body);\n}\n\nexport function TSInterfaceBody(this: Printer, node: t.TSInterfaceBody) {\n printBraced(this, node, () =>\n this.printJoin(node.body, true, true, undefined, undefined, true),\n );\n}\n\nexport function TSTypeAliasDeclaration(\n this: Printer,\n node: t.TSTypeAliasDeclaration,\n) {\n const { declare, id, typeParameters, typeAnnotation } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n this.word(\"type\");\n this.space();\n this.print(id);\n this.print(typeParameters);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(typeAnnotation);\n this.semicolon();\n}\n\nexport function TSAsExpression(this: Printer, node: t.TSAsExpression) {\n const { expression, typeAnnotation } = node;\n this.print(expression, true);\n this.space();\n this.word(\"as\");\n this.space();\n this.print(typeAnnotation);\n}\n\nexport function TSSatisfiesExpression(\n this: Printer,\n node: t.TSSatisfiesExpression,\n) {\n const { expression, typeAnnotation } = node;\n this.print(expression, true);\n this.space();\n this.word(\"satisfies\");\n this.space();\n this.print(typeAnnotation);\n}\n\nexport function TSTypeAssertion(this: Printer, node: t.TSTypeAssertion) {\n const { typeAnnotation, expression } = node;\n this.token(\"<\");\n this.print(typeAnnotation);\n this.token(\">\");\n this.space();\n this.print(expression);\n}\n\nexport function TSInstantiationExpression(\n this: Printer,\n node: t.TSInstantiationExpression,\n) {\n this.print(node.expression);\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.typeArguments);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n this.print(node.typeParameters);\n }\n}\n\nexport function TSEnumDeclaration(this: Printer, node: t.TSEnumDeclaration) {\n const { declare, const: isConst, id } = node;\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n if (isConst) {\n this.word(\"const\");\n this.space();\n }\n this.word(\"enum\");\n this.space();\n this.print(id);\n this.space();\n\n if (process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n this.print(node.body);\n } else {\n // cast to TSEnumBody for Babel 7 AST\n TSEnumBody.call(this, node as unknown as t.TSEnumBody);\n }\n}\n\nexport function TSEnumBody(this: Printer, node: t.TSEnumBody) {\n printBraced(this, node, () =>\n this.printList(\n node.members,\n this.shouldPrintTrailingComma(\"}\") ??\n (process.env.BABEL_8_BREAKING ? false : true),\n true,\n true,\n undefined,\n true,\n ),\n );\n}\n\nexport function TSEnumMember(this: Printer, node: t.TSEnumMember) {\n const { id, initializer } = node;\n this.print(id);\n if (initializer) {\n this.space();\n this.token(\"=\");\n this.space();\n this.print(initializer);\n }\n}\n\nexport function TSModuleDeclaration(\n this: Printer,\n node: t.TSModuleDeclaration,\n) {\n const { declare, id, kind } = node;\n\n if (declare) {\n this.word(\"declare\");\n this.space();\n }\n\n if (process.env.BABEL_8_BREAKING) {\n if (kind !== \"global\") {\n this.word(kind);\n this.space();\n }\n\n this.print(node.id);\n if (!node.body) {\n this.semicolon();\n return;\n }\n this.space();\n this.print(node.body);\n } else {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n if (!node.global) {\n this.word(kind ?? (id.type === \"Identifier\" ? \"namespace\" : \"module\"));\n this.space();\n }\n\n this.print(id);\n\n if (!node.body) {\n this.semicolon();\n return;\n }\n\n let body = node.body;\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n while (body.type === \"TSModuleDeclaration\") {\n this.token(\".\");\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n this.print(body.id);\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST shape\n body = body.body;\n }\n\n this.space();\n this.print(body);\n }\n}\n\nexport function TSModuleBlock(this: Printer, node: t.TSModuleBlock) {\n printBraced(this, node, () => this.printSequence(node.body, true, true));\n}\n\nexport function TSImportType(this: Printer, node: t.TSImportType) {\n const { qualifier, options } = node;\n this.word(\"import\");\n this.token(\"(\");\n this.print(\n //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n process.env.BABEL_8_BREAKING ? node.source : node.argument,\n );\n if (options) {\n this.token(\",\");\n this.print(options);\n }\n this.token(\")\");\n if (qualifier) {\n this.token(\".\");\n this.print(qualifier);\n }\n const typeArguments = process.env.BABEL_8_BREAKING\n ? //@ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n node.typeArguments\n : //@ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.typeParameters;\n if (typeArguments) {\n this.print(typeArguments);\n }\n}\n\nexport function TSImportEqualsDeclaration(\n this: Printer,\n node: t.TSImportEqualsDeclaration,\n) {\n const { id, moduleReference } = node;\n if (\n !process.env.BABEL_8_BREAKING &&\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n node.isExport\n ) {\n this.word(\"export\");\n this.space();\n }\n this.word(\"import\");\n this.space();\n this.print(id);\n this.space();\n this.token(\"=\");\n this.space();\n this.print(moduleReference);\n this.semicolon();\n}\n\nexport function TSExternalModuleReference(\n this: Printer,\n node: t.TSExternalModuleReference,\n) {\n this.token(\"require(\");\n this.print(node.expression);\n this.token(\")\");\n}\n\nexport function TSNonNullExpression(\n this: Printer,\n node: t.TSNonNullExpression,\n) {\n this.print(node.expression);\n this.token(\"!\");\n this.setLastChar(charCodes.exclamationMark);\n}\n\nexport function TSExportAssignment(this: Printer, node: t.TSExportAssignment) {\n this.word(\"export\");\n this.space();\n this.token(\"=\");\n this.space();\n this.print(node.expression);\n this.semicolon();\n}\n\nexport function TSNamespaceExportDeclaration(\n this: Printer,\n node: t.TSNamespaceExportDeclaration,\n) {\n this.word(\"export\");\n this.space();\n this.word(\"as\");\n this.space();\n this.word(\"namespace\");\n this.space();\n this.print(node.id);\n this.semicolon();\n}\n\nfunction tsPrintSignatureDeclarationBase(this: Printer, node: any) {\n const { typeParameters } = node;\n const parameters = process.env.BABEL_8_BREAKING\n ? node.params\n : node.parameters;\n this.print(typeParameters);\n this.token(\"(\");\n _parameters.call(this, parameters, charCodes.rightParenthesis);\n const returnType = process.env.BABEL_8_BREAKING\n ? node.returnType\n : node.typeAnnotation;\n this.print(returnType);\n}\n\nexport function _tsPrintClassMemberModifiers(\n this: Printer,\n node:\n | t.ClassProperty\n | t.ClassAccessorProperty\n | t.ClassPrivateProperty\n | t.ClassMethod\n | t.ClassPrivateMethod\n | t.TSDeclareMethod,\n) {\n const isPrivateField = node.type === \"ClassPrivateProperty\";\n const isPublicField =\n node.type === \"ClassAccessorProperty\" || node.type === \"ClassProperty\";\n printModifiersList(this, node, [\n isPublicField && node.declare && \"declare\",\n !isPrivateField && node.accessibility,\n ]);\n if (node.static) {\n this.word(\"static\");\n this.space();\n }\n printModifiersList(this, node, [\n !isPrivateField && node.abstract && \"abstract\",\n !isPrivateField && node.override && \"override\",\n (isPublicField || isPrivateField) && node.readonly && \"readonly\",\n ]);\n}\n\nfunction printBraced(printer: Printer, node: t.Node, cb: () => void) {\n printer.token(\"{\");\n const oldNoLineTerminatorAfterNode = printer.enterDelimited();\n cb();\n printer._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n printer.rightBrace(node);\n}\n\nfunction printModifiersList(\n printer: Printer,\n node: t.Node,\n modifiers: (string | false | null | undefined)[],\n) {\n const modifiersSet = new Set();\n for (const modifier of modifiers) {\n if (modifier) modifiersSet.add(modifier);\n }\n\n printer.tokenMap?.find(node, tok => {\n if (modifiersSet.has(tok.value)) {\n printer.token(tok.value);\n printer.space();\n modifiersSet.delete(tok.value);\n return modifiersSet.size === 0;\n }\n return false;\n });\n\n for (const modifier of modifiersSet) {\n printer.word(modifier);\n printer.space();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAEO,SAASG,gBAAgBA,CAE9BC,IAAwB,EACxBC,MAAc,EACd;EAGA,IAAI,CAACC,KAAK,CACR,CAACD,MAAM,CAACE,IAAI,KAAK,gBAAgB,IAAIF,MAAM,CAACE,IAAI,KAAK,mBAAmB,KAKlEF,MAAM,CAACG,cAAc,KAAMJ,IAAI,GACjC,IAAI,GACJ,GACN,CAAC;EACD,IAAI,CAACK,KAAK,CAAC,CAAC;EAEZ,IAAIL,IAAI,CAACM,QAAQ,EAAE,IAAI,CAACJ,SAAK,GAAI,CAAC;EAClC,IAAI,CAACK,KAAK,CAACP,IAAI,CAACI,cAAc,CAAC;AACjC;AAEO,SAASI,4BAA4BA,CAE1CR,IAAoC,EACpCC,MAAc,EACR;EACN,IAAI,CAACC,SAAK,GAAI,CAAC;EAEf,IAAIO,sBAAsC,GACxCR,MAAM,CAACE,IAAI,KAAK,yBAAyB,IAAIH,IAAI,CAACU,MAAM,CAACC,MAAM,KAAK,CAAC;EACvE,IAAI,IAAI,CAACC,QAAQ,IAAIZ,IAAI,CAACa,KAAK,IA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,cAAc,CAAC,CAAC;EAC7DiD,EAAE,CAAC,CAAC;EACJjI,OAAO,CAACkF,0BAA0B,GAAGH,4BAA4B;EACjE/E,OAAO,CAACkI,UAAU,CAAChL,IAAI,CAAC;AAC1B;AAEA,SAAS6K,kBAAkBA,CACzB/H,OAAgB,EAChB9C,IAAY,EACZiL,SAAgD,EAChD;EAAA,IAAAC,kBAAA;EACA,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAS,CAAC;EACtC,KAAK,MAAMC,QAAQ,IAAIJ,SAAS,EAAE;IAChC,IAAII,QAAQ,EAAEF,YAAY,CAACG,GAAG,CAACD,QAAQ,CAAC;EAC1C;EAEA,CAAAH,kBAAA,GAAApI,OAAO,CAAClC,QAAQ,aAAhBsK,kBAAA,CAAkBnK,IAAI,CAACf,IAAI,EAAEkI,GAAG,IAAI;IAClC,IAAIiD,YAAY,CAACI,GAAG,CAACrD,GAAG,CAACsD,KAAK,CAAC,EAAE;MAC/B1I,OAAO,CAAC5C,KAAK,CAACgI,GAAG,CAACsD,KAAK,CAAC;MACxB1I,OAAO,CAACzC,KAAK,CAAC,CAAC;MACf8K,YAAY,CAACM,MAAM,CAACvD,GAAG,CAACsD,KAAK,CAAC;MAC9B,OAAOL,YAAY,CAACO,IAAI,KAAK,CAAC;IAChC;IACA,OAAO,KAAK;EACd,CAAC,CAAC;EAEF,KAAK,MAAML,QAAQ,IAAIF,YAAY,EAAE;IACnCrI,OAAO,CAACxB,IAAI,CAAC+J,QAAQ,CAAC;IACtBvI,OAAO,CAACzC,KAAK,CAAC,CAAC;EACjB;AACF","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js deleted file mode 100644 index e8b3bcc..0000000 --- a/node_modules/@babel/generator/lib/index.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -exports.generate = generate; -var _sourceMap = require("./source-map.js"); -var _printer = require("./printer.js"); -function normalizeOptions(code, opts, ast) { - var _opts$recordAndTupleS; - if (opts.experimental_preserveFormat) { - if (typeof code !== "string") { - throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string"); - } - if (!opts.retainLines) { - throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`"); - } - if (opts.compact && opts.compact !== "auto") { - throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option"); - } - if (opts.minified) { - throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option"); - } - if (opts.jsescOption) { - throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option"); - } - if (!Array.isArray(ast.tokens)) { - throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option."); - } - } - const format = { - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - shouldPrintComment: opts.shouldPrintComment, - preserveFormat: opts.experimental_preserveFormat, - retainLines: opts.retainLines, - retainFunctionParens: opts.retainFunctionParens, - comments: opts.comments == null || opts.comments, - compact: opts.compact, - minified: opts.minified, - concise: opts.concise, - indent: { - adjustMultilineComment: true, - style: " " - }, - jsescOption: Object.assign({ - quotes: "double", - wrap: true, - minimal: false - }, opts.jsescOption), - topicToken: opts.topicToken - }; - format.decoratorsBeforeExport = opts.decoratorsBeforeExport; - format.jsescOption.json = opts.jsonCompatibleStrings; - format.recordAndTupleSyntaxType = (_opts$recordAndTupleS = opts.recordAndTupleSyntaxType) != null ? _opts$recordAndTupleS : "hash"; - format.importAttributesKeyword = opts.importAttributesKeyword; - if (format.minified) { - format.compact = true; - format.shouldPrintComment = format.shouldPrintComment || (() => format.comments); - } else { - format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.includes("@license") || value.includes("@preserve")); - } - if (format.compact === "auto") { - format.compact = typeof code === "string" && code.length > 500000; - if (format.compact) { - console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`); - } - } - if (format.compact || format.preserveFormat) { - format.indent.adjustMultilineComment = false; - } - const { - auxiliaryCommentBefore, - auxiliaryCommentAfter, - shouldPrintComment - } = format; - if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) { - format.auxiliaryCommentBefore = undefined; - } - if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) { - format.auxiliaryCommentAfter = undefined; - } - return format; -} -exports.CodeGenerator = class CodeGenerator { - constructor(ast, opts = {}, code) { - this._ast = void 0; - this._format = void 0; - this._map = void 0; - this._ast = ast; - this._format = normalizeOptions(code, opts, ast); - this._map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; - } - generate() { - const printer = new _printer.default(this._format, this._map); - return printer.generate(this._ast); - } -}; -function generate(ast, opts = {}, code) { - const format = normalizeOptions(code, opts, ast); - const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; - const printer = new _printer.default(format, map, ast.tokens, typeof code === "string" ? code : null); - return printer.generate(ast); -} -var _default = exports.default = generate; - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/index.js.map b/node_modules/@babel/generator/lib/index.js.map deleted file mode 100644 index e6a7901..0000000 --- a/node_modules/@babel/generator/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_sourceMap","require","_printer","normalizeOptions","code","opts","ast","_opts$recordAndTupleS","experimental_preserveFormat","Error","retainLines","compact","minified","jsescOption","Array","isArray","tokens","format","auxiliaryCommentBefore","auxiliaryCommentAfter","shouldPrintComment","preserveFormat","retainFunctionParens","comments","concise","indent","adjustMultilineComment","style","Object","assign","quotes","wrap","minimal","topicToken","decoratorsBeforeExport","json","jsonCompatibleStrings","recordAndTupleSyntaxType","importAttributesKeyword","value","includes","length","console","error","filename","undefined","exports","CodeGenerator","constructor","_ast","_format","_map","sourceMaps","SourceMap","generate","printer","Printer","map","_default","default"],"sources":["../src/index.ts"],"sourcesContent":["import SourceMap from \"./source-map.ts\";\nimport Printer from \"./printer.ts\";\nimport type * as t from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\nimport type { Format } from \"./printer.ts\";\nimport type {\n EncodedSourceMap,\n DecodedSourceMap,\n Mapping,\n} from \"@jridgewell/gen-mapping\";\n\n/**\n * Normalize generator options, setting defaults.\n *\n * - Detects code indentation.\n * - If `opts.compact = \"auto\"` and the code is over 500KB, `compact` will be set to `true`.\n */\n\nfunction normalizeOptions(\n code: string | Record | undefined,\n opts: GeneratorOptions,\n ast: t.Node,\n): Format {\n if (opts.experimental_preserveFormat) {\n if (typeof code !== \"string\") {\n throw new Error(\n \"`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string\",\n );\n }\n if (!opts.retainLines) {\n throw new Error(\n \"`experimental_preserveFormat` requires `retainLines` to be set to `true`\",\n );\n }\n if (opts.compact && opts.compact !== \"auto\") {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `compact` option\",\n );\n }\n if (opts.minified) {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `minified` option\",\n );\n }\n if (opts.jsescOption) {\n throw new Error(\n \"`experimental_preserveFormat` is not compatible with the `jsescOption` option\",\n );\n }\n if (!Array.isArray((ast as any).tokens)) {\n throw new Error(\n \"`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.\",\n );\n }\n }\n\n const format: Format = {\n auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n // @ts-expect-error define it later\n shouldPrintComment: opts.shouldPrintComment,\n preserveFormat: opts.experimental_preserveFormat,\n retainLines: opts.retainLines,\n retainFunctionParens: opts.retainFunctionParens,\n comments: opts.comments == null || opts.comments,\n compact: opts.compact,\n minified: opts.minified,\n concise: opts.concise,\n indent: {\n adjustMultilineComment: true,\n style: \" \",\n },\n jsescOption: {\n quotes: \"double\",\n wrap: true,\n minimal: process.env.BABEL_8_BREAKING ? true : false,\n ...opts.jsescOption,\n },\n topicToken: opts.topicToken,\n };\n\n if (!process.env.BABEL_8_BREAKING) {\n format.decoratorsBeforeExport = opts.decoratorsBeforeExport;\n format.jsescOption.json = opts.jsonCompatibleStrings;\n format.recordAndTupleSyntaxType = opts.recordAndTupleSyntaxType ?? \"hash\";\n format.importAttributesKeyword = opts.importAttributesKeyword;\n }\n\n if (format.minified) {\n format.compact = true;\n\n format.shouldPrintComment =\n format.shouldPrintComment || (() => format.comments);\n } else {\n format.shouldPrintComment =\n format.shouldPrintComment ||\n (value =>\n format.comments ||\n value.includes(\"@license\") ||\n value.includes(\"@preserve\"));\n }\n\n if (format.compact === \"auto\") {\n format.compact = typeof code === \"string\" && code.length > 500_000; // 500KB\n\n if (format.compact) {\n console.error(\n \"[BABEL] Note: The code generator has deoptimised the styling of \" +\n `${opts.filename} as it exceeds the max of ${\"500KB\"}.`,\n );\n }\n }\n\n if (format.compact || format.preserveFormat) {\n format.indent.adjustMultilineComment = false;\n }\n\n const { auxiliaryCommentBefore, auxiliaryCommentAfter, shouldPrintComment } =\n format;\n\n if (auxiliaryCommentBefore && !shouldPrintComment(auxiliaryCommentBefore)) {\n format.auxiliaryCommentBefore = undefined;\n }\n if (auxiliaryCommentAfter && !shouldPrintComment(auxiliaryCommentAfter)) {\n format.auxiliaryCommentAfter = undefined;\n }\n\n return format;\n}\n\nexport interface GeneratorOptions {\n /**\n * Optional string to add as a block comment at the start of the output file.\n */\n auxiliaryCommentBefore?: string;\n\n /**\n * Optional string to add as a block comment at the end of the output file.\n */\n auxiliaryCommentAfter?: string;\n\n /**\n * Function that takes a comment (as a string) and returns true if the comment should be included in the output.\n * By default, comments are included if `opts.comments` is `true` or if `opts.minified` is `false` and the comment\n * contains `@preserve` or `@license`.\n */\n shouldPrintComment?(comment: string): boolean;\n\n /**\n * Preserve the input code format while printing the transformed code.\n * This is experimental, and may have breaking changes in future\n * patch releases. It will be removed in a future minor release,\n * when it will graduate to stable.\n */\n experimental_preserveFormat?: boolean;\n\n /**\n * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).\n * Defaults to `false`.\n */\n retainLines?: boolean;\n\n /**\n * Retain parens around function expressions (could be used to change engine parsing behavior)\n * Defaults to `false`.\n */\n retainFunctionParens?: boolean;\n\n /**\n * Should comments be included in output? Defaults to `true`.\n */\n comments?: boolean;\n\n /**\n * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.\n */\n compact?: boolean | \"auto\";\n\n /**\n * Should the output be minified. Defaults to `false`.\n */\n minified?: boolean;\n\n /**\n * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.\n */\n concise?: boolean;\n\n /**\n * Used in warning messages\n */\n filename?: string;\n\n /**\n * Enable generating source maps. Defaults to `false`.\n */\n sourceMaps?: boolean;\n\n inputSourceMap?: any;\n\n /**\n * A root for all relative URLs in the source map.\n */\n sourceRoot?: string;\n\n /**\n * The filename for the source code (i.e. the code in the `code` argument).\n * This will only be used if `code` is a string.\n */\n sourceFileName?: string;\n\n /**\n * Set to true to run jsesc with \"json\": true to print \"\\u00A9\" vs. \"©\";\n * @deprecated use `jsescOptions: { json: true }` instead\n */\n jsonCompatibleStrings?: boolean;\n\n /**\n * Set to true to enable support for experimental decorators syntax before\n * module exports. If not specified, decorators will be printed in the same\n * position as they were in the input source code.\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n\n /**\n * Options for outputting jsesc representation.\n */\n jsescOption?: jsescOptions;\n\n /**\n * For use with the recordAndTuple token.\n * @deprecated It will be removed in Babel 8.\n */\n recordAndTupleSyntaxType?: \"bar\" | \"hash\";\n\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: \"%\" | \"#\" | \"@@\" | \"^^\" | \"^\";\n\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n * @deprecated Removed in Babel 8.\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n}\n\nexport interface GeneratorResult {\n code: string;\n map: EncodedSourceMap | null;\n decodedMap: DecodedSourceMap | undefined;\n rawMappings: Mapping[] | undefined;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n /**\n * We originally exported the Generator class above, but to make it extra clear that it is a private API,\n * we have moved that to an internal class instance and simplified the interface to the two public methods\n * that we wish to support.\n */\n\n // eslint-disable-next-line no-restricted-globals\n exports.CodeGenerator = class CodeGenerator {\n private _ast: t.Node;\n private _format: Format;\n private _map: SourceMap | null;\n constructor(ast: t.Node, opts: GeneratorOptions = {}, code?: string) {\n this._ast = ast;\n this._format = normalizeOptions(code, opts, ast);\n this._map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n }\n generate(): GeneratorResult {\n const printer = new Printer(this._format, this._map);\n\n return printer.generate(this._ast);\n }\n };\n}\n\n/**\n * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.\n * @param ast - the abstract syntax tree from which to generate output code.\n * @param opts - used for specifying options for code generation.\n * @param code - the original source code, used for source maps.\n * @returns - an object containing the output code and source map.\n */\nexport function generate(\n ast: t.Node,\n opts: GeneratorOptions = {},\n code?: string | Record,\n): GeneratorResult {\n const format = normalizeOptions(code, opts, ast);\n const map = opts.sourceMaps ? new SourceMap(opts, code) : null;\n\n const printer = new Printer(\n format,\n map,\n (ast as any).tokens,\n typeof code === \"string\" ? code : null,\n );\n\n return printer.generate(ast);\n}\n\nexport default generate;\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAiBA,SAASE,gBAAgBA,CACvBC,IAAiD,EACjDC,IAAsB,EACtBC,GAAW,EACH;EAAA,IAAAC,qBAAA;EACR,IAAIF,IAAI,CAACG,2BAA2B,EAAE;IACpC,IAAI,OAAOJ,IAAI,KAAK,QA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9D,MAAMmD,OAAO,GAAG,IAAIC,gBAAO,CACzBvC,MAAM,EACNwC,GAAG,EACFnD,GAAG,CAASU,MAAM,EACnB,OAAOZ,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAG,IACpC,CAAC;EAED,OAAOmD,OAAO,CAACD,QAAQ,CAAChD,GAAG,CAAC;AAC9B;AAAC,IAAAoD,QAAA,GAAAZ,OAAA,CAAAa,OAAA,GAEcL,QAAQ","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/generator/lib/node/index.js deleted file mode 100644 index 58cb15c..0000000 --- a/node_modules/@babel/generator/lib/node/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TokenContext = void 0; -exports.isLastChild = isLastChild; -exports.parentNeedsParens = parentNeedsParens; -var parens = require("./parentheses.js"); -var _t = require("@babel/types"); -var _nodes = require("../nodes.js"); -const { - VISITOR_KEYS -} = _t; -const TokenContext = exports.TokenContext = { - normal: 0, - expressionStatement: 1, - arrowBody: 2, - exportDefault: 4, - arrowFlowReturnType: 8, - forInitHead: 16, - forInHead: 32, - forOfHead: 64, - forInOrInitHeadAccumulate: 128, - forInOrInitHeadAccumulatePassThroughMask: 128 -}; -for (const type of Object.keys(parens)) { - const func = parens[type]; - if (_nodes.generatorInfosMap.has(type)) { - _nodes.generatorInfosMap.get(type)[2] = func; - } -} -function isOrHasCallExpression(node) { - switch (node.type) { - case "CallExpression": - return true; - case "MemberExpression": - return isOrHasCallExpression(node.object); - } - return false; -} -function parentNeedsParens(node, parent, parentId) { - switch (parentId) { - case 112: - if (parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - break; - case 42: - return !isDecoratorMemberExpression(node) && !(node.type === "CallExpression" && isDecoratorMemberExpression(node.callee)) && node.type !== "ParenthesizedExpression"; - } - return false; -} -function isDecoratorMemberExpression(node) { - switch (node.type) { - case "Identifier": - return true; - case "MemberExpression": - return !node.computed && node.property.type === "Identifier" && isDecoratorMemberExpression(node.object); - default: - return false; - } -} -function isLastChild(parent, child) { - const visitorKeys = VISITOR_KEYS[parent.type]; - for (let i = visitorKeys.length - 1; i >= 0; i--) { - const val = parent[visitorKeys[i]]; - if (val === child) { - return true; - } else if (Array.isArray(val)) { - let j = val.length - 1; - while (j >= 0 && val[j] === null) j--; - return j >= 0 && val[j] === child; - } else if (val) { - return false; - } - } - return false; -} - -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/generator/lib/node/index.js.map b/node_modules/@babel/generator/lib/node/index.js.map deleted file mode 100644 index bae168f..0000000 --- a/node_modules/@babel/generator/lib/node/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["parens","require","_t","_nodes","VISITOR_KEYS","TokenContext","exports","normal","expressionStatement","arrowBody","exportDefault","arrowFlowReturnType","forInitHead","forInHead","forOfHead","forInOrInitHeadAccumulate","forInOrInitHeadAccumulatePassThroughMask","type","Object","keys","func","generatorInfosMap","has","get","isOrHasCallExpression","node","object","parentNeedsParens","parent","parentId","callee","isDecoratorMemberExpression","computed","property","isLastChild","child","visitorKeys","i","length","val","Array","isArray","j"],"sources":["../../src/node/index.ts"],"sourcesContent":["import * as parens from \"./parentheses.ts\";\nimport { VISITOR_KEYS } from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport { generatorInfosMap } from \"../nodes.ts\";\n\nexport const enum TokenContext {\n normal = 0,\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n arrowFlowReturnType = 1 << 3,\n forInitHead = 1 << 4,\n forInHead = 1 << 5,\n forOfHead = 1 << 6,\n // This flag lives across the token boundary, and will\n // be reset after forIn or forInit head is printed\n forInOrInitHeadAccumulate = 1 << 7,\n forInOrInitHeadAccumulatePassThroughMask = 0b10000000,\n}\n\nexport type NodeHandler = (\n node: t.Node,\n // todo:\n // node: K extends keyof typeof t\n // ? Extract\n // : t.Node,\n parent: t.Node,\n parentId: number,\n tokenContext?: number,\n getRawIdentifier?: (node: t.Identifier) => string,\n) => R | undefined;\n\nfor (const type of Object.keys(parens) as (keyof typeof parens)[]) {\n const func = parens[type];\n if (generatorInfosMap.has(type)) {\n generatorInfosMap.get(type)![2] = func;\n }\n}\n\nfunction isOrHasCallExpression(node: t.Node): boolean {\n switch (node.type) {\n case \"CallExpression\":\n return true;\n case \"MemberExpression\":\n return isOrHasCallExpression(node.object);\n }\n return false;\n}\n\nexport function parentNeedsParens(\n node: t.Node,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"NewExpression\"):\n if (parent.callee === node) {\n if (isOrHasCallExpression(node)) return true;\n }\n break;\n case __node(\"Decorator\"):\n return (\n !isDecoratorMemberExpression(node) &&\n !(\n node.type === \"CallExpression\" &&\n isDecoratorMemberExpression(node.callee)\n ) &&\n node.type !== \"ParenthesizedExpression\"\n );\n }\n return false;\n}\n\nfunction isDecoratorMemberExpression(node: t.Node): boolean {\n switch (node.type) {\n case \"Identifier\":\n return true;\n case \"MemberExpression\":\n return (\n !node.computed &&\n node.property.type === \"Identifier\" &&\n isDecoratorMemberExpression(node.object)\n );\n default:\n return false;\n }\n}\n\nexport function isLastChild(parent: t.Node, child: t.Node) {\n const visitorKeys = VISITOR_KEYS[parent.type];\n for (let i = visitorKeys.length - 1; i >= 0; i--) {\n const val = (parent as any)[visitorKeys[i]] as t.Node | t.Node[] | null;\n if (val === child) {\n return true;\n } else if (Array.isArray(val)) {\n let j = val.length - 1;\n while (j >= 0 && val[j] === null) j--;\n return j >= 0 && val[j] === child;\n } else if (val) {\n return false;\n }\n }\n return false;\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,EAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAAgD;EAHvCG;AAAY,IAAAF,EAAA;AAAA,MAKHG,YAAY,GAAAC,OAAA,CAAAD,YAAA;EAAAE,MAAA;EAAAC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I,KAAK,YAAY,IACnCc,2BAA2B,CAACN,IAAI,CAACC,MAAM,CAAC;IAE5C;MACE,OAAO,KAAK;EAChB;AACF;AAEO,SAASQ,WAAWA,CAACN,MAAc,EAAEO,KAAa,EAAE;EACzD,MAAMC,WAAW,GAAGhC,YAAY,CAACwB,MAAM,CAACX,IAAI,CAAC;EAC7C,KAAK,IAAIoB,CAAC,GAAGD,WAAW,CAACE,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,EAAEA,CAAC,EAAE,EAAE;IAChD,MAAME,GAAG,GAAIX,MAAM,CAASQ,WAAW,CAACC,CAAC,CAAC,CAA6B;IACvE,IAAIE,GAAG,KAAKJ,KAAK,EAAE;MACjB,OAAO,IAAI;IACb,CAAC,MAAM,IAAIK,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,EAAE;MAC7B,IAAIG,CAAC,GAAGH,GAAG,CAACD,MAAM,GAAG,CAAC;MACtB,OAAOI,CAAC,IAAI,CAAC,IAAIH,GAAG,CAACG,CAAC,CAAC,KAAK,IAAI,EAAEA,CAAC,EAAE;MACrC,OAAOA,CAAC,IAAI,CAAC,IAAIH,GAAG,CAACG,CAAC,CAAC,KAAKP,KAAK;IACnC,CAAC,MAAM,IAAII,GAAG,EAAE;MACd,OAAO,KAAK;IACd;EACF;EACA,OAAO,KAAK;AACd","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/generator/lib/node/parentheses.js deleted file mode 100644 index b7e1f4f..0000000 --- a/node_modules/@babel/generator/lib/node/parentheses.js +++ /dev/null @@ -1,298 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AssignmentExpression = AssignmentExpression; -exports.BinaryExpression = BinaryExpression; -exports.ClassExpression = ClassExpression; -exports.ArrowFunctionExpression = exports.ConditionalExpression = ConditionalExpression; -exports.DoExpression = DoExpression; -exports.FunctionExpression = FunctionExpression; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.Identifier = Identifier; -exports.LogicalExpression = LogicalExpression; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.ObjectExpression = ObjectExpression; -exports.OptionalIndexedAccessType = OptionalIndexedAccessType; -exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.SequenceExpression = SequenceExpression; -exports.TSSatisfiesExpression = exports.TSAsExpression = TSAsExpression; -exports.TSConditionalType = TSConditionalType; -exports.TSConstructorType = exports.TSFunctionType = TSFunctionType; -exports.TSInferType = TSInferType; -exports.TSInstantiationExpression = TSInstantiationExpression; -exports.TSIntersectionType = TSIntersectionType; -exports.SpreadElement = exports.UnaryExpression = exports.TSTypeAssertion = UnaryLike; -exports.TSTypeOperator = TSTypeOperator; -exports.TSUnionType = TSUnionType; -exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.UpdateExpression = UpdateExpression; -exports.AwaitExpression = exports.YieldExpression = YieldExpression; -var _t = require("@babel/types"); -var _index = require("./index.js"); -const { - isMemberExpression, - isOptionalMemberExpression, - isYieldExpression, - isStatement -} = _t; -const PRECEDENCE = new Map([["||", 0], ["??", 1], ["&&", 2], ["|", 3], ["^", 4], ["&", 5], ["==", 6], ["===", 6], ["!=", 6], ["!==", 6], ["<", 7], [">", 7], ["<=", 7], [">=", 7], ["in", 7], ["instanceof", 7], [">>", 8], ["<<", 8], [">>>", 8], ["+", 9], ["-", 9], ["*", 10], ["/", 10], ["%", 10], ["**", 11]]); -function isTSTypeExpression(nodeId) { - return nodeId === 156 || nodeId === 201 || nodeId === 209; -} -const isClassExtendsClause = (node, parent, parentId) => { - return (parentId === 21 || parentId === 22) && parent.superClass === node; -}; -const hasPostfixPart = (node, parent, parentId) => { - switch (parentId) { - case 108: - case 132: - return parent.object === node; - case 17: - case 130: - case 112: - return parent.callee === node; - case 222: - return parent.tag === node; - case 191: - return true; - } - return false; -}; -function NullableTypeAnnotation(node, parent, parentId) { - return parentId === 4; -} -function FunctionTypeAnnotation(node, parent, parentId, tokenContext) { - return (parentId === 239 || parentId === 90 || parentId === 4 || (tokenContext & _index.TokenContext.arrowFlowReturnType) > 0 - ); -} -function UpdateExpression(node, parent, parentId) { - return hasPostfixPart(node, parent, parentId) || isClassExtendsClause(node, parent, parentId); -} -function needsParenBeforeExpressionBrace(tokenContext) { - return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.arrowBody)) > 0; -} -function ObjectExpression(node, parent, parentId, tokenContext) { - return needsParenBeforeExpressionBrace(tokenContext); -} -function DoExpression(node, parent, parentId, tokenContext) { - return (tokenContext & _index.TokenContext.expressionStatement) > 0 && !node.async; -} -function BinaryLike(node, parent, parentId, nodeType) { - if (isClassExtendsClause(node, parent, parentId)) { - return true; - } - if (hasPostfixPart(node, parent, parentId) || parentId === 238 || parentId === 145 || parentId === 8) { - return true; - } - let parentPos; - switch (parentId) { - case 10: - case 107: - parentPos = PRECEDENCE.get(parent.operator); - break; - case 156: - case 201: - parentPos = 7; - } - if (parentPos !== undefined) { - const nodePos = nodeType === 2 ? 7 : PRECEDENCE.get(node.operator); - if (parentPos > nodePos) return true; - if (parentPos === nodePos && parentId === 10 && (nodePos === 11 ? parent.left === node : parent.right === node)) { - return true; - } - if (nodeType === 1 && parentId === 107 && (nodePos === 1 && parentPos !== 1 || parentPos === 1 && nodePos !== 1)) { - return true; - } - } - return false; -} -function UnionTypeAnnotation(node, parent, parentId) { - switch (parentId) { - case 4: - case 115: - case 90: - case 239: - return true; - } - return false; -} -function OptionalIndexedAccessType(node, parent, parentId) { - return parentId === 84 && parent.objectType === node; -} -function TSAsExpression(node, parent, parentId) { - if ((parentId === 6 || parentId === 7) && parent.left === node) { - return true; - } - if (parentId === 10 && (parent.operator === "|" || parent.operator === "&") && node === parent.left) { - return true; - } - return BinaryLike(node, parent, parentId, 2); -} -function TSConditionalType(node, parent, parentId) { - switch (parentId) { - case 155: - case 195: - case 211: - case 212: - return true; - case 175: - return parent.objectType === node; - case 181: - case 219: - return parent.types[0] === node; - case 161: - return parent.checkType === node || parent.extendsType === node; - } - return false; -} -function TSUnionType(node, parent, parentId) { - switch (parentId) { - case 181: - case 211: - case 155: - case 195: - return true; - case 175: - return parent.objectType === node; - } - return false; -} -function TSIntersectionType(node, parent, parentId) { - return parentId === 211 || TSTypeOperator(node, parent, parentId); -} -function TSInferType(node, parent, parentId) { - if (TSTypeOperator(node, parent, parentId)) { - return true; - } - if ((parentId === 181 || parentId === 219) && node.typeParameter.constraint && parent.types[0] === node) { - return true; - } - return false; -} -function TSTypeOperator(node, parent, parentId) { - switch (parentId) { - case 155: - case 195: - return true; - case 175: - if (parent.objectType === node) { - return true; - } - } - return false; -} -function TSInstantiationExpression(node, parent, parentId) { - switch (parentId) { - case 17: - case 130: - case 112: - case 177: - return (parent.typeParameters - ) != null; - } - return false; -} -function TSFunctionType(node, parent, parentId) { - if (TSUnionType(node, parent, parentId)) return true; - return parentId === 219 || parentId === 161 && (parent.checkType === node || parent.extendsType === node); -} -function BinaryExpression(node, parent, parentId, tokenContext) { - if (BinaryLike(node, parent, parentId, 0)) return true; - return (tokenContext & _index.TokenContext.forInOrInitHeadAccumulate) > 0 && node.operator === "in"; -} -function LogicalExpression(node, parent, parentId) { - return BinaryLike(node, parent, parentId, 1); -} -function SequenceExpression(node, parent, parentId) { - if (parentId === 144 || parentId === 133 || parentId === 108 && parent.property === node || parentId === 132 && parent.property === node || parentId === 224) { - return false; - } - if (parentId === 21) { - return true; - } - if (parentId === 68) { - return parent.right === node; - } - if (parentId === 60) { - return true; - } - return !isStatement(parent); -} -function YieldExpression(node, parent, parentId) { - return parentId === 10 || parentId === 107 || parentId === 238 || parentId === 145 || hasPostfixPart(node, parent, parentId) || parentId === 8 && isYieldExpression(node) || parentId === 28 && node === parent.test || isClassExtendsClause(node, parent, parentId) || isTSTypeExpression(parentId); -} -function ClassExpression(node, parent, parentId, tokenContext) { - return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)) > 0; -} -function UnaryLike(node, parent, parentId) { - return hasPostfixPart(node, parent, parentId) || parentId === 10 && parent.operator === "**" && parent.left === node || isClassExtendsClause(node, parent, parentId); -} -function FunctionExpression(node, parent, parentId, tokenContext) { - return (tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.exportDefault)) > 0; -} -function ConditionalExpression(node, parent, parentId) { - switch (parentId) { - case 238: - case 145: - case 10: - case 107: - case 8: - return true; - case 28: - if (parent.test === node) { - return true; - } - } - if (isTSTypeExpression(parentId)) { - return true; - } - return UnaryLike(node, parent, parentId); -} -function OptionalMemberExpression(node, parent, parentId) { - switch (parentId) { - case 17: - return parent.callee === node; - case 108: - return parent.object === node; - } - return false; -} -function AssignmentExpression(node, parent, parentId, tokenContext) { - if (needsParenBeforeExpressionBrace(tokenContext) && node.left.type === "ObjectPattern") { - return true; - } - return ConditionalExpression(node, parent, parentId); -} -function Identifier(node, parent, parentId, tokenContext, getRawIdentifier) { - var _node$extra; - if (getRawIdentifier && getRawIdentifier(node) !== node.name) { - return false; - } - if (parentId === 6 && (_node$extra = node.extra) != null && _node$extra.parenthesized && parent.left === node) { - const rightType = parent.right.type; - if ((rightType === "FunctionExpression" || rightType === "ClassExpression") && parent.right.id == null) { - return true; - } - } - if (tokenContext & _index.TokenContext.forOfHead || (parentId === 108 || parentId === 132) && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forInitHead | _index.TokenContext.forInHead)) { - if (node.name === "let") { - const isFollowedByBracket = isMemberExpression(parent, { - object: node, - computed: true - }) || isOptionalMemberExpression(parent, { - object: node, - computed: true, - optional: false - }); - if (isFollowedByBracket && tokenContext & (_index.TokenContext.expressionStatement | _index.TokenContext.forInitHead | _index.TokenContext.forInHead)) { - return true; - } - return (tokenContext & _index.TokenContext.forOfHead) > 0; - } - } - return parentId === 68 && parent.left === node && node.name === "async" && !parent.await; -} - -//# sourceMappingURL=parentheses.js.map diff --git a/node_modules/@babel/generator/lib/node/parentheses.js.map b/node_modules/@babel/generator/lib/node/parentheses.js.map deleted file mode 100644 index 0120e9c..0000000 --- a/node_modules/@babel/generator/lib/node/parentheses.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_t","require","_index","isMemberExpression","isOptionalMemberExpression","isYieldExpression","isStatement","PRECEDENCE","Map","isTSTypeExpression","nodeId","isClassExtendsClause","node","parent","parentId","superClass","hasPostfixPart","object","callee","tag","NullableTypeAnnotation","FunctionTypeAnnotation","tokenContext","TokenContext","arrowFlowReturnType","UpdateExpression","needsParenBeforeExpressionBrace","expressionStatement","arrowBody","ObjectExpression","DoExpression","async","BinaryLike","nodeType","parentPos","get","operator","undefined","nodePos","left","right","UnionTypeAnnotation","OptionalIndexedAccessType","objectType","TSAsExpression","TSConditionalType","types","checkType","extendsType","TSUnionType","TSIntersectionType","TSTypeOperator","TSInferType","typeParameter","constraint","TSInstantiationExpression","typeParameters","TSFunctionType","BinaryExpression","forInOrInitHeadAccumulate","LogicalExpression","SequenceExpression","property","YieldExpression","test","ClassExpression","exportDefault","UnaryLike","FunctionExpression","ConditionalExpression","OptionalMemberExpression","AssignmentExpression","type","Identifier","getRawIdentifier","_node$extra","name","extra","parenthesized","rightType","id","forOfHead","forInitHead","forInHead","isFollowedByBracket","computed","optional","await"],"sources":["../../src/node/parentheses.ts"],"sourcesContent":["import {\n isMemberExpression,\n isOptionalMemberExpression,\n isYieldExpression,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nimport { TokenContext } from \"./index.ts\";\n\nconst PRECEDENCE = new Map([\n [\"||\", 0],\n [\"??\", 1],\n [\"&&\", 2],\n [\"|\", 3],\n [\"^\", 4],\n [\"&\", 5],\n [\"==\", 6],\n [\"===\", 6],\n [\"!=\", 6],\n [\"!==\", 6],\n [\"<\", 7],\n [\">\", 7],\n [\"<=\", 7],\n [\">=\", 7],\n [\"in\", 7],\n [\"instanceof\", 7],\n [\">>\", 8],\n [\"<<\", 8],\n [\">>>\", 8],\n [\"+\", 9],\n [\"-\", 9],\n [\"*\", 10],\n [\"/\", 10],\n [\"%\", 10],\n [\"**\", 11],\n]);\n\nfunction isTSTypeExpression(nodeId: number) {\n return (\n nodeId === __node(\"TSAsExpression\") ||\n nodeId === __node(\"TSSatisfiesExpression\") ||\n nodeId === __node(\"TSTypeAssertion\")\n );\n}\n\nconst isClassExtendsClause = (\n node: t.Node,\n parent: any,\n parentId: number,\n): parent is t.Class => {\n return (\n (parentId === __node(\"ClassDeclaration\") ||\n parentId === __node(\"ClassExpression\")) &&\n parent.superClass === node\n );\n};\n\nconst hasPostfixPart = (node: t.Node, parent: any, parentId: number) => {\n switch (parentId) {\n case __node(\"MemberExpression\"):\n case __node(\"OptionalMemberExpression\"):\n return parent.object === node;\n case __node(\"CallExpression\"):\n case __node(\"OptionalCallExpression\"):\n case __node(\"NewExpression\"):\n return parent.callee === node;\n case __node(\"TaggedTemplateExpression\"):\n return parent.tag === node;\n case __node(\"TSNonNullExpression\"):\n return true;\n }\n\n return false;\n};\n\nexport function NullableTypeAnnotation(\n node: t.NullableTypeAnnotation,\n parent: any,\n parentId: number,\n): boolean {\n return parentId === __node(\"ArrayTypeAnnotation\");\n}\n\nexport function FunctionTypeAnnotation(\n node: t.FunctionTypeAnnotation,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n return (\n // (() => A) | (() => B)\n parentId === __node(\"UnionTypeAnnotation\") ||\n // (() => A) & (() => B)\n parentId === __node(\"IntersectionTypeAnnotation\") ||\n // (() => A)[]\n parentId === __node(\"ArrayTypeAnnotation\") ||\n (tokenContext & TokenContext.arrowFlowReturnType) > 0\n );\n}\n\nexport function UpdateExpression(\n node: t.UpdateExpression,\n parent: any,\n parentId: number,\n): boolean {\n return (\n hasPostfixPart(node, parent, parentId) ||\n isClassExtendsClause(node, parent, parentId)\n );\n}\n\nfunction needsParenBeforeExpressionBrace(tokenContext: number) {\n return (\n (tokenContext &\n (TokenContext.expressionStatement | TokenContext.arrowBody)) >\n 0\n );\n}\n\nexport function ObjectExpression(\n node: t.ObjectExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n return needsParenBeforeExpressionBrace(tokenContext);\n}\n\nexport function DoExpression(\n node: t.DoExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n // `async do` can start an expression statement\n return (tokenContext & TokenContext.expressionStatement) > 0 && !node.async;\n}\n\nconst enum BinaryLikeType {\n Binary = 0,\n Logical = 1,\n TypeScript = 2,\n}\n\nfunction BinaryLike(\n node: t.Binary | t.TSAsExpression | t.TSSatisfiesExpression,\n parent: any,\n parentId: number,\n nodeType: BinaryLikeType,\n): boolean {\n if (isClassExtendsClause(node, parent, parentId)) {\n return true;\n }\n\n if (\n hasPostfixPart(node, parent, parentId) ||\n parentId === __node(\"UnaryExpression\") ||\n parentId === __node(\"SpreadElement\") ||\n parentId === __node(\"AwaitExpression\")\n ) {\n return true;\n }\n let parentPos: number | undefined;\n switch (parentId) {\n case __node(\"BinaryExpression\"):\n case __node(\"LogicalExpression\"):\n parentPos = PRECEDENCE.get(parent.operator);\n break;\n case __node(\"TSAsExpression\"):\n case __node(\"TSSatisfiesExpression\"):\n parentPos = 7; /* in */\n }\n if (parentPos !== undefined) {\n const nodePos =\n nodeType === BinaryLikeType.TypeScript\n ? 7 /* in */\n : PRECEDENCE.get((node as t.Binary).operator)!;\n if (parentPos > nodePos) return true;\n if (\n parentPos === nodePos &&\n parentId === __node(\"BinaryExpression\") &&\n (nodePos === 11 /* ** */ ? parent.left === node : parent.right === node)\n ) {\n return true;\n }\n if (\n nodeType === BinaryLikeType.Logical &&\n parentId === __node(\"LogicalExpression\") &&\n // 1: ??\n ((nodePos === 1 && parentPos !== 1) || (parentPos === 1 && nodePos !== 1))\n ) {\n return true;\n }\n }\n return false;\n}\n\nexport function UnionTypeAnnotation(\n node: t.UnionTypeAnnotation | t.IntersectionTypeAnnotation,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"ArrayTypeAnnotation\"):\n case __node(\"NullableTypeAnnotation\"):\n case __node(\"IntersectionTypeAnnotation\"):\n case __node(\"UnionTypeAnnotation\"):\n return true;\n }\n return false;\n}\n\nexport { UnionTypeAnnotation as IntersectionTypeAnnotation };\n\nexport function OptionalIndexedAccessType(\n node: t.OptionalIndexedAccessType,\n parent: any,\n parentId: number,\n): boolean {\n return parentId === __node(\"IndexedAccessType\") && parent.objectType === node;\n}\n\nexport function TSAsExpression(\n node: t.TSAsExpression | t.TSSatisfiesExpression,\n parent: any,\n parentId: number,\n): boolean {\n if (\n (parentId === __node(\"AssignmentExpression\") ||\n parentId === __node(\"AssignmentPattern\")) &&\n parent.left === node\n ) {\n return true;\n }\n if (\n parentId === __node(\"BinaryExpression\") &&\n (parent.operator === \"|\" || parent.operator === \"&\") &&\n node === parent.left\n ) {\n return true;\n }\n return BinaryLike(node, parent, parentId, BinaryLikeType.TypeScript);\n}\n\nexport { TSAsExpression as TSSatisfiesExpression };\n\nexport { UnaryLike as TSTypeAssertion };\n\nexport function TSConditionalType(\n node: t.TSConditionalType,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"TSArrayType\"):\n case __node(\"TSOptionalType\"):\n case __node(\"TSTypeOperator\"):\n // for `infer K extends (L extends M ? M : ...)`\n // fallthrough\n case __node(\"TSTypeParameter\"):\n return true;\n case __node(\"TSIndexedAccessType\"):\n return parent.objectType === node;\n case __node(\"TSIntersectionType\"):\n case __node(\"TSUnionType\"):\n return parent.types[0] === node;\n case __node(\"TSConditionalType\"):\n return parent.checkType === node || parent.extendsType === node;\n }\n return false;\n}\n\nexport function TSUnionType(\n node: t.TSUnionType | t.TSFunctionType,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"TSIntersectionType\"):\n case __node(\"TSTypeOperator\"):\n case __node(\"TSArrayType\"):\n case __node(\"TSOptionalType\"):\n return true;\n case __node(\"TSIndexedAccessType\"):\n return parent.objectType === node;\n }\n return false;\n}\n\nexport function TSIntersectionType(\n node: t.TSUnionType,\n parent: any,\n parentId: number,\n): boolean {\n return (\n parentId === __node(\"TSTypeOperator\") ||\n TSTypeOperator(node, parent, parentId)\n );\n}\n\nexport function TSInferType(\n node: t.TSInferType,\n parent: any,\n parentId: number,\n): boolean {\n if (TSTypeOperator(node, parent, parentId)) {\n return true;\n }\n if (\n (parentId === __node(\"TSIntersectionType\") ||\n parentId === __node(\"TSUnionType\")) &&\n node.typeParameter.constraint &&\n parent.types[0] === node\n ) {\n return true;\n }\n return false;\n}\n\nexport function TSTypeOperator(\n node: t.TSTypeOperator | t.TSUnionType | t.TSInferType,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"TSArrayType\"):\n case __node(\"TSOptionalType\"):\n return true;\n case __node(\"TSIndexedAccessType\"):\n if (parent.objectType === node) {\n return true;\n }\n }\n return false;\n}\n\nexport function TSInstantiationExpression(\n node: t.TSInstantiationExpression,\n parent: any,\n parentId: number,\n) {\n switch (parentId) {\n case __node(\"CallExpression\"):\n case __node(\"OptionalCallExpression\"):\n case __node(\"NewExpression\"):\n case __node(\"TSInstantiationExpression\"):\n return (\n (process.env.BABEL_8_BREAKING\n ? // @ts-ignore(Babel 7 vs Babel 8) Babel 8 AST\n parent.typeArguments\n : // @ts-ignore(Babel 7 vs Babel 8) Babel 7 AST\n parent.typeParameters) != null\n );\n }\n\n return false;\n}\n\nexport function TSFunctionType(\n node: t.TSFunctionType,\n parent: any,\n parentId: number,\n): boolean {\n if (TSUnionType(node, parent, parentId)) return true;\n\n return (\n parentId === __node(\"TSUnionType\") ||\n (parentId === __node(\"TSConditionalType\") &&\n (parent.checkType === node || parent.extendsType === node))\n );\n}\n\nexport { TSFunctionType as TSConstructorType };\n\nexport function BinaryExpression(\n node: t.BinaryExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n if (BinaryLike(node, parent, parentId, BinaryLikeType.Binary)) return true;\n\n // for ((1 in []);;);\n // for (var x = (1 in []) in 2);\n return (\n (tokenContext & TokenContext.forInOrInitHeadAccumulate) > 0 &&\n node.operator === \"in\"\n );\n}\n\nexport function LogicalExpression(\n node: t.LogicalExpression,\n parent: any,\n parentId: number,\n): boolean {\n return BinaryLike(node, parent, parentId, BinaryLikeType.Logical);\n}\n\nexport function SequenceExpression(\n node: t.SequenceExpression,\n parent: any,\n parentId: number,\n): boolean {\n if (\n parentId === __node(\"SequenceExpression\") ||\n parentId === __node(\"ParenthesizedExpression\") ||\n (parentId === __node(\"MemberExpression\") && parent.property === node) ||\n (parentId === __node(\"OptionalMemberExpression\") &&\n parent.property === node) ||\n parentId === __node(\"TemplateLiteral\")\n ) {\n return false;\n }\n if (parentId === __node(\"ClassDeclaration\")) {\n return true;\n }\n if (parentId === __node(\"ForOfStatement\")) {\n return parent.right === node;\n }\n if (parentId === __node(\"ExportDefaultDeclaration\")) {\n return true;\n }\n\n return !isStatement(parent);\n}\n\nexport function YieldExpression(\n node: t.YieldExpression,\n parent: any,\n parentId: number,\n): boolean {\n return (\n parentId === __node(\"BinaryExpression\") ||\n parentId === __node(\"LogicalExpression\") ||\n parentId === __node(\"UnaryExpression\") ||\n parentId === __node(\"SpreadElement\") ||\n hasPostfixPart(node, parent, parentId) ||\n (parentId === __node(\"AwaitExpression\") && isYieldExpression(node)) ||\n (parentId === __node(\"ConditionalExpression\") && node === parent.test) ||\n isClassExtendsClause(node, parent, parentId) ||\n isTSTypeExpression(parentId)\n );\n}\n\nexport { YieldExpression as AwaitExpression };\n\nexport function ClassExpression(\n node: t.ClassExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n return (\n (tokenContext &\n (TokenContext.expressionStatement | TokenContext.exportDefault)) >\n 0\n );\n}\n\nfunction UnaryLike(\n node:\n | t.UnaryLike\n | t.TSTypeAssertion\n | t.ArrowFunctionExpression\n | t.ConditionalExpression\n | t.AssignmentExpression,\n parent: any,\n parentId: number,\n): boolean {\n return (\n hasPostfixPart(node, parent, parentId) ||\n (parentId === __node(\"BinaryExpression\") &&\n parent.operator === \"**\" &&\n parent.left === node) ||\n isClassExtendsClause(node, parent, parentId)\n );\n}\n\nexport { UnaryLike as UnaryExpression, UnaryLike as SpreadElement };\n\nexport function FunctionExpression(\n node: t.FunctionExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n return (\n (tokenContext &\n (TokenContext.expressionStatement | TokenContext.exportDefault)) >\n 0\n );\n}\n\nexport function ConditionalExpression(\n node:\n | t.ConditionalExpression\n | t.ArrowFunctionExpression\n | t.AssignmentExpression,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"UnaryExpression\"):\n case __node(\"SpreadElement\"):\n case __node(\"BinaryExpression\"):\n case __node(\"LogicalExpression\"):\n case __node(\"AwaitExpression\"):\n return true;\n case __node(\"ConditionalExpression\"):\n if (parent.test === node) {\n return true;\n }\n }\n\n if (isTSTypeExpression(parentId)) {\n return true;\n }\n\n return UnaryLike(node, parent, parentId);\n}\n\nexport { ConditionalExpression as ArrowFunctionExpression };\n\nexport function OptionalMemberExpression(\n node: t.OptionalMemberExpression,\n parent: any,\n parentId: number,\n): boolean {\n switch (parentId) {\n case __node(\"CallExpression\"):\n return parent.callee === node;\n case __node(\"MemberExpression\"):\n return parent.object === node;\n }\n return false;\n}\n\nexport { OptionalMemberExpression as OptionalCallExpression };\n\nexport function AssignmentExpression(\n node: t.AssignmentExpression,\n parent: any,\n parentId: number,\n tokenContext: number,\n): boolean {\n if (\n needsParenBeforeExpressionBrace(tokenContext) &&\n node.left.type === \"ObjectPattern\"\n ) {\n return true;\n }\n return ConditionalExpression(node, parent, parentId);\n}\n\nexport function Identifier(\n node: t.Identifier,\n parent: any,\n parentId: number,\n tokenContext: number,\n getRawIdentifier: (node: t.Identifier) => string,\n): boolean {\n if (getRawIdentifier && getRawIdentifier(node) !== node.name) {\n return false;\n }\n\n // 13.15.2 AssignmentExpression RS: Evaluation\n // (fn) = function () {};\n if (\n parentId === __node(\"AssignmentExpression\") &&\n node.extra?.parenthesized &&\n parent.left === node\n ) {\n const rightType = parent.right.type;\n if (\n (rightType === \"FunctionExpression\" || rightType === \"ClassExpression\") &&\n parent.right.id == null\n ) {\n return true;\n }\n }\n\n // fast path\n if (\n tokenContext & TokenContext.forOfHead ||\n ((parentId === __node(\"MemberExpression\") ||\n parentId === __node(\"OptionalMemberExpression\")) &&\n tokenContext &\n (TokenContext.expressionStatement |\n TokenContext.forInitHead |\n TokenContext.forInHead))\n ) {\n // Non-strict code allows the identifier `let`, but it cannot occur as-is in\n // certain contexts to avoid ambiguity with contextual keyword `let`.\n if (node.name === \"let\") {\n // Some contexts only forbid `let [`, so check if the next token would\n // be the left bracket of a computed member expression.\n const isFollowedByBracket =\n isMemberExpression(parent, {\n object: node,\n computed: true,\n }) ||\n isOptionalMemberExpression(parent, {\n object: node,\n computed: true,\n optional: false,\n });\n if (\n isFollowedByBracket &&\n tokenContext &\n (TokenContext.expressionStatement |\n TokenContext.forInitHead |\n TokenContext.forInHead)\n ) {\n return true;\n }\n return (tokenContext & TokenContext.forOfHead) > 0;\n }\n }\n\n // ECMAScript specifically forbids a for-of loop from starting with the\n // token sequence `for (async of`, because it would be ambiguous with\n // `for (async of => {};;)`, so we need to add extra parentheses.\n return (\n parentId === __node(\"ForOfStatement\") &&\n parent.left === node &&\n node.name === \"async\" &&\n !parent.await\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AAA0C;EAPxCE,kBAAkB;EAClBC,0BAA0B;EAC1BC,iBAAiB;EACjBC;AAAW,IAAAN,EAAA;AAMb,MAAMO,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,CAAC,IAAI,EAAE,CAAC,CAAC,EACT,CAAC,IAAI,EAAE,CAAC,CAAC,EACT,CAAC,IAAI,EAAE,CAAC,CAAC,EACT,CAAC,GAAG,EAAE,CAAC,CAAC,EACR,CAAC,GAAG,EAAE,CAAC,CAA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vBjF,kBAAkB,CAACU,MAAM,EAAE;QACzBI,MAAM,EAAEL,IAAI;QACZyE,QAAQ,EAAE;MACZ,CAAC,CAAC,IACFjF,0BAA0B,CAACS,MAAM,EAAE;QACjCI,MAAM,EAAEL,IAAI;QACZyE,QAAQ,EAAE,IAAI;QACdC,QAAQ,EAAE;MACZ,CAAC,CAAC;MACJ,IACEF,mBAAmB,IACnB9D,YAAY,IACTC,mBAAY,CAACI,mBAAmB,GAC/BJ,mBAAY,CAAC2D,WAAW,GACxB3D,mBAAY,CAAC4D,SAAS,CAAC,EAC3B;QACA,OAAO,IAAI;MACb;MACA,OAAO,CAAC7D,YAAY,GAAGC,mBAAY,CAAC0D,SAAS,IAAI,CAAC;IACpD;EACF;EAKA,OACEnE,QAAQ,OAA6B,IACrCD,MAAM,CAAC0B,IAAI,KAAK3B,IAAI,IACpBA,IAAI,CAACgE,IAAI,KAAK,OAAO,IACrB,CAAC/D,MAAM,CAAC0E,KAAK;AAEjB","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/nodes.js b/node_modules/@babel/generator/lib/nodes.js deleted file mode 100644 index 8754a38..0000000 --- a/node_modules/@babel/generator/lib/nodes.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.generatorInfosMap = void 0; -var generatorFunctions = require("./generators/index.js"); -var deprecatedGeneratorFunctions = require("./generators/deprecated.js"); -const generatorInfosMap = exports.generatorInfosMap = new Map(); -let index = 0; -for (const key of Object.keys(generatorFunctions).sort()) { - if (key.startsWith("_")) continue; - generatorInfosMap.set(key, [generatorFunctions[key], index++, undefined]); -} -for (const key of Object.keys(deprecatedGeneratorFunctions)) { - generatorInfosMap.set(key, [deprecatedGeneratorFunctions[key], index++, undefined]); -} - -//# sourceMappingURL=nodes.js.map diff --git a/node_modules/@babel/generator/lib/nodes.js.map b/node_modules/@babel/generator/lib/nodes.js.map deleted file mode 100644 index 6aa8283..0000000 --- a/node_modules/@babel/generator/lib/nodes.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["generatorFunctions","require","deprecatedGeneratorFunctions","generatorInfosMap","exports","Map","index","key","Object","keys","sort","startsWith","set","undefined"],"sources":["../src/nodes.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\n\nimport * as generatorFunctions from \"./generators/index.ts\";\nimport * as deprecatedGeneratorFunctions from \"./generators/deprecated.ts\";\nimport type { NodeHandler } from \"./node/index.ts\";\nimport type Printer from \"./printer.ts\";\n\ndeclare global {\n function __node(type: t.Node[\"type\"]): number;\n}\n\nconst generatorInfosMap = new Map<\n string,\n [\n (this: Printer, node: t.Node, parent?: t.Node | null) => void,\n number,\n NodeHandler | undefined,\n ]\n>();\nlet index = 0;\n\nfor (const key of Object.keys(generatorFunctions).sort() as Exclude<\n keyof typeof generatorFunctions,\n `_${string}`\n>[]) {\n if (key.startsWith(\"_\")) continue;\n generatorInfosMap.set(key, [generatorFunctions[key], index++, undefined]);\n}\nif (!process.env.BABEL_8_BREAKING) {\n for (const key of Object.keys(\n deprecatedGeneratorFunctions,\n ) as (keyof typeof deprecatedGeneratorFunctions)[]) {\n generatorInfosMap.set(key, [\n deprecatedGeneratorFunctions[key],\n index++,\n undefined,\n ]);\n }\n}\n\nexport { generatorInfosMap };\n"],"mappings":";;;;;;AAEA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,4BAAA,GAAAD,OAAA;AAQA,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAIE,GAAG,CAO/B,CAAC;AACH,IAAIC,KAAK,GAAG,CAAC;AAEb,KAAK,MAAMC,GAAG,IAAIC,MAAM,CAACC,IAAI,CAACT,kBAAkB,CAAC,CAACU,IAAI,CAAC,CAAC,EAGnD;EACH,IAAIH,GAAG,CAACI,UAAU,CAAC,GAAG,CAAC,EAAE;EACzBR,iBAAiB,CAACS,GAAG,CAACL,GAAG,EAAE,CAACP,kBAAkB,CAACO,GAAG,CAAC,EAAED,KAAK,EAAE,EAAEO,SAAS,CAAC,CAAC;AAC3E;AAEE,KAAK,MAAMN,GAAG,IAAIC,MAAM,CAACC,IAAI,CAC3BP,4BACF,CAAC,EAAmD;EAClDC,iBAAiB,CAACS,GAAG,CAACL,GAAG,EAAE,CACzBL,4BAA4B,CAACK,GAAG,CAAC,EACjCD,KAAK,EAAE,EACPO,SAAS,CACV,CAAC;AACJ","ignoreList":[]} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js deleted file mode 100644 index ffdd45f..0000000 --- a/node_modules/@babel/generator/lib/printer.js +++ /dev/null @@ -1,782 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _buffer = require("./buffer.js"); -var _index = require("./node/index.js"); -var _nodes = require("./nodes.js"); -var _t = require("@babel/types"); -var _tokenMap = require("./token-map.js"); -var _types2 = require("./generators/types.js"); -const { - isExpression, - isFunction, - isStatement, - isClassBody, - isTSInterfaceBody, - isTSEnumMember -} = _t; -const SCIENTIFIC_NOTATION = /e/i; -const ZERO_DECIMAL_INTEGER = /\.0+$/; -const HAS_NEWLINE = /[\n\r\u2028\u2029]/; -const HAS_NEWLINE_OR_BlOCK_COMMENT_END = /[\n\r\u2028\u2029]|\*\//; -function commentIsNewline(c) { - return c.type === "CommentLine" || HAS_NEWLINE.test(c.value); -} -class Printer { - constructor(format, map, tokens = null, originalCode = null) { - this.tokenContext = _index.TokenContext.normal; - this._tokens = null; - this._originalCode = null; - this._currentNode = null; - this._currentTypeId = null; - this._indent = 0; - this._indentRepeat = 0; - this._insideAux = false; - this._noLineTerminator = false; - this._noLineTerminatorAfterNode = null; - this._printAuxAfterOnNextUserNode = false; - this._printedComments = new Set(); - this._lastCommentLine = 0; - this._innerCommentsState = 0; - this._flags = 0; - this.tokenMap = null; - this._boundGetRawIdentifier = null; - this._printSemicolonBeforeNextNode = -1; - this._printSemicolonBeforeNextToken = -1; - this.format = format; - this._tokens = tokens; - this._originalCode = originalCode; - this._indentRepeat = format.indent.style.length; - this._inputMap = (map == null ? void 0 : map._inputMap) || null; - this._buf = new _buffer.default(map, format.indent.style[0]); - const { - preserveFormat, - compact, - concise, - retainLines, - retainFunctionParens - } = format; - if (preserveFormat) { - this._flags |= 1; - } - if (compact) { - this._flags |= 2; - } - if (concise) { - this._flags |= 4; - } - if (retainLines) { - this._flags |= 8; - } - if (retainFunctionParens) { - this._flags |= 16; - } - if (format.auxiliaryCommentBefore || format.auxiliaryCommentAfter) { - this._flags |= 32; - } - } - enterDelimited() { - const oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode; - if (oldNoLineTerminatorAfterNode !== null) { - this._noLineTerminatorAfterNode = null; - } - return oldNoLineTerminatorAfterNode; - } - generate(ast) { - if (this.format.preserveFormat) { - this.tokenMap = new _tokenMap.TokenMap(ast, this._tokens, this._originalCode); - this._boundGetRawIdentifier = _types2._getRawIdentifier.bind(this); - } - this.print(ast); - this._maybeAddAuxComment(); - return this._buf.get(); - } - indent(flags = this._flags) { - if (flags & (1 | 2 | 4)) { - return; - } - this._indent += this._indentRepeat; - } - dedent(flags = this._flags) { - if (flags & (1 | 2 | 4)) { - return; - } - this._indent -= this._indentRepeat; - } - semicolon(force = false) { - const flags = this._flags; - if (flags & 32) { - this._maybeAddAuxComment(); - } - if (flags & 1) { - const node = this._currentNode; - if (node.start != null && node.end != null) { - if (!this.tokenMap.endMatches(node, ";")) { - this._printSemicolonBeforeNextNode = this._buf.getCurrentLine(); - return; - } - const indexes = this.tokenMap.getIndexes(this._currentNode); - this._catchUpTo(this._tokens[indexes[indexes.length - 1]].loc.start); - } - } - if (force) { - this._appendChar(59); - } else { - this._queue(59); - } - this._noLineTerminator = false; - } - rightBrace(node) { - if (this.format.minified) { - this._buf.removeLastSemicolon(); - } - this.sourceWithOffset("end", node.loc, -1); - this.tokenChar(125); - } - rightParens(node) { - this.sourceWithOffset("end", node.loc, -1); - this.tokenChar(41); - } - space(force = false) { - if (this._flags & (1 | 2)) { - return; - } - if (force) { - this._space(); - } else { - const lastCp = this.getLastChar(true); - if (lastCp !== 0 && lastCp !== 32 && lastCp !== 10) { - this._space(); - } - } - } - word(str, noLineTerminatorAfter = false) { - this.tokenContext &= _index.TokenContext.forInOrInitHeadAccumulatePassThroughMask; - this._maybePrintInnerComments(str); - const flags = this._flags; - if (flags & 32) { - this._maybeAddAuxComment(); - } - if (flags & 1) this._catchUpToCurrentToken(str); - const lastChar = this.getLastChar(); - if (lastChar === -2 || lastChar === -3 || lastChar === 47 && str.charCodeAt(0) === 47) { - this._space(); - } - this._append(str, false); - this.setLastChar(-3); - this._noLineTerminator = noLineTerminatorAfter; - } - number(str, number) { - function isNonDecimalLiteral(str) { - if (str.length > 2 && str.charCodeAt(0) === 48) { - const secondChar = str.charCodeAt(1); - return secondChar === 98 || secondChar === 111 || secondChar === 120; - } - return false; - } - this.word(str); - if (Number.isInteger(number) && !isNonDecimalLiteral(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46) { - this.setLastChar(-2); - } - } - token(str, maybeNewline = false, occurrenceCount = 0, mayNeedSpace = false) { - this.tokenContext &= _index.TokenContext.forInOrInitHeadAccumulatePassThroughMask; - this._maybePrintInnerComments(str, occurrenceCount); - const flags = this._flags; - if (flags & 32) { - this._maybeAddAuxComment(); - } - if (flags & 1) { - this._catchUpToCurrentToken(str, occurrenceCount); - } - if (mayNeedSpace) { - const strFirst = str.charCodeAt(0); - if ((strFirst === 45 && str === "--" || strFirst === 61) && this.getLastChar() === 33 || strFirst === 43 && this.getLastChar() === 43 || strFirst === 45 && this.getLastChar() === 45 || strFirst === 46 && this.getLastChar() === -2) { - this._space(); - } - } - this._append(str, maybeNewline); - this._noLineTerminator = false; - } - tokenChar(char, occurrenceCount = 0) { - this.tokenContext &= _index.TokenContext.forInOrInitHeadAccumulatePassThroughMask; - this._maybePrintInnerComments(char, occurrenceCount); - const flags = this._flags; - if (flags & 32) { - this._maybeAddAuxComment(); - } - if (flags & 1) { - this._catchUpToCurrentToken(char, occurrenceCount); - } - if (char === 43 && this.getLastChar() === 43 || char === 45 && this.getLastChar() === 45 || char === 46 && this.getLastChar() === -2) { - this._space(); - } - this._appendChar(char); - this._noLineTerminator = false; - } - newline(i = 1, flags = this._flags) { - if (i <= 0) return; - if (flags & (8 | 2)) { - return; - } - if (flags & 4) { - this.space(); - return; - } - if (i > 2) i = 2; - i -= this._buf.getNewlineCount(); - for (let j = 0; j < i; j++) { - this._newline(); - } - } - endsWith(char) { - return this.getLastChar(true) === char; - } - getLastChar(checkQueue) { - return this._buf.getLastChar(checkQueue); - } - setLastChar(char) { - this._buf._last = char; - } - exactSource(loc, cb) { - if (!loc) { - cb(); - return; - } - this._catchUp("start", loc); - this._buf.exactSource(loc, cb); - } - source(prop, loc) { - if (!loc) return; - this._catchUp(prop, loc); - this._buf.source(prop, loc); - } - sourceWithOffset(prop, loc, columnOffset) { - if (!loc || this.format.preserveFormat) return; - this._catchUp(prop, loc); - this._buf.sourceWithOffset(prop, loc, columnOffset); - } - sourceIdentifierName(identifierName, pos) { - if (!this._buf._canMarkIdName) return; - const sourcePosition = this._buf._sourcePosition; - sourcePosition.identifierNamePos = pos; - sourcePosition.identifierName = identifierName; - } - _space() { - this._queue(32); - } - _newline() { - if (this._buf._queuedChar === 32) this._buf._queuedChar = 0; - this._appendChar(10, true); - } - _catchUpToCurrentToken(str, occurrenceCount = 0) { - const token = this.tokenMap.findMatching(this._currentNode, str, occurrenceCount); - if (token) this._catchUpTo(token.loc.start); - if (this._printSemicolonBeforeNextToken !== -1 && this._printSemicolonBeforeNextToken === this._buf.getCurrentLine()) { - this._appendChar(59, true); - } - this._printSemicolonBeforeNextToken = -1; - this._printSemicolonBeforeNextNode = -1; - } - _append(str, maybeNewline) { - this._maybeIndent(); - this._buf.append(str, maybeNewline); - } - _appendChar(char, noIndent) { - if (!noIndent) { - this._maybeIndent(); - } - this._buf.appendChar(char); - } - _queue(char) { - this._buf.queue(char); - this.setLastChar(-1); - } - _maybeIndent() { - const indent = this._shouldIndent(); - if (indent > 0) { - this._buf._appendChar(-1, indent, false); - } - } - _shouldIndent() { - return this.endsWith(10) ? this._indent : 0; - } - catchUp(line) { - if (!this.format.retainLines) return; - const count = line - this._buf.getCurrentLine(); - for (let i = 0; i < count; i++) { - this._newline(); - } - } - _catchUp(prop, loc) { - const flags = this._flags; - if ((flags & 1) === 0) { - if (flags & 8 && loc != null && loc[prop]) { - this.catchUp(loc[prop].line); - } - return; - } - const pos = loc == null ? void 0 : loc[prop]; - if (pos != null) this._catchUpTo(pos); - } - _catchUpTo({ - line, - column, - index - }) { - const count = line - this._buf.getCurrentLine(); - if (count > 0 && this._noLineTerminator) { - return; - } - for (let i = 0; i < count; i++) { - this._newline(); - } - const spacesCount = count > 0 ? column : column - this._buf.getCurrentColumn(); - if (spacesCount > 0) { - const spaces = this._originalCode ? this._originalCode.slice(index - spacesCount, index).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu, " ") : " ".repeat(spacesCount); - this._append(spaces, false); - this.setLastChar(32); - } - } - printTerminatorless(node) { - this._noLineTerminator = true; - this.print(node); - } - print(node, noLineTerminatorAfter = false, resetTokenContext = false, trailingCommentsLineOffset) { - var _node$leadingComments, _node$leadingComments2; - if (!node) return; - this._innerCommentsState = 0; - const { - type, - loc, - extra - } = node; - const flags = this._flags; - let changedFlags = false; - if (node._compact) { - this._flags |= 4; - changedFlags = true; - } - const nodeInfo = _nodes.generatorInfosMap.get(type); - if (nodeInfo === undefined) { - throw new ReferenceError(`unknown node of type ${JSON.stringify(type)} with constructor ${JSON.stringify(node.constructor.name)}`); - } - const [printMethod, nodeId, needsParens] = nodeInfo; - const parent = this._currentNode; - const parentId = this._currentTypeId; - this._currentNode = node; - this._currentTypeId = nodeId; - if (flags & 1) { - this._printSemicolonBeforeNextToken = this._printSemicolonBeforeNextNode; - } - let oldInAux; - if (flags & 32) { - oldInAux = this._insideAux; - this._insideAux = loc == null; - this._maybeAddAuxComment(this._insideAux && !oldInAux); - } - let oldTokenContext = 0; - if (resetTokenContext) { - oldTokenContext = this.tokenContext; - if (oldTokenContext & _index.TokenContext.forInOrInitHeadAccumulate) { - this.tokenContext = 0; - } else { - oldTokenContext = 0; - } - } - const parenthesized = extra != null && extra.parenthesized; - let shouldPrintParens = parenthesized && flags & 1 || parenthesized && flags & 16 && nodeId === 71 || parent && ((0, _index.parentNeedsParens)(node, parent, parentId) || needsParens != null && needsParens(node, parent, parentId, this.tokenContext, flags & 1 ? this._boundGetRawIdentifier : undefined)); - if (!shouldPrintParens && parenthesized && (_node$leadingComments = node.leadingComments) != null && _node$leadingComments.length && node.leadingComments[0].type === "CommentBlock") { - switch (parentId) { - case 65: - case 243: - case 6: - case 143: - break; - case 17: - case 130: - case 112: - if (parent.callee !== node) break; - default: - shouldPrintParens = true; - } - } - let indentParenthesized = false; - if (!shouldPrintParens && this._noLineTerminator && ((_node$leadingComments2 = node.leadingComments) != null && _node$leadingComments2.some(commentIsNewline) || flags & 8 && loc && loc.start.line > this._buf.getCurrentLine())) { - shouldPrintParens = true; - indentParenthesized = true; - } - let oldNoLineTerminatorAfterNode; - if (!shouldPrintParens) { - noLineTerminatorAfter || (noLineTerminatorAfter = !!parent && this._noLineTerminatorAfterNode === parent && (0, _index.isLastChild)(parent, node)); - if (noLineTerminatorAfter) { - var _node$trailingComment; - if ((_node$trailingComment = node.trailingComments) != null && _node$trailingComment.some(commentIsNewline)) { - if (isExpression(node)) shouldPrintParens = true; - } else { - oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode; - this._noLineTerminatorAfterNode = node; - } - } - } - if (shouldPrintParens) { - this.tokenChar(40); - if (indentParenthesized) this.indent(); - this._innerCommentsState = 0; - if (!resetTokenContext) { - oldTokenContext = this.tokenContext; - } - if (oldTokenContext & _index.TokenContext.forInOrInitHeadAccumulate) { - this.tokenContext = 0; - } - oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode; - this._noLineTerminatorAfterNode = null; - } - this._printLeadingComments(node, parent); - this.exactSource(nodeId === 139 || nodeId === 66 ? null : loc, printMethod.bind(this, node, parent)); - if (shouldPrintParens) { - this._printTrailingComments(node, parent); - if (indentParenthesized) { - this.dedent(); - this.newline(); - } - this.tokenChar(41); - this._noLineTerminator = noLineTerminatorAfter; - } else if (noLineTerminatorAfter && !this._noLineTerminator) { - this._noLineTerminator = true; - this._printTrailingComments(node, parent); - } else { - this._printTrailingComments(node, parent, trailingCommentsLineOffset); - } - if (oldTokenContext) this.tokenContext = oldTokenContext; - this._currentNode = parent; - this._currentTypeId = parentId; - if (changedFlags) { - this._flags = flags; - } - if (flags & 32) { - this._insideAux = oldInAux; - } - if (oldNoLineTerminatorAfterNode != null) { - this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode; - } - this._innerCommentsState = 0; - } - _maybeAddAuxComment(enteredPositionlessNode) { - if (enteredPositionlessNode) this._printAuxBeforeComment(); - if (!this._insideAux) this._printAuxAfterComment(); - } - _printAuxBeforeComment() { - if (this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = true; - const comment = this.format.auxiliaryCommentBefore; - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }, 0); - } - } - _printAuxAfterComment() { - if (!this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = false; - const comment = this.format.auxiliaryCommentAfter; - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }, 0); - } - } - getPossibleRaw(node) { - const extra = node.extra; - if ((extra == null ? void 0 : extra.raw) != null && extra.rawValue != null && node.value === extra.rawValue) { - return extra.raw; - } - } - printJoin(nodes, statement, indent, separator, printTrailingSeparator, resetTokenContext, trailingCommentsLineOffset) { - if (!(nodes != null && nodes.length)) return; - const flags = this._flags; - if (indent == null && flags & 8) { - var _nodes$0$loc; - const startLine = (_nodes$0$loc = nodes[0].loc) == null ? void 0 : _nodes$0$loc.start.line; - if (startLine != null && startLine !== this._buf.getCurrentLine()) { - indent = true; - } - } - if (indent) this.indent(flags); - const len = nodes.length; - for (let i = 0; i < len; i++) { - const node = nodes[i]; - if (!node) continue; - if (statement && i === 0 && this._buf.hasContent()) { - this.newline(1, flags); - } - this.print(node, false, resetTokenContext, trailingCommentsLineOffset || 0); - if (separator != null) { - if (i < len - 1) separator.call(this, i, false);else if (printTrailingSeparator) separator.call(this, i, true); - } - if (statement) { - if (i + 1 === len) { - this.newline(1, flags); - } else { - const lastCommentLine = this._lastCommentLine; - if (lastCommentLine > 0) { - var _nodes$loc; - const offset = (((_nodes$loc = nodes[i + 1].loc) == null ? void 0 : _nodes$loc.start.line) || 0) - lastCommentLine; - if (offset >= 0) { - this.newline(offset || 1, flags); - continue; - } - } - this.newline(1, flags); - } - } - } - if (indent) this.dedent(flags); - } - printAndIndentOnComments(node) { - const indent = node.leadingComments && node.leadingComments.length > 0; - if (indent) this.indent(); - this.print(node); - if (indent) this.dedent(); - } - printBlock(body) { - if (body.type !== "EmptyStatement") { - this.space(); - } - this.print(body); - } - _printTrailingComments(node, parent, lineOffset) { - const { - innerComments, - trailingComments - } = node; - if (innerComments != null && innerComments.length) { - this._printComments(2, innerComments, node, parent, lineOffset); - } - if (trailingComments != null && trailingComments.length) { - this._printComments(2, trailingComments, node, parent, lineOffset); - } else { - this._lastCommentLine = 0; - } - } - _printLeadingComments(node, parent) { - const comments = node.leadingComments; - if (!(comments != null && comments.length)) return; - this._printComments(0, comments, node, parent); - } - _maybePrintInnerComments(nextTokenStr, nextTokenOccurrenceCount) { - var _this$tokenMap; - const state = this._innerCommentsState; - switch (state & 3) { - case 0: - this._innerCommentsState = 1 | 4; - return; - case 1: - this.printInnerComments((state & 4) > 0, (_this$tokenMap = this.tokenMap) == null ? void 0 : _this$tokenMap.findMatching(this._currentNode, nextTokenStr, nextTokenOccurrenceCount)); - } - } - printInnerComments(indent = true, nextToken) { - const node = this._currentNode; - const comments = node.innerComments; - if (!(comments != null && comments.length)) { - this._innerCommentsState = 2; - return; - } - const hasSpace = this.endsWith(32); - if (indent) this.indent(); - switch (this._printComments(1, comments, node, undefined, undefined, nextToken)) { - case 2: - this._innerCommentsState = 2; - case 1: - if (hasSpace) this.space(); - } - if (indent) this.dedent(); - } - noIndentInnerCommentsHere() { - this._innerCommentsState &= ~4; - } - printSequence(nodes, indent, resetTokenContext, trailingCommentsLineOffset) { - this.printJoin(nodes, true, indent != null ? indent : false, undefined, undefined, resetTokenContext, trailingCommentsLineOffset); - } - printList(items, printTrailingSeparator, statement, indent, separator, resetTokenContext) { - this.printJoin(items, statement, indent, separator != null ? separator : commaSeparator, printTrailingSeparator, resetTokenContext); - } - shouldPrintTrailingComma(listEnd) { - if (!this.tokenMap) return null; - const listEndIndex = this.tokenMap.findLastIndex(this._currentNode, token => this.tokenMap.matchesOriginal(token, typeof listEnd === "number" ? String.fromCharCode(listEnd) : listEnd)); - if (listEndIndex <= 0) return null; - return this.tokenMap.matchesOriginal(this._tokens[listEndIndex - 1], ","); - } - _shouldPrintComment(comment, nextToken) { - if (comment.ignore) return 0; - if (this._printedComments.has(comment)) return 0; - if (this._noLineTerminator && HAS_NEWLINE_OR_BlOCK_COMMENT_END.test(comment.value)) { - return 2; - } - if (nextToken && this.tokenMap) { - const commentTok = this.tokenMap.find(this._currentNode, token => token.value === comment.value); - if (commentTok && commentTok.start > nextToken.start) { - return 2; - } - } - this._printedComments.add(comment); - if (!this.format.shouldPrintComment(comment.value)) { - return 0; - } - return 1; - } - _printComment(comment, skipNewLines) { - const noLineTerminator = this._noLineTerminator; - const isBlockComment = comment.type === "CommentBlock"; - const printNewLines = isBlockComment && skipNewLines !== 1 && !noLineTerminator; - if (printNewLines && this._buf.hasContent() && skipNewLines !== 2) { - this.newline(1); - } - switch (this.getLastChar(true)) { - case 47: - this._space(); - case 91: - case 123: - case 40: - break; - default: - this.space(); - } - let val; - if (isBlockComment) { - val = `/*${comment.value}*/`; - if (this.format.indent.adjustMultilineComment) { - var _comment$loc; - const offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column; - if (offset) { - const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); - } - if (this._flags & 4) { - val = val.replace(/\n(?!$)/g, `\n`); - } else { - let indentSize = this.format.retainLines ? 0 : this._buf.getCurrentColumn(); - if (this._shouldIndent() || this.format.retainLines) { - indentSize += this._indent; - } - val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`); - } - } - } else if (!noLineTerminator) { - val = `//${comment.value}`; - } else { - val = `/*${comment.value}*/`; - } - this.source("start", comment.loc); - this._append(val, isBlockComment); - if (!isBlockComment && !noLineTerminator) { - this._newline(); - } - if (printNewLines && skipNewLines !== 3) { - this.newline(1); - } - } - _printComments(type, comments, node, parent, lineOffset = 0, nextToken) { - const nodeLoc = node.loc; - const len = comments.length; - let hasLoc = !!nodeLoc; - const nodeStartLine = hasLoc ? nodeLoc.start.line : 0; - const nodeEndLine = hasLoc ? nodeLoc.end.line : 0; - let lastLine = 0; - let leadingCommentNewline = 0; - const { - _noLineTerminator, - _flags - } = this; - for (let i = 0; i < len; i++) { - const comment = comments[i]; - const shouldPrint = this._shouldPrintComment(comment, nextToken); - if (shouldPrint === 2) { - return i === 0 ? 0 : 1; - } - if (hasLoc && comment.loc && shouldPrint === 1) { - const commentStartLine = comment.loc.start.line; - const commentEndLine = comment.loc.end.line; - if (type === 0) { - let offset = 0; - if (i === 0) { - if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine !== commentEndLine)) { - offset = leadingCommentNewline = 1; - } - } else { - offset = commentStartLine - lastLine; - } - lastLine = commentEndLine; - if (offset > 0 && !_noLineTerminator) { - this.newline(offset, _flags); - } - this._printComment(comment, 1); - if (i + 1 === len) { - const count = Math.max(nodeStartLine - lastLine, leadingCommentNewline); - if (count > 0 && !_noLineTerminator) { - this.newline(count, _flags); - } - lastLine = nodeStartLine; - } - } else if (type === 1) { - const offset = commentStartLine - (i === 0 ? nodeStartLine : lastLine); - lastLine = commentEndLine; - if (offset > 0 && !_noLineTerminator) { - this.newline(offset, _flags); - } - this._printComment(comment, 1); - if (i + 1 === len) { - const count = Math.min(1, nodeEndLine - lastLine); - if (count > 0 && !_noLineTerminator) { - this.newline(count, _flags); - } - lastLine = nodeEndLine; - } - } else { - const offset = commentStartLine - (i === 0 ? nodeEndLine - lineOffset : lastLine); - lastLine = commentEndLine; - if (offset > 0 && !_noLineTerminator) { - this.newline(offset, _flags); - } - this._printComment(comment, 1); - } - } else { - hasLoc = false; - if (shouldPrint !== 1) { - continue; - } - if (len === 1) { - const singleLine = comment.loc ? comment.loc.start.line === comment.loc.end.line : !HAS_NEWLINE.test(comment.value); - const shouldSkipNewline = singleLine && !isStatement(node) && !isClassBody(parent) && !isTSInterfaceBody(parent) && !isTSEnumMember(node); - if (type === 0) { - this._printComment(comment, shouldSkipNewline && node.type !== "ObjectExpression" || singleLine && isFunction(parent) && parent.body === node ? 1 : 0); - } else if (shouldSkipNewline && type === 2) { - this._printComment(comment, 1); - } else { - this._printComment(comment, 0); - } - } else if (type === 1 && !(node.type === "ObjectExpression" && node.properties.length > 1) && node.type !== "ClassBody" && node.type !== "TSInterfaceBody") { - this._printComment(comment, i === 0 ? 2 : i === len - 1 ? 3 : 0); - } else { - this._printComment(comment, 0); - } - } - } - if (type === 2 && hasLoc && lastLine) { - this._lastCommentLine = lastLine; - } - return 2; - } -} -var _default = exports.default = Printer; -function commaSeparator(occurrenceCount, last) { - this.tokenChar(44, occurrenceCount); - if (!last) this.space(); -} - -//# sourceMappingURL=printer.js.map diff --git a/node_modules/@babel/generator/lib/printer.js.map b/node_modules/@babel/generator/lib/printer.js.map deleted file mode 100644 index 1576929..0000000 --- a/node_modules/@babel/generator/lib/printer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["_buffer","require","_index","_nodes","_t","_tokenMap","_types2","isExpression","isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumMember","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","HAS_NEWLINE","HAS_NEWLINE_OR_BlOCK_COMMENT_END","commentIsNewline","c","type","test","value","Printer","constructor","format","map","tokens","originalCode","tokenContext","TokenContext","normal","_tokens","_originalCode","_currentNode","_currentTypeId","_indent","_indentRepeat","_insideAux","_noLineTerminator","_noLineTerminatorAfterNode","_printAuxAfterOnNextUserNode","_printedComments","Set","_lastCommentLine","_innerCommentsState","_flags","tokenMap","_boundGetRawIdentifier","_printSemicolonBeforeNextNode","_printSemicolonBeforeNextToken","indent","style","length","_inputMap","_buf","Buffer","preserveFormat","compact","concise","retainLines","retainFunctionParens","auxiliaryCommentBefore","auxiliaryCommentAfter","enterDelimited","oldNoLineTerminatorAfterNode","generate","ast","TokenMap","_getRawIdentifier","bind","print","_maybeAddAuxComment","get","flags","dedent","semicolon","force","node","start","end","endMatches","getCurrentLine","indexes","getIndexes","_catchUpTo","loc","_appendChar","_queue","rightBrace","minified","removeLastSemicolon","sourceWithOffset","token","rightParens","space","_space","lastCp","getLastChar","word","str","noLineTerminatorAfter","forInOrInitHeadAccumulatePassThroughMask","_maybePrintInnerComments","_catchUpToCurrentToken","lastChar","charCodeAt","_append","setLastChar","number","isNonDecimalLiteral","secondChar","Number","isInteger","maybeNewline","occurrenceCount","mayNeedSpace","strFirst","tokenChar","char","newline","i","getNewlineCount","j","_newline","endsWith","checkQueue","_last","exactSource","cb","_catchUp","source","prop","columnOffset","sourceIdentifierName","identifierName","pos","_canMarkIdName","sourcePosition","_sourcePosition","identifierNamePos","_queuedChar","findMatching","_maybeIndent","append","noIndent","appendChar","queue","_shouldIndent","catchUp","line","count","column","index","spacesCount","getCurrentColumn","spaces","slice","replace","repeat","printTerminatorless","resetTokenContext","trailingCommentsLineOffset","_node$leadingComments","_node$leadingComments2","extra","changedFlags","_compact","nodeInfo","generatorInfosMap","undefined","ReferenceError","JSON","stringify","name","printMethod","nodeId","needsParens","parent","parentId","oldInAux","oldTokenContext","forInOrInitHeadAccumulate","parenthesized","shouldPrintParens","parentNeedsParens","leadingComments","callee","indentParenthesized","some","isLastChild","_node$trailingComment","trailingComments","_printLeadingComments","_printTrailingComments","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","_printComment","getPossibleRaw","raw","rawValue","printJoin","nodes","statement","separator","printTrailingSeparator","_nodes$0$loc","startLine","len","hasContent","call","lastCommentLine","_nodes$loc","offset","printAndIndentOnComments","printBlock","body","lineOffset","innerComments","_printComments","comments","nextTokenStr","nextTokenOccurrenceCount","_this$tokenMap","state","printInnerComments","nextToken","hasSpace","noIndentInnerCommentsHere","printSequence","printList","items","commaSeparator","shouldPrintTrailingComma","listEnd","listEndIndex","findLastIndex","matchesOriginal","String","fromCharCode","_shouldPrintComment","ignore","has","commentTok","find","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","val","adjustMultilineComment","_comment$loc","newlineRegex","RegExp","indentSize","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","_default","exports","default","last"],"sources":["../src/printer.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */\n\nimport Buffer from \"./buffer.ts\";\nimport type { Loc, Pos } from \"./buffer.ts\";\nimport { isLastChild, parentNeedsParens } from \"./node/index.ts\";\nimport { generatorInfosMap } from \"./nodes.ts\";\nimport type * as t from \"@babel/types\";\nimport {\n isExpression,\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumMember,\n} from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport { TokenMap } from \"./token-map.ts\";\n\nimport type { GeneratorOptions } from \"./index.ts\";\nimport type SourceMap from \"./source-map.ts\";\nimport type { TraceMap } from \"@jridgewell/trace-mapping\";\nimport type { Token } from \"@babel/parser\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst HAS_NEWLINE = /[\\n\\r\\u2028\\u2029]/;\nconst HAS_NEWLINE_OR_BlOCK_COMMENT_END = /[\\n\\r\\u2028\\u2029]|\\*\\//;\n\nfunction commentIsNewline(c: t.Comment) {\n return c.type === \"CommentLine\" || HAS_NEWLINE.test(c.value);\n}\n\nimport { TokenContext } from \"./node/index.ts\";\nimport { _getRawIdentifier } from \"./generators/types.ts\";\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n ALL,\n LEADING,\n TRAILING,\n}\n\nconst enum PRINT_COMMENT_HINT {\n SKIP,\n ALLOW,\n DEFER,\n}\n\nconst enum PRINTER_FLAGS {\n EMPTY = 0,\n PRESERVE_FORMAT = 1 << 0,\n COMPACT = 1 << 1,\n CONCISE = 1 << 2,\n RETAIN_LINES = 1 << 3,\n RETAIN_FUNCTION_PARENS = 1 << 4,\n AUX_COMMENTS = 1 << 5,\n}\n\nconst enum LAST_CHAR_KINDS {\n EMPTY = 0,\n NORMAL = -1,\n INTEGER = -2,\n WORD = -3,\n}\n\nconst enum INNER_COMMENTS_STATE {\n DISALLOWED = 0,\n ALLOWED = 1,\n PRINTED = 2,\n\n WITH_INDENT = 4,\n MASK = 3,\n}\n\nconst enum PRINT_COMMENTS_RESULT {\n PRINTED_NONE = 0,\n PRINTED_SOME = 1,\n PRINTED_ALL = 2,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n preserveFormat: boolean | undefined;\n retainLines: boolean | undefined;\n retainFunctionParens: boolean | undefined;\n comments: boolean | undefined;\n auxiliaryCommentBefore: string | undefined;\n auxiliaryCommentAfter: string | undefined;\n compact: boolean | \"auto\" | undefined;\n minified: boolean | undefined;\n concise: boolean | undefined;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n /**\n * @deprecated Removed in Babel 8, syntax type is always 'hash'\n */\n recordAndTupleSyntaxType?: GeneratorOptions[\"recordAndTupleSyntaxType\"];\n jsescOption: jsescOptions;\n /**\n * @deprecated Removed in Babel 8, use `jsescOption` instead\n */\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies’ topic references.\n */\n topicToken?: GeneratorOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n /**\n * The import attributes syntax style:\n * - \"with\" : `import { a } from \"b\" with { type: \"json\" };`\n * - \"assert\" : `import { a } from \"b\" assert { type: \"json\" };`\n * - \"with-legacy\" : `import { a } from \"b\" with type: \"json\";`\n * @deprecated Removed in Babel 8.\n */\n importAttributesKeyword?: \"with\" | \"assert\" | \"with-legacy\";\n};\n\ninterface PrintSequenceOptions {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer, occurrenceCount: number, last: boolean) => void;\n statement?: boolean;\n indent?: boolean;\n printTrailingSeparator?: boolean;\n}\n\nexport type PrintJoinOptions = PrintListOptions & PrintSequenceOptions;\nclass Printer {\n constructor(\n format: Format,\n map: SourceMap | null,\n tokens: Token[] | null = null,\n originalCode: string | null = null,\n ) {\n this.format = format;\n\n this._tokens = tokens;\n this._originalCode = originalCode;\n\n this._indentRepeat = format.indent.style.length;\n\n this._inputMap = map?._inputMap || null;\n\n this._buf = new Buffer(map, format.indent.style[0]);\n\n const {\n preserveFormat,\n compact,\n concise,\n retainLines,\n retainFunctionParens,\n } = format;\n if (preserveFormat) {\n this._flags |= PRINTER_FLAGS.PRESERVE_FORMAT;\n }\n if (compact) {\n this._flags |= PRINTER_FLAGS.COMPACT;\n }\n if (concise) {\n this._flags |= PRINTER_FLAGS.CONCISE;\n }\n if (retainLines) {\n this._flags |= PRINTER_FLAGS.RETAIN_LINES;\n }\n if (retainFunctionParens) {\n this._flags |= PRINTER_FLAGS.RETAIN_FUNCTION_PARENS;\n }\n if (format.auxiliaryCommentBefore || format.auxiliaryCommentAfter) {\n this._flags |= PRINTER_FLAGS.AUX_COMMENTS;\n }\n }\n declare _inputMap: TraceMap | null;\n\n declare format: Format;\n\n enterDelimited() {\n const oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode;\n if (oldNoLineTerminatorAfterNode !== null) {\n this._noLineTerminatorAfterNode = null;\n }\n return oldNoLineTerminatorAfterNode;\n }\n\n tokenContext: number = TokenContext.normal;\n\n _tokens: Token[] | null = null;\n _originalCode: string | null = null;\n\n declare _buf: Buffer;\n _currentNode: t.Node | null = null;\n _currentTypeId: number | null = null;\n _indent: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _noLineTerminator: boolean = false;\n _noLineTerminatorAfterNode: t.Node | null = null;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set();\n _lastCommentLine = 0;\n _innerCommentsState = INNER_COMMENTS_STATE.DISALLOWED;\n _flags = PRINTER_FLAGS.EMPTY;\n\n tokenMap: TokenMap | null = null;\n\n _boundGetRawIdentifier: ((node: t.Identifier) => string) | null = null;\n\n generate(ast: t.Node) {\n if (this.format.preserveFormat) {\n this.tokenMap = new TokenMap(ast, this._tokens!, this._originalCode!);\n this._boundGetRawIdentifier = _getRawIdentifier.bind(this);\n }\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(flags = this._flags): void {\n if (\n flags &\n (PRINTER_FLAGS.PRESERVE_FORMAT |\n PRINTER_FLAGS.COMPACT |\n PRINTER_FLAGS.CONCISE)\n ) {\n return;\n }\n\n this._indent += this._indentRepeat;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(flags = this._flags): void {\n if (\n flags &\n (PRINTER_FLAGS.PRESERVE_FORMAT |\n PRINTER_FLAGS.COMPACT |\n PRINTER_FLAGS.CONCISE)\n ) {\n return;\n }\n\n this._indent -= this._indentRepeat;\n }\n\n /**\n * If the next token is on the same line, we must first print a semicolon.\n * This option is only used in `preserveFormat` node, for semicolons that\n * might have omitted due to them being absent in the original code (thanks\n * to ASI).\n *\n * We need both *NextToken and *NextNode because we only want to insert the\n * semicolon when the next token starts a new node, and not in cases like\n * foo} (where } is not starting a new node). So we first set *NextNode, and\n * then the print() method will move it to *NextToken.\n */\n _printSemicolonBeforeNextNode: number = -1;\n _printSemicolonBeforeNextToken: number = -1;\n\n /**\n * Add a semicolon to the buffer.\n */\n semicolon(force: boolean = false): void {\n const flags = this._flags;\n if (flags & PRINTER_FLAGS.AUX_COMMENTS) {\n this._maybeAddAuxComment();\n }\n if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) {\n const node = this._currentNode!;\n if (node.start != null && node.end != null) {\n if (!this.tokenMap!.endMatches(node, \";\")) {\n // no semicolon\n this._printSemicolonBeforeNextNode = this._buf.getCurrentLine();\n return;\n }\n const indexes = this.tokenMap!.getIndexes(this._currentNode!)!;\n this._catchUpTo(this._tokens![indexes[indexes.length - 1]].loc.start);\n }\n }\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n this._noLineTerminator = false;\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(node: t.Node): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.sourceWithOffset(\"end\", node.loc, -1);\n this.token(\"}\");\n }\n\n rightParens(node: t.Node): void {\n this.sourceWithOffset(\"end\", node.loc, -1);\n this.token(\")\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this._flags & (PRINTER_FLAGS.PRESERVE_FORMAT | PRINTER_FLAGS.COMPACT)) {\n return;\n }\n\n if (force) {\n this._space();\n } else {\n const lastCp = this.getLastChar(true);\n if (\n lastCp !== 0 &&\n lastCp !== charCodes.space &&\n lastCp !== charCodes.lineFeed\n ) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string, noLineTerminatorAfter: boolean = false): void {\n this.tokenContext &= TokenContext.forInOrInitHeadAccumulatePassThroughMask;\n\n this._maybePrintInnerComments(str);\n\n const flags = this._flags;\n if (flags & PRINTER_FLAGS.AUX_COMMENTS) {\n this._maybeAddAuxComment();\n }\n\n if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) this._catchUpToCurrentToken(str);\n\n const lastChar = this.getLastChar();\n\n if (\n lastChar === LAST_CHAR_KINDS.INTEGER ||\n lastChar === LAST_CHAR_KINDS.WORD ||\n // prevent concatenating words and creating // comment out of division and regex\n (lastChar === charCodes.slash && str.charCodeAt(0) === charCodes.slash)\n ) {\n this._space();\n }\n this._append(str, false);\n\n this.setLastChar(-3);\n this._noLineTerminator = noLineTerminatorAfter;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string, number?: number): void {\n // const NON_DECIMAL_LITERAL = /^0[box]/;\n function isNonDecimalLiteral(str: string) {\n if (str.length > 2 && str.charCodeAt(0) === charCodes.digit0) {\n const secondChar = str.charCodeAt(1);\n return (\n secondChar === charCodes.lowercaseB ||\n secondChar === charCodes.lowercaseO ||\n secondChar === charCodes.lowercaseX\n );\n }\n return false;\n }\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted immediately after them.\n if (\n Number.isInteger(number) &&\n !isNonDecimalLiteral(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot\n ) {\n this.setLastChar(LAST_CHAR_KINDS.INTEGER);\n }\n }\n\n /**\n * Writes a simple token.\n *\n * @param {string} str The string to append.\n * @param {boolean} [maybeNewline=false] Wether `str` might potentially\n * contain a line terminator or not.\n * @param {number} [occurrenceCount=0] The occurrence count of this token in\n * the current node. This is used when printing in `preserveFormat` mode,\n * to know which token we should map to (for example, to disambiguate the\n * commas in an array literal).\n */\n token(\n str: string,\n maybeNewline = false,\n occurrenceCount = 0,\n mayNeedSpace: boolean = false,\n ): void {\n this.tokenContext &= TokenContext.forInOrInitHeadAccumulatePassThroughMask;\n\n this._maybePrintInnerComments(str, occurrenceCount);\n\n const flags = this._flags;\n\n if (flags & PRINTER_FLAGS.AUX_COMMENTS) {\n this._maybeAddAuxComment();\n }\n\n if (flags & PRINTER_FLAGS.PRESERVE_FORMAT) {\n this._catchUpToCurrentToken(str, occurrenceCount);\n }\n\n if (mayNeedSpace) {\n const strFirst = str.charCodeAt(0);\n if (\n // space is mandatory to avoid outputting ` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n comments?.push(comment);\n }\n } else {\n break loop;\n }\n } else if (\n ch === charCodes.lessThan &&\n !this.inModule &&\n this.optionFlags & OptionFlags.AnnexB\n ) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // ` - - -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) -to get your logo on our READMEs and [website](https://eslint.org/sponsors). - -

Platinum Sponsors

-

Gold Sponsors

-

Qlty Software

Silver Sponsors

-

Vite Liftoff StackBlitz

Bronze Sponsors

-

Cybozu SAP CrawlJobs aeriusventilation's Org Depot Icons8 Discord GitBook HeroCoders TestMu AI Open Source Office (Formerly LambdaTest)

-

Technology Sponsors

-Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. -

Netlify Algolia 1Password

- diff --git a/node_modules/@eslint/config-array/dist/cjs/index.cjs b/node_modules/@eslint/config-array/dist/cjs/index.cjs deleted file mode 100644 index 34dbbc1..0000000 --- a/node_modules/@eslint/config-array/dist/cjs/index.cjs +++ /dev/null @@ -1,1541 +0,0 @@ -'use strict'; - -var posixPath = require('./std__path/posix.cjs'); -var windowsPath = require('./std__path/windows.cjs'); -var minimatch = require('minimatch'); -var createDebug = require('debug'); -var objectSchema = require('@eslint/object-schema'); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); -} - -var posixPath__namespace = /*#__PURE__*/_interopNamespaceDefault(posixPath); -var windowsPath__namespace = /*#__PURE__*/_interopNamespaceDefault(windowsPath); - -/** - * @fileoverview ConfigSchema - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - -/** @import * as $eslintobjectschema from "@eslint/object-schema"; */ -/** @typedef {$eslintobjectschema.PropertyDefinition} PropertyDefinition */ -/** @typedef {$eslintobjectschema.ObjectDefinition} ObjectDefinition */ - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * A strategy that does nothing. - * @type {PropertyDefinition} - */ -const NOOP_STRATEGY = { - required: false, - merge() { - return undefined; - }, - validate() {}, -}; - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * The base schema that every ConfigArray uses. - * @type {ObjectDefinition} - */ -const baseSchema = Object.freeze({ - name: { - required: false, - merge() { - return undefined; - }, - validate(value) { - if (typeof value !== "string") { - throw new TypeError("Property must be a string."); - } - }, - }, - basePath: NOOP_STRATEGY, - files: NOOP_STRATEGY, - ignores: NOOP_STRATEGY, -}); - -/** - * @fileoverview ConfigSchema - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Asserts that a given value is an array. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array. - */ -function assertIsArray(value) { - if (!Array.isArray(value)) { - throw new TypeError("Expected value to be an array."); - } -} - -/** - * Asserts that a given value is an array containing only strings and functions. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array of strings and functions. - */ -function assertIsArrayOfStringsAndFunctions(value) { - assertIsArray(value); - - if ( - value.some( - item => typeof item !== "string" && typeof item !== "function", - ) - ) { - throw new TypeError( - "Expected array to only contain strings and functions.", - ); - } -} - -/** - * Asserts that a given value is a non-empty array. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array or an empty array. - */ -function assertIsNonEmptyArray(value) { - if (!Array.isArray(value) || value.length === 0) { - throw new TypeError("Expected value to be a non-empty array."); - } -} - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * The schema for `files` and `ignores` that every ConfigArray uses. - * @type {ObjectDefinition} - */ -const filesAndIgnoresSchema = Object.freeze({ - basePath: { - required: false, - merge() { - return undefined; - }, - validate(value) { - if (typeof value !== "string") { - throw new TypeError("Expected value to be a string."); - } - }, - }, - files: { - required: false, - merge() { - return undefined; - }, - validate(value) { - // first check if it's an array - assertIsNonEmptyArray(value); - - // then check each member - value.forEach(item => { - if (Array.isArray(item)) { - assertIsArrayOfStringsAndFunctions(item); - } else if ( - typeof item !== "string" && - typeof item !== "function" - ) { - throw new TypeError( - "Items must be a string, a function, or an array of strings and functions.", - ); - } - }); - }, - }, - ignores: { - required: false, - merge() { - return undefined; - }, - validate: assertIsArrayOfStringsAndFunctions, - }, -}); - -/** - * @fileoverview ConfigArray - * @author Nicholas C. Zakas - */ - - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.ConfigObject} ConfigObject */ -/** @typedef {$typests.FileMatcher} FileMatcher */ -/** @typedef {$typests.FilesMatcher} FilesMatcher */ -/** @typedef {$typests.ExtraConfigType} ExtraConfigType */ -/** @import * as $minimatch from "minimatch"; */ -/** @typedef {$minimatch.MinimatchOptions} MinimatchOptions */ -/** @import * as PathImpl from "@jsr/std__path" */ - -/* - * This is a bit of a hack to make TypeScript happy with the Rollup-created - * CommonJS file. Rollup doesn't do object destructuring for imported files - * and instead imports the default via `require()`. This messes up type checking - * for `ObjectSchema`. To work around that, we just import the type manually - * and give it a different name to use in the JSDoc comments. - */ -/** @typedef {ObjectSchema} ObjectSchemaInstance */ - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const debug = createDebug("@eslint/config-array"); - -/** - * A cache for minimatch instances. - * @type {Map} - */ -const minimatchCache = new Map(); - -/** - * A cache for negated minimatch instances. - * @type {Map} - */ -const negatedMinimatchCache = new Map(); - -/** - * Options to use with minimatch. - * @type {MinimatchOptions} - */ -const MINIMATCH_OPTIONS = { - // matchBase: true, - dot: true, -}; - -/** - * The types of config objects that are supported. - * @type {Set} - */ -const CONFIG_TYPES = new Set(["array", "function"]); - -/** - * Fields that are considered metadata and not part of the config object. - * @type {Set} - */ -const META_FIELDS = new Set(["name", "basePath"]); - -/** - * A schema containing just files and ignores for early validation. - * @type {ObjectSchemaInstance} - */ -const FILES_AND_IGNORES_SCHEMA = new objectSchema.ObjectSchema(filesAndIgnoresSchema); - -// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`. - -const CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: "external" }); -const CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: "ignored" }); -const CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({ - status: "unconfigured", -}); - -// Match two leading dots followed by a slash or the end of input. -const EXTERNAL_PATH_REGEX = /^\.\.(?:\/|$)/u; - -/** - * Wrapper error for config validation errors that adds a name to the front of the - * error message. - */ -class ConfigError extends Error { - /** - * Creates a new instance. - * @param {string} name The config object name causing the error. - * @param {number} index The index of the config object in the array. - * @param {Object} options The options for the error. - * @param {Error} [options.cause] The error that caused this error. - * @param {string} [options.message] The message to use for the error. - */ - constructor(name, index, { cause, message }) { - const finalMessage = message || cause.message; - - super(`Config ${name}: ${finalMessage}`, { cause }); - - // copy over custom properties that aren't represented - if (cause) { - for (const key of Object.keys(cause)) { - if (!(key in this)) { - this[key] = cause[key]; - } - } - } - - /** - * The name of the error. - * @type {string} - * @readonly - */ - this.name = "ConfigError"; - - /** - * The index of the config object in the array. - * @type {number} - * @readonly - */ - this.index = index; - } -} - -/** - * Gets the name of a config object. - * @param {ConfigObject} config The config object to get the name of. - * @returns {string} The name of the config object. - */ -function getConfigName(config) { - if (config && typeof config.name === "string" && config.name) { - return `"${config.name}"`; - } - - return "(unnamed)"; -} - -/** - * Rethrows a config error with additional information about the config object. - * @param {ConfigObject} config The config object to get the name of. - * @param {number} index The index of the config object in the array. - * @param {Error} error The error to rethrow. - * @throws {ConfigError} When the error is rethrown for a config. - */ -function rethrowConfigError(config, index, error) { - const configName = getConfigName(config); - throw new ConfigError(configName, index, { cause: error }); -} - -/** - * Shorthand for checking if a value is a string. - * @param {any} value The value to check. - * @returns {value is string} True if a string, false if not. - */ -function isString(value) { - return typeof value === "string"; -} - -/** - * Creates a function that asserts that the config is valid - * during normalization. This checks that the config is not nullish - * and that files and ignores keys of a config object are valid as per base schema. - * @param {Object} config The config object to check. - * @param {number} index The index of the config object in the array. - * @returns {void} - * @throws {ConfigError} If the files and ignores keys of a config object are not valid. - */ -function assertValidBaseConfig(config, index) { - if (config === null) { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected null config.", - }); - } - - if (config === undefined) { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected undefined config.", - }); - } - - if (typeof config !== "object") { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected non-object config.", - }); - } - - const validateConfig = {}; - - if ("basePath" in config) { - validateConfig.basePath = config.basePath; - } - - if ("files" in config) { - validateConfig.files = config.files; - } - - if ("ignores" in config) { - validateConfig.ignores = config.ignores; - } - - try { - FILES_AND_IGNORES_SCHEMA.validate(validateConfig); - } catch (validationError) { - rethrowConfigError(config, index, validationError); - } -} - -/** - * Wrapper around minimatch that caches minimatch patterns for - * faster matching speed over multiple file path evaluations. - * @param {string} filepath The file path to match. - * @param {string} pattern The glob pattern to match against. - * @param {MinimatchOptions} options The minimatch options to use. - * @returns {boolean} True if the file path matches, false if not. - */ -function doMatch(filepath, pattern, options = {}) { - let cache = minimatchCache; - - if (options.flipNegate) { - cache = negatedMinimatchCache; - } - - let matcher = cache.get(pattern); - - if (!matcher) { - matcher = new minimatch.Minimatch( - pattern, - Object.assign({}, MINIMATCH_OPTIONS, options), - ); - cache.set(pattern, matcher); - } - - return matcher.match(filepath); -} - -/** - * Normalizes a pattern by removing the leading "./" if present. - * @param {FileMatcher} pattern The pattern to normalize. - * @returns {FileMatcher} The normalized pattern. - */ -function normalizePattern(pattern) { - if (isString(pattern)) { - if (pattern.startsWith("./")) { - return pattern.slice(2); - } - - if (pattern.startsWith("!./")) { - return `!${pattern.slice(3)}`; - } - } - - return pattern; -} - -/** - * Checks if a given pattern requires normalization. - * @param {any} pattern The pattern to check. - * @returns {boolean} True if the pattern needs normalization, false otherwise. - * - */ -function needsPatternNormalization(pattern) { - return ( - isString(pattern) && - (pattern.startsWith("./") || pattern.startsWith("!./")) - ); -} - -/** - * Normalizes `files` and `ignores` patterns in a config by removing "./" prefixes. - * @param {Object} config The config object to normalize patterns in. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative. - * @param {PathImpl} path Path-handling implementation. - * @returns {Object} The normalized config object. - */ -function normalizeConfigPatterns(config, namespacedBasePath, path) { - if (!config) { - return config; - } - - const hasBasePath = typeof config.basePath === "string"; - - let needsNormalization = false; - - if (hasBasePath) { - needsNormalization = true; - } - - if (!needsNormalization && Array.isArray(config.files)) { - needsNormalization = config.files.some(pattern => { - if (Array.isArray(pattern)) { - return pattern.some(needsPatternNormalization); - } - return needsPatternNormalization(pattern); - }); - } - - if (!needsNormalization && Array.isArray(config.ignores)) { - needsNormalization = config.ignores.some(needsPatternNormalization); - } - - if (!needsNormalization) { - return config; - } - - const newConfig = { ...config }; - - if (hasBasePath) { - if (path.isAbsolute(config.basePath)) { - newConfig.basePath = path.toNamespacedPath(config.basePath); - } else { - newConfig.basePath = path.resolve( - namespacedBasePath, - config.basePath, - ); - } - } - - if (Array.isArray(newConfig.files)) { - newConfig.files = newConfig.files.map(pattern => { - if (Array.isArray(pattern)) { - return pattern.map(normalizePattern); - } - return normalizePattern(pattern); - }); - } - - if (Array.isArray(newConfig.ignores)) { - newConfig.ignores = newConfig.ignores.map(normalizePattern); - } - - return newConfig; -} - -/** - * Normalizes a `ConfigArray` by flattening it and executing any functions - * that are found inside. - * @param {Array} items The items in a `ConfigArray`. - * @param {Object} context The context object to pass into any function - * found. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. - * @param {PathImpl} path Path-handling implementation. - * @returns {Promise} A flattened array containing only config objects. - * @throws {TypeError} When a config function returns a function. - */ -async function normalize( - items, - context, - extraConfigTypes, - namespacedBasePath, - path, -) { - const allowFunctions = extraConfigTypes.includes("function"); - const allowArrays = extraConfigTypes.includes("array"); - - async function* flatTraverse(array) { - for (let item of array) { - if (typeof item === "function") { - if (!allowFunctions) { - throw new TypeError("Unexpected function."); - } - - item = item(context); - if (item.then) { - item = await item; - } - } - - if (Array.isArray(item)) { - if (!allowArrays) { - throw new TypeError("Unexpected array."); - } - yield* flatTraverse(item); - } else if (typeof item === "function") { - throw new TypeError( - "A config function can only return an object or array.", - ); - } else { - yield item; - } - } - } - - /* - * Async iterables cannot be used with the spread operator, so we need to manually - * create the array to return. - */ - const asyncIterable = flatTraverse(items); - const configs = []; - - for await (const config of asyncIterable) { - configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); - } - - return configs; -} - -/** - * Normalizes a `ConfigArray` by flattening it and executing any functions - * that are found inside. - * @param {Array} items The items in a `ConfigArray`. - * @param {Object} context The context object to pass into any function - * found. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. - * @param {PathImpl} path Path-handling implementation - * @returns {Array} A flattened array containing only config objects. - * @throws {TypeError} When a config function returns a function. - */ -function normalizeSync( - items, - context, - extraConfigTypes, - namespacedBasePath, - path, -) { - const allowFunctions = extraConfigTypes.includes("function"); - const allowArrays = extraConfigTypes.includes("array"); - - function* flatTraverse(array) { - for (let item of array) { - if (typeof item === "function") { - if (!allowFunctions) { - throw new TypeError("Unexpected function."); - } - - item = item(context); - if (item.then) { - throw new TypeError( - "Async config functions are not supported.", - ); - } - } - - if (Array.isArray(item)) { - if (!allowArrays) { - throw new TypeError("Unexpected array."); - } - - yield* flatTraverse(item); - } else if (typeof item === "function") { - throw new TypeError( - "A config function can only return an object or array.", - ); - } else { - yield item; - } - } - } - - const configs = []; - - for (const config of flatTraverse(items)) { - configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); - } - - return configs; -} - -/** - * Converts a given path to a relative path with all separator characters replaced by forward slashes (`"/"`). - * @param {string} fileOrDirPath The unprocessed path to convert. - * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative. - * @param {PathImpl} path Path-handling implementations. - * @returns {string} A relative path with all separator characters replaced by forward slashes. - */ -function toRelativePath(fileOrDirPath, namespacedBasePath, path) { - const fullPath = path.resolve(namespacedBasePath, fileOrDirPath); - const namespacedFullPath = path.toNamespacedPath(fullPath); - const relativePath = path.relative(namespacedBasePath, namespacedFullPath); - return relativePath.replaceAll(path.SEPARATOR, "/"); -} - -/** - * Determines if a given file path should be ignored based on the given - * matcher. - * @param {Array<{ basePath?: string, ignores: FileMatcher[] }>} configs Configuration objects containing `ignores`. - * @param {string} filePath The unprocessed file path to check. - * @param {string} relativeFilePath The path of the file to check relative to the base path, - * using forward slash (`"/"`) as a separator. - * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects - * that have `basePath` property. - * @param {string} [basePathData.basePath] Namespaced path to which `relativeFilePath` is relative. - * @param {PathImpl} [basePathData.path] Path-handling implementation. - * @returns {boolean} True if the path should be ignored and false if not. - */ -function shouldIgnorePath( - configs, - filePath, - relativeFilePath, - { basePath, path } = {}, -) { - let shouldIgnore = false; - - for (const config of configs) { - let relativeFilePathToCheck = relativeFilePath; - if (config.basePath) { - relativeFilePathToCheck = toRelativePath( - path.resolve(basePath, relativeFilePath), - config.basePath, - path, - ); - - if ( - relativeFilePathToCheck === "" || - EXTERNAL_PATH_REGEX.test(relativeFilePathToCheck) - ) { - continue; - } - - if (relativeFilePath.endsWith("/")) { - relativeFilePathToCheck += "/"; - } - } - shouldIgnore = config.ignores.reduce((ignored, matcher) => { - if (!ignored) { - if (typeof matcher === "function") { - return matcher(filePath); - } - - // don't check negated patterns because we're not ignored yet - if (!matcher.startsWith("!")) { - return doMatch(relativeFilePathToCheck, matcher); - } - - // otherwise we're still not ignored - return false; - } - - // only need to check negated patterns because we're ignored - if (typeof matcher === "string" && matcher.startsWith("!")) { - return !doMatch(relativeFilePathToCheck, matcher, { - flipNegate: true, - }); - } - - return ignored; - }, shouldIgnore); - } - - return shouldIgnore; -} - -/** - * Determines if a given file path is matched by a config. If the config - * has no `files` field, then it matches; otherwise, if a `files` field - * is present then we match the globs in `files` and exclude any globs in - * `ignores`. - * @param {string} filePath The unprocessed file path to check. - * @param {string} relativeFilePath The path of the file to check relative to the base path, - * using forward slash (`"/"`) as a separator. - * @param {ConfigObject & { files: FilesMatcher[] }} config The config object to check. - * @returns {boolean} True if the file path is matched by the config, - * false if not. - */ -function pathMatches(filePath, relativeFilePath, config) { - // match both strings and functions - function match(pattern) { - if (isString(pattern)) { - return doMatch(relativeFilePath, pattern); - } - - if (typeof pattern === "function") { - return pattern(filePath); - } - - throw new TypeError(`Unexpected matcher type ${pattern}.`); - } - - // check for all matches to config.files - let filePathMatchesPattern = config.files.some(pattern => { - if (Array.isArray(pattern)) { - return pattern.every(match); - } - - return match(pattern); - }); - - /* - * If the file path matches the config.files patterns, then check to see - * if there are any files to ignore. - */ - if (filePathMatchesPattern && config.ignores) { - /* - * Pass config object without `basePath`, because `relativeFilePath` is already - * calculated as relative to it. - */ - filePathMatchesPattern = !shouldIgnorePath( - [{ ignores: config.ignores }], - filePath, - relativeFilePath, - ); - } - - return filePathMatchesPattern; -} - -/** - * Ensures that a ConfigArray has been normalized. - * @param {ConfigArray} configArray The ConfigArray to check. - * @returns {void} - * @throws {Error} When the `ConfigArray` is not normalized. - */ -function assertNormalized(configArray) { - // TODO: Throw more verbose error - if (!configArray.isNormalized()) { - throw new Error( - "ConfigArray must be normalized to perform this operation.", - ); - } -} - -/** - * Ensures that config types are valid. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @returns {void} - * @throws {TypeError} When the config types array is invalid. - */ -function assertExtraConfigTypes(extraConfigTypes) { - if (!Array.isArray(extraConfigTypes)) { - throw new TypeError("extraConfigTypes must be an array."); - } - - if (extraConfigTypes.length > 2) { - throw new TypeError("extraConfigTypes must contain at most two items."); - } - - for (const configType of extraConfigTypes) { - if (!CONFIG_TYPES.has(configType)) { - throw new TypeError( - `Unexpected config type "${configType}" in extraConfigTypes. Expected one of: "array", "function".`, - ); - } - } -} - -/** - * Returns path-handling implementations for Unix or Windows, depending on a given absolute path. - * @param {string} fileOrDirPath The absolute path to check. - * @returns {PathImpl} Path-handling implementations for the specified path. - * @throws {Error} An error is thrown if the specified argument is not an absolute path. - */ -function getPathImpl(fileOrDirPath) { - // Posix absolute paths always start with a slash. - if (fileOrDirPath.startsWith("/")) { - return posixPath__namespace; - } - - // Windows absolute paths start with a letter followed by a colon and at least one backslash, - // or with two backslashes in the case of UNC paths. - // Forward slashed are automatically normalized to backslashes. - if (/^(?:[A-Za-z]:[/\\]|[/\\]{2})/u.test(fileOrDirPath)) { - return windowsPath__namespace; - } - - throw new Error( - `Expected an absolute path but received "${fileOrDirPath}"`, - ); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -const ConfigArraySymbol = { - isNormalized: Symbol("isNormalized"), - configCache: Symbol("configCache"), - schema: Symbol("schema"), - finalizeConfig: Symbol("finalizeConfig"), - preprocessConfig: Symbol("preprocessConfig"), -}; - -// used to store calculate data for faster lookup -const dataCache = new WeakMap(); - -/** - * Represents an array of config objects and provides method for working with - * those config objects. - */ -class ConfigArray extends Array { - /** - * The namespaced path of the config file directory. - * @type {string} - */ - #namespacedBasePath; - - /** - * Path-handling implementations. - * @type {PathImpl} - */ - #path; - - /** - * Creates a new instance of ConfigArray. - * @param {Iterable|Function|Object} configs An iterable yielding config - * objects, or a config function, or a config object. - * @param {Object} options The options for the ConfigArray. - * @param {string} [options.basePath="/"] The absolute path of the config file directory. - * Defaults to `"/"`. - * @param {boolean} [options.normalized=false] Flag indicating if the - * configs have already been normalized. - * @param {ObjectDefinition} [options.schema] The additional schema - * definitions to use for the ConfigArray schema. - * @param {ReadonlyArray} [options.extraConfigTypes] List of config types supported. - * @throws {TypeError} When the `basePath` is not a non-empty string, - */ - constructor( - configs, - { - basePath = "/", - normalized = false, - schema: customSchema, - extraConfigTypes = [], - } = {}, - ) { - super(); - - /** - * Tracks if the array has been normalized. - * @property isNormalized - * @type {boolean} - * @private - */ - this[ConfigArraySymbol.isNormalized] = normalized; - - /** - * The schema used for validating and merging configs. - * @property schema - * @type {ObjectSchemaInstance} - * @private - */ - this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema( - Object.assign({}, customSchema, baseSchema), - ); - - if (!isString(basePath) || !basePath) { - throw new TypeError("basePath must be a non-empty string"); - } - - /** - * The path of the config file that this array was loaded from. - * This is used to calculate filename matches. - * @property basePath - * @type {string} - */ - this.basePath = basePath; - - assertExtraConfigTypes(extraConfigTypes); - - /** - * The supported config types. - * @type {ReadonlyArray} - */ - this.extraConfigTypes = [...extraConfigTypes]; - Object.freeze(this.extraConfigTypes); - - /** - * A cache to store calculated configs for faster repeat lookup. - * @property configCache - * @type {Map} - * @private - */ - this[ConfigArraySymbol.configCache] = new Map(); - - // init cache - dataCache.set(this, { - explicitMatches: new Map(), - directoryMatches: new Map(), - files: undefined, - ignores: undefined, - }); - - // load the configs into this array - if (Array.isArray(configs)) { - this.push(...configs); - } else { - this.push(configs); - } - - // select path-handling implementations depending on the base path - this.#path = getPathImpl(basePath); - - // On Windows, `path.relative()` returns an absolute path when given two paths on different drives. - // The namespaced base path is useful to make sure that calculated relative paths are always relative. - // On Unix, it is identical to the base path. - this.#namespacedBasePath = this.#path.toNamespacedPath(basePath); - } - - /** - * Prevent normal array methods from creating a new `ConfigArray` instance. - * This is to ensure that methods such as `slice()` won't try to create a - * new instance of `ConfigArray` behind the scenes as doing so may throw - * an error due to the different constructor signature. - * @type {ArrayConstructor} The `Array` constructor. - */ - static get [Symbol.species]() { - return Array; - } - - /** - * Returns the `files` globs from every config object in the array. - * This can be used to determine which files will be matched by a - * config array or to use as a glob pattern when no patterns are provided - * for a command line interface. - * @returns {Array} An array of matchers. - */ - get files() { - assertNormalized(this); - - // if this data has been cached, retrieve it - const cache = dataCache.get(this); - - if (cache.files) { - return cache.files; - } - - // otherwise calculate it - - const result = []; - - for (const config of this) { - if (config.files) { - config.files.forEach(filePattern => { - result.push(filePattern); - }); - } - } - - // store result - cache.files = result; - dataCache.set(this, cache); - - return result; - } - - /** - * Returns ignore matchers that should always be ignored regardless of - * the matching `files` fields in any configs. This is necessary to mimic - * the behavior of things like .gitignore and .eslintignore, allowing a - * globbing operation to be faster. - * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores. - */ - get ignores() { - assertNormalized(this); - - // if this data has been cached, retrieve it - const cache = dataCache.get(this); - - if (cache.ignores) { - return cache.ignores; - } - - // otherwise calculate it - - const result = []; - - for (const config of this) { - /* - * We only count ignores if there are no other keys in the object. - * In this case, it acts like a globally ignored pattern. If there - * are additional keys, then ignores act like exclusions. - */ - if ( - config.ignores && - Object.keys(config).filter(key => !META_FIELDS.has(key)) - .length === 1 - ) { - result.push(config); - } - } - - // store result - cache.ignores = result; - dataCache.set(this, cache); - - return result; - } - - /** - * Indicates if the config array has been normalized. - * @returns {boolean} True if the config array is normalized, false if not. - */ - isNormalized() { - return this[ConfigArraySymbol.isNormalized]; - } - - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {Promise} The current ConfigArray instance. - */ - async normalize(context = {}) { - if (!this.isNormalized()) { - const normalizedConfigs = await normalize( - this, - context, - this.extraConfigTypes, - this.#namespacedBasePath, - this.#path, - ); - this.length = 0; - this.push( - ...normalizedConfigs.map( - this[ConfigArraySymbol.preprocessConfig].bind(this), - ), - ); - this.forEach(assertValidBaseConfig); - this[ConfigArraySymbol.isNormalized] = true; - - // prevent further changes - Object.freeze(this); - } - - return this; - } - - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {ConfigArray} The current ConfigArray instance. - */ - normalizeSync(context = {}) { - if (!this.isNormalized()) { - const normalizedConfigs = normalizeSync( - this, - context, - this.extraConfigTypes, - this.#namespacedBasePath, - this.#path, - ); - this.length = 0; - this.push( - ...normalizedConfigs.map( - this[ConfigArraySymbol.preprocessConfig].bind(this), - ), - ); - this.forEach(assertValidBaseConfig); - this[ConfigArraySymbol.isNormalized] = true; - - // prevent further changes - Object.freeze(this); - } - - return this; - } - - /* eslint-disable class-methods-use-this -- Desired as instance methods */ - - /** - * Finalizes the state of a config before being cached and returned by - * `getConfig()`. Does nothing by default but is provided to be - * overridden by subclasses as necessary. - * @param {Object} config The config to finalize. - * @returns {Object} The finalized config. - */ - // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class. - [/** @type {never} */ (ConfigArraySymbol.finalizeConfig)](config) { - return config; - } - - /** - * Preprocesses a config during the normalization process. This is the - * method to override if you want to convert an array item before it is - * validated for the first time. For example, if you want to replace a - * string with an object, this is the method to override. - * @param {Object} config The config to preprocess. - * @returns {Object} The config to use in place of the argument. - */ - // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class. - [/** @type {never} */ (ConfigArraySymbol.preprocessConfig)](config) { - return config; - } - - /* eslint-enable class-methods-use-this -- Desired as instance methods */ - - /** - * Returns the config object for a given file path and a status that can be used to determine why a file has no config. - * @param {string} filePath The path of a file to get a config for. - * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} - * An object with an optional property `config` and property `status`. - * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, - * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. - */ - getConfigWithStatus(filePath) { - assertNormalized(this); - - const cache = this[ConfigArraySymbol.configCache]; - - // first check the cache for a filename match to avoid duplicate work - if (cache.has(filePath)) { - return cache.get(filePath); - } - - // check to see if the file is outside the base path - - const relativeToBaseFilePath = toRelativePath( - filePath, - this.#namespacedBasePath, - this.#path, - ); - - if (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) { - debug(`No config for file ${filePath} outside of base path`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL); - return CONFIG_WITH_STATUS_EXTERNAL; - } - - // next check to see if the file should be ignored - - // check if this should be ignored due to its directory - if (this.isDirectoryIgnored(this.#path.dirname(filePath))) { - debug(`Ignoring ${filePath} based on directory pattern`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); - return CONFIG_WITH_STATUS_IGNORED; - } - - if ( - shouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, { - basePath: this.#namespacedBasePath, - path: this.#path, - }) - ) { - debug(`Ignoring ${filePath} based on file pattern`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); - return CONFIG_WITH_STATUS_IGNORED; - } - - // filePath isn't automatically ignored, so try to construct config - - const matchingConfigIndices = []; - let matchFound = false; - const universalPattern = /^\*$|^!|\/\*{1,2}$/u; - - this.forEach((config, index) => { - const relativeFilePath = config.basePath - ? toRelativePath( - this.#path.resolve(this.#namespacedBasePath, filePath), - config.basePath, - this.#path, - ) - : relativeToBaseFilePath; - - if (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) { - debug( - `Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`, - ); - return; - } - - if (!config.files) { - if (!config.ignores) { - debug(`Universal config found for ${filePath}`); - matchingConfigIndices.push(index); - return; - } - - if ( - Object.keys(config).filter(key => !META_FIELDS.has(key)) - .length === 1 - ) { - debug( - `Skipped config found for ${filePath} (global ignores)`, - ); - return; - } - - /* - * Pass config object without `basePath`, because `relativeFilePath` is already - * calculated as relative to it. - */ - if ( - shouldIgnorePath( - [{ ignores: config.ignores }], - filePath, - relativeFilePath, - ) - ) { - debug( - `Skipped config found for ${filePath} (based on ignores: ${config.ignores})`, - ); - return; - } - - debug( - `Matching config found for ${filePath} (based on ignores: ${config.ignores})`, - ); - matchingConfigIndices.push(index); - return; - } - - /* - * If a config has a files pattern * or patterns ending in /** or /*, - * and the filePath only matches those patterns, then the config is only - * applied if there is another config where the filePath matches - * a file with a specific extensions such as *.js. - */ - - const nonUniversalFiles = []; - const universalFiles = config.files.filter(element => { - if (Array.isArray(element)) { - /* - * filePath matches an element that is an array only if it matches - * all patterns in it (AND operation). Therefore, if there is at least - * one non-universal pattern in the array, and filePath matches the array, - * then we know for sure that filePath matches at least one non-universal - * pattern, so we can consider the entire array to be non-universal. - * In other words, all patterns in the array need to be universal - * for it to be considered universal. - */ - if ( - element.every(pattern => universalPattern.test(pattern)) - ) { - return true; - } - - nonUniversalFiles.push(element); - return false; - } - - // element is a string - - if (universalPattern.test(element)) { - return true; - } - - nonUniversalFiles.push(element); - return false; - }); - - // universal patterns were found so we need to check the config twice - if (universalFiles.length) { - debug("Universal files patterns found. Checking carefully."); - - // check that the config matches without the non-universal files first - if ( - nonUniversalFiles.length && - pathMatches(filePath, relativeFilePath, { - files: nonUniversalFiles, - ignores: config.ignores, - }) - ) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - matchFound = true; - return; - } - - // if there wasn't a match then check if it matches with universal files - if ( - universalFiles.length && - pathMatches(filePath, relativeFilePath, { - files: universalFiles, - ignores: config.ignores, - }) - ) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - return; - } - - // if we make here, then there was no match - return; - } - - // the normal case - if (pathMatches(filePath, relativeFilePath, config)) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - matchFound = true; - } - }); - - // if matching both files and ignores, there will be no config to create - if (!matchFound) { - debug(`No matching configs found for ${filePath}`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED); - return CONFIG_WITH_STATUS_UNCONFIGURED; - } - - // check to see if there is a config cached by indices - const indicesKey = matchingConfigIndices.toString(); - let configWithStatus = cache.get(indicesKey); - - if (configWithStatus) { - // also store for filename for faster lookup next time - cache.set(filePath, configWithStatus); - - return configWithStatus; - } - - // otherwise construct the config - - // eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error - let finalConfig = matchingConfigIndices.reduce((result, index) => { - try { - return this[ConfigArraySymbol.schema].merge( - result, - this[index], - ); - } catch (validationError) { - rethrowConfigError(this[index], index, validationError); - } - }, {}); - - finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); - - configWithStatus = Object.freeze({ - config: finalConfig, - status: "matched", - }); - cache.set(filePath, configWithStatus); - cache.set(indicesKey, configWithStatus); - - return configWithStatus; - } - - /** - * Returns the config object for a given file path. - * @param {string} filePath The path of a file to get a config for. - * @returns {Object|undefined} The config object for this file or `undefined`. - */ - getConfig(filePath) { - return this.getConfigWithStatus(filePath).config; - } - - /** - * Determines whether a file has a config or why it doesn't. - * @param {string} filePath The path of the file to check. - * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: - * * `"ignored"`: the file is ignored - * * `"external"`: the file is outside the base path - * * `"unconfigured"`: the file is not matched by any config - * * `"matched"`: the file has a matching config - */ - getConfigStatus(filePath) { - return this.getConfigWithStatus(filePath).status; - } - - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - * @deprecated Use `isFileIgnored` instead. - */ - isIgnored(filePath) { - return this.isFileIgnored(filePath); - } - - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - */ - isFileIgnored(filePath) { - return this.getConfigStatus(filePath) === "ignored"; - } - - /** - * Determines if the given directory is ignored based on the configs. - * This checks only default `ignores` that don't have `files` in the - * same config. A pattern such as `/foo` be considered to ignore the directory - * while a pattern such as `/foo/**` is not considered to ignore the - * directory because it is matching files. - * @param {string} directoryPath The path of a directory to check. - * @returns {boolean} True if the directory is ignored, false if not. Will - * return true for any directory that is not inside of `basePath`. - * @throws {Error} When the `ConfigArray` is not normalized. - */ - isDirectoryIgnored(directoryPath) { - assertNormalized(this); - - const relativeDirectoryPath = toRelativePath( - directoryPath, - this.#namespacedBasePath, - this.#path, - ); - - // basePath directory can never be ignored - if (relativeDirectoryPath === "") { - return false; - } - - if (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) { - return true; - } - - // first check the cache - const cache = dataCache.get(this).directoryMatches; - - if (cache.has(relativeDirectoryPath)) { - return cache.get(relativeDirectoryPath); - } - - const directoryParts = relativeDirectoryPath.split("/"); - let relativeDirectoryToCheck = ""; - let result; - - /* - * In order to get the correct gitignore-style ignores, where an - * ignored parent directory cannot have any descendants unignored, - * we need to check every directory starting at the parent all - * the way down to the actual requested directory. - * - * We aggressively cache all of this info to make sure we don't - * have to recalculate everything for every call. - */ - do { - relativeDirectoryToCheck += `${directoryParts.shift()}/`; - - result = shouldIgnorePath( - this.ignores, - this.#path.join(this.basePath, relativeDirectoryToCheck), - relativeDirectoryToCheck, - { - basePath: this.#namespacedBasePath, - path: this.#path, - }, - ); - - cache.set(relativeDirectoryToCheck, result); - } while (!result && directoryParts.length); - - // also cache the result for the requested path - cache.set(relativeDirectoryPath, result); - - return result; - } -} - -Object.defineProperty(exports, "ObjectSchema", { - enumerable: true, - get: function () { return objectSchema.ObjectSchema; } -}); -exports.ConfigArray = ConfigArray; -exports.ConfigArraySymbol = ConfigArraySymbol; diff --git a/node_modules/@eslint/config-array/dist/cjs/index.d.cts b/node_modules/@eslint/config-array/dist/cjs/index.d.cts deleted file mode 100644 index 016ed4c..0000000 --- a/node_modules/@eslint/config-array/dist/cjs/index.d.cts +++ /dev/null @@ -1,151 +0,0 @@ -export { ObjectSchema } from "@eslint/object-schema"; -export type PropertyDefinition = $eslintobjectschema.PropertyDefinition; -export type ObjectDefinition = $eslintobjectschema.ObjectDefinition; -export type ConfigObject = $typests.ConfigObject; -export type FileMatcher = $typests.FileMatcher; -export type FilesMatcher = $typests.FilesMatcher; -export type ExtraConfigType = $typests.ExtraConfigType; -export type MinimatchOptions = $minimatch.MinimatchOptions; -export type ObjectSchemaInstance = ObjectSchema; -/** - * Represents an array of config objects and provides method for working with - * those config objects. - */ -export class ConfigArray extends Array { - /** - * Creates a new instance of ConfigArray. - * @param {Iterable|Function|Object} configs An iterable yielding config - * objects, or a config function, or a config object. - * @param {Object} options The options for the ConfigArray. - * @param {string} [options.basePath="/"] The absolute path of the config file directory. - * Defaults to `"/"`. - * @param {boolean} [options.normalized=false] Flag indicating if the - * configs have already been normalized. - * @param {ObjectDefinition} [options.schema] The additional schema - * definitions to use for the ConfigArray schema. - * @param {ReadonlyArray} [options.extraConfigTypes] List of config types supported. - * @throws {TypeError} When the `basePath` is not a non-empty string, - */ - constructor(configs: Iterable | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: { - basePath?: string; - normalized?: boolean; - schema?: ObjectDefinition; - extraConfigTypes?: ReadonlyArray; - }); - /** - * The path of the config file that this array was loaded from. - * This is used to calculate filename matches. - * @property basePath - * @type {string} - */ - basePath: string; - /** - * The supported config types. - * @type {ReadonlyArray} - */ - extraConfigTypes: ReadonlyArray; - /** - * Returns the `files` globs from every config object in the array. - * This can be used to determine which files will be matched by a - * config array or to use as a glob pattern when no patterns are provided - * for a command line interface. - * @returns {Array} An array of matchers. - */ - get files(): Array; - /** - * Returns ignore matchers that should always be ignored regardless of - * the matching `files` fields in any configs. This is necessary to mimic - * the behavior of things like .gitignore and .eslintignore, allowing a - * globbing operation to be faster. - * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores. - */ - get ignores(): Array<{ - basePath?: string; - name?: string; - ignores: FileMatcher[]; - }>; - /** - * Indicates if the config array has been normalized. - * @returns {boolean} True if the config array is normalized, false if not. - */ - isNormalized(): boolean; - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {Promise} The current ConfigArray instance. - */ - normalize(context?: any): Promise; - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {ConfigArray} The current ConfigArray instance. - */ - normalizeSync(context?: any): ConfigArray; - /** - * Returns the config object for a given file path and a status that can be used to determine why a file has no config. - * @param {string} filePath The path of a file to get a config for. - * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} - * An object with an optional property `config` and property `status`. - * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, - * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. - */ - getConfigWithStatus(filePath: string): { - config?: any; - status: "ignored" | "external" | "unconfigured" | "matched"; - }; - /** - * Returns the config object for a given file path. - * @param {string} filePath The path of a file to get a config for. - * @returns {Object|undefined} The config object for this file or `undefined`. - */ - getConfig(filePath: string): any | undefined; - /** - * Determines whether a file has a config or why it doesn't. - * @param {string} filePath The path of the file to check. - * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: - * * `"ignored"`: the file is ignored - * * `"external"`: the file is outside the base path - * * `"unconfigured"`: the file is not matched by any config - * * `"matched"`: the file has a matching config - */ - getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched"; - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - * @deprecated Use `isFileIgnored` instead. - */ - isIgnored(filePath: string): boolean; - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - */ - isFileIgnored(filePath: string): boolean; - /** - * Determines if the given directory is ignored based on the configs. - * This checks only default `ignores` that don't have `files` in the - * same config. A pattern such as `/foo` be considered to ignore the directory - * while a pattern such as `/foo/**` is not considered to ignore the - * directory because it is matching files. - * @param {string} directoryPath The path of a directory to check. - * @returns {boolean} True if the directory is ignored, false if not. Will - * return true for any directory that is not inside of `basePath`. - * @throws {Error} When the `ConfigArray` is not normalized. - */ - isDirectoryIgnored(directoryPath: string): boolean; - #private; -} -export namespace ConfigArraySymbol { - let isNormalized: symbol; - let configCache: symbol; - let schema: symbol; - let finalizeConfig: symbol; - let preprocessConfig: symbol; -} -import type * as $eslintobjectschema from "@eslint/object-schema"; -import type * as $typests from "./types.cts"; -import type * as $minimatch from "minimatch"; -import { ObjectSchema } from '@eslint/object-schema'; diff --git a/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs b/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs deleted file mode 100644 index 13cc0d3..0000000 --- a/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs +++ /dev/null @@ -1,1336 +0,0 @@ -// @ts-nocheck -'use strict'; - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -function assertPath(path) { - if (typeof path !== "string") { - throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function stripSuffix(name, suffix) { - if (suffix.length >= name.length) { - return name; - } - const lenDiff = name.length - suffix.length; - for(let i = suffix.length - 1; i >= 0; --i){ - if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { - return name; - } - } - return name.slice(0, -suffix.length); -} -function lastPathSegment(path, isSep, start = 0) { - let matchedNonSeparator = false; - let end = path.length; - for(let i = path.length - 1; i >= start; --i){ - if (isSep(path.charCodeAt(i))) { - if (matchedNonSeparator) { - start = i + 1; - break; - } - } else if (!matchedNonSeparator) { - matchedNonSeparator = true; - end = i + 1; - } - } - return path.slice(start, end); -} -function assertArgs$1(path, suffix) { - assertPath(path); - if (path.length === 0) return path; - if (typeof suffix !== "string") { - throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$3(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol !== "file:") { - throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a file URL to a path string. - * - * @example Usage - * ```ts - * import { fromFileUrl } from "@std/path/posix/from-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo"); - * ``` - * - * @param url The file URL to convert. - * @returns The path string. - */ function fromFileUrl(url) { - url = assertArg$3(url); - return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function stripTrailingSeparators(segment, isSep) { - if (segment.length <= 1) { - return segment; - } - let end = segment.length; - for(let i = segment.length - 1; i > 0; i--){ - if (isSep(segment.charCodeAt(i))) { - end = i; - } else { - break; - } - } - return segment.slice(0, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Alphabet chars. -// Non-alphabetic chars. -const CHAR_DOT = 46; /* . */ -const CHAR_FORWARD_SLASH = 47; /* / */ - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the last portion of a `path`. - * Trailing directory separators are ignored, and optional suffix is removed. - * - * @example Usage - * ```ts - * import { basename } from "@std/path/posix/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("/home/user/Documents/"), "Documents"); - * assertEquals(basename("/home/user/Documents/image.png"), "image.png"); - * assertEquals(basename("/home/user/Documents/image.png", ".png"), "image"); - * assertEquals(basename(new URL("file:///home/user/Documents/image.png")), "image.png"); - * assertEquals(basename(new URL("file:///home/user/Documents/image.png"), ".png"), "image"); - * ``` - * - * @example Working with URLs - * - * Note: This function doesn't automatically strip hash and query parts from - * URLs. If your URL contains a hash or query, remove them before passing the - * URL to the function. This can be done by passing the URL to `new URL(url)`, - * and setting the `hash` and `search` properties to empty strings. - * - * ```ts - * import { basename } from "@std/path/posix/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("https://deno.land/std/path/mod.ts"), "mod.ts"); - * assertEquals(basename("https://deno.land/std/path/mod.ts", ".ts"), "mod"); - * assertEquals(basename("https://deno.land/std/path/mod.ts?a=b"), "mod.ts?a=b"); - * assertEquals(basename("https://deno.land/std/path/mod.ts#header"), "mod.ts#header"); - * ``` - * - * @param path The path to extract the name from. - * @param suffix The suffix to remove from extracted name. - * @returns The extracted name. - */ function basename(path, suffix = "") { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArgs$1(path, suffix); - const lastSegment = lastPathSegment(path, isPosixPathSeparator); - const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator); - return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * The character used to separate entries in the PATH environment variable. - */ const DELIMITER = ":"; -/** - * The character used to separate components of a file path. - */ const SEPARATOR = "/"; -/** - * A regular expression that matches one or more path separators. - */ const SEPARATOR_PATTERN = /\/+/; - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$2(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the directory path of a `path`. - * - * @example Usage - * ```ts - * import { dirname } from "@std/path/posix/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("/home/user/Documents/"), "/home/user"); - * assertEquals(dirname("/home/user/Documents/image.png"), "/home/user/Documents"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); - * assertEquals(dirname(new URL("file:///home/user/Documents/image.png")), "/home/user/Documents"); - * ``` - * - * @example Working with URLs - * - * ```ts - * import { dirname } from "@std/path/posix/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts?a=b"), "https://deno.land/std/path"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts#header"), "https://deno.land/std/path"); - * ``` - * - * @param path The path to get the directory from. - * @returns The directory path. - */ function dirname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg$2(path); - let end = -1; - let matchedNonSeparator = false; - for(let i = path.length - 1; i >= 1; --i){ - if (isPosixPathSeparator(path.charCodeAt(i))) { - if (matchedNonSeparator) { - end = i; - break; - } - } else { - matchedNonSeparator = true; - } - } - // No matches. Fallback based on provided path: - // - // - leading slashes paths - // "/foo" => "/" - // "///foo" => "/" - // - no slash path - // "foo" => "." - if (end === -1) { - return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : "."; - } - return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the extension of the `path` with leading period. - * - * @example Usage - * ```ts - * import { extname } from "@std/path/posix/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("/home/user/Documents/file.ts"), ".ts"); - * assertEquals(extname("/home/user/Documents/"), ""); - * assertEquals(extname("/home/user/Documents/image.png"), ".png"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts")), ".ts"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts?a=b")), ".ts"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts#header")), ".ts"); - * ``` - * - * @example Working with URLs - * - * Note: This function doesn't automatically strip hash and query parts from - * URLs. If your URL contains a hash or query, remove them before passing the - * URL to the function. This can be done by passing the URL to `new URL(url)`, - * and setting the `hash` and `search` properties to empty strings. - * - * ```ts - * import { extname } from "@std/path/posix/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("https://deno.land/std/path/mod.ts"), ".ts"); - * assertEquals(extname("https://deno.land/std/path/mod.ts?a=b"), ".ts?a=b"); - * assertEquals(extname("https://deno.land/std/path/mod.ts#header"), ".ts#header"); - * ``` - * - * @param path The path to get the extension from. - * @returns The extension (ex. for `file.ts` returns `.ts`). - */ function extname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertPath(path); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - for(let i = path.length - 1; i >= 0; --i){ - const code = path.charCodeAt(i); - if (isPosixPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function _format(sep, pathObject) { - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); - if (!dir) return base; - if (base === sep) return dir; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} -function assertArg$1(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Generate a path from `ParsedPath` object. - * - * @example Usage - * ```ts - * import { format } from "@std/path/posix/format"; - * import { assertEquals } from "@std/assert"; - * - * const path = format({ - * root: "/", - * dir: "/path/dir", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * assertEquals(path, "/path/dir/file.txt"); - * ``` - * - * @param pathObject The path object to format. - * @returns The formatted path. - */ function format(pathObject) { - assertArg$1(pathObject); - return _format("/", pathObject); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Verifies whether provided path is absolute. - * - * @example Usage - * ```ts - * import { isAbsolute } from "@std/path/posix/is-absolute"; - * import { assert, assertFalse } from "@std/assert"; - * - * assert(isAbsolute("/home/user/Documents/")); - * assertFalse(isAbsolute("home/user/Documents/")); - * ``` - * - * @param path The path to verify. - * @returns Whether the path is absolute. - */ function isAbsolute(path) { - assertPath(path); - return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0)); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Resolves . and .. elements in a path with directory names -function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code; - for(let i = 0; i <= path.length; ++i){ - if (i < path.length) code = path.charCodeAt(i); - else if (isPathSeparator(code)) break; - else code = CHAR_FORWARD_SLASH; - if (isPathSeparator(code)) { - if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * Note that resolving these segments does not necessarily mean that all will be eliminated. - * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. - * - * @example Usage - * ```ts - * import { normalize } from "@std/path/posix/normalize"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(normalize("/foo/bar//baz/asdf/quux/.."), "/foo/bar/baz/asdf"); - * assertEquals(normalize(new URL("file:///foo/bar//baz/asdf/quux/..")), "/foo/bar/baz/asdf/"); - * ``` - * - * @example Working with URLs - * - * Note: This function will remove the double slashes from a URL's scheme. - * Hence, do not pass a full URL to this function. Instead, pass the pathname of - * the URL. - * - * ```ts - * import { normalize } from "@std/path/posix/normalize"; - * import { assertEquals } from "@std/assert"; - * - * const url = new URL("https://deno.land"); - * url.pathname = normalize("//std//assert//.//mod.ts"); - * assertEquals(url.href, "https://deno.land/std/assert/mod.ts"); - * - * url.pathname = normalize("std/assert/../async/retry.ts"); - * assertEquals(url.href, "https://deno.land/std/async/retry.ts"); - * ``` - * - * @param path The path to normalize. - * @returns The normalized path. - */ function normalize(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg(path); - const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1)); - // Normalize the path - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - if (path.length === 0 && !isAbsolute) path = "."; - if (path.length > 0 && trailingSeparator) path += "/"; - if (isAbsolute) return `/${path}`; - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * - * @example Usage - * ```ts - * import { join } from "@std/path/posix/join"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(join("/foo", "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); - * assertEquals(join(new URL("file:///foo"), "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); - * ``` - * - * @example Working with URLs - * ```ts - * import { join } from "@std/path/posix/join"; - * import { assertEquals } from "@std/assert"; - * - * const url = new URL("https://deno.land"); - * url.pathname = join("std", "path", "mod.ts"); - * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); - * - * url.pathname = join("//std", "path/", "/mod.ts"); - * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); - * ``` - * - * @param path The path to join. This can be string or file URL. - * @param paths The paths to join. - * @returns The joined path. - */ function join(path, ...paths) { - if (path === undefined) return "."; - if (path instanceof URL) { - path = fromFileUrl(path); - } - paths = path ? [ - path, - ...paths - ] : paths; - paths.forEach((path)=>assertPath(path)); - const joined = paths.filter((path)=>path.length > 0).join("/"); - return joined === "" ? "." : normalize(joined); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return a `ParsedPath` object of the `path`. - * - * @example Usage - * ```ts - * import { parse } from "@std/path/posix/parse"; - * import { assertEquals } from "@std/assert"; - * - * const path = parse("/home/user/file.txt"); - * assertEquals(path, { - * root: "/", - * dir: "/home/user", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * ``` - * - * @param path The path to parse. - * @returns The parsed path object. - */ function parse(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - if (path.length === 0) return ret; - const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - let start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for(; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPosixPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) { - ret.base = ret.name = path.slice(1, end); - } else { - ret.base = ret.name = path.slice(startPart, end); - } - } - // Fallback to '/' in case there is no basename - ret.base = ret.base || "/"; - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - if (startPart > 0) { - ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator); - } else if (isAbsolute) ret.dir = "/"; - return ret; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path segments into a `path`. - * - * @example Usage - * ```ts - * import { resolve } from "@std/path/posix/resolve"; - * import { assertEquals } from "@std/assert"; - * - * const path = resolve("/foo", "bar", "baz/asdf", "quux", ".."); - * assertEquals(path, "/foo/bar/baz/asdf"); - * ``` - * - * @param pathSegments The path segments to resolve. - * @returns The resolved path. - */ function resolve(...pathSegments) { - let resolvedPath = ""; - let resolvedAbsolute = false; - for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){ - let path; - if (i >= 0) path = pathSegments[i]; - else { - // deno-lint-ignore no-explicit-any - const { Deno } = globalThis; - if (typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a relative path without a current working directory (CWD)"); - } - path = Deno.cwd(); - } - assertPath(path); - // Skip empty entries - if (path.length === 0) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when Deno.cwd() fails) - // Normalize the path - resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); - if (resolvedAbsolute) { - if (resolvedPath.length > 0) return `/${resolvedPath}`; - else return "/"; - } else if (resolvedPath.length > 0) return resolvedPath; - else return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArgs(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the relative path from `from` to `to` based on current working directory. - * - * If `from` and `to` are the same, return an empty string. - * - * @example Usage - * ```ts - * import { relative } from "@std/path/posix/relative"; - * import { assertEquals } from "@std/assert"; - * - * const path = relative("/data/orandea/test/aaa", "/data/orandea/impl/bbb"); - * assertEquals(path, "../../impl/bbb"); - * ``` - * - * @param from The path to start from. - * @param to The path to reach. - * @returns The relative path. - */ function relative(from, to) { - assertArgs(from, to); - from = resolve(from); - to = resolve(to); - if (from === to) return ""; - // Trim any leading backslashes - let fromStart = 1; - const fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break; - } - const fromLen = fromEnd - fromStart; - // Trim any leading backslashes - let toStart = 1; - const toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (!isPosixPathSeparator(to.charCodeAt(toStart))) break; - } - const toLen = toEnd - toStart; - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (isPosixPathSeparator(to.charCodeAt(toStart + i))) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (isPosixPathSeparator(fromCode)) lastCommonSep = i; - } - let out = ""; - // Generate the relative path based on the path difference between `to` - // and `from` - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) { - if (out.length === 0) out += ".."; - else out += "/.."; - } - } - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart; - return to.slice(toStart); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const WHITESPACE_ENCODINGS = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20" -}; -function encodeWhitespace(string) { - return string.replaceAll(/[\s]/g, (c)=>{ - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path string to a file URL. - * - * @example Usage - * ```ts - * import { toFileUrl } from "@std/path/posix/to-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo")); - * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar")); - * ``` - * - * @param path The path to convert. - * @returns The file URL. - */ function toFileUrl(path) { - if (!isAbsolute(path)) { - throw new TypeError(`Path must be absolute: received "${path}"`); - } - const url = new URL("file:///"); - url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path to a namespaced path. This function returns the path as is on posix. - * - * @example Usage - * ```ts - * import { toNamespacedPath } from "@std/path/posix/to-namespaced-path"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toNamespacedPath("/home/foo"), "/home/foo"); - * ``` - * - * @param path The path. - * @returns The namespaced path. - */ function toNamespacedPath(path) { - // Non-op on posix systems - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function common$1(paths, sep) { - const [first = "", ...remaining] = paths; - const parts = first.split(sep); - let endOfPrefix = parts.length; - let append = ""; - for (const path of remaining){ - const compare = path.split(sep); - if (compare.length <= endOfPrefix) { - endOfPrefix = compare.length; - append = ""; - } - for(let i = 0; i < endOfPrefix; i++){ - if (compare[i] !== parts[i]) { - endOfPrefix = i; - append = i === 0 ? "" : sep; - break; - } - } - } - return parts.slice(0, endOfPrefix).join(sep) + append; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** Determines the common path from a set of paths for POSIX systems. - * - * @example Usage - * ```ts - * import { common } from "@std/path/posix/common"; - * import { assertEquals } from "@std/assert"; - * - * const path = common([ - * "./deno/std/path/mod.ts", - * "./deno/std/fs/mod.ts", - * ]); - * assertEquals(path, "./deno/std/"); - * ``` - * - * @param paths The paths to compare. - * @returns The common path. - */ function common(paths) { - return common$1(paths, SEPARATOR); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, - * {@linkcode normalizeGlob} and {@linkcode expandGlob}. - */ const REG_EXP_ESCAPE_CHARS = [ - "!", - "$", - "(", - ")", - "*", - "+", - ".", - "=", - "?", - "[", - "\\", - "^", - "{", - "|" -]; -const RANGE_ESCAPE_CHARS = [ - "-", - "\\", - "]" -]; -function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, -caseInsensitive = false } = {}) { - if (glob === "") { - return /(?!)/; - } - // Remove trailing separators. - let newLength = glob.length; - for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - let regExpString = ""; - // Terminates correctly. Trust that `j` is incremented every iteration. - for(let j = 0; j < glob.length;){ - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - // Terminates with `i` at the non-inclusive end of the current segment. - for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){ - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - if (glob[i] === c.escapePrefix) { - inEscape = true; - continue; - } - if (glob[i] === "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] === "!") { - i++; - segment += "^"; - } else if (glob[i + 1] === "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] === ":") { - let k = i + 1; - let value = ""; - while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ - value += glob[k + 1]; - k++; - } - if (glob[k + 1] === ":" && glob[k + 2] === "]") { - i = k + 2; - if (value === "alnum") segment += "\\dA-Za-z"; - else if (value === "alpha") segment += "A-Za-z"; - else if (value === "ascii") segment += "\x00-\x7F"; - else if (value === "blank") segment += "\t "; - else if (value === "cntrl") segment += "\x00-\x1F\x7F"; - else if (value === "digit") segment += "\\d"; - else if (value === "graph") segment += "\x21-\x7E"; - else if (value === "lower") segment += "a-z"; - else if (value === "print") segment += "\x20-\x7E"; - else if (value === "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value === "space") segment += "\\s\v"; - else if (value === "upper") segment += "A-Z"; - else if (value === "word") segment += "\\w"; - else if (value === "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - if (glob[i] === "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - if (inRange) { - segment += glob[i]; - continue; - } - if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += ")"; - const type = groupStack.pop(); - if (type === "!") { - segment += c.wildcard; - } else if (type !== "@") { - segment += type; - } - continue; - } - if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "+" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - if (glob[i] === "@" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - if (glob[i] === "?") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - if (glob[i] === "!" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - if (glob[i] === "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "*") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while(glob[i + 1] === "*"){ - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if (globstarOption && numStars === 2 && [ - ...c.seps, - undefined - ].includes(prevChar) && [ - ...c.seps, - undefined - ].includes(nextChar)) { - segment += c.globstar; - endsWithSep = true; - } else { - segment += c.wildcard; - } - } - continue; - } - segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)){ - segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? c.sep : c.sepMaybe; - endsWithSep = true; - } - // Terminates with `i` at the start of the next segment. - while(c.seps.includes(glob[i]))i++; - j = i; - } - regExpString = `^${regExpString}$`; - return new RegExp(regExpString, caseInsensitive ? "i" : ""); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const constants = { - sep: "/+", - sepMaybe: "/*", - seps: [ - "/" - ], - globstar: "(?:[^/]*(?:/|$)+)*", - wildcard: "[^/]*", - escapePrefix: "\\" -}; -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `?` - Matches any single character. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precedence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occurred. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. - * - * @example Usage - * ```ts - * import { globToRegExp } from "@std/path/posix/glob-to-regexp"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(globToRegExp("*.js"), /^[^/]*\.js\/*$/); - * ``` - * - * @param glob Glob string to convert. - * @param options Conversion options. - * @returns The regular expression equivalent to the glob. - */ function globToRegExp(glob, options = {}) { - return _globToRegExp(constants, glob, options); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Test whether the given string is a glob. - * - * @example Usage - * ```ts - * import { isGlob } from "@std/path/is-glob"; - * import { assert } from "@std/assert"; - * - * assert(!isGlob("foo/bar/../baz")); - * assert(isGlob("foo/*ar/../baz")); - * ``` - * - * @param str String to test. - * @returns `true` if the given string is a glob, otherwise `false` - */ function isGlob(str) { - const chars = { - "{": "}", - "(": ")", - "[": "]" - }; - const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/; - if (str === "") { - return false; - } - let match; - while(match = regex.exec(str)){ - if (match[2]) return true; - let idx = match.index + match[0].length; - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - str = str.slice(idx); - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { normalizeGlob } from "@std/path/posix/normalize-glob"; - * import { assertEquals } from "@std/assert"; - * - * const path = normalizeGlob("foo/bar/../*", { globstar: true }); - * assertEquals(path, "foo/*"); - * ``` - * - * @param glob The glob to normalize. - * @param options The options to use. - * @returns The normalized path. - */ function normalizeGlob(glob, options = {}) { - const { globstar = false } = options; - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEPARATOR_PATTERN.source; - const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like join(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { joinGlobs } from "@std/path/posix/join-globs"; - * import { assertEquals } from "@std/assert"; - * - * const path = joinGlobs(["foo", "bar", "**"], { globstar: true }); - * assertEquals(path, "foo/bar/**"); - * ``` - * - * @param globs The globs to join. - * @param options The options to use. - * @returns The joined path. - */ function joinGlobs(globs, options = {}) { - const { globstar = false } = options; - if (!globstar || globs.length === 0) { - return join(...globs); - } - let joined; - for (const glob of globs){ - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEPARATOR}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { - globstar - }); -} - -exports.DELIMITER = DELIMITER; -exports.SEPARATOR = SEPARATOR; -exports.SEPARATOR_PATTERN = SEPARATOR_PATTERN; -exports.basename = basename; -exports.common = common; -exports.dirname = dirname; -exports.extname = extname; -exports.format = format; -exports.fromFileUrl = fromFileUrl; -exports.globToRegExp = globToRegExp; -exports.isAbsolute = isAbsolute; -exports.isGlob = isGlob; -exports.join = join; -exports.joinGlobs = joinGlobs; -exports.normalize = normalize; -exports.normalizeGlob = normalizeGlob; -exports.parse = parse; -exports.relative = relative; -exports.resolve = resolve; -exports.toFileUrl = toFileUrl; -exports.toNamespacedPath = toNamespacedPath; diff --git a/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs b/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs deleted file mode 100644 index 1501f94..0000000 --- a/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs +++ /dev/null @@ -1,1678 +0,0 @@ -// @ts-nocheck -'use strict'; - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -function assertPath(path) { - if (typeof path !== "string") { - throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function stripSuffix(name, suffix) { - if (suffix.length >= name.length) { - return name; - } - const lenDiff = name.length - suffix.length; - for(let i = suffix.length - 1; i >= 0; --i){ - if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { - return name; - } - } - return name.slice(0, -suffix.length); -} -function lastPathSegment(path, isSep, start = 0) { - let matchedNonSeparator = false; - let end = path.length; - for(let i = path.length - 1; i >= start; --i){ - if (isSep(path.charCodeAt(i))) { - if (matchedNonSeparator) { - start = i + 1; - break; - } - } else if (!matchedNonSeparator) { - matchedNonSeparator = true; - end = i + 1; - } - } - return path.slice(start, end); -} -function assertArgs$1(path, suffix) { - assertPath(path); - if (path.length === 0) return path; - if (typeof suffix !== "string") { - throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Alphabet chars. -const CHAR_UPPERCASE_A = 65; /* A */ -const CHAR_LOWERCASE_A = 97; /* a */ -const CHAR_UPPERCASE_Z = 90; /* Z */ -const CHAR_LOWERCASE_Z = 122; /* z */ -// Non-alphabetic chars. -const CHAR_DOT = 46; /* . */ -const CHAR_FORWARD_SLASH = 47; /* / */ -const CHAR_BACKWARD_SLASH = 92; /* \ */ -const CHAR_COLON = 58; /* : */ -const CHAR_QUESTION_MARK = 63; /* ? */ - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function stripTrailingSeparators(segment, isSep) { - if (segment.length <= 1) { - return segment; - } - let end = segment.length; - for(let i = segment.length - 1; i > 0; i--){ - if (isSep(segment.charCodeAt(i))) { - end = i; - } else { - break; - } - } - return segment.slice(0, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} -function isPathSeparator(code) { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -} -function isWindowsDeviceRoot(code) { - return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$3(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol !== "file:") { - throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a file URL to a path string. - * - * @example Usage - * ```ts - * import { fromFileUrl } from "@std/path/windows/from-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo"); - * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo"); - * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo"); - * ``` - * - * @param url The file URL to convert. - * @returns The path string. - */ function fromFileUrl(url) { - url = assertArg$3(url); - let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (url.hostname !== "") { - // Note: The `URL` implementation guarantees that the drive letter and - // hostname are mutually exclusive. Otherwise it would not have been valid - // to append the hostname and path like this. - path = `\\\\${url.hostname}${path}`; - } - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the last portion of a `path`. - * Trailing directory separators are ignored, and optional suffix is removed. - * - * @example Usage - * ```ts - * import { basename } from "@std/path/windows/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("C:\\user\\Documents\\"), "Documents"); - * assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png"); - * assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image"); - * assertEquals(basename(new URL("file:///C:/user/Documents/image.png")), "image.png"); - * assertEquals(basename(new URL("file:///C:/user/Documents/image.png"), ".png"), "image"); - * ``` - * - * @param path The path to extract the name from. - * @param suffix The suffix to remove from extracted name. - * @returns The extracted name. - */ function basename(path, suffix = "") { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArgs$1(path, suffix); - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - let start = 0; - if (path.length >= 2) { - const drive = path.charCodeAt(0); - if (isWindowsDeviceRoot(drive)) { - if (path.charCodeAt(1) === CHAR_COLON) start = 2; - } - } - const lastSegment = lastPathSegment(path, isPathSeparator, start); - const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator); - return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * The character used to separate entries in the PATH environment variable. - */ const DELIMITER = ";"; -/** - * The character used to separate components of a file path. - */ const SEPARATOR = "\\"; -/** - * A regular expression that matches one or more path separators. - */ const SEPARATOR_PATTERN = /[\\/]+/; - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$2(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the directory path of a `path`. - * - * @example Usage - * ```ts - * import { dirname } from "@std/path/windows/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("C:\\foo\\bar\\baz.ext"), "C:\\foo\\bar"); - * assertEquals(dirname(new URL("file:///C:/foo/bar/baz.ext")), "C:\\foo\\bar"); - * ``` - * - * @param path The path to get the directory from. - * @returns The directory path. - */ function dirname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg$2(path); - const len = path.length; - let rootEnd = -1; - let end = -1; - let matchedSlash = true; - let offset = 0; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = offset = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - return path; - } - for(let i = len - 1; i >= offset; --i){ - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) return "."; - else end = rootEnd; - } - return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the extension of the `path` with leading period. - * - * @example Usage - * ```ts - * import { extname } from "@std/path/windows/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("file.ts"), ".ts"); - * assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext"); - * ``` - * - * @param path The path to get the extension from. - * @returns The extension of the `path`. - */ function extname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertPath(path); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for(let i = path.length - 1; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function _format(sep, pathObject) { - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); - if (!dir) return base; - if (base === sep) return dir; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} -function assertArg$1(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Generate a path from `ParsedPath` object. - * - * @example Usage - * ```ts - * import { format } from "@std/path/windows/format"; - * import { assertEquals } from "@std/assert"; - * - * const path = format({ - * root: "C:\\", - * dir: "C:\\path\\dir", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * assertEquals(path, "C:\\path\\dir\\file.txt"); - * ``` - * - * @param pathObject The path object to format. - * @returns The formatted path. - */ function format(pathObject) { - assertArg$1(pathObject); - return _format("\\", pathObject); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Verifies whether provided path is absolute. - * - * @example Usage - * ```ts - * import { isAbsolute } from "@std/path/windows/is-absolute"; - * import { assert, assertFalse } from "@std/assert"; - * - * assert(isAbsolute("C:\\foo\\bar")); - * assertFalse(isAbsolute("..\\baz")); - * ``` - * - * @param path The path to verify. - * @returns `true` if the path is absolute, `false` otherwise. - */ function isAbsolute(path) { - assertPath(path); - const len = path.length; - if (len === 0) return false; - const code = path.charCodeAt(0); - if (isPathSeparator(code)) { - return true; - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { - if (isPathSeparator(path.charCodeAt(2))) return true; - } - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Resolves . and .. elements in a path with directory names -function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code; - for(let i = 0; i <= path.length; ++i){ - if (i < path.length) code = path.charCodeAt(i); - else if (isPathSeparator(code)) break; - else code = CHAR_FORWARD_SLASH; - if (isPathSeparator(code)) { - if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * Note that resolving these segments does not necessarily mean that all will be eliminated. - * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. - * - * @example Usage - * ```ts - * import { normalize } from "@std/path/windows/normalize"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(normalize("C:\\foo\\..\\bar"), "C:\\bar"); - * assertEquals(normalize(new URL("file:///C:/foo/../bar")), "C:\\bar"); - * ``` - * - * @param path The path to normalize - * @returns The normalized path - */ function normalize(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg(path); - const len = path.length; - let rootEnd = 0; - let device; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an absolute - // path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - // Return the normalized version of the UNC root since there - // is nothing left to process - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } else if (j !== last) { - // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid unnecessary - // work - return "\\"; - } - let tail; - if (rootEnd < len) { - tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator); - } else { - tail = ""; - } - if (tail.length === 0 && !isAbsolute) tail = "."; - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === undefined) { - if (isAbsolute) { - if (tail.length > 0) return `\\${tail}`; - else return "\\"; - } - return tail; - } else if (isAbsolute) { - if (tail.length > 0) return `${device}\\${tail}`; - else return `${device}\\`; - } - return device + tail; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * - * @example Usage - * ```ts - * import { join } from "@std/path/windows/join"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(join("C:\\foo", "bar", "baz\\.."), "C:\\foo\\bar"); - * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz\\.."), "C:\\foo\\bar"); - * ``` - * - * @param path The path to join. This can be string or file URL. - * @param paths The paths to join. - * @returns The joined path. - */ function join(path, ...paths) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - paths = path ? [ - path, - ...paths - ] : paths; - paths.forEach((path)=>assertPath(path)); - paths = paths.filter((path)=>path.length > 0); - if (paths.length === 0) return "."; - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\\' - let needsReplace = true; - let slashCount = 0; - const firstPart = paths[0]; - if (isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1) { - if (isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; - else { - // We matched a UNC path in the first part - needsReplace = false; - } - } - } - } - } - let joined = paths.join("\\"); - if (needsReplace) { - // Find any more consecutive slashes we need to replace - for(; slashCount < joined.length; ++slashCount){ - if (!isPathSeparator(joined.charCodeAt(slashCount))) break; - } - // Replace the slashes if needed - if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; - } - return normalize(joined); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return a `ParsedPath` object of the `path`. - * - * @example Usage - * ```ts - * import { parse } from "@std/path/windows/parse"; - * import { assertEquals } from "@std/assert"; - * - * const parsed = parse("C:\\foo\\bar\\baz.ext"); - * assertEquals(parsed, { - * root: "C:\\", - * dir: "C:\\foo\\bar", - * base: "baz.ext", - * ext: ".ext", - * name: "baz", - * }); - * ``` - * - * @param path The path to parse. - * @returns The `ParsedPath` object. - */ function parse(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - const len = path.length; - if (len === 0) return ret; - let rootEnd = 0; - let code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - rootEnd = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - ret.base = "\\"; - return ret; - } - rootEnd = 3; - } - } else { - // `path` contains just a relative drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - ret.base = "\\"; - return ret; - } - if (rootEnd > 0) ret.root = path.slice(0, rootEnd); - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for(; i >= rootEnd; --i){ - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - ret.base = ret.name = path.slice(startPart, end); - } - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - // Fallback to '\' in case there is no basename - ret.base = ret.base || "\\"; - // If the directory is the root, use the entire root as the `dir` including - // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the - // trailing slash (`C:\abc\def` -> `C:\abc`). - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else ret.dir = ret.root; - return ret; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path segments into a `path`. - * - * @example Usage - * ```ts - * import { resolve } from "@std/path/windows/resolve"; - * import { assertEquals } from "@std/assert"; - * - * const resolved = resolve("C:\\foo\\bar", "..\\baz"); - * assertEquals(resolved, "C:\\foo\\baz"); - * ``` - * - * @param pathSegments The path segments to process to path - * @returns The resolved path - */ function resolve(...pathSegments) { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - for(let i = pathSegments.length - 1; i >= -1; i--){ - let path; - // deno-lint-ignore no-explicit-any - const { Deno } = globalThis; - if (i >= 0) { - path = pathSegments[i]; - } else if (!resolvedDevice) { - if (typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)"); - } - path = Deno.cwd(); - } else { - if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a relative path without a current working directory (CWD)"); - } - path = Deno.cwd(); - // Verify that a cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { - path = `${resolvedDevice}\\`; - } - } - assertPath(path); - const len = path.length; - // Skip empty entries - if (len === 0) continue; - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an - // absolute path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - device = `\\\\${firstPart}\\${path.slice(last)}`; - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator - rootEnd = 1; - isAbsolute = true; - } - if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { - continue; - } - if (resolvedDevice.length === 0 && device.length > 0) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - } - if (resolvedAbsolute && resolvedDevice.length > 0) break; - } - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when Deno.cwd() - // fails) - // Normalize the tail path - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); - return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArgs(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the relative path from `from` to `to` based on current working directory. - * - * An example in windows, for instance: - * from = 'C:\\orandea\\test\\aaa' - * to = 'C:\\orandea\\impl\\bbb' - * The output of the function should be: '..\\..\\impl\\bbb' - * - * @example Usage - * ```ts - * import { relative } from "@std/path/windows/relative"; - * import { assertEquals } from "@std/assert"; - * - * const relativePath = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb"); - * assertEquals(relativePath, "..\\..\\impl\\bbb"); - * ``` - * - * @param from The path from which to calculate the relative path - * @param to The path to which to calculate the relative path - * @returns The relative path from `from` to `to` - */ function relative(from, to) { - assertArgs(from, to); - const fromOrig = resolve(from); - const toOrig = resolve(to); - if (fromOrig === toOrig) return ""; - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) return ""; - // Trim any leading backslashes - let fromStart = 0; - let fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for(; fromEnd - 1 > fromStart; --fromEnd){ - if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - // Trim any leading backslashes - let toStart = 0; - let toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for(; toEnd - 1 > toStart; --toEnd){ - if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const toLen = toEnd - toStart; - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); - } else if (i === 2) { - // We get here if `from` is the device root. - // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='C:\\foo\\bar'; to='C:\\foo' - lastCommonSep = i; - } else if (i === 2) { - // We get here if `to` is the device root. - // For example: from='C:\\foo\\bar'; to='C:\\' - lastCommonSep = 3; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; - } - // We found a mismatch before the first common path separator was seen, so - // return the original `to`. - if (i !== length && lastCommonSep === -1) { - return toOrig; - } - let out = ""; - if (lastCommonSep === -1) lastCommonSep = 0; - // Generate the relative path based on the path difference between `to` and - // `from` - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "\\.."; - } - } - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) { - return out + toOrig.slice(toStart + lastCommonSep, toEnd); - } else { - toStart += lastCommonSep; - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; - return toOrig.slice(toStart, toEnd); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const WHITESPACE_ENCODINGS = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20" -}; -function encodeWhitespace(string) { - return string.replaceAll(/[\s]/g, (c)=>{ - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path string to a file URL. - * - * @example Usage - * ```ts - * import { toFileUrl } from "@std/path/windows/to-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo")); - * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo")); - * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo")); - * ``` - * @param path The path to convert. - * @returns The file URL. - */ function toFileUrl(path) { - if (!isAbsolute(path)) { - throw new TypeError(`Path must be absolute: received "${path}"`); - } - const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); - const url = new URL("file:///"); - url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); - if (hostname !== undefined && hostname !== "localhost") { - url.hostname = hostname; - if (!url.hostname) { - throw new TypeError(`Invalid hostname: "${url.hostname}"`); - } - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path to a namespace path - * - * @example Usage - * ```ts - * import { toNamespacedPath } from "@std/path/windows/to-namespaced-path"; - * import { assertEquals } from "@std/assert"; - * - * const namespaced = toNamespacedPath("C:\\foo\\bar"); - * assertEquals(namespaced, "\\\\?\\C:\\foo\\bar"); - * ``` - * - * @param path The path to resolve to namespaced path - * @returns The resolved namespaced path - */ function toNamespacedPath(path) { - // Note: this will *probably* throw somewhere. - if (typeof path !== "string") return path; - if (path.length === 0) return ""; - const resolvedPath = resolve(path); - if (resolvedPath.length >= 3) { - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - // Possible UNC root - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { - // Possible device root - if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - // Matched device root, convert the path to a long UNC path - return `\\\\?\\${resolvedPath}`; - } - } - } - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function common$1(paths, sep) { - const [first = "", ...remaining] = paths; - const parts = first.split(sep); - let endOfPrefix = parts.length; - let append = ""; - for (const path of remaining){ - const compare = path.split(sep); - if (compare.length <= endOfPrefix) { - endOfPrefix = compare.length; - append = ""; - } - for(let i = 0; i < endOfPrefix; i++){ - if (compare[i] !== parts[i]) { - endOfPrefix = i; - append = i === 0 ? "" : sep; - break; - } - } - } - return parts.slice(0, endOfPrefix).join(sep) + append; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Determines the common path from a set of paths for Windows systems. - * - * @example Usage - * ```ts - * import { common } from "@std/path/windows/common"; - * import { assertEquals } from "@std/assert"; - * - * const path = common([ - * "C:\\foo\\bar", - * "C:\\foo\\baz", - * ]); - * assertEquals(path, "C:\\foo\\"); - * ``` - * - * @param paths The paths to compare. - * @returns The common path. - */ function common(paths) { - return common$1(paths, SEPARATOR); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, - * {@linkcode normalizeGlob} and {@linkcode expandGlob}. - */ const REG_EXP_ESCAPE_CHARS = [ - "!", - "$", - "(", - ")", - "*", - "+", - ".", - "=", - "?", - "[", - "\\", - "^", - "{", - "|" -]; -const RANGE_ESCAPE_CHARS = [ - "-", - "\\", - "]" -]; -function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, -caseInsensitive = false } = {}) { - if (glob === "") { - return /(?!)/; - } - // Remove trailing separators. - let newLength = glob.length; - for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - let regExpString = ""; - // Terminates correctly. Trust that `j` is incremented every iteration. - for(let j = 0; j < glob.length;){ - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - // Terminates with `i` at the non-inclusive end of the current segment. - for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){ - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - if (glob[i] === c.escapePrefix) { - inEscape = true; - continue; - } - if (glob[i] === "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] === "!") { - i++; - segment += "^"; - } else if (glob[i + 1] === "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] === ":") { - let k = i + 1; - let value = ""; - while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ - value += glob[k + 1]; - k++; - } - if (glob[k + 1] === ":" && glob[k + 2] === "]") { - i = k + 2; - if (value === "alnum") segment += "\\dA-Za-z"; - else if (value === "alpha") segment += "A-Za-z"; - else if (value === "ascii") segment += "\x00-\x7F"; - else if (value === "blank") segment += "\t "; - else if (value === "cntrl") segment += "\x00-\x1F\x7F"; - else if (value === "digit") segment += "\\d"; - else if (value === "graph") segment += "\x21-\x7E"; - else if (value === "lower") segment += "a-z"; - else if (value === "print") segment += "\x20-\x7E"; - else if (value === "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value === "space") segment += "\\s\v"; - else if (value === "upper") segment += "A-Z"; - else if (value === "word") segment += "\\w"; - else if (value === "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - if (glob[i] === "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - if (inRange) { - segment += glob[i]; - continue; - } - if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += ")"; - const type = groupStack.pop(); - if (type === "!") { - segment += c.wildcard; - } else if (type !== "@") { - segment += type; - } - continue; - } - if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "+" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - if (glob[i] === "@" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - if (glob[i] === "?") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - if (glob[i] === "!" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - if (glob[i] === "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "*") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while(glob[i + 1] === "*"){ - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if (globstarOption && numStars === 2 && [ - ...c.seps, - undefined - ].includes(prevChar) && [ - ...c.seps, - undefined - ].includes(nextChar)) { - segment += c.globstar; - endsWithSep = true; - } else { - segment += c.wildcard; - } - } - continue; - } - segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)){ - segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? c.sep : c.sepMaybe; - endsWithSep = true; - } - // Terminates with `i` at the start of the next segment. - while(c.seps.includes(glob[i]))i++; - j = i; - } - regExpString = `^${regExpString}$`; - return new RegExp(regExpString, caseInsensitive ? "i" : ""); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const constants = { - sep: "(?:\\\\|/)+", - sepMaybe: "(?:\\\\|/)*", - seps: [ - "\\", - "/" - ], - globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*", - wildcard: "[^\\\\/]*", - escapePrefix: "`" -}; -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `?` - Matches any single character. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precedence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occurred. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. - * - * @example Usage - * ```ts - * import { globToRegExp } from "@std/path/windows/glob-to-regexp"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(globToRegExp("*.js"), /^[^\\/]*\.js(?:\\|\/)*$/); - * ``` - * - * @param glob Glob string to convert. - * @param options Conversion options. - * @returns The regular expression equivalent to the glob. - */ function globToRegExp(glob, options = {}) { - return _globToRegExp(constants, glob, options); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Test whether the given string is a glob. - * - * @example Usage - * ```ts - * import { isGlob } from "@std/path/is-glob"; - * import { assert } from "@std/assert"; - * - * assert(!isGlob("foo/bar/../baz")); - * assert(isGlob("foo/*ar/../baz")); - * ``` - * - * @param str String to test. - * @returns `true` if the given string is a glob, otherwise `false` - */ function isGlob(str) { - const chars = { - "{": "}", - "(": ")", - "[": "]" - }; - const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/; - if (str === "") { - return false; - } - let match; - while(match = regex.exec(str)){ - if (match[2]) return true; - let idx = match.index + match[0].length; - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - str = str.slice(idx); - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { normalizeGlob } from "@std/path/windows/normalize-glob"; - * import { assertEquals } from "@std/assert"; - * - * const normalized = normalizeGlob("**\\foo\\..\\bar", { globstar: true }); - * assertEquals(normalized, "**\\bar"); - * ``` - * - * @param glob The glob pattern to normalize. - * @param options The options for glob pattern. - * @returns The normalized glob pattern. - */ function normalizeGlob(glob, options = {}) { - const { globstar = false } = options; - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEPARATOR_PATTERN.source; - const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like join(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * - * ```ts - * import { joinGlobs } from "@std/path/windows/join-globs"; - * import { assertEquals } from "@std/assert"; - * - * const joined = joinGlobs(["foo", "**", "bar"], { globstar: true }); - * assertEquals(joined, "foo\\**\\bar"); - * ``` - * - * @param globs The globs to join. - * @param options The options for glob pattern. - * @returns The joined glob pattern. - */ function joinGlobs(globs, options = {}) { - const { globstar = false } = options; - if (!globstar || globs.length === 0) { - return join(...globs); - } - let joined; - for (const glob of globs){ - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEPARATOR}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { - globstar - }); -} - -exports.DELIMITER = DELIMITER; -exports.SEPARATOR = SEPARATOR; -exports.SEPARATOR_PATTERN = SEPARATOR_PATTERN; -exports.basename = basename; -exports.common = common; -exports.dirname = dirname; -exports.extname = extname; -exports.format = format; -exports.fromFileUrl = fromFileUrl; -exports.globToRegExp = globToRegExp; -exports.isAbsolute = isAbsolute; -exports.isGlob = isGlob; -exports.join = join; -exports.joinGlobs = joinGlobs; -exports.normalize = normalize; -exports.normalizeGlob = normalizeGlob; -exports.parse = parse; -exports.relative = relative; -exports.resolve = resolve; -exports.toFileUrl = toFileUrl; -exports.toNamespacedPath = toNamespacedPath; diff --git a/node_modules/@eslint/config-array/dist/cjs/types.cts b/node_modules/@eslint/config-array/dist/cjs/types.cts deleted file mode 100644 index 54ff217..0000000 --- a/node_modules/@eslint/config-array/dist/cjs/types.cts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @fileoverview Types for the config-array package. - * @author Nicholas C. Zakas - */ - -/** - * A file matcher used in `files` and `ignores`. - */ -export type FileMatcher = string | ((filePath: string) => boolean); - -/** - * An entry in a config's `files` array. - * - * A subarray means all matchers must match. - */ -export type FilesMatcher = FileMatcher | FileMatcher[]; - -/** - * The config types allowed in the `extraConfigTypes` option. - */ -export type ExtraConfigType = "array" | "function"; - -export interface ConfigObject { - /** - * The base path for files and ignores. - */ - basePath?: string; - - /** - * The files to include. - */ - files?: FilesMatcher[]; - - /** - * The files to exclude. - */ - ignores?: FileMatcher[]; - - /** - * The name of the config object. - */ - name?: string; - - // may also have any number of other properties - [key: string]: unknown; -} diff --git a/node_modules/@eslint/config-array/dist/esm/index.d.ts b/node_modules/@eslint/config-array/dist/esm/index.d.ts deleted file mode 100644 index b31bed5..0000000 --- a/node_modules/@eslint/config-array/dist/esm/index.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -export { ObjectSchema } from "@eslint/object-schema"; -export type PropertyDefinition = $eslintobjectschema.PropertyDefinition; -export type ObjectDefinition = $eslintobjectschema.ObjectDefinition; -export type ConfigObject = $typests.ConfigObject; -export type FileMatcher = $typests.FileMatcher; -export type FilesMatcher = $typests.FilesMatcher; -export type ExtraConfigType = $typests.ExtraConfigType; -export type MinimatchOptions = $minimatch.MinimatchOptions; -export type ObjectSchemaInstance = ObjectSchema; -/** - * Represents an array of config objects and provides method for working with - * those config objects. - */ -export class ConfigArray extends Array { - /** - * Creates a new instance of ConfigArray. - * @param {Iterable|Function|Object} configs An iterable yielding config - * objects, or a config function, or a config object. - * @param {Object} options The options for the ConfigArray. - * @param {string} [options.basePath="/"] The absolute path of the config file directory. - * Defaults to `"/"`. - * @param {boolean} [options.normalized=false] Flag indicating if the - * configs have already been normalized. - * @param {ObjectDefinition} [options.schema] The additional schema - * definitions to use for the ConfigArray schema. - * @param {ReadonlyArray} [options.extraConfigTypes] List of config types supported. - * @throws {TypeError} When the `basePath` is not a non-empty string, - */ - constructor(configs: Iterable | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: { - basePath?: string; - normalized?: boolean; - schema?: ObjectDefinition; - extraConfigTypes?: ReadonlyArray; - }); - /** - * The path of the config file that this array was loaded from. - * This is used to calculate filename matches. - * @property basePath - * @type {string} - */ - basePath: string; - /** - * The supported config types. - * @type {ReadonlyArray} - */ - extraConfigTypes: ReadonlyArray; - /** - * Returns the `files` globs from every config object in the array. - * This can be used to determine which files will be matched by a - * config array or to use as a glob pattern when no patterns are provided - * for a command line interface. - * @returns {Array} An array of matchers. - */ - get files(): Array; - /** - * Returns ignore matchers that should always be ignored regardless of - * the matching `files` fields in any configs. This is necessary to mimic - * the behavior of things like .gitignore and .eslintignore, allowing a - * globbing operation to be faster. - * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores. - */ - get ignores(): Array<{ - basePath?: string; - name?: string; - ignores: FileMatcher[]; - }>; - /** - * Indicates if the config array has been normalized. - * @returns {boolean} True if the config array is normalized, false if not. - */ - isNormalized(): boolean; - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {Promise} The current ConfigArray instance. - */ - normalize(context?: any): Promise; - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {ConfigArray} The current ConfigArray instance. - */ - normalizeSync(context?: any): ConfigArray; - /** - * Returns the config object for a given file path and a status that can be used to determine why a file has no config. - * @param {string} filePath The path of a file to get a config for. - * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} - * An object with an optional property `config` and property `status`. - * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, - * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. - */ - getConfigWithStatus(filePath: string): { - config?: any; - status: "ignored" | "external" | "unconfigured" | "matched"; - }; - /** - * Returns the config object for a given file path. - * @param {string} filePath The path of a file to get a config for. - * @returns {Object|undefined} The config object for this file or `undefined`. - */ - getConfig(filePath: string): any | undefined; - /** - * Determines whether a file has a config or why it doesn't. - * @param {string} filePath The path of the file to check. - * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: - * * `"ignored"`: the file is ignored - * * `"external"`: the file is outside the base path - * * `"unconfigured"`: the file is not matched by any config - * * `"matched"`: the file has a matching config - */ - getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched"; - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - * @deprecated Use `isFileIgnored` instead. - */ - isIgnored(filePath: string): boolean; - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - */ - isFileIgnored(filePath: string): boolean; - /** - * Determines if the given directory is ignored based on the configs. - * This checks only default `ignores` that don't have `files` in the - * same config. A pattern such as `/foo` be considered to ignore the directory - * while a pattern such as `/foo/**` is not considered to ignore the - * directory because it is matching files. - * @param {string} directoryPath The path of a directory to check. - * @returns {boolean} True if the directory is ignored, false if not. Will - * return true for any directory that is not inside of `basePath`. - * @throws {Error} When the `ConfigArray` is not normalized. - */ - isDirectoryIgnored(directoryPath: string): boolean; - #private; -} -export namespace ConfigArraySymbol { - let isNormalized: symbol; - let configCache: symbol; - let schema: symbol; - let finalizeConfig: symbol; - let preprocessConfig: symbol; -} -import type * as $eslintobjectschema from "@eslint/object-schema"; -import type * as $typests from "./types.ts"; -import type * as $minimatch from "minimatch"; -import { ObjectSchema } from '@eslint/object-schema'; diff --git a/node_modules/@eslint/config-array/dist/esm/index.js b/node_modules/@eslint/config-array/dist/esm/index.js deleted file mode 100644 index 904058a..0000000 --- a/node_modules/@eslint/config-array/dist/esm/index.js +++ /dev/null @@ -1,1516 +0,0 @@ -// @ts-self-types="./index.d.ts" -import * as posixPath from './std__path/posix.js'; -import * as windowsPath from './std__path/windows.js'; -import { Minimatch } from 'minimatch'; -import createDebug from 'debug'; -import { ObjectSchema } from '@eslint/object-schema'; -export { ObjectSchema } from '@eslint/object-schema'; - -/** - * @fileoverview ConfigSchema - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - -/** @import * as $eslintobjectschema from "@eslint/object-schema"; */ -/** @typedef {$eslintobjectschema.PropertyDefinition} PropertyDefinition */ -/** @typedef {$eslintobjectschema.ObjectDefinition} ObjectDefinition */ - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * A strategy that does nothing. - * @type {PropertyDefinition} - */ -const NOOP_STRATEGY = { - required: false, - merge() { - return undefined; - }, - validate() {}, -}; - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * The base schema that every ConfigArray uses. - * @type {ObjectDefinition} - */ -const baseSchema = Object.freeze({ - name: { - required: false, - merge() { - return undefined; - }, - validate(value) { - if (typeof value !== "string") { - throw new TypeError("Property must be a string."); - } - }, - }, - basePath: NOOP_STRATEGY, - files: NOOP_STRATEGY, - ignores: NOOP_STRATEGY, -}); - -/** - * @fileoverview ConfigSchema - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Asserts that a given value is an array. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array. - */ -function assertIsArray(value) { - if (!Array.isArray(value)) { - throw new TypeError("Expected value to be an array."); - } -} - -/** - * Asserts that a given value is an array containing only strings and functions. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array of strings and functions. - */ -function assertIsArrayOfStringsAndFunctions(value) { - assertIsArray(value); - - if ( - value.some( - item => typeof item !== "string" && typeof item !== "function", - ) - ) { - throw new TypeError( - "Expected array to only contain strings and functions.", - ); - } -} - -/** - * Asserts that a given value is a non-empty array. - * @param {*} value The value to check. - * @returns {void} - * @throws {TypeError} When the value is not an array or an empty array. - */ -function assertIsNonEmptyArray(value) { - if (!Array.isArray(value) || value.length === 0) { - throw new TypeError("Expected value to be a non-empty array."); - } -} - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * The schema for `files` and `ignores` that every ConfigArray uses. - * @type {ObjectDefinition} - */ -const filesAndIgnoresSchema = Object.freeze({ - basePath: { - required: false, - merge() { - return undefined; - }, - validate(value) { - if (typeof value !== "string") { - throw new TypeError("Expected value to be a string."); - } - }, - }, - files: { - required: false, - merge() { - return undefined; - }, - validate(value) { - // first check if it's an array - assertIsNonEmptyArray(value); - - // then check each member - value.forEach(item => { - if (Array.isArray(item)) { - assertIsArrayOfStringsAndFunctions(item); - } else if ( - typeof item !== "string" && - typeof item !== "function" - ) { - throw new TypeError( - "Items must be a string, a function, or an array of strings and functions.", - ); - } - }); - }, - }, - ignores: { - required: false, - merge() { - return undefined; - }, - validate: assertIsArrayOfStringsAndFunctions, - }, -}); - -/** - * @fileoverview ConfigArray - * @author Nicholas C. Zakas - */ - - -//------------------------------------------------------------------------------ -// Types -//------------------------------------------------------------------------------ - -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.ConfigObject} ConfigObject */ -/** @typedef {$typests.FileMatcher} FileMatcher */ -/** @typedef {$typests.FilesMatcher} FilesMatcher */ -/** @typedef {$typests.ExtraConfigType} ExtraConfigType */ -/** @import * as $minimatch from "minimatch"; */ -/** @typedef {$minimatch.MinimatchOptions} MinimatchOptions */ -/** @import * as PathImpl from "@jsr/std__path" */ - -/* - * This is a bit of a hack to make TypeScript happy with the Rollup-created - * CommonJS file. Rollup doesn't do object destructuring for imported files - * and instead imports the default via `require()`. This messes up type checking - * for `ObjectSchema`. To work around that, we just import the type manually - * and give it a different name to use in the JSDoc comments. - */ -/** @typedef {ObjectSchema} ObjectSchemaInstance */ - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const debug = createDebug("@eslint/config-array"); - -/** - * A cache for minimatch instances. - * @type {Map} - */ -const minimatchCache = new Map(); - -/** - * A cache for negated minimatch instances. - * @type {Map} - */ -const negatedMinimatchCache = new Map(); - -/** - * Options to use with minimatch. - * @type {MinimatchOptions} - */ -const MINIMATCH_OPTIONS = { - // matchBase: true, - dot: true, -}; - -/** - * The types of config objects that are supported. - * @type {Set} - */ -const CONFIG_TYPES = new Set(["array", "function"]); - -/** - * Fields that are considered metadata and not part of the config object. - * @type {Set} - */ -const META_FIELDS = new Set(["name", "basePath"]); - -/** - * A schema containing just files and ignores for early validation. - * @type {ObjectSchemaInstance} - */ -const FILES_AND_IGNORES_SCHEMA = new ObjectSchema(filesAndIgnoresSchema); - -// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`. - -const CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: "external" }); -const CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: "ignored" }); -const CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({ - status: "unconfigured", -}); - -// Match two leading dots followed by a slash or the end of input. -const EXTERNAL_PATH_REGEX = /^\.\.(?:\/|$)/u; - -/** - * Wrapper error for config validation errors that adds a name to the front of the - * error message. - */ -class ConfigError extends Error { - /** - * Creates a new instance. - * @param {string} name The config object name causing the error. - * @param {number} index The index of the config object in the array. - * @param {Object} options The options for the error. - * @param {Error} [options.cause] The error that caused this error. - * @param {string} [options.message] The message to use for the error. - */ - constructor(name, index, { cause, message }) { - const finalMessage = message || cause.message; - - super(`Config ${name}: ${finalMessage}`, { cause }); - - // copy over custom properties that aren't represented - if (cause) { - for (const key of Object.keys(cause)) { - if (!(key in this)) { - this[key] = cause[key]; - } - } - } - - /** - * The name of the error. - * @type {string} - * @readonly - */ - this.name = "ConfigError"; - - /** - * The index of the config object in the array. - * @type {number} - * @readonly - */ - this.index = index; - } -} - -/** - * Gets the name of a config object. - * @param {ConfigObject} config The config object to get the name of. - * @returns {string} The name of the config object. - */ -function getConfigName(config) { - if (config && typeof config.name === "string" && config.name) { - return `"${config.name}"`; - } - - return "(unnamed)"; -} - -/** - * Rethrows a config error with additional information about the config object. - * @param {ConfigObject} config The config object to get the name of. - * @param {number} index The index of the config object in the array. - * @param {Error} error The error to rethrow. - * @throws {ConfigError} When the error is rethrown for a config. - */ -function rethrowConfigError(config, index, error) { - const configName = getConfigName(config); - throw new ConfigError(configName, index, { cause: error }); -} - -/** - * Shorthand for checking if a value is a string. - * @param {any} value The value to check. - * @returns {value is string} True if a string, false if not. - */ -function isString(value) { - return typeof value === "string"; -} - -/** - * Creates a function that asserts that the config is valid - * during normalization. This checks that the config is not nullish - * and that files and ignores keys of a config object are valid as per base schema. - * @param {Object} config The config object to check. - * @param {number} index The index of the config object in the array. - * @returns {void} - * @throws {ConfigError} If the files and ignores keys of a config object are not valid. - */ -function assertValidBaseConfig(config, index) { - if (config === null) { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected null config.", - }); - } - - if (config === undefined) { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected undefined config.", - }); - } - - if (typeof config !== "object") { - throw new ConfigError(getConfigName(config), index, { - message: "Unexpected non-object config.", - }); - } - - const validateConfig = {}; - - if ("basePath" in config) { - validateConfig.basePath = config.basePath; - } - - if ("files" in config) { - validateConfig.files = config.files; - } - - if ("ignores" in config) { - validateConfig.ignores = config.ignores; - } - - try { - FILES_AND_IGNORES_SCHEMA.validate(validateConfig); - } catch (validationError) { - rethrowConfigError(config, index, validationError); - } -} - -/** - * Wrapper around minimatch that caches minimatch patterns for - * faster matching speed over multiple file path evaluations. - * @param {string} filepath The file path to match. - * @param {string} pattern The glob pattern to match against. - * @param {MinimatchOptions} options The minimatch options to use. - * @returns {boolean} True if the file path matches, false if not. - */ -function doMatch(filepath, pattern, options = {}) { - let cache = minimatchCache; - - if (options.flipNegate) { - cache = negatedMinimatchCache; - } - - let matcher = cache.get(pattern); - - if (!matcher) { - matcher = new Minimatch( - pattern, - Object.assign({}, MINIMATCH_OPTIONS, options), - ); - cache.set(pattern, matcher); - } - - return matcher.match(filepath); -} - -/** - * Normalizes a pattern by removing the leading "./" if present. - * @param {FileMatcher} pattern The pattern to normalize. - * @returns {FileMatcher} The normalized pattern. - */ -function normalizePattern(pattern) { - if (isString(pattern)) { - if (pattern.startsWith("./")) { - return pattern.slice(2); - } - - if (pattern.startsWith("!./")) { - return `!${pattern.slice(3)}`; - } - } - - return pattern; -} - -/** - * Checks if a given pattern requires normalization. - * @param {any} pattern The pattern to check. - * @returns {boolean} True if the pattern needs normalization, false otherwise. - * - */ -function needsPatternNormalization(pattern) { - return ( - isString(pattern) && - (pattern.startsWith("./") || pattern.startsWith("!./")) - ); -} - -/** - * Normalizes `files` and `ignores` patterns in a config by removing "./" prefixes. - * @param {Object} config The config object to normalize patterns in. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative. - * @param {PathImpl} path Path-handling implementation. - * @returns {Object} The normalized config object. - */ -function normalizeConfigPatterns(config, namespacedBasePath, path) { - if (!config) { - return config; - } - - const hasBasePath = typeof config.basePath === "string"; - - let needsNormalization = false; - - if (hasBasePath) { - needsNormalization = true; - } - - if (!needsNormalization && Array.isArray(config.files)) { - needsNormalization = config.files.some(pattern => { - if (Array.isArray(pattern)) { - return pattern.some(needsPatternNormalization); - } - return needsPatternNormalization(pattern); - }); - } - - if (!needsNormalization && Array.isArray(config.ignores)) { - needsNormalization = config.ignores.some(needsPatternNormalization); - } - - if (!needsNormalization) { - return config; - } - - const newConfig = { ...config }; - - if (hasBasePath) { - if (path.isAbsolute(config.basePath)) { - newConfig.basePath = path.toNamespacedPath(config.basePath); - } else { - newConfig.basePath = path.resolve( - namespacedBasePath, - config.basePath, - ); - } - } - - if (Array.isArray(newConfig.files)) { - newConfig.files = newConfig.files.map(pattern => { - if (Array.isArray(pattern)) { - return pattern.map(normalizePattern); - } - return normalizePattern(pattern); - }); - } - - if (Array.isArray(newConfig.ignores)) { - newConfig.ignores = newConfig.ignores.map(normalizePattern); - } - - return newConfig; -} - -/** - * Normalizes a `ConfigArray` by flattening it and executing any functions - * that are found inside. - * @param {Array} items The items in a `ConfigArray`. - * @param {Object} context The context object to pass into any function - * found. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. - * @param {PathImpl} path Path-handling implementation. - * @returns {Promise} A flattened array containing only config objects. - * @throws {TypeError} When a config function returns a function. - */ -async function normalize( - items, - context, - extraConfigTypes, - namespacedBasePath, - path, -) { - const allowFunctions = extraConfigTypes.includes("function"); - const allowArrays = extraConfigTypes.includes("array"); - - async function* flatTraverse(array) { - for (let item of array) { - if (typeof item === "function") { - if (!allowFunctions) { - throw new TypeError("Unexpected function."); - } - - item = item(context); - if (item.then) { - item = await item; - } - } - - if (Array.isArray(item)) { - if (!allowArrays) { - throw new TypeError("Unexpected array."); - } - yield* flatTraverse(item); - } else if (typeof item === "function") { - throw new TypeError( - "A config function can only return an object or array.", - ); - } else { - yield item; - } - } - } - - /* - * Async iterables cannot be used with the spread operator, so we need to manually - * create the array to return. - */ - const asyncIterable = flatTraverse(items); - const configs = []; - - for await (const config of asyncIterable) { - configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); - } - - return configs; -} - -/** - * Normalizes a `ConfigArray` by flattening it and executing any functions - * that are found inside. - * @param {Array} items The items in a `ConfigArray`. - * @param {Object} context The context object to pass into any function - * found. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative. - * @param {PathImpl} path Path-handling implementation - * @returns {Array} A flattened array containing only config objects. - * @throws {TypeError} When a config function returns a function. - */ -function normalizeSync( - items, - context, - extraConfigTypes, - namespacedBasePath, - path, -) { - const allowFunctions = extraConfigTypes.includes("function"); - const allowArrays = extraConfigTypes.includes("array"); - - function* flatTraverse(array) { - for (let item of array) { - if (typeof item === "function") { - if (!allowFunctions) { - throw new TypeError("Unexpected function."); - } - - item = item(context); - if (item.then) { - throw new TypeError( - "Async config functions are not supported.", - ); - } - } - - if (Array.isArray(item)) { - if (!allowArrays) { - throw new TypeError("Unexpected array."); - } - - yield* flatTraverse(item); - } else if (typeof item === "function") { - throw new TypeError( - "A config function can only return an object or array.", - ); - } else { - yield item; - } - } - } - - const configs = []; - - for (const config of flatTraverse(items)) { - configs.push(normalizeConfigPatterns(config, namespacedBasePath, path)); - } - - return configs; -} - -/** - * Converts a given path to a relative path with all separator characters replaced by forward slashes (`"/"`). - * @param {string} fileOrDirPath The unprocessed path to convert. - * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative. - * @param {PathImpl} path Path-handling implementations. - * @returns {string} A relative path with all separator characters replaced by forward slashes. - */ -function toRelativePath(fileOrDirPath, namespacedBasePath, path) { - const fullPath = path.resolve(namespacedBasePath, fileOrDirPath); - const namespacedFullPath = path.toNamespacedPath(fullPath); - const relativePath = path.relative(namespacedBasePath, namespacedFullPath); - return relativePath.replaceAll(path.SEPARATOR, "/"); -} - -/** - * Determines if a given file path should be ignored based on the given - * matcher. - * @param {Array<{ basePath?: string, ignores: FileMatcher[] }>} configs Configuration objects containing `ignores`. - * @param {string} filePath The unprocessed file path to check. - * @param {string} relativeFilePath The path of the file to check relative to the base path, - * using forward slash (`"/"`) as a separator. - * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects - * that have `basePath` property. - * @param {string} [basePathData.basePath] Namespaced path to which `relativeFilePath` is relative. - * @param {PathImpl} [basePathData.path] Path-handling implementation. - * @returns {boolean} True if the path should be ignored and false if not. - */ -function shouldIgnorePath( - configs, - filePath, - relativeFilePath, - { basePath, path } = {}, -) { - let shouldIgnore = false; - - for (const config of configs) { - let relativeFilePathToCheck = relativeFilePath; - if (config.basePath) { - relativeFilePathToCheck = toRelativePath( - path.resolve(basePath, relativeFilePath), - config.basePath, - path, - ); - - if ( - relativeFilePathToCheck === "" || - EXTERNAL_PATH_REGEX.test(relativeFilePathToCheck) - ) { - continue; - } - - if (relativeFilePath.endsWith("/")) { - relativeFilePathToCheck += "/"; - } - } - shouldIgnore = config.ignores.reduce((ignored, matcher) => { - if (!ignored) { - if (typeof matcher === "function") { - return matcher(filePath); - } - - // don't check negated patterns because we're not ignored yet - if (!matcher.startsWith("!")) { - return doMatch(relativeFilePathToCheck, matcher); - } - - // otherwise we're still not ignored - return false; - } - - // only need to check negated patterns because we're ignored - if (typeof matcher === "string" && matcher.startsWith("!")) { - return !doMatch(relativeFilePathToCheck, matcher, { - flipNegate: true, - }); - } - - return ignored; - }, shouldIgnore); - } - - return shouldIgnore; -} - -/** - * Determines if a given file path is matched by a config. If the config - * has no `files` field, then it matches; otherwise, if a `files` field - * is present then we match the globs in `files` and exclude any globs in - * `ignores`. - * @param {string} filePath The unprocessed file path to check. - * @param {string} relativeFilePath The path of the file to check relative to the base path, - * using forward slash (`"/"`) as a separator. - * @param {ConfigObject & { files: FilesMatcher[] }} config The config object to check. - * @returns {boolean} True if the file path is matched by the config, - * false if not. - */ -function pathMatches(filePath, relativeFilePath, config) { - // match both strings and functions - function match(pattern) { - if (isString(pattern)) { - return doMatch(relativeFilePath, pattern); - } - - if (typeof pattern === "function") { - return pattern(filePath); - } - - throw new TypeError(`Unexpected matcher type ${pattern}.`); - } - - // check for all matches to config.files - let filePathMatchesPattern = config.files.some(pattern => { - if (Array.isArray(pattern)) { - return pattern.every(match); - } - - return match(pattern); - }); - - /* - * If the file path matches the config.files patterns, then check to see - * if there are any files to ignore. - */ - if (filePathMatchesPattern && config.ignores) { - /* - * Pass config object without `basePath`, because `relativeFilePath` is already - * calculated as relative to it. - */ - filePathMatchesPattern = !shouldIgnorePath( - [{ ignores: config.ignores }], - filePath, - relativeFilePath, - ); - } - - return filePathMatchesPattern; -} - -/** - * Ensures that a ConfigArray has been normalized. - * @param {ConfigArray} configArray The ConfigArray to check. - * @returns {void} - * @throws {Error} When the `ConfigArray` is not normalized. - */ -function assertNormalized(configArray) { - // TODO: Throw more verbose error - if (!configArray.isNormalized()) { - throw new Error( - "ConfigArray must be normalized to perform this operation.", - ); - } -} - -/** - * Ensures that config types are valid. - * @param {ReadonlyArray} extraConfigTypes The config types to check. - * @returns {void} - * @throws {TypeError} When the config types array is invalid. - */ -function assertExtraConfigTypes(extraConfigTypes) { - if (!Array.isArray(extraConfigTypes)) { - throw new TypeError("extraConfigTypes must be an array."); - } - - if (extraConfigTypes.length > 2) { - throw new TypeError("extraConfigTypes must contain at most two items."); - } - - for (const configType of extraConfigTypes) { - if (!CONFIG_TYPES.has(configType)) { - throw new TypeError( - `Unexpected config type "${configType}" in extraConfigTypes. Expected one of: "array", "function".`, - ); - } - } -} - -/** - * Returns path-handling implementations for Unix or Windows, depending on a given absolute path. - * @param {string} fileOrDirPath The absolute path to check. - * @returns {PathImpl} Path-handling implementations for the specified path. - * @throws {Error} An error is thrown if the specified argument is not an absolute path. - */ -function getPathImpl(fileOrDirPath) { - // Posix absolute paths always start with a slash. - if (fileOrDirPath.startsWith("/")) { - return posixPath; - } - - // Windows absolute paths start with a letter followed by a colon and at least one backslash, - // or with two backslashes in the case of UNC paths. - // Forward slashed are automatically normalized to backslashes. - if (/^(?:[A-Za-z]:[/\\]|[/\\]{2})/u.test(fileOrDirPath)) { - return windowsPath; - } - - throw new Error( - `Expected an absolute path but received "${fileOrDirPath}"`, - ); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -const ConfigArraySymbol = { - isNormalized: Symbol("isNormalized"), - configCache: Symbol("configCache"), - schema: Symbol("schema"), - finalizeConfig: Symbol("finalizeConfig"), - preprocessConfig: Symbol("preprocessConfig"), -}; - -// used to store calculate data for faster lookup -const dataCache = new WeakMap(); - -/** - * Represents an array of config objects and provides method for working with - * those config objects. - */ -class ConfigArray extends Array { - /** - * The namespaced path of the config file directory. - * @type {string} - */ - #namespacedBasePath; - - /** - * Path-handling implementations. - * @type {PathImpl} - */ - #path; - - /** - * Creates a new instance of ConfigArray. - * @param {Iterable|Function|Object} configs An iterable yielding config - * objects, or a config function, or a config object. - * @param {Object} options The options for the ConfigArray. - * @param {string} [options.basePath="/"] The absolute path of the config file directory. - * Defaults to `"/"`. - * @param {boolean} [options.normalized=false] Flag indicating if the - * configs have already been normalized. - * @param {ObjectDefinition} [options.schema] The additional schema - * definitions to use for the ConfigArray schema. - * @param {ReadonlyArray} [options.extraConfigTypes] List of config types supported. - * @throws {TypeError} When the `basePath` is not a non-empty string, - */ - constructor( - configs, - { - basePath = "/", - normalized = false, - schema: customSchema, - extraConfigTypes = [], - } = {}, - ) { - super(); - - /** - * Tracks if the array has been normalized. - * @property isNormalized - * @type {boolean} - * @private - */ - this[ConfigArraySymbol.isNormalized] = normalized; - - /** - * The schema used for validating and merging configs. - * @property schema - * @type {ObjectSchemaInstance} - * @private - */ - this[ConfigArraySymbol.schema] = new ObjectSchema( - Object.assign({}, customSchema, baseSchema), - ); - - if (!isString(basePath) || !basePath) { - throw new TypeError("basePath must be a non-empty string"); - } - - /** - * The path of the config file that this array was loaded from. - * This is used to calculate filename matches. - * @property basePath - * @type {string} - */ - this.basePath = basePath; - - assertExtraConfigTypes(extraConfigTypes); - - /** - * The supported config types. - * @type {ReadonlyArray} - */ - this.extraConfigTypes = [...extraConfigTypes]; - Object.freeze(this.extraConfigTypes); - - /** - * A cache to store calculated configs for faster repeat lookup. - * @property configCache - * @type {Map} - * @private - */ - this[ConfigArraySymbol.configCache] = new Map(); - - // init cache - dataCache.set(this, { - explicitMatches: new Map(), - directoryMatches: new Map(), - files: undefined, - ignores: undefined, - }); - - // load the configs into this array - if (Array.isArray(configs)) { - this.push(...configs); - } else { - this.push(configs); - } - - // select path-handling implementations depending on the base path - this.#path = getPathImpl(basePath); - - // On Windows, `path.relative()` returns an absolute path when given two paths on different drives. - // The namespaced base path is useful to make sure that calculated relative paths are always relative. - // On Unix, it is identical to the base path. - this.#namespacedBasePath = this.#path.toNamespacedPath(basePath); - } - - /** - * Prevent normal array methods from creating a new `ConfigArray` instance. - * This is to ensure that methods such as `slice()` won't try to create a - * new instance of `ConfigArray` behind the scenes as doing so may throw - * an error due to the different constructor signature. - * @type {ArrayConstructor} The `Array` constructor. - */ - static get [Symbol.species]() { - return Array; - } - - /** - * Returns the `files` globs from every config object in the array. - * This can be used to determine which files will be matched by a - * config array or to use as a glob pattern when no patterns are provided - * for a command line interface. - * @returns {Array} An array of matchers. - */ - get files() { - assertNormalized(this); - - // if this data has been cached, retrieve it - const cache = dataCache.get(this); - - if (cache.files) { - return cache.files; - } - - // otherwise calculate it - - const result = []; - - for (const config of this) { - if (config.files) { - config.files.forEach(filePattern => { - result.push(filePattern); - }); - } - } - - // store result - cache.files = result; - dataCache.set(this, cache); - - return result; - } - - /** - * Returns ignore matchers that should always be ignored regardless of - * the matching `files` fields in any configs. This is necessary to mimic - * the behavior of things like .gitignore and .eslintignore, allowing a - * globbing operation to be faster. - * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores. - */ - get ignores() { - assertNormalized(this); - - // if this data has been cached, retrieve it - const cache = dataCache.get(this); - - if (cache.ignores) { - return cache.ignores; - } - - // otherwise calculate it - - const result = []; - - for (const config of this) { - /* - * We only count ignores if there are no other keys in the object. - * In this case, it acts like a globally ignored pattern. If there - * are additional keys, then ignores act like exclusions. - */ - if ( - config.ignores && - Object.keys(config).filter(key => !META_FIELDS.has(key)) - .length === 1 - ) { - result.push(config); - } - } - - // store result - cache.ignores = result; - dataCache.set(this, cache); - - return result; - } - - /** - * Indicates if the config array has been normalized. - * @returns {boolean} True if the config array is normalized, false if not. - */ - isNormalized() { - return this[ConfigArraySymbol.isNormalized]; - } - - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {Promise} The current ConfigArray instance. - */ - async normalize(context = {}) { - if (!this.isNormalized()) { - const normalizedConfigs = await normalize( - this, - context, - this.extraConfigTypes, - this.#namespacedBasePath, - this.#path, - ); - this.length = 0; - this.push( - ...normalizedConfigs.map( - this[ConfigArraySymbol.preprocessConfig].bind(this), - ), - ); - this.forEach(assertValidBaseConfig); - this[ConfigArraySymbol.isNormalized] = true; - - // prevent further changes - Object.freeze(this); - } - - return this; - } - - /** - * Normalizes a config array by flattening embedded arrays and executing - * config functions. - * @param {Object} [context] The context object for config functions. - * @returns {ConfigArray} The current ConfigArray instance. - */ - normalizeSync(context = {}) { - if (!this.isNormalized()) { - const normalizedConfigs = normalizeSync( - this, - context, - this.extraConfigTypes, - this.#namespacedBasePath, - this.#path, - ); - this.length = 0; - this.push( - ...normalizedConfigs.map( - this[ConfigArraySymbol.preprocessConfig].bind(this), - ), - ); - this.forEach(assertValidBaseConfig); - this[ConfigArraySymbol.isNormalized] = true; - - // prevent further changes - Object.freeze(this); - } - - return this; - } - - /* eslint-disable class-methods-use-this -- Desired as instance methods */ - - /** - * Finalizes the state of a config before being cached and returned by - * `getConfig()`. Does nothing by default but is provided to be - * overridden by subclasses as necessary. - * @param {Object} config The config to finalize. - * @returns {Object} The finalized config. - */ - // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class. - [/** @type {never} */ (ConfigArraySymbol.finalizeConfig)](config) { - return config; - } - - /** - * Preprocesses a config during the normalization process. This is the - * method to override if you want to convert an array item before it is - * validated for the first time. For example, if you want to replace a - * string with an object, this is the method to override. - * @param {Object} config The config to preprocess. - * @returns {Object} The config to use in place of the argument. - */ - // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class. - [/** @type {never} */ (ConfigArraySymbol.preprocessConfig)](config) { - return config; - } - - /* eslint-enable class-methods-use-this -- Desired as instance methods */ - - /** - * Returns the config object for a given file path and a status that can be used to determine why a file has no config. - * @param {string} filePath The path of a file to get a config for. - * @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }} - * An object with an optional property `config` and property `status`. - * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig}, - * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}. - */ - getConfigWithStatus(filePath) { - assertNormalized(this); - - const cache = this[ConfigArraySymbol.configCache]; - - // first check the cache for a filename match to avoid duplicate work - if (cache.has(filePath)) { - return cache.get(filePath); - } - - // check to see if the file is outside the base path - - const relativeToBaseFilePath = toRelativePath( - filePath, - this.#namespacedBasePath, - this.#path, - ); - - if (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) { - debug(`No config for file ${filePath} outside of base path`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL); - return CONFIG_WITH_STATUS_EXTERNAL; - } - - // next check to see if the file should be ignored - - // check if this should be ignored due to its directory - if (this.isDirectoryIgnored(this.#path.dirname(filePath))) { - debug(`Ignoring ${filePath} based on directory pattern`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); - return CONFIG_WITH_STATUS_IGNORED; - } - - if ( - shouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, { - basePath: this.#namespacedBasePath, - path: this.#path, - }) - ) { - debug(`Ignoring ${filePath} based on file pattern`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_IGNORED); - return CONFIG_WITH_STATUS_IGNORED; - } - - // filePath isn't automatically ignored, so try to construct config - - const matchingConfigIndices = []; - let matchFound = false; - const universalPattern = /^\*$|^!|\/\*{1,2}$/u; - - this.forEach((config, index) => { - const relativeFilePath = config.basePath - ? toRelativePath( - this.#path.resolve(this.#namespacedBasePath, filePath), - config.basePath, - this.#path, - ) - : relativeToBaseFilePath; - - if (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) { - debug( - `Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`, - ); - return; - } - - if (!config.files) { - if (!config.ignores) { - debug(`Universal config found for ${filePath}`); - matchingConfigIndices.push(index); - return; - } - - if ( - Object.keys(config).filter(key => !META_FIELDS.has(key)) - .length === 1 - ) { - debug( - `Skipped config found for ${filePath} (global ignores)`, - ); - return; - } - - /* - * Pass config object without `basePath`, because `relativeFilePath` is already - * calculated as relative to it. - */ - if ( - shouldIgnorePath( - [{ ignores: config.ignores }], - filePath, - relativeFilePath, - ) - ) { - debug( - `Skipped config found for ${filePath} (based on ignores: ${config.ignores})`, - ); - return; - } - - debug( - `Matching config found for ${filePath} (based on ignores: ${config.ignores})`, - ); - matchingConfigIndices.push(index); - return; - } - - /* - * If a config has a files pattern * or patterns ending in /** or /*, - * and the filePath only matches those patterns, then the config is only - * applied if there is another config where the filePath matches - * a file with a specific extensions such as *.js. - */ - - const nonUniversalFiles = []; - const universalFiles = config.files.filter(element => { - if (Array.isArray(element)) { - /* - * filePath matches an element that is an array only if it matches - * all patterns in it (AND operation). Therefore, if there is at least - * one non-universal pattern in the array, and filePath matches the array, - * then we know for sure that filePath matches at least one non-universal - * pattern, so we can consider the entire array to be non-universal. - * In other words, all patterns in the array need to be universal - * for it to be considered universal. - */ - if ( - element.every(pattern => universalPattern.test(pattern)) - ) { - return true; - } - - nonUniversalFiles.push(element); - return false; - } - - // element is a string - - if (universalPattern.test(element)) { - return true; - } - - nonUniversalFiles.push(element); - return false; - }); - - // universal patterns were found so we need to check the config twice - if (universalFiles.length) { - debug("Universal files patterns found. Checking carefully."); - - // check that the config matches without the non-universal files first - if ( - nonUniversalFiles.length && - pathMatches(filePath, relativeFilePath, { - files: nonUniversalFiles, - ignores: config.ignores, - }) - ) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - matchFound = true; - return; - } - - // if there wasn't a match then check if it matches with universal files - if ( - universalFiles.length && - pathMatches(filePath, relativeFilePath, { - files: universalFiles, - ignores: config.ignores, - }) - ) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - return; - } - - // if we make here, then there was no match - return; - } - - // the normal case - if (pathMatches(filePath, relativeFilePath, config)) { - debug(`Matching config found for ${filePath}`); - matchingConfigIndices.push(index); - matchFound = true; - } - }); - - // if matching both files and ignores, there will be no config to create - if (!matchFound) { - debug(`No matching configs found for ${filePath}`); - - // cache and return result - cache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED); - return CONFIG_WITH_STATUS_UNCONFIGURED; - } - - // check to see if there is a config cached by indices - const indicesKey = matchingConfigIndices.toString(); - let configWithStatus = cache.get(indicesKey); - - if (configWithStatus) { - // also store for filename for faster lookup next time - cache.set(filePath, configWithStatus); - - return configWithStatus; - } - - // otherwise construct the config - - // eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error - let finalConfig = matchingConfigIndices.reduce((result, index) => { - try { - return this[ConfigArraySymbol.schema].merge( - result, - this[index], - ); - } catch (validationError) { - rethrowConfigError(this[index], index, validationError); - } - }, {}); - - finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); - - configWithStatus = Object.freeze({ - config: finalConfig, - status: "matched", - }); - cache.set(filePath, configWithStatus); - cache.set(indicesKey, configWithStatus); - - return configWithStatus; - } - - /** - * Returns the config object for a given file path. - * @param {string} filePath The path of a file to get a config for. - * @returns {Object|undefined} The config object for this file or `undefined`. - */ - getConfig(filePath) { - return this.getConfigWithStatus(filePath).config; - } - - /** - * Determines whether a file has a config or why it doesn't. - * @param {string} filePath The path of the file to check. - * @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values: - * * `"ignored"`: the file is ignored - * * `"external"`: the file is outside the base path - * * `"unconfigured"`: the file is not matched by any config - * * `"matched"`: the file has a matching config - */ - getConfigStatus(filePath) { - return this.getConfigWithStatus(filePath).status; - } - - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - * @deprecated Use `isFileIgnored` instead. - */ - isIgnored(filePath) { - return this.isFileIgnored(filePath); - } - - /** - * Determines if the given filepath is ignored based on the configs. - * @param {string} filePath The path of a file to check. - * @returns {boolean} True if the path is ignored, false if not. - */ - isFileIgnored(filePath) { - return this.getConfigStatus(filePath) === "ignored"; - } - - /** - * Determines if the given directory is ignored based on the configs. - * This checks only default `ignores` that don't have `files` in the - * same config. A pattern such as `/foo` be considered to ignore the directory - * while a pattern such as `/foo/**` is not considered to ignore the - * directory because it is matching files. - * @param {string} directoryPath The path of a directory to check. - * @returns {boolean} True if the directory is ignored, false if not. Will - * return true for any directory that is not inside of `basePath`. - * @throws {Error} When the `ConfigArray` is not normalized. - */ - isDirectoryIgnored(directoryPath) { - assertNormalized(this); - - const relativeDirectoryPath = toRelativePath( - directoryPath, - this.#namespacedBasePath, - this.#path, - ); - - // basePath directory can never be ignored - if (relativeDirectoryPath === "") { - return false; - } - - if (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) { - return true; - } - - // first check the cache - const cache = dataCache.get(this).directoryMatches; - - if (cache.has(relativeDirectoryPath)) { - return cache.get(relativeDirectoryPath); - } - - const directoryParts = relativeDirectoryPath.split("/"); - let relativeDirectoryToCheck = ""; - let result; - - /* - * In order to get the correct gitignore-style ignores, where an - * ignored parent directory cannot have any descendants unignored, - * we need to check every directory starting at the parent all - * the way down to the actual requested directory. - * - * We aggressively cache all of this info to make sure we don't - * have to recalculate everything for every call. - */ - do { - relativeDirectoryToCheck += `${directoryParts.shift()}/`; - - result = shouldIgnorePath( - this.ignores, - this.#path.join(this.basePath, relativeDirectoryToCheck), - relativeDirectoryToCheck, - { - basePath: this.#namespacedBasePath, - path: this.#path, - }, - ); - - cache.set(relativeDirectoryToCheck, result); - } while (!result && directoryParts.length); - - // also cache the result for the requested path - cache.set(relativeDirectoryPath, result); - - return result; - } -} - -export { ConfigArray, ConfigArraySymbol }; diff --git a/node_modules/@eslint/config-array/dist/esm/std__path/posix.js b/node_modules/@eslint/config-array/dist/esm/std__path/posix.js deleted file mode 100644 index 05cf4a9..0000000 --- a/node_modules/@eslint/config-array/dist/esm/std__path/posix.js +++ /dev/null @@ -1,1314 +0,0 @@ -// @ts-nocheck -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -function assertPath(path) { - if (typeof path !== "string") { - throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function stripSuffix(name, suffix) { - if (suffix.length >= name.length) { - return name; - } - const lenDiff = name.length - suffix.length; - for(let i = suffix.length - 1; i >= 0; --i){ - if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { - return name; - } - } - return name.slice(0, -suffix.length); -} -function lastPathSegment(path, isSep, start = 0) { - let matchedNonSeparator = false; - let end = path.length; - for(let i = path.length - 1; i >= start; --i){ - if (isSep(path.charCodeAt(i))) { - if (matchedNonSeparator) { - start = i + 1; - break; - } - } else if (!matchedNonSeparator) { - matchedNonSeparator = true; - end = i + 1; - } - } - return path.slice(start, end); -} -function assertArgs$1(path, suffix) { - assertPath(path); - if (path.length === 0) return path; - if (typeof suffix !== "string") { - throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$3(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol !== "file:") { - throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a file URL to a path string. - * - * @example Usage - * ```ts - * import { fromFileUrl } from "@std/path/posix/from-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(fromFileUrl(new URL("file:///home/foo")), "/home/foo"); - * ``` - * - * @param url The file URL to convert. - * @returns The path string. - */ function fromFileUrl(url) { - url = assertArg$3(url); - return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function stripTrailingSeparators(segment, isSep) { - if (segment.length <= 1) { - return segment; - } - let end = segment.length; - for(let i = segment.length - 1; i > 0; i--){ - if (isSep(segment.charCodeAt(i))) { - end = i; - } else { - break; - } - } - return segment.slice(0, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Alphabet chars. -// Non-alphabetic chars. -const CHAR_DOT = 46; /* . */ -const CHAR_FORWARD_SLASH = 47; /* / */ - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the last portion of a `path`. - * Trailing directory separators are ignored, and optional suffix is removed. - * - * @example Usage - * ```ts - * import { basename } from "@std/path/posix/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("/home/user/Documents/"), "Documents"); - * assertEquals(basename("/home/user/Documents/image.png"), "image.png"); - * assertEquals(basename("/home/user/Documents/image.png", ".png"), "image"); - * assertEquals(basename(new URL("file:///home/user/Documents/image.png")), "image.png"); - * assertEquals(basename(new URL("file:///home/user/Documents/image.png"), ".png"), "image"); - * ``` - * - * @example Working with URLs - * - * Note: This function doesn't automatically strip hash and query parts from - * URLs. If your URL contains a hash or query, remove them before passing the - * URL to the function. This can be done by passing the URL to `new URL(url)`, - * and setting the `hash` and `search` properties to empty strings. - * - * ```ts - * import { basename } from "@std/path/posix/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("https://deno.land/std/path/mod.ts"), "mod.ts"); - * assertEquals(basename("https://deno.land/std/path/mod.ts", ".ts"), "mod"); - * assertEquals(basename("https://deno.land/std/path/mod.ts?a=b"), "mod.ts?a=b"); - * assertEquals(basename("https://deno.land/std/path/mod.ts#header"), "mod.ts#header"); - * ``` - * - * @param path The path to extract the name from. - * @param suffix The suffix to remove from extracted name. - * @returns The extracted name. - */ function basename(path, suffix = "") { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArgs$1(path, suffix); - const lastSegment = lastPathSegment(path, isPosixPathSeparator); - const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator); - return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * The character used to separate entries in the PATH environment variable. - */ const DELIMITER = ":"; -/** - * The character used to separate components of a file path. - */ const SEPARATOR = "/"; -/** - * A regular expression that matches one or more path separators. - */ const SEPARATOR_PATTERN = /\/+/; - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$2(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the directory path of a `path`. - * - * @example Usage - * ```ts - * import { dirname } from "@std/path/posix/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("/home/user/Documents/"), "/home/user"); - * assertEquals(dirname("/home/user/Documents/image.png"), "/home/user/Documents"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); - * assertEquals(dirname(new URL("file:///home/user/Documents/image.png")), "/home/user/Documents"); - * ``` - * - * @example Working with URLs - * - * ```ts - * import { dirname } from "@std/path/posix/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("https://deno.land/std/path/mod.ts"), "https://deno.land/std/path"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts?a=b"), "https://deno.land/std/path"); - * assertEquals(dirname("https://deno.land/std/path/mod.ts#header"), "https://deno.land/std/path"); - * ``` - * - * @param path The path to get the directory from. - * @returns The directory path. - */ function dirname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg$2(path); - let end = -1; - let matchedNonSeparator = false; - for(let i = path.length - 1; i >= 1; --i){ - if (isPosixPathSeparator(path.charCodeAt(i))) { - if (matchedNonSeparator) { - end = i; - break; - } - } else { - matchedNonSeparator = true; - } - } - // No matches. Fallback based on provided path: - // - // - leading slashes paths - // "/foo" => "/" - // "///foo" => "/" - // - no slash path - // "foo" => "." - if (end === -1) { - return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : "."; - } - return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the extension of the `path` with leading period. - * - * @example Usage - * ```ts - * import { extname } from "@std/path/posix/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("/home/user/Documents/file.ts"), ".ts"); - * assertEquals(extname("/home/user/Documents/"), ""); - * assertEquals(extname("/home/user/Documents/image.png"), ".png"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts")), ".ts"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts?a=b")), ".ts"); - * assertEquals(extname(new URL("file:///home/user/Documents/file.ts#header")), ".ts"); - * ``` - * - * @example Working with URLs - * - * Note: This function doesn't automatically strip hash and query parts from - * URLs. If your URL contains a hash or query, remove them before passing the - * URL to the function. This can be done by passing the URL to `new URL(url)`, - * and setting the `hash` and `search` properties to empty strings. - * - * ```ts - * import { extname } from "@std/path/posix/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("https://deno.land/std/path/mod.ts"), ".ts"); - * assertEquals(extname("https://deno.land/std/path/mod.ts?a=b"), ".ts?a=b"); - * assertEquals(extname("https://deno.land/std/path/mod.ts#header"), ".ts#header"); - * ``` - * - * @param path The path to get the extension from. - * @returns The extension (ex. for `file.ts` returns `.ts`). - */ function extname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertPath(path); - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - for(let i = path.length - 1; i >= 0; --i){ - const code = path.charCodeAt(i); - if (isPosixPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function _format(sep, pathObject) { - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); - if (!dir) return base; - if (base === sep) return dir; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} -function assertArg$1(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Generate a path from `ParsedPath` object. - * - * @example Usage - * ```ts - * import { format } from "@std/path/posix/format"; - * import { assertEquals } from "@std/assert"; - * - * const path = format({ - * root: "/", - * dir: "/path/dir", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * assertEquals(path, "/path/dir/file.txt"); - * ``` - * - * @param pathObject The path object to format. - * @returns The formatted path. - */ function format(pathObject) { - assertArg$1(pathObject); - return _format("/", pathObject); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Verifies whether provided path is absolute. - * - * @example Usage - * ```ts - * import { isAbsolute } from "@std/path/posix/is-absolute"; - * import { assert, assertFalse } from "@std/assert"; - * - * assert(isAbsolute("/home/user/Documents/")); - * assertFalse(isAbsolute("home/user/Documents/")); - * ``` - * - * @param path The path to verify. - * @returns Whether the path is absolute. - */ function isAbsolute(path) { - assertPath(path); - return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0)); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Resolves . and .. elements in a path with directory names -function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code; - for(let i = 0; i <= path.length; ++i){ - if (i < path.length) code = path.charCodeAt(i); - else if (isPathSeparator(code)) break; - else code = CHAR_FORWARD_SLASH; - if (isPathSeparator(code)) { - if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * Note that resolving these segments does not necessarily mean that all will be eliminated. - * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. - * - * @example Usage - * ```ts - * import { normalize } from "@std/path/posix/normalize"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(normalize("/foo/bar//baz/asdf/quux/.."), "/foo/bar/baz/asdf"); - * assertEquals(normalize(new URL("file:///foo/bar//baz/asdf/quux/..")), "/foo/bar/baz/asdf/"); - * ``` - * - * @example Working with URLs - * - * Note: This function will remove the double slashes from a URL's scheme. - * Hence, do not pass a full URL to this function. Instead, pass the pathname of - * the URL. - * - * ```ts - * import { normalize } from "@std/path/posix/normalize"; - * import { assertEquals } from "@std/assert"; - * - * const url = new URL("https://deno.land"); - * url.pathname = normalize("//std//assert//.//mod.ts"); - * assertEquals(url.href, "https://deno.land/std/assert/mod.ts"); - * - * url.pathname = normalize("std/assert/../async/retry.ts"); - * assertEquals(url.href, "https://deno.land/std/async/retry.ts"); - * ``` - * - * @param path The path to normalize. - * @returns The normalized path. - */ function normalize(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg(path); - const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1)); - // Normalize the path - path = normalizeString(path, !isAbsolute, "/", isPosixPathSeparator); - if (path.length === 0 && !isAbsolute) path = "."; - if (path.length > 0 && trailingSeparator) path += "/"; - if (isAbsolute) return `/${path}`; - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * - * @example Usage - * ```ts - * import { join } from "@std/path/posix/join"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(join("/foo", "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); - * assertEquals(join(new URL("file:///foo"), "bar", "baz/asdf", "quux", ".."), "/foo/bar/baz/asdf"); - * ``` - * - * @example Working with URLs - * ```ts - * import { join } from "@std/path/posix/join"; - * import { assertEquals } from "@std/assert"; - * - * const url = new URL("https://deno.land"); - * url.pathname = join("std", "path", "mod.ts"); - * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); - * - * url.pathname = join("//std", "path/", "/mod.ts"); - * assertEquals(url.href, "https://deno.land/std/path/mod.ts"); - * ``` - * - * @param path The path to join. This can be string or file URL. - * @param paths The paths to join. - * @returns The joined path. - */ function join(path, ...paths) { - if (path === undefined) return "."; - if (path instanceof URL) { - path = fromFileUrl(path); - } - paths = path ? [ - path, - ...paths - ] : paths; - paths.forEach((path)=>assertPath(path)); - const joined = paths.filter((path)=>path.length > 0).join("/"); - return joined === "" ? "." : normalize(joined); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return a `ParsedPath` object of the `path`. - * - * @example Usage - * ```ts - * import { parse } from "@std/path/posix/parse"; - * import { assertEquals } from "@std/assert"; - * - * const path = parse("/home/user/file.txt"); - * assertEquals(path, { - * root: "/", - * dir: "/home/user", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * ``` - * - * @param path The path to parse. - * @returns The parsed path object. - */ function parse(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - if (path.length === 0) return ret; - const isAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - let start; - if (isAbsolute) { - ret.root = "/"; - start = 1; - } else { - start = 0; - } - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for(; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPosixPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - if (startPart === 0 && isAbsolute) { - ret.base = ret.name = path.slice(1, end); - } else { - ret.base = ret.name = path.slice(startPart, end); - } - } - // Fallback to '/' in case there is no basename - ret.base = ret.base || "/"; - } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(1, startDot); - ret.base = path.slice(1, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } - ret.ext = path.slice(startDot, end); - } - if (startPart > 0) { - ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator); - } else if (isAbsolute) ret.dir = "/"; - return ret; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path segments into a `path`. - * - * @example Usage - * ```ts - * import { resolve } from "@std/path/posix/resolve"; - * import { assertEquals } from "@std/assert"; - * - * const path = resolve("/foo", "bar", "baz/asdf", "quux", ".."); - * assertEquals(path, "/foo/bar/baz/asdf"); - * ``` - * - * @param pathSegments The path segments to resolve. - * @returns The resolved path. - */ function resolve(...pathSegments) { - let resolvedPath = ""; - let resolvedAbsolute = false; - for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){ - let path; - if (i >= 0) path = pathSegments[i]; - else { - // deno-lint-ignore no-explicit-any - const { Deno } = globalThis; - if (typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a relative path without a current working directory (CWD)"); - } - path = Deno.cwd(); - } - assertPath(path); - // Skip empty entries - if (path.length === 0) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0)); - } - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when Deno.cwd() fails) - // Normalize the path - resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, "/", isPosixPathSeparator); - if (resolvedAbsolute) { - if (resolvedPath.length > 0) return `/${resolvedPath}`; - else return "/"; - } else if (resolvedPath.length > 0) return resolvedPath; - else return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArgs(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the relative path from `from` to `to` based on current working directory. - * - * If `from` and `to` are the same, return an empty string. - * - * @example Usage - * ```ts - * import { relative } from "@std/path/posix/relative"; - * import { assertEquals } from "@std/assert"; - * - * const path = relative("/data/orandea/test/aaa", "/data/orandea/impl/bbb"); - * assertEquals(path, "../../impl/bbb"); - * ``` - * - * @param from The path to start from. - * @param to The path to reach. - * @returns The relative path. - */ function relative(from, to) { - assertArgs(from, to); - from = resolve(from); - to = resolve(to); - if (from === to) return ""; - // Trim any leading backslashes - let fromStart = 1; - const fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break; - } - const fromLen = fromEnd - fromStart; - // Trim any leading backslashes - let toStart = 1; - const toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (!isPosixPathSeparator(to.charCodeAt(toStart))) break; - } - const toLen = toEnd - toStart; - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (isPosixPathSeparator(to.charCodeAt(toStart + i))) { - // We get here if `from` is the exact base path for `to`. - // For example: from='/foo/bar'; to='/foo/bar/baz' - return to.slice(toStart + i + 1); - } else if (i === 0) { - // We get here if `from` is the root - // For example: from='/'; to='/foo' - return to.slice(toStart + i); - } - } else if (fromLen > length) { - if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) { - // We get here if `to` is the exact base path for `from`. - // For example: from='/foo/bar/baz'; to='/foo/bar' - lastCommonSep = i; - } else if (i === 0) { - // We get here if `to` is the root. - // For example: from='/foo'; to='/' - lastCommonSep = 0; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (isPosixPathSeparator(fromCode)) lastCommonSep = i; - } - let out = ""; - // Generate the relative path based on the path difference between `to` - // and `from` - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) { - if (out.length === 0) out += ".."; - else out += "/.."; - } - } - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) return out + to.slice(toStart + lastCommonSep); - else { - toStart += lastCommonSep; - if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart; - return to.slice(toStart); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const WHITESPACE_ENCODINGS = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20" -}; -function encodeWhitespace(string) { - return string.replaceAll(/[\s]/g, (c)=>{ - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path string to a file URL. - * - * @example Usage - * ```ts - * import { toFileUrl } from "@std/path/posix/to-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toFileUrl("/home/foo"), new URL("file:///home/foo")); - * assertEquals(toFileUrl("/home/foo bar"), new URL("file:///home/foo%20bar")); - * ``` - * - * @param path The path to convert. - * @returns The file URL. - */ function toFileUrl(path) { - if (!isAbsolute(path)) { - throw new TypeError(`Path must be absolute: received "${path}"`); - } - const url = new URL("file:///"); - url.pathname = encodeWhitespace(path.replace(/%/g, "%25").replace(/\\/g, "%5C")); - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path to a namespaced path. This function returns the path as is on posix. - * - * @example Usage - * ```ts - * import { toNamespacedPath } from "@std/path/posix/to-namespaced-path"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toNamespacedPath("/home/foo"), "/home/foo"); - * ``` - * - * @param path The path. - * @returns The namespaced path. - */ function toNamespacedPath(path) { - // Non-op on posix systems - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function common$1(paths, sep) { - const [first = "", ...remaining] = paths; - const parts = first.split(sep); - let endOfPrefix = parts.length; - let append = ""; - for (const path of remaining){ - const compare = path.split(sep); - if (compare.length <= endOfPrefix) { - endOfPrefix = compare.length; - append = ""; - } - for(let i = 0; i < endOfPrefix; i++){ - if (compare[i] !== parts[i]) { - endOfPrefix = i; - append = i === 0 ? "" : sep; - break; - } - } - } - return parts.slice(0, endOfPrefix).join(sep) + append; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** Determines the common path from a set of paths for POSIX systems. - * - * @example Usage - * ```ts - * import { common } from "@std/path/posix/common"; - * import { assertEquals } from "@std/assert"; - * - * const path = common([ - * "./deno/std/path/mod.ts", - * "./deno/std/fs/mod.ts", - * ]); - * assertEquals(path, "./deno/std/"); - * ``` - * - * @param paths The paths to compare. - * @returns The common path. - */ function common(paths) { - return common$1(paths, SEPARATOR); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, - * {@linkcode normalizeGlob} and {@linkcode expandGlob}. - */ const REG_EXP_ESCAPE_CHARS = [ - "!", - "$", - "(", - ")", - "*", - "+", - ".", - "=", - "?", - "[", - "\\", - "^", - "{", - "|" -]; -const RANGE_ESCAPE_CHARS = [ - "-", - "\\", - "]" -]; -function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, -caseInsensitive = false } = {}) { - if (glob === "") { - return /(?!)/; - } - // Remove trailing separators. - let newLength = glob.length; - for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - let regExpString = ""; - // Terminates correctly. Trust that `j` is incremented every iteration. - for(let j = 0; j < glob.length;){ - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - // Terminates with `i` at the non-inclusive end of the current segment. - for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){ - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - if (glob[i] === c.escapePrefix) { - inEscape = true; - continue; - } - if (glob[i] === "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] === "!") { - i++; - segment += "^"; - } else if (glob[i + 1] === "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] === ":") { - let k = i + 1; - let value = ""; - while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ - value += glob[k + 1]; - k++; - } - if (glob[k + 1] === ":" && glob[k + 2] === "]") { - i = k + 2; - if (value === "alnum") segment += "\\dA-Za-z"; - else if (value === "alpha") segment += "A-Za-z"; - else if (value === "ascii") segment += "\x00-\x7F"; - else if (value === "blank") segment += "\t "; - else if (value === "cntrl") segment += "\x00-\x1F\x7F"; - else if (value === "digit") segment += "\\d"; - else if (value === "graph") segment += "\x21-\x7E"; - else if (value === "lower") segment += "a-z"; - else if (value === "print") segment += "\x20-\x7E"; - else if (value === "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value === "space") segment += "\\s\v"; - else if (value === "upper") segment += "A-Z"; - else if (value === "word") segment += "\\w"; - else if (value === "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - if (glob[i] === "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - if (inRange) { - segment += glob[i]; - continue; - } - if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += ")"; - const type = groupStack.pop(); - if (type === "!") { - segment += c.wildcard; - } else if (type !== "@") { - segment += type; - } - continue; - } - if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "+" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - if (glob[i] === "@" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - if (glob[i] === "?") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - if (glob[i] === "!" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - if (glob[i] === "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "*") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while(glob[i + 1] === "*"){ - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if (globstarOption && numStars === 2 && [ - ...c.seps, - undefined - ].includes(prevChar) && [ - ...c.seps, - undefined - ].includes(nextChar)) { - segment += c.globstar; - endsWithSep = true; - } else { - segment += c.wildcard; - } - } - continue; - } - segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)){ - segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? c.sep : c.sepMaybe; - endsWithSep = true; - } - // Terminates with `i` at the start of the next segment. - while(c.seps.includes(glob[i]))i++; - j = i; - } - regExpString = `^${regExpString}$`; - return new RegExp(regExpString, caseInsensitive ? "i" : ""); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const constants = { - sep: "/+", - sepMaybe: "/*", - seps: [ - "/" - ], - globstar: "(?:[^/]*(?:/|$)+)*", - wildcard: "[^/]*", - escapePrefix: "\\" -}; -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `?` - Matches any single character. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precedence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occurred. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. - * - * @example Usage - * ```ts - * import { globToRegExp } from "@std/path/posix/glob-to-regexp"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(globToRegExp("*.js"), /^[^/]*\.js\/*$/); - * ``` - * - * @param glob Glob string to convert. - * @param options Conversion options. - * @returns The regular expression equivalent to the glob. - */ function globToRegExp(glob, options = {}) { - return _globToRegExp(constants, glob, options); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Test whether the given string is a glob. - * - * @example Usage - * ```ts - * import { isGlob } from "@std/path/is-glob"; - * import { assert } from "@std/assert"; - * - * assert(!isGlob("foo/bar/../baz")); - * assert(isGlob("foo/*ar/../baz")); - * ``` - * - * @param str String to test. - * @returns `true` if the given string is a glob, otherwise `false` - */ function isGlob(str) { - const chars = { - "{": "}", - "(": ")", - "[": "]" - }; - const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/; - if (str === "") { - return false; - } - let match; - while(match = regex.exec(str)){ - if (match[2]) return true; - let idx = match.index + match[0].length; - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - str = str.slice(idx); - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { normalizeGlob } from "@std/path/posix/normalize-glob"; - * import { assertEquals } from "@std/assert"; - * - * const path = normalizeGlob("foo/bar/../*", { globstar: true }); - * assertEquals(path, "foo/*"); - * ``` - * - * @param glob The glob to normalize. - * @param options The options to use. - * @returns The normalized path. - */ function normalizeGlob(glob, options = {}) { - const { globstar = false } = options; - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEPARATOR_PATTERN.source; - const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like join(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { joinGlobs } from "@std/path/posix/join-globs"; - * import { assertEquals } from "@std/assert"; - * - * const path = joinGlobs(["foo", "bar", "**"], { globstar: true }); - * assertEquals(path, "foo/bar/**"); - * ``` - * - * @param globs The globs to join. - * @param options The options to use. - * @returns The joined path. - */ function joinGlobs(globs, options = {}) { - const { globstar = false } = options; - if (!globstar || globs.length === 0) { - return join(...globs); - } - let joined; - for (const glob of globs){ - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEPARATOR}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { - globstar - }); -} - -export { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath }; diff --git a/node_modules/@eslint/config-array/dist/esm/std__path/windows.js b/node_modules/@eslint/config-array/dist/esm/std__path/windows.js deleted file mode 100644 index 725e361..0000000 --- a/node_modules/@eslint/config-array/dist/esm/std__path/windows.js +++ /dev/null @@ -1,1656 +0,0 @@ -// @ts-nocheck -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -function assertPath(path) { - if (typeof path !== "string") { - throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function stripSuffix(name, suffix) { - if (suffix.length >= name.length) { - return name; - } - const lenDiff = name.length - suffix.length; - for(let i = suffix.length - 1; i >= 0; --i){ - if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) { - return name; - } - } - return name.slice(0, -suffix.length); -} -function lastPathSegment(path, isSep, start = 0) { - let matchedNonSeparator = false; - let end = path.length; - for(let i = path.length - 1; i >= start; --i){ - if (isSep(path.charCodeAt(i))) { - if (matchedNonSeparator) { - start = i + 1; - break; - } - } else if (!matchedNonSeparator) { - matchedNonSeparator = true; - end = i + 1; - } - } - return path.slice(start, end); -} -function assertArgs$1(path, suffix) { - assertPath(path); - if (path.length === 0) return path; - if (typeof suffix !== "string") { - throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Alphabet chars. -const CHAR_UPPERCASE_A = 65; /* A */ -const CHAR_LOWERCASE_A = 97; /* a */ -const CHAR_UPPERCASE_Z = 90; /* Z */ -const CHAR_LOWERCASE_Z = 122; /* z */ -// Non-alphabetic chars. -const CHAR_DOT = 46; /* . */ -const CHAR_FORWARD_SLASH = 47; /* / */ -const CHAR_BACKWARD_SLASH = 92; /* \ */ -const CHAR_COLON = 58; /* : */ -const CHAR_QUESTION_MARK = 63; /* ? */ - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function stripTrailingSeparators(segment, isSep) { - if (segment.length <= 1) { - return segment; - } - let end = segment.length; - for(let i = segment.length - 1; i > 0; i--){ - if (isSep(segment.charCodeAt(i))) { - end = i; - } else { - break; - } - } - return segment.slice(0, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -function isPosixPathSeparator(code) { - return code === CHAR_FORWARD_SLASH; -} -function isPathSeparator(code) { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -} -function isWindowsDeviceRoot(code) { - return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$3(url) { - url = url instanceof URL ? url : new URL(url); - if (url.protocol !== "file:") { - throw new TypeError(`URL must be a file URL: received "${url.protocol}"`); - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a file URL to a path string. - * - * @example Usage - * ```ts - * import { fromFileUrl } from "@std/path/windows/from-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo"); - * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo"); - * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo"); - * ``` - * - * @param url The file URL to convert. - * @returns The path string. - */ function fromFileUrl(url) { - url = assertArg$3(url); - let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); - if (url.hostname !== "") { - // Note: The `URL` implementation guarantees that the drive letter and - // hostname are mutually exclusive. Otherwise it would not have been valid - // to append the hostname and path like this. - path = `\\\\${url.hostname}${path}`; - } - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the last portion of a `path`. - * Trailing directory separators are ignored, and optional suffix is removed. - * - * @example Usage - * ```ts - * import { basename } from "@std/path/windows/basename"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(basename("C:\\user\\Documents\\"), "Documents"); - * assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png"); - * assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image"); - * assertEquals(basename(new URL("file:///C:/user/Documents/image.png")), "image.png"); - * assertEquals(basename(new URL("file:///C:/user/Documents/image.png"), ".png"), "image"); - * ``` - * - * @param path The path to extract the name from. - * @param suffix The suffix to remove from extracted name. - * @returns The extracted name. - */ function basename(path, suffix = "") { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArgs$1(path, suffix); - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - let start = 0; - if (path.length >= 2) { - const drive = path.charCodeAt(0); - if (isWindowsDeviceRoot(drive)) { - if (path.charCodeAt(1) === CHAR_COLON) start = 2; - } - } - const lastSegment = lastPathSegment(path, isPathSeparator, start); - const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator); - return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * The character used to separate entries in the PATH environment variable. - */ const DELIMITER = ";"; -/** - * The character used to separate components of a file path. - */ const SEPARATOR = "\\"; -/** - * A regular expression that matches one or more path separators. - */ const SEPARATOR_PATTERN = /[\\/]+/; - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg$2(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the directory path of a `path`. - * - * @example Usage - * ```ts - * import { dirname } from "@std/path/windows/dirname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(dirname("C:\\foo\\bar\\baz.ext"), "C:\\foo\\bar"); - * assertEquals(dirname(new URL("file:///C:/foo/bar/baz.ext")), "C:\\foo\\bar"); - * ``` - * - * @param path The path to get the directory from. - * @returns The directory path. - */ function dirname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg$2(path); - const len = path.length; - let rootEnd = -1; - let end = -1; - let matchedSlash = true; - let offset = 0; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = offset = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - return path; - } - if (j !== last) { - // We matched a UNC root with leftovers - // Offset by 1 to include the separator after the UNC root to - // treat it as a "normal root" on top of a (UNC) root - rootEnd = offset = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = offset = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - return path; - } - for(let i = len - 1; i >= offset; --i){ - if (isPathSeparator(path.charCodeAt(i))) { - if (!matchedSlash) { - end = i; - break; - } - } else { - // We saw the first non-path separator - matchedSlash = false; - } - } - if (end === -1) { - if (rootEnd === -1) return "."; - else end = rootEnd; - } - return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the extension of the `path` with leading period. - * - * @example Usage - * ```ts - * import { extname } from "@std/path/windows/extname"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(extname("file.ts"), ".ts"); - * assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext"); - * ``` - * - * @param path The path to get the extension from. - * @returns The extension of the `path`. - */ function extname(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertPath(path); - let start = 0; - let startDot = -1; - let startPart = 0; - let end = -1; - let matchedSlash = true; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Check for a drive letter prefix so as not to mistake the following - // path separator as an extra separator at the end of the path that can be - // disregarded - if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) { - start = startPart = 2; - } - for(let i = path.length - 1; i >= start; --i){ - const code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - return ""; - } - return path.slice(startDot, end); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function _format(sep, pathObject) { - const dir = pathObject.dir || pathObject.root; - const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? ""); - if (!dir) return base; - if (base === sep) return dir; - if (dir === pathObject.root) return dir + base; - return dir + sep + base; -} -function assertArg$1(pathObject) { - if (pathObject === null || typeof pathObject !== "object") { - throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Generate a path from `ParsedPath` object. - * - * @example Usage - * ```ts - * import { format } from "@std/path/windows/format"; - * import { assertEquals } from "@std/assert"; - * - * const path = format({ - * root: "C:\\", - * dir: "C:\\path\\dir", - * base: "file.txt", - * ext: ".txt", - * name: "file" - * }); - * assertEquals(path, "C:\\path\\dir\\file.txt"); - * ``` - * - * @param pathObject The path object to format. - * @returns The formatted path. - */ function format(pathObject) { - assertArg$1(pathObject); - return _format("\\", pathObject); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Verifies whether provided path is absolute. - * - * @example Usage - * ```ts - * import { isAbsolute } from "@std/path/windows/is-absolute"; - * import { assert, assertFalse } from "@std/assert"; - * - * assert(isAbsolute("C:\\foo\\bar")); - * assertFalse(isAbsolute("..\\baz")); - * ``` - * - * @param path The path to verify. - * @returns `true` if the path is absolute, `false` otherwise. - */ function isAbsolute(path) { - assertPath(path); - const len = path.length; - if (len === 0) return false; - const code = path.charCodeAt(0); - if (isPathSeparator(code)) { - return true; - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (len > 2 && path.charCodeAt(1) === CHAR_COLON) { - if (isPathSeparator(path.charCodeAt(2))) return true; - } - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArg(path) { - assertPath(path); - if (path.length === 0) return "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// Copyright the Browserify authors. MIT License. -// Ported from https://github.com/browserify/path-browserify/ -// This module is browser compatible. -// Resolves . and .. elements in a path with directory names -function normalizeString(path, allowAboveRoot, separator, isPathSeparator) { - let res = ""; - let lastSegmentLength = 0; - let lastSlash = -1; - let dots = 0; - let code; - for(let i = 0; i <= path.length; ++i){ - if (i < path.length) code = path.charCodeAt(i); - else if (isPathSeparator(code)) break; - else code = CHAR_FORWARD_SLASH; - if (isPathSeparator(code)) { - if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) { - if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) { - if (res.length > 2) { - const lastSlashIndex = res.lastIndexOf(separator); - if (lastSlashIndex === -1) { - res = ""; - lastSegmentLength = 0; - } else { - res = res.slice(0, lastSlashIndex); - lastSegmentLength = res.length - 1 - res.lastIndexOf(separator); - } - lastSlash = i; - dots = 0; - continue; - } else if (res.length === 2 || res.length === 1) { - res = ""; - lastSegmentLength = 0; - lastSlash = i; - dots = 0; - continue; - } - } - if (allowAboveRoot) { - if (res.length > 0) res += `${separator}..`; - else res = ".."; - lastSegmentLength = 2; - } - } else { - if (res.length > 0) res += separator + path.slice(lastSlash + 1, i); - else res = path.slice(lastSlash + 1, i); - lastSegmentLength = i - lastSlash - 1; - } - lastSlash = i; - dots = 0; - } else if (code === CHAR_DOT && dots !== -1) { - ++dots; - } else { - dots = -1; - } - } - return res; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Normalize the `path`, resolving `'..'` and `'.'` segments. - * Note that resolving these segments does not necessarily mean that all will be eliminated. - * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`. - * - * @example Usage - * ```ts - * import { normalize } from "@std/path/windows/normalize"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(normalize("C:\\foo\\..\\bar"), "C:\\bar"); - * assertEquals(normalize(new URL("file:///C:/foo/../bar")), "C:\\bar"); - * ``` - * - * @param path The path to normalize - * @returns The normalized path - */ function normalize(path) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - assertArg(path); - const len = path.length; - let rootEnd = 0; - let device; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an absolute - // path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - // Return the normalized version of the UNC root since there - // is nothing left to process - return `\\\\${firstPart}\\${path.slice(last)}\\`; - } else if (j !== last) { - // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid unnecessary - // work - return "\\"; - } - let tail; - if (rootEnd < len) { - tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator); - } else { - tail = ""; - } - if (tail.length === 0 && !isAbsolute) tail = "."; - if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) { - tail += "\\"; - } - if (device === undefined) { - if (isAbsolute) { - if (tail.length > 0) return `\\${tail}`; - else return "\\"; - } - return tail; - } else if (isAbsolute) { - if (tail.length > 0) return `${device}\\${tail}`; - else return `${device}\\`; - } - return device + tail; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Join all given a sequence of `paths`,then normalizes the resulting path. - * - * @example Usage - * ```ts - * import { join } from "@std/path/windows/join"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(join("C:\\foo", "bar", "baz\\.."), "C:\\foo\\bar"); - * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz\\.."), "C:\\foo\\bar"); - * ``` - * - * @param path The path to join. This can be string or file URL. - * @param paths The paths to join. - * @returns The joined path. - */ function join(path, ...paths) { - if (path instanceof URL) { - path = fromFileUrl(path); - } - paths = path ? [ - path, - ...paths - ] : paths; - paths.forEach((path)=>assertPath(path)); - paths = paths.filter((path)=>path.length > 0); - if (paths.length === 0) return "."; - // Make sure that the joined path doesn't start with two slashes, because - // normalize() will mistake it for an UNC path then. - // - // This step is skipped when it is very clear that the user actually - // intended to point at an UNC path. This is assumed when the first - // non-empty string arguments starts with exactly two slashes followed by - // at least one more non-slash character. - // - // Note that for normalize() to treat a path as an UNC path it needs to - // have at least 2 components, so we don't filter for that here. - // This means that the user can use join to construct UNC paths from - // a server name and a share name; for example: - // path.join('//server', 'share') -> '\\\\server\\share\\' - let needsReplace = true; - let slashCount = 0; - const firstPart = paths[0]; - if (isPathSeparator(firstPart.charCodeAt(0))) { - ++slashCount; - const firstLen = firstPart.length; - if (firstLen > 1) { - if (isPathSeparator(firstPart.charCodeAt(1))) { - ++slashCount; - if (firstLen > 2) { - if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount; - else { - // We matched a UNC path in the first part - needsReplace = false; - } - } - } - } - } - let joined = paths.join("\\"); - if (needsReplace) { - // Find any more consecutive slashes we need to replace - for(; slashCount < joined.length; ++slashCount){ - if (!isPathSeparator(joined.charCodeAt(slashCount))) break; - } - // Replace the slashes if needed - if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`; - } - return normalize(joined); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return a `ParsedPath` object of the `path`. - * - * @example Usage - * ```ts - * import { parse } from "@std/path/windows/parse"; - * import { assertEquals } from "@std/assert"; - * - * const parsed = parse("C:\\foo\\bar\\baz.ext"); - * assertEquals(parsed, { - * root: "C:\\", - * dir: "C:\\foo\\bar", - * base: "baz.ext", - * ext: ".ext", - * name: "baz", - * }); - * ``` - * - * @param path The path to parse. - * @returns The `ParsedPath` object. - */ function parse(path) { - assertPath(path); - const ret = { - root: "", - dir: "", - base: "", - ext: "", - name: "" - }; - const len = path.length; - if (len === 0) return ret; - let rootEnd = 0; - let code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - rootEnd = 1; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - rootEnd = j + 1; - } - } - } - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - if (len === 3) { - // `path` contains just a drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - ret.base = "\\"; - return ret; - } - rootEnd = 3; - } - } else { - // `path` contains just a relative drive root, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - return ret; - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator, exit early to avoid - // unnecessary work - ret.root = ret.dir = path; - ret.base = "\\"; - return ret; - } - if (rootEnd > 0) ret.root = path.slice(0, rootEnd); - let startDot = -1; - let startPart = rootEnd; - let end = -1; - let matchedSlash = true; - let i = path.length - 1; - // Track the state of characters (if any) we see before our first dot and - // after any path separator we find - let preDotState = 0; - // Get non-dir info - for(; i >= rootEnd; --i){ - code = path.charCodeAt(i); - if (isPathSeparator(code)) { - // If we reached a path separator that was not part of a set of path - // separators at the end of the string, stop now - if (!matchedSlash) { - startPart = i + 1; - break; - } - continue; - } - if (end === -1) { - // We saw the first non-path separator, mark this as the end of our - // extension - matchedSlash = false; - end = i + 1; - } - if (code === CHAR_DOT) { - // If this is our first dot, mark it as the start of our extension - if (startDot === -1) startDot = i; - else if (preDotState !== 1) preDotState = 1; - } else if (startDot !== -1) { - // We saw a non-dot and non-path separator before our dot, so we should - // have a good chance at having a non-empty extension - preDotState = -1; - } - } - if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot - preDotState === 0 || // The (right-most) trimmed path component is exactly '..' - preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { - if (end !== -1) { - ret.base = ret.name = path.slice(startPart, end); - } - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - ret.ext = path.slice(startDot, end); - } - // Fallback to '\' in case there is no basename - ret.base = ret.base || "\\"; - // If the directory is the root, use the entire root as the `dir` including - // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the - // trailing slash (`C:\abc\def` -> `C:\abc`). - if (startPart > 0 && startPart !== rootEnd) { - ret.dir = path.slice(0, startPart - 1); - } else ret.dir = ret.root; - return ret; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path segments into a `path`. - * - * @example Usage - * ```ts - * import { resolve } from "@std/path/windows/resolve"; - * import { assertEquals } from "@std/assert"; - * - * const resolved = resolve("C:\\foo\\bar", "..\\baz"); - * assertEquals(resolved, "C:\\foo\\baz"); - * ``` - * - * @param pathSegments The path segments to process to path - * @returns The resolved path - */ function resolve(...pathSegments) { - let resolvedDevice = ""; - let resolvedTail = ""; - let resolvedAbsolute = false; - for(let i = pathSegments.length - 1; i >= -1; i--){ - let path; - // deno-lint-ignore no-explicit-any - const { Deno } = globalThis; - if (i >= 0) { - path = pathSegments[i]; - } else if (!resolvedDevice) { - if (typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)"); - } - path = Deno.cwd(); - } else { - if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") { - throw new TypeError("Resolved a relative path without a current working directory (CWD)"); - } - path = Deno.cwd(); - // Verify that a cwd was found and that it actually points - // to our drive. If not, default to the drive's root. - if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) { - path = `${resolvedDevice}\\`; - } - } - assertPath(path); - const len = path.length; - // Skip empty entries - if (len === 0) continue; - let rootEnd = 0; - let device = ""; - let isAbsolute = false; - const code = path.charCodeAt(0); - // Try to match a root - if (len > 1) { - if (isPathSeparator(code)) { - // Possible UNC root - // If we started with a separator, we know we at least have an - // absolute path of some kind (UNC or otherwise) - isAbsolute = true; - if (isPathSeparator(path.charCodeAt(1))) { - // Matched double path separator at beginning - let j = 2; - let last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - const firstPart = path.slice(last, j); - // Matched! - last = j; - // Match 1 or more path separators - for(; j < len; ++j){ - if (!isPathSeparator(path.charCodeAt(j))) break; - } - if (j < len && j !== last) { - // Matched! - last = j; - // Match 1 or more non-path separators - for(; j < len; ++j){ - if (isPathSeparator(path.charCodeAt(j))) break; - } - if (j === len) { - // We matched a UNC root only - device = `\\\\${firstPart}\\${path.slice(last)}`; - rootEnd = j; - } else if (j !== last) { - // We matched a UNC root with leftovers - device = `\\\\${firstPart}\\${path.slice(last, j)}`; - rootEnd = j; - } - } - } - } else { - rootEnd = 1; - } - } else if (isWindowsDeviceRoot(code)) { - // Possible device root - if (path.charCodeAt(1) === CHAR_COLON) { - device = path.slice(0, 2); - rootEnd = 2; - if (len > 2) { - if (isPathSeparator(path.charCodeAt(2))) { - // Treat separator following drive name as an absolute path - // indicator - isAbsolute = true; - rootEnd = 3; - } - } - } - } - } else if (isPathSeparator(code)) { - // `path` contains just a path separator - rootEnd = 1; - isAbsolute = true; - } - if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) { - continue; - } - if (resolvedDevice.length === 0 && device.length > 0) { - resolvedDevice = device; - } - if (!resolvedAbsolute) { - resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`; - resolvedAbsolute = isAbsolute; - } - if (resolvedAbsolute && resolvedDevice.length > 0) break; - } - // At this point the path should be resolved to a full absolute path, - // but handle relative paths to be safe (might happen when Deno.cwd() - // fails) - // Normalize the tail path - resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator); - return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || "."; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function assertArgs(from, to) { - assertPath(from); - assertPath(to); - if (from === to) return ""; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Return the relative path from `from` to `to` based on current working directory. - * - * An example in windows, for instance: - * from = 'C:\\orandea\\test\\aaa' - * to = 'C:\\orandea\\impl\\bbb' - * The output of the function should be: '..\\..\\impl\\bbb' - * - * @example Usage - * ```ts - * import { relative } from "@std/path/windows/relative"; - * import { assertEquals } from "@std/assert"; - * - * const relativePath = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb"); - * assertEquals(relativePath, "..\\..\\impl\\bbb"); - * ``` - * - * @param from The path from which to calculate the relative path - * @param to The path to which to calculate the relative path - * @returns The relative path from `from` to `to` - */ function relative(from, to) { - assertArgs(from, to); - const fromOrig = resolve(from); - const toOrig = resolve(to); - if (fromOrig === toOrig) return ""; - from = fromOrig.toLowerCase(); - to = toOrig.toLowerCase(); - if (from === to) return ""; - // Trim any leading backslashes - let fromStart = 0; - let fromEnd = from.length; - for(; fromStart < fromEnd; ++fromStart){ - if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for(; fromEnd - 1 > fromStart; --fromEnd){ - if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const fromLen = fromEnd - fromStart; - // Trim any leading backslashes - let toStart = 0; - let toEnd = to.length; - for(; toStart < toEnd; ++toStart){ - if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break; - } - // Trim trailing backslashes (applicable to UNC paths only) - for(; toEnd - 1 > toStart; --toEnd){ - if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break; - } - const toLen = toEnd - toStart; - // Compare paths to find the longest common path from root - const length = fromLen < toLen ? fromLen : toLen; - let lastCommonSep = -1; - let i = 0; - for(; i <= length; ++i){ - if (i === length) { - if (toLen > length) { - if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `from` is the exact base path for `to`. - // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz' - return toOrig.slice(toStart + i + 1); - } else if (i === 2) { - // We get here if `from` is the device root. - // For example: from='C:\\'; to='C:\\foo' - return toOrig.slice(toStart + i); - } - } - if (fromLen > length) { - if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) { - // We get here if `to` is the exact base path for `from`. - // For example: from='C:\\foo\\bar'; to='C:\\foo' - lastCommonSep = i; - } else if (i === 2) { - // We get here if `to` is the device root. - // For example: from='C:\\foo\\bar'; to='C:\\' - lastCommonSep = 3; - } - } - break; - } - const fromCode = from.charCodeAt(fromStart + i); - const toCode = to.charCodeAt(toStart + i); - if (fromCode !== toCode) break; - else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i; - } - // We found a mismatch before the first common path separator was seen, so - // return the original `to`. - if (i !== length && lastCommonSep === -1) { - return toOrig; - } - let out = ""; - if (lastCommonSep === -1) lastCommonSep = 0; - // Generate the relative path based on the path difference between `to` and - // `from` - for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){ - if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) { - if (out.length === 0) out += ".."; - else out += "\\.."; - } - } - // Lastly, append the rest of the destination (`to`) path that comes after - // the common path parts - if (out.length > 0) { - return out + toOrig.slice(toStart + lastCommonSep, toEnd); - } else { - toStart += lastCommonSep; - if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart; - return toOrig.slice(toStart, toEnd); - } -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const WHITESPACE_ENCODINGS = { - "\u0009": "%09", - "\u000A": "%0A", - "\u000B": "%0B", - "\u000C": "%0C", - "\u000D": "%0D", - "\u0020": "%20" -}; -function encodeWhitespace(string) { - return string.replaceAll(/[\s]/g, (c)=>{ - return WHITESPACE_ENCODINGS[c] ?? c; - }); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Converts a path string to a file URL. - * - * @example Usage - * ```ts - * import { toFileUrl } from "@std/path/windows/to-file-url"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo")); - * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo")); - * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo")); - * ``` - * @param path The path to convert. - * @returns The file URL. - */ function toFileUrl(path) { - if (!isAbsolute(path)) { - throw new TypeError(`Path must be absolute: received "${path}"`); - } - const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/); - const url = new URL("file:///"); - url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25")); - if (hostname !== undefined && hostname !== "localhost") { - url.hostname = hostname; - if (!url.hostname) { - throw new TypeError(`Invalid hostname: "${url.hostname}"`); - } - } - return url; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Resolves path to a namespace path - * - * @example Usage - * ```ts - * import { toNamespacedPath } from "@std/path/windows/to-namespaced-path"; - * import { assertEquals } from "@std/assert"; - * - * const namespaced = toNamespacedPath("C:\\foo\\bar"); - * assertEquals(namespaced, "\\\\?\\C:\\foo\\bar"); - * ``` - * - * @param path The path to resolve to namespaced path - * @returns The resolved namespaced path - */ function toNamespacedPath(path) { - // Note: this will *probably* throw somewhere. - if (typeof path !== "string") return path; - if (path.length === 0) return ""; - const resolvedPath = resolve(path); - if (resolvedPath.length >= 3) { - if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) { - // Possible UNC root - if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) { - const code = resolvedPath.charCodeAt(2); - if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) { - // Matched non-long UNC root, convert the path to a long UNC path - return `\\\\?\\UNC\\${resolvedPath.slice(2)}`; - } - } - } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) { - // Possible device root - if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) { - // Matched device root, convert the path to a long UNC path - return `\\\\?\\${resolvedPath}`; - } - } - } - return path; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -function common$1(paths, sep) { - const [first = "", ...remaining] = paths; - const parts = first.split(sep); - let endOfPrefix = parts.length; - let append = ""; - for (const path of remaining){ - const compare = path.split(sep); - if (compare.length <= endOfPrefix) { - endOfPrefix = compare.length; - append = ""; - } - for(let i = 0; i < endOfPrefix; i++){ - if (compare[i] !== parts[i]) { - endOfPrefix = i; - append = i === 0 ? "" : sep; - break; - } - } - } - return parts.slice(0, endOfPrefix).join(sep) + append; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Determines the common path from a set of paths for Windows systems. - * - * @example Usage - * ```ts - * import { common } from "@std/path/windows/common"; - * import { assertEquals } from "@std/assert"; - * - * const path = common([ - * "C:\\foo\\bar", - * "C:\\foo\\baz", - * ]); - * assertEquals(path, "C:\\foo\\"); - * ``` - * - * @param paths The paths to compare. - * @returns The common path. - */ function common(paths) { - return common$1(paths, SEPARATOR); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs}, - * {@linkcode normalizeGlob} and {@linkcode expandGlob}. - */ const REG_EXP_ESCAPE_CHARS = [ - "!", - "$", - "(", - ")", - "*", - "+", - ".", - "=", - "?", - "[", - "\\", - "^", - "{", - "|" -]; -const RANGE_ESCAPE_CHARS = [ - "-", - "\\", - "]" -]; -function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType, -caseInsensitive = false } = {}) { - if (glob === "") { - return /(?!)/; - } - // Remove trailing separators. - let newLength = glob.length; - for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--); - glob = glob.slice(0, newLength); - let regExpString = ""; - // Terminates correctly. Trust that `j` is incremented every iteration. - for(let j = 0; j < glob.length;){ - let segment = ""; - const groupStack = []; - let inRange = false; - let inEscape = false; - let endsWithSep = false; - let i = j; - // Terminates with `i` at the non-inclusive end of the current segment. - for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){ - if (inEscape) { - inEscape = false; - const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS; - segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - continue; - } - if (glob[i] === c.escapePrefix) { - inEscape = true; - continue; - } - if (glob[i] === "[") { - if (!inRange) { - inRange = true; - segment += "["; - if (glob[i + 1] === "!") { - i++; - segment += "^"; - } else if (glob[i + 1] === "^") { - i++; - segment += "\\^"; - } - continue; - } else if (glob[i + 1] === ":") { - let k = i + 1; - let value = ""; - while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){ - value += glob[k + 1]; - k++; - } - if (glob[k + 1] === ":" && glob[k + 2] === "]") { - i = k + 2; - if (value === "alnum") segment += "\\dA-Za-z"; - else if (value === "alpha") segment += "A-Za-z"; - else if (value === "ascii") segment += "\x00-\x7F"; - else if (value === "blank") segment += "\t "; - else if (value === "cntrl") segment += "\x00-\x1F\x7F"; - else if (value === "digit") segment += "\\d"; - else if (value === "graph") segment += "\x21-\x7E"; - else if (value === "lower") segment += "a-z"; - else if (value === "print") segment += "\x20-\x7E"; - else if (value === "punct") { - segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~"; - } else if (value === "space") segment += "\\s\v"; - else if (value === "upper") segment += "A-Z"; - else if (value === "word") segment += "\\w"; - else if (value === "xdigit") segment += "\\dA-Fa-f"; - continue; - } - } - } - if (glob[i] === "]" && inRange) { - inRange = false; - segment += "]"; - continue; - } - if (inRange) { - segment += glob[i]; - continue; - } - if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += ")"; - const type = groupStack.pop(); - if (type === "!") { - segment += c.wildcard; - } else if (type !== "@") { - segment += type; - } - continue; - } - if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "+" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("+"); - segment += "(?:"; - continue; - } - if (glob[i] === "@" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("@"); - segment += "(?:"; - continue; - } - if (glob[i] === "?") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("?"); - segment += "(?:"; - } else { - segment += "."; - } - continue; - } - if (glob[i] === "!" && extended && glob[i + 1] === "(") { - i++; - groupStack.push("!"); - segment += "(?!"; - continue; - } - if (glob[i] === "{") { - groupStack.push("BRACE"); - segment += "(?:"; - continue; - } - if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") { - groupStack.pop(); - segment += ")"; - continue; - } - if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") { - segment += "|"; - continue; - } - if (glob[i] === "*") { - if (extended && glob[i + 1] === "(") { - i++; - groupStack.push("*"); - segment += "(?:"; - } else { - const prevChar = glob[i - 1]; - let numStars = 1; - while(glob[i + 1] === "*"){ - i++; - numStars++; - } - const nextChar = glob[i + 1]; - if (globstarOption && numStars === 2 && [ - ...c.seps, - undefined - ].includes(prevChar) && [ - ...c.seps, - undefined - ].includes(nextChar)) { - segment += c.globstar; - endsWithSep = true; - } else { - segment += c.wildcard; - } - } - continue; - } - segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i]; - } - // Check for unclosed groups or a dangling backslash. - if (groupStack.length > 0 || inRange || inEscape) { - // Parse failure. Take all characters from this segment literally. - segment = ""; - for (const c of glob.slice(j, i)){ - segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c; - endsWithSep = false; - } - } - regExpString += segment; - if (!endsWithSep) { - regExpString += i < glob.length ? c.sep : c.sepMaybe; - endsWithSep = true; - } - // Terminates with `i` at the start of the next segment. - while(c.seps.includes(glob[i]))i++; - j = i; - } - regExpString = `^${regExpString}$`; - return new RegExp(regExpString, caseInsensitive ? "i" : ""); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -const constants = { - sep: "(?:\\\\|/)+", - sepMaybe: "(?:\\\\|/)*", - seps: [ - "\\", - "/" - ], - globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*", - wildcard: "[^\\\\/]*", - escapePrefix: "`" -}; -/** Convert a glob string to a regular expression. - * - * Tries to match bash glob expansion as closely as possible. - * - * Basic glob syntax: - * - `*` - Matches everything without leaving the path segment. - * - `?` - Matches any single character. - * - `{foo,bar}` - Matches `foo` or `bar`. - * - `[abcd]` - Matches `a`, `b`, `c` or `d`. - * - `[a-d]` - Matches `a`, `b`, `c` or `d`. - * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`. - * - `[[::]]` - Matches any character belonging to ``. - * - `[[:alnum:]]` - Matches any digit or letter. - * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`. - * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes - * for a complete list of supported character classes. - * - `\` - Escapes the next character for an `os` other than `"windows"`. - * - \` - Escapes the next character for `os` set to `"windows"`. - * - `/` - Path separator. - * - `\` - Additional path separator only for `os` set to `"windows"`. - * - * Extended syntax: - * - Requires `{ extended: true }`. - * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`. - * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same. - * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`. - * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`. - * - `!(foo|bar)` - Matches anything other than `{foo,bar}`. - * - See https://www.linuxjournal.com/content/bash-extended-globbing. - * - * Globstar syntax: - * - Requires `{ globstar: true }`. - * - `**` - Matches any number of any path segments. - * - Must comprise its entire path segment in the provided glob. - * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option. - * - * Note the following properties: - * - The generated `RegExp` is anchored at both start and end. - * - Repeating and trailing separators are tolerated. Trailing separators in the - * provided glob have no meaning and are discarded. - * - Absolute globs will only match absolute paths, etc. - * - Empty globs will match nothing. - * - Any special glob syntax must be contained to one path segment. For example, - * `?(foo|bar/baz)` is invalid. The separator will take precedence and the - * first segment ends with an unclosed group. - * - If a path segment ends with unclosed groups or a dangling escape prefix, a - * parse error has occurred. Every character for that segment is taken - * literally in this event. - * - * Limitations: - * - A negative group like `!(foo|bar)` will wrongly be converted to a negative - * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly - * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively, - * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if - * the group occurs not nested at the end of the segment. - * - * @example Usage - * ```ts - * import { globToRegExp } from "@std/path/windows/glob-to-regexp"; - * import { assertEquals } from "@std/assert"; - * - * assertEquals(globToRegExp("*.js"), /^[^\\/]*\.js(?:\\|\/)*$/); - * ``` - * - * @param glob Glob string to convert. - * @param options Conversion options. - * @returns The regular expression equivalent to the glob. - */ function globToRegExp(glob, options = {}) { - return _globToRegExp(constants, glob, options); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Test whether the given string is a glob. - * - * @example Usage - * ```ts - * import { isGlob } from "@std/path/is-glob"; - * import { assert } from "@std/assert"; - * - * assert(!isGlob("foo/bar/../baz")); - * assert(isGlob("foo/*ar/../baz")); - * ``` - * - * @param str String to test. - * @returns `true` if the given string is a glob, otherwise `false` - */ function isGlob(str) { - const chars = { - "{": "}", - "(": ")", - "[": "]" - }; - const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/; - if (str === "") { - return false; - } - let match; - while(match = regex.exec(str)){ - if (match[2]) return true; - let idx = match.index + match[0].length; - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - const open = match[1]; - const close = open ? chars[open] : null; - if (open && close) { - const n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - str = str.slice(idx); - } - return false; -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * ```ts - * import { normalizeGlob } from "@std/path/windows/normalize-glob"; - * import { assertEquals } from "@std/assert"; - * - * const normalized = normalizeGlob("**\\foo\\..\\bar", { globstar: true }); - * assertEquals(normalized, "**\\bar"); - * ``` - * - * @param glob The glob pattern to normalize. - * @param options The options for glob pattern. - * @returns The normalized glob pattern. - */ function normalizeGlob(glob, options = {}) { - const { globstar = false } = options; - if (glob.match(/\0/g)) { - throw new Error(`Glob contains invalid characters: "${glob}"`); - } - if (!globstar) { - return normalize(glob); - } - const s = SEPARATOR_PATTERN.source; - const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g"); - return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, ".."); -} - -// Copyright 2018-2025 the Deno authors. MIT license. -// This module is browser compatible. -/** - * Like join(), but doesn't collapse "**\/.." when `globstar` is true. - * - * @example Usage - * - * ```ts - * import { joinGlobs } from "@std/path/windows/join-globs"; - * import { assertEquals } from "@std/assert"; - * - * const joined = joinGlobs(["foo", "**", "bar"], { globstar: true }); - * assertEquals(joined, "foo\\**\\bar"); - * ``` - * - * @param globs The globs to join. - * @param options The options for glob pattern. - * @returns The joined glob pattern. - */ function joinGlobs(globs, options = {}) { - const { globstar = false } = options; - if (!globstar || globs.length === 0) { - return join(...globs); - } - let joined; - for (const glob of globs){ - const path = glob; - if (path.length > 0) { - if (!joined) joined = path; - else joined += `${SEPARATOR}${path}`; - } - } - if (!joined) return "."; - return normalizeGlob(joined, { - globstar - }); -} - -export { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath }; diff --git a/node_modules/@eslint/config-array/dist/esm/types.d.ts b/node_modules/@eslint/config-array/dist/esm/types.d.ts deleted file mode 100644 index 5e2b95a..0000000 --- a/node_modules/@eslint/config-array/dist/esm/types.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @fileoverview Types for the config-array package. - * @author Nicholas C. Zakas - */ -/** - * A file matcher used in `files` and `ignores`. - */ -export type FileMatcher = string | ((filePath: string) => boolean); -/** - * An entry in a config's `files` array. - * - * A subarray means all matchers must match. - */ -export type FilesMatcher = FileMatcher | FileMatcher[]; -/** - * The config types allowed in the `extraConfigTypes` option. - */ -export type ExtraConfigType = "array" | "function"; -export interface ConfigObject { - /** - * The base path for files and ignores. - */ - basePath?: string; - /** - * The files to include. - */ - files?: FilesMatcher[]; - /** - * The files to exclude. - */ - ignores?: FileMatcher[]; - /** - * The name of the config object. - */ - name?: string; - [key: string]: unknown; -} diff --git a/node_modules/@eslint/config-array/dist/esm/types.ts b/node_modules/@eslint/config-array/dist/esm/types.ts deleted file mode 100644 index 54ff217..0000000 --- a/node_modules/@eslint/config-array/dist/esm/types.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @fileoverview Types for the config-array package. - * @author Nicholas C. Zakas - */ - -/** - * A file matcher used in `files` and `ignores`. - */ -export type FileMatcher = string | ((filePath: string) => boolean); - -/** - * An entry in a config's `files` array. - * - * A subarray means all matchers must match. - */ -export type FilesMatcher = FileMatcher | FileMatcher[]; - -/** - * The config types allowed in the `extraConfigTypes` option. - */ -export type ExtraConfigType = "array" | "function"; - -export interface ConfigObject { - /** - * The base path for files and ignores. - */ - basePath?: string; - - /** - * The files to include. - */ - files?: FilesMatcher[]; - - /** - * The files to exclude. - */ - ignores?: FileMatcher[]; - - /** - * The name of the config object. - */ - name?: string; - - // may also have any number of other properties - [key: string]: unknown; -} diff --git a/node_modules/@eslint/config-array/package.json b/node_modules/@eslint/config-array/package.json deleted file mode 100644 index 9a9a062..0000000 --- a/node_modules/@eslint/config-array/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@eslint/config-array", - "version": "0.23.5", - "description": "General purpose glob-based configuration matching.", - "author": "Nicholas C. Zakas", - "type": "module", - "main": "dist/esm/index.js", - "types": "dist/esm/index.d.ts", - "exports": { - "require": { - "types": "./dist/cjs/index.d.cts", - "default": "./dist/cjs/index.cjs" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - } - }, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/rewrite.git", - "directory": "packages/config-array" - }, - "bugs": { - "url": "https://github.com/eslint/rewrite/issues" - }, - "homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-array#readme", - "scripts": { - "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", - "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", - "build:std__path": "rollup -c rollup.std__path-config.js && node fix-std__path-imports", - "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts && npm run build:std__path", - "lint:types": "attw --pack", - "pretest": "npm run build", - "test": "npm run test:types && npm run test:unit", - "test:coverage": "npm run build && c8 npm run test:unit", - "test:jsr": "npx -y jsr@latest publish --dry-run", - "test:types": "tsc -p tests/types/tsconfig.json", - "test:unit": "mocha \"tests/**/*.test.js\"" - }, - "keywords": [ - "configuration", - "configarray", - "config file" - ], - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "devDependencies": { - "@jsr/std__path": "^1.0.4", - "rollup-plugin-copy": "^3.5.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@eslint/config-helpers/LICENSE b/node_modules/@eslint/config-helpers/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@eslint/config-helpers/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@eslint/config-helpers/README.md b/node_modules/@eslint/config-helpers/README.md deleted file mode 100644 index 5e6fda4..0000000 --- a/node_modules/@eslint/config-helpers/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# @eslint/config-helpers - -## Description - -Helper utilities for creating ESLint configuration. - -## Installation - -For Node.js and compatible runtimes: - -```shell -npm install @eslint/config-helpers -# or -yarn add @eslint/config-helpers -# or -pnpm install @eslint/config-helpers -# or -bun add @eslint/config-helpers -``` - -For Deno: - -```shell -deno add @eslint/config-helpers -``` - -## Usage - -### `defineConfig()` - -The `defineConfig()` function allows you to specify an ESLint configuration with full type checking and additional capabilities, such as `extends`. Here's an example: - -```js -// eslint.config.js -import { defineConfig } from "@eslint/config-helpers"; -import js from "@eslint/js"; - -export default defineConfig([ - { - files: ["src/**/*.js"], - plugins: { js }, - extends: ["js/recommended"], - rules: { - "no-var": "error", - "prefer-const": "error", - }, - }, - { - files: ["test/**/*.js"], - rules: { - "no-console": "off", - }, - }, -]); -``` - -### `globalIgnores()` - -The `globalIgnores()` function allows you to specify patterns for files and directories that should be globally ignored by ESLint. This is useful for excluding files that you don't want to lint, such as build directories or third-party libraries. Here's an example: - -```js -// eslint.config.js -import { defineConfig, globalIgnores } from "@eslint/config-helpers"; - -export default defineConfig([ - { - files: ["src/**/*.js"], - rules: { - "no-var": "error", - "prefer-const": "error", - }, - }, - globalIgnores(["node_modules/", "dist/", "coverage/"]), -]); -``` - -## License - -Apache 2.0 - - - - -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) -to get your logo on our READMEs and [website](https://eslint.org/sponsors). - -

Platinum Sponsors

-

Automattic

Gold Sponsors

-

Qlty Software

Silver Sponsors

-

Vite Liftoff StackBlitz

Bronze Sponsors

-

Cybozu SAP CrawlJobs aeriusventilation's Org Depot Icons8 Discord GitBook HeroCoders TestMu AI Open Source Office (Formerly LambdaTest)

-

Technology Sponsors

-Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. -

Netlify Algolia 1Password

- diff --git a/node_modules/@eslint/config-helpers/dist/cjs/index.cjs b/node_modules/@eslint/config-helpers/dist/cjs/index.cjs deleted file mode 100644 index a99a35d..0000000 --- a/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +++ /dev/null @@ -1,587 +0,0 @@ -'use strict'; - -/** - * @fileoverview defineConfig helper - * @author Nicholas C. Zakas - */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @import * as $eslintcore from "@eslint/core"; */ -/** @typedef {$eslintcore.ConfigObject} Config */ -/** @typedef {$eslintcore.LegacyConfigObject} LegacyConfig */ -/** @typedef {$eslintcore.Plugin} Plugin */ -/** @typedef {$eslintcore.RuleConfig} RuleConfig */ -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.ExtendsElement} ExtendsElement */ -/** @typedef {$typests.ExtensionConfigObject} ExtensionConfigObject */ -/** @typedef {$typests.SimpleExtendsElement} SimpleExtendsElement */ -/** @typedef {$typests.ConfigWithExtends} ConfigWithExtends */ -/** @typedef {$typests.InfiniteArray} InfiniteConfigArray */ -/** @typedef {$typests.ConfigWithExtendsArray} ConfigWithExtendsArray */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const eslintrcKeys = [ - "env", - "extends", - "globals", - "ignorePatterns", - "noInlineConfig", - "overrides", - "parser", - "parserOptions", - "reportUnusedDisableDirectives", - "root", -]; - -const allowedGlobalIgnoreKeys = new Set(["basePath", "ignores", "name"]); - -/** - * Gets the name of a config object. - * @param {Config} config The config object. - * @param {string} indexPath The index path of the config object. - * @return {string} The name of the config object. - */ -function getConfigName(config, indexPath) { - if (config.name) { - return config.name; - } - - return `UserConfig${indexPath}`; -} - -/** - * Gets the name of an extension. - * @param {SimpleExtendsElement} extension The extension. - * @param {string} indexPath The index of the extension. - * @return {string} The name of the extension. - */ -function getExtensionName(extension, indexPath) { - if (typeof extension === "string") { - return extension; - } - - if (extension.name) { - return extension.name; - } - - return `ExtendedConfig${indexPath}`; -} - -/** - * Determines if a config object is a legacy config. - * @param {Config|LegacyConfig} config The config object to check. - * @return {config is LegacyConfig} `true` if the config object is a legacy config. - */ -function isLegacyConfig(config) { - // eslintrc's plugins must be an array; while flat config's must be an object. - if (Array.isArray(config.plugins)) { - return true; - } - - for (const key of eslintrcKeys) { - if (key in config) { - return true; - } - } - - return false; -} - -/** - * Determines if a config object is a global ignores config. - * @param {Config} config The config object to check. - * @return {boolean} `true` if the config object is a global ignores config. - */ -function isGlobalIgnores(config) { - return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key)); -} - -/** - * Parses a plugin member ID (rule, processor, etc.) and returns - * the namespace and member name. - * @param {string} id The ID to parse. - * @returns {{namespace:string, name:string}} The namespace and member name. - */ -function getPluginMember(id) { - const firstSlashIndex = id.indexOf("/"); - - if (firstSlashIndex === -1) { - return { namespace: "", name: id }; - } - - let namespace = id.slice(0, firstSlashIndex); - - /* - * Special cases: - * 1. The namespace is `@`, that means it's referring to the - * core plugin so `@` is the full namespace. - * 2. The namespace starts with `@`, that means it's referring to - * an npm scoped package. That means the namespace is the scope - * and the package name (i.e., `@eslint/core`). - */ - if (namespace[0] === "@" && namespace !== "@") { - const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1); - if (secondSlashIndex !== -1) { - namespace = id.slice(0, secondSlashIndex); - return { namespace, name: id.slice(secondSlashIndex + 1) }; - } - } - - const name = id.slice(firstSlashIndex + 1); - - return { namespace, name }; -} - -/** - * Normalizes the plugin config by replacing the namespace with the plugin namespace. - * @param {string} userNamespace The namespace of the plugin. - * @param {Plugin} plugin The plugin config object. - * @param {Config} config The config object to normalize. - * @return {Config} The normalized config object. - */ -function normalizePluginConfig(userNamespace, plugin, config) { - const pluginNamespace = plugin.meta?.namespace; - - // don't do anything if the plugin doesn't have a namespace or rules - if ( - !pluginNamespace || - pluginNamespace === userNamespace || - (!config.rules && !config.processor && !config.language) - ) { - return config; - } - - const result = { ...config }; - - // update the rules - if (result.rules) { - const ruleIds = Object.keys(result.rules); - - /** @type {Record} */ - const newRules = {}; - - for (let i = 0; i < ruleIds.length; i++) { - const ruleId = ruleIds[i]; - const { namespace: ruleNamespace, name: ruleName } = - getPluginMember(ruleId); - - if (ruleNamespace === pluginNamespace) { - newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId]; - } else { - newRules[ruleId] = result.rules[ruleId]; - } - } - - result.rules = newRules; - } - - // update the processor - - if (typeof result.processor === "string") { - const { namespace: processorNamespace, name: processorName } = - getPluginMember(result.processor); - - if (processorNamespace) { - if (processorNamespace === pluginNamespace) { - result.processor = `${userNamespace}/${processorName}`; - } - } - } - - // update the language - if (typeof result.language === "string") { - const { namespace: languageNamespace, name: languageName } = - getPluginMember(result.language); - - if (languageNamespace === pluginNamespace) { - result.language = `${userNamespace}/${languageName}`; - } - } - - return result; -} - -/** - * Deeply normalizes a plugin config, traversing recursively into an arrays. - * @param {string} userPluginNamespace The namespace of the plugin. - * @param {Plugin} plugin The plugin object. - * @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize. - * @param {string} pluginConfigName The name of the plugin config. - * @return {InfiniteConfigArray} The normalized plugin config. - * @throws {TypeError} If the plugin config is a legacy config. - */ -function deepNormalizePluginConfig( - userPluginNamespace, - plugin, - pluginConfig, - pluginConfigName, -) { - // if it's an array then it's definitely a new config - if (Array.isArray(pluginConfig)) { - return pluginConfig.map(pluginSubConfig => - deepNormalizePluginConfig( - userPluginNamespace, - plugin, - pluginSubConfig, - pluginConfigName, - ), - ); - } - - // if it's a legacy config, throw an error - if (isLegacyConfig(pluginConfig)) { - throw new TypeError( - `Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`, - ); - } - - return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig); -} - -/** - * Finds a plugin config by name in the given config. - * @param {Config} config The config object. - * @param {string} pluginConfigName The name of the plugin config. - * @return {InfiniteConfigArray} The plugin config. - * @throws {TypeError} If the plugin config is not found or is a legacy config. - */ -function findPluginConfig(config, pluginConfigName) { - const { namespace: userPluginNamespace, name: configName } = - getPluginMember(pluginConfigName); - const plugin = config.plugins?.[userPluginNamespace]; - - if (!plugin) { - throw new TypeError(`Plugin "${userPluginNamespace}" not found.`); - } - - const directConfig = plugin.configs?.[configName]; - - // Prefer direct config, but fall back to flat config if available - if (directConfig) { - // Arrays are always flat configs, and non-legacy configs can be used directly - if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) { - return deepNormalizePluginConfig( - userPluginNamespace, - plugin, - directConfig, - pluginConfigName, - ); - } - } - - // If it's a legacy config, or the config does not exist => look for the flat version - const flatConfig = plugin.configs?.[`flat/${configName}`]; - if ( - flatConfig && - (Array.isArray(flatConfig) || !isLegacyConfig(flatConfig)) - ) { - return deepNormalizePluginConfig( - userPluginNamespace, - plugin, - flatConfig, - pluginConfigName, - ); - } - - // If we get here, then the config was either not found or is a legacy config - const message = - directConfig || flatConfig - ? `Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.` - : `Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`; - throw new TypeError(message); -} - -/** - * Flattens an array while keeping track of the index path. - * @param {any[]} configList The array to traverse. - * @param {string} indexPath The index path of the value in a multidimensional array. - * @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values. - */ -function* flatTraverse(configList, indexPath = "") { - for (let i = 0; i < configList.length; i++) { - const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`; - - // if it's an array then traverse it as well - if (Array.isArray(configList[i])) { - yield* flatTraverse(configList[i], newIndexPath); - continue; - } - - yield { indexPath: newIndexPath, value: configList[i] }; - } -} - -/** - * Extends a list of config files by creating every combination of base and extension files. - * @param {(string|string[])[]} [baseFiles] The base files. - * @param {(string|string[])[]} [extensionFiles] The extension files. - * @return {(string|string[])[]} The extended files. - */ -function extendConfigFiles(baseFiles = [], extensionFiles = []) { - if (!extensionFiles.length) { - return baseFiles.concat(); - } - - if (!baseFiles.length) { - return extensionFiles.concat(); - } - - /** @type {(string|string[])[]} */ - const result = []; - - for (const baseFile of baseFiles) { - for (const extensionFile of extensionFiles) { - /* - * Each entry can be a string or array of strings. The end result - * needs to be an array of strings, so we need to be sure to include - * all of the items when there's an array. - */ - - const entry = []; - - if (Array.isArray(baseFile)) { - entry.push(...baseFile); - } else { - entry.push(baseFile); - } - - if (Array.isArray(extensionFile)) { - entry.push(...extensionFile); - } else { - entry.push(extensionFile); - } - - result.push(entry); - } - } - - return result; -} - -/** - * Extends a config object with another config object. - * @param {Config} baseConfig The base config object. - * @param {string} baseConfigName The name of the base config object. - * @param {Config} extension The extension config object. - * @param {string} extensionName The index of the extension config object. - * @return {Config} The extended config object. - */ -function extendConfig(baseConfig, baseConfigName, extension, extensionName) { - const result = { ...extension }; - - // for global ignores there is no further work to be done, we just keep everything - if (!isGlobalIgnores(extension)) { - // for files we need to create every combination of base and extension files - if (baseConfig.files) { - result.files = extendConfigFiles(baseConfig.files, extension.files); - } - - // for ignores we just concatenation the extension ignores onto the base ignores - if (baseConfig.ignores) { - result.ignores = baseConfig.ignores.concat(extension.ignores ?? []); - } - } - - result.name = `${baseConfigName} > ${extensionName}`; - - if (baseConfig.basePath) { - result.basePath = baseConfig.basePath; - } - - return result; -} - -/** - * Processes a list of extends elements. - * @param {ConfigWithExtends} config The config object. - * @param {WeakMap} configNames The map of config objects to their names. - * @return {Config[]} The flattened list of config objects. - * @throws {TypeError} If the `extends` property is not an array or if nested `extends` is found. - */ -function processExtends(config, configNames) { - if (!config.extends) { - return [config]; - } - - if (!Array.isArray(config.extends)) { - throw new TypeError("The `extends` property must be an array."); - } - - const { - /** @type {Config[]} */ - extends: extendsList, - - /** @type {Config} */ - ...configObject - } = config; - - const extensionNames = new WeakMap(); - - // replace strings with the actual configs - const objectExtends = extendsList.map(extendsElement => { - if (typeof extendsElement === "string") { - const pluginConfig = findPluginConfig(config, extendsElement); - - // assign names - if (Array.isArray(pluginConfig)) { - pluginConfig.forEach((pluginConfigElement, index) => { - extensionNames.set( - pluginConfigElement, - `${extendsElement}[${index}]`, - ); - }); - } else { - extensionNames.set(pluginConfig, extendsElement); - } - - return pluginConfig; - } - - return /** @type {Config} */ (extendsElement); - }); - - const result = []; - - for (const { indexPath, value: extendsElement } of flatTraverse( - objectExtends, - )) { - const extension = /** @type {Config} */ (extendsElement); - - if ("basePath" in extension) { - throw new TypeError("'basePath' in `extends` is not allowed."); - } - - if ("extends" in extension) { - throw new TypeError("Nested 'extends' is not allowed."); - } - - const baseConfigName = /** @type {string} */ (configNames.get(config)); - const extensionName = - extensionNames.get(extendsElement) ?? - getExtensionName(extendsElement, indexPath); - - result.push( - extendConfig( - configObject, - baseConfigName, - extension, - extensionName, - ), - ); - } - - /* - * If the base config object has only `ignores` and `extends`, then - * removing `extends` turns it into a global ignores, which is not what - * we want. So we need to check if the base config object is a global ignores - * and if so, we don't add it to the array. - * - * (The other option would be to add a `files` entry, but that would result - * in a config that didn't actually do anything because there are no - * other keys in the config.) - */ - if (!isGlobalIgnores(configObject)) { - result.push(configObject); - } - - return result.flat(); -} - -/** - * Processes a list of config objects and arrays. - * @param {ConfigWithExtends[]} configList The list of config objects and arrays. - * @param {WeakMap} configNames The map of config objects to their names. - * @return {Config[]} The flattened list of config objects. - */ -function processConfigList(configList, configNames) { - return configList.flatMap(config => processExtends(config, configNames)); -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * Helper function to define a config array. - * @param {ConfigWithExtendsArray} args The arguments to the function. - * @returns {Config[]} The config array. - * @throws {TypeError} If no arguments are provided or if an argument is not an object. - */ -function defineConfig(...args) { - const configNames = new WeakMap(); - const configs = []; - - if (args.length === 0) { - throw new TypeError("Expected one or more arguments."); - } - - // first flatten the list of configs and get the names - for (const { indexPath, value } of flatTraverse(args)) { - if (typeof value !== "object" || value === null) { - throw new TypeError( - `Expected an object but received ${String(value)}.`, - ); - } - - const config = /** @type {ConfigWithExtends} */ (value); - - // save config name for easy reference later - configNames.set(config, getConfigName(config, indexPath)); - configs.push(config); - } - - return processConfigList(configs, configNames); -} - -/** - * @fileoverview Global ignores helper function. - * @author Nicholas C. Zakas - */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -let globalIgnoreCount = 0; - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * Creates a global ignores config with the given patterns. - * @param {string[]} ignorePatterns The ignore patterns. - * @param {string} [name] The name of the global ignores config. - * @returns {Config} The global ignores config. - * @throws {TypeError} If ignorePatterns is not an array or if it is empty. - */ -function globalIgnores(ignorePatterns, name) { - if (!Array.isArray(ignorePatterns)) { - throw new TypeError("ignorePatterns must be an array"); - } - - if (ignorePatterns.length === 0) { - throw new TypeError("ignorePatterns must contain at least one pattern"); - } - - const id = globalIgnoreCount++; - - return { - name: name || `globalIgnores ${id}`, - ignores: ignorePatterns, - }; -} - -exports.defineConfig = defineConfig; -exports.globalIgnores = globalIgnores; diff --git a/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts b/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts deleted file mode 100644 index 220c64f..0000000 --- a/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +++ /dev/null @@ -1,27 +0,0 @@ -export type Config = $eslintcore.ConfigObject; -export type LegacyConfig = $eslintcore.LegacyConfigObject; -export type Plugin = $eslintcore.Plugin; -export type RuleConfig = $eslintcore.RuleConfig; -export type ExtendsElement = $typests.ExtendsElement; -export type ExtensionConfigObject = $typests.ExtensionConfigObject; -export type SimpleExtendsElement = $typests.SimpleExtendsElement; -export type ConfigWithExtends = $typests.ConfigWithExtends; -export type InfiniteConfigArray = $typests.InfiniteArray; -export type ConfigWithExtendsArray = $typests.ConfigWithExtendsArray; -/** - * Helper function to define a config array. - * @param {ConfigWithExtendsArray} args The arguments to the function. - * @returns {Config[]} The config array. - * @throws {TypeError} If no arguments are provided or if an argument is not an object. - */ -export function defineConfig(...args: ConfigWithExtendsArray): Config[]; -/** - * Creates a global ignores config with the given patterns. - * @param {string[]} ignorePatterns The ignore patterns. - * @param {string} [name] The name of the global ignores config. - * @returns {Config} The global ignores config. - * @throws {TypeError} If ignorePatterns is not an array or if it is empty. - */ -export function globalIgnores(ignorePatterns: string[], name?: string): Config; -import type * as $eslintcore from "@eslint/core"; -import type * as $typests from "./types.cts"; diff --git a/node_modules/@eslint/config-helpers/dist/cjs/types.cts b/node_modules/@eslint/config-helpers/dist/cjs/types.cts deleted file mode 100644 index 9140c9c..0000000 --- a/node_modules/@eslint/config-helpers/dist/cjs/types.cts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @fileoverview Types for this package. - */ - -import type { ConfigObject } from "@eslint/core"; - -/** - * Infinite array type. - */ -export type InfiniteArray = T | InfiniteArray[]; - -/** - * A config object that may appear inside of `extends`. - * `basePath` and nested `extends` are not allowed on extension config objects. - */ -export type ExtensionConfigObject = Omit & { - extends?: never; -}; - -/** - * The type of array element in the `extends` property after flattening. - */ -export type SimpleExtendsElement = string | ExtensionConfigObject; - -/** - * The type of array element in the `extends` property before flattening. - */ -export type ExtendsElement = - | SimpleExtendsElement - | InfiniteArray; - -/** - * Config with extends. Valid only inside of `defineConfig()`. - */ -export interface ConfigWithExtends extends ConfigObject { - extends?: ExtendsElement[]; -} - -export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/node_modules/@eslint/config-helpers/dist/esm/index.d.ts b/node_modules/@eslint/config-helpers/dist/esm/index.d.ts deleted file mode 100644 index ed5e59e..0000000 --- a/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export type Config = $eslintcore.ConfigObject; -export type LegacyConfig = $eslintcore.LegacyConfigObject; -export type Plugin = $eslintcore.Plugin; -export type RuleConfig = $eslintcore.RuleConfig; -export type ExtendsElement = $typests.ExtendsElement; -export type ExtensionConfigObject = $typests.ExtensionConfigObject; -export type SimpleExtendsElement = $typests.SimpleExtendsElement; -export type ConfigWithExtends = $typests.ConfigWithExtends; -export type InfiniteConfigArray = $typests.InfiniteArray; -export type ConfigWithExtendsArray = $typests.ConfigWithExtendsArray; -/** - * Helper function to define a config array. - * @param {ConfigWithExtendsArray} args The arguments to the function. - * @returns {Config[]} The config array. - * @throws {TypeError} If no arguments are provided or if an argument is not an object. - */ -export function defineConfig(...args: ConfigWithExtendsArray): Config[]; -/** - * Creates a global ignores config with the given patterns. - * @param {string[]} ignorePatterns The ignore patterns. - * @param {string} [name] The name of the global ignores config. - * @returns {Config} The global ignores config. - * @throws {TypeError} If ignorePatterns is not an array or if it is empty. - */ -export function globalIgnores(ignorePatterns: string[], name?: string): Config; -import type * as $eslintcore from "@eslint/core"; -import type * as $typests from "./types.ts"; diff --git a/node_modules/@eslint/config-helpers/dist/esm/index.js b/node_modules/@eslint/config-helpers/dist/esm/index.js deleted file mode 100644 index e5bd4e0..0000000 --- a/node_modules/@eslint/config-helpers/dist/esm/index.js +++ /dev/null @@ -1,585 +0,0 @@ -// @ts-self-types="./index.d.ts" -/** - * @fileoverview defineConfig helper - * @author Nicholas C. Zakas - */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @import * as $eslintcore from "@eslint/core"; */ -/** @typedef {$eslintcore.ConfigObject} Config */ -/** @typedef {$eslintcore.LegacyConfigObject} LegacyConfig */ -/** @typedef {$eslintcore.Plugin} Plugin */ -/** @typedef {$eslintcore.RuleConfig} RuleConfig */ -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.ExtendsElement} ExtendsElement */ -/** @typedef {$typests.ExtensionConfigObject} ExtensionConfigObject */ -/** @typedef {$typests.SimpleExtendsElement} SimpleExtendsElement */ -/** @typedef {$typests.ConfigWithExtends} ConfigWithExtends */ -/** @typedef {$typests.InfiniteArray} InfiniteConfigArray */ -/** @typedef {$typests.ConfigWithExtendsArray} ConfigWithExtendsArray */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const eslintrcKeys = [ - "env", - "extends", - "globals", - "ignorePatterns", - "noInlineConfig", - "overrides", - "parser", - "parserOptions", - "reportUnusedDisableDirectives", - "root", -]; - -const allowedGlobalIgnoreKeys = new Set(["basePath", "ignores", "name"]); - -/** - * Gets the name of a config object. - * @param {Config} config The config object. - * @param {string} indexPath The index path of the config object. - * @return {string} The name of the config object. - */ -function getConfigName(config, indexPath) { - if (config.name) { - return config.name; - } - - return `UserConfig${indexPath}`; -} - -/** - * Gets the name of an extension. - * @param {SimpleExtendsElement} extension The extension. - * @param {string} indexPath The index of the extension. - * @return {string} The name of the extension. - */ -function getExtensionName(extension, indexPath) { - if (typeof extension === "string") { - return extension; - } - - if (extension.name) { - return extension.name; - } - - return `ExtendedConfig${indexPath}`; -} - -/** - * Determines if a config object is a legacy config. - * @param {Config|LegacyConfig} config The config object to check. - * @return {config is LegacyConfig} `true` if the config object is a legacy config. - */ -function isLegacyConfig(config) { - // eslintrc's plugins must be an array; while flat config's must be an object. - if (Array.isArray(config.plugins)) { - return true; - } - - for (const key of eslintrcKeys) { - if (key in config) { - return true; - } - } - - return false; -} - -/** - * Determines if a config object is a global ignores config. - * @param {Config} config The config object to check. - * @return {boolean} `true` if the config object is a global ignores config. - */ -function isGlobalIgnores(config) { - return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key)); -} - -/** - * Parses a plugin member ID (rule, processor, etc.) and returns - * the namespace and member name. - * @param {string} id The ID to parse. - * @returns {{namespace:string, name:string}} The namespace and member name. - */ -function getPluginMember(id) { - const firstSlashIndex = id.indexOf("/"); - - if (firstSlashIndex === -1) { - return { namespace: "", name: id }; - } - - let namespace = id.slice(0, firstSlashIndex); - - /* - * Special cases: - * 1. The namespace is `@`, that means it's referring to the - * core plugin so `@` is the full namespace. - * 2. The namespace starts with `@`, that means it's referring to - * an npm scoped package. That means the namespace is the scope - * and the package name (i.e., `@eslint/core`). - */ - if (namespace[0] === "@" && namespace !== "@") { - const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1); - if (secondSlashIndex !== -1) { - namespace = id.slice(0, secondSlashIndex); - return { namespace, name: id.slice(secondSlashIndex + 1) }; - } - } - - const name = id.slice(firstSlashIndex + 1); - - return { namespace, name }; -} - -/** - * Normalizes the plugin config by replacing the namespace with the plugin namespace. - * @param {string} userNamespace The namespace of the plugin. - * @param {Plugin} plugin The plugin config object. - * @param {Config} config The config object to normalize. - * @return {Config} The normalized config object. - */ -function normalizePluginConfig(userNamespace, plugin, config) { - const pluginNamespace = plugin.meta?.namespace; - - // don't do anything if the plugin doesn't have a namespace or rules - if ( - !pluginNamespace || - pluginNamespace === userNamespace || - (!config.rules && !config.processor && !config.language) - ) { - return config; - } - - const result = { ...config }; - - // update the rules - if (result.rules) { - const ruleIds = Object.keys(result.rules); - - /** @type {Record} */ - const newRules = {}; - - for (let i = 0; i < ruleIds.length; i++) { - const ruleId = ruleIds[i]; - const { namespace: ruleNamespace, name: ruleName } = - getPluginMember(ruleId); - - if (ruleNamespace === pluginNamespace) { - newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId]; - } else { - newRules[ruleId] = result.rules[ruleId]; - } - } - - result.rules = newRules; - } - - // update the processor - - if (typeof result.processor === "string") { - const { namespace: processorNamespace, name: processorName } = - getPluginMember(result.processor); - - if (processorNamespace) { - if (processorNamespace === pluginNamespace) { - result.processor = `${userNamespace}/${processorName}`; - } - } - } - - // update the language - if (typeof result.language === "string") { - const { namespace: languageNamespace, name: languageName } = - getPluginMember(result.language); - - if (languageNamespace === pluginNamespace) { - result.language = `${userNamespace}/${languageName}`; - } - } - - return result; -} - -/** - * Deeply normalizes a plugin config, traversing recursively into an arrays. - * @param {string} userPluginNamespace The namespace of the plugin. - * @param {Plugin} plugin The plugin object. - * @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize. - * @param {string} pluginConfigName The name of the plugin config. - * @return {InfiniteConfigArray} The normalized plugin config. - * @throws {TypeError} If the plugin config is a legacy config. - */ -function deepNormalizePluginConfig( - userPluginNamespace, - plugin, - pluginConfig, - pluginConfigName, -) { - // if it's an array then it's definitely a new config - if (Array.isArray(pluginConfig)) { - return pluginConfig.map(pluginSubConfig => - deepNormalizePluginConfig( - userPluginNamespace, - plugin, - pluginSubConfig, - pluginConfigName, - ), - ); - } - - // if it's a legacy config, throw an error - if (isLegacyConfig(pluginConfig)) { - throw new TypeError( - `Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`, - ); - } - - return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig); -} - -/** - * Finds a plugin config by name in the given config. - * @param {Config} config The config object. - * @param {string} pluginConfigName The name of the plugin config. - * @return {InfiniteConfigArray} The plugin config. - * @throws {TypeError} If the plugin config is not found or is a legacy config. - */ -function findPluginConfig(config, pluginConfigName) { - const { namespace: userPluginNamespace, name: configName } = - getPluginMember(pluginConfigName); - const plugin = config.plugins?.[userPluginNamespace]; - - if (!plugin) { - throw new TypeError(`Plugin "${userPluginNamespace}" not found.`); - } - - const directConfig = plugin.configs?.[configName]; - - // Prefer direct config, but fall back to flat config if available - if (directConfig) { - // Arrays are always flat configs, and non-legacy configs can be used directly - if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) { - return deepNormalizePluginConfig( - userPluginNamespace, - plugin, - directConfig, - pluginConfigName, - ); - } - } - - // If it's a legacy config, or the config does not exist => look for the flat version - const flatConfig = plugin.configs?.[`flat/${configName}`]; - if ( - flatConfig && - (Array.isArray(flatConfig) || !isLegacyConfig(flatConfig)) - ) { - return deepNormalizePluginConfig( - userPluginNamespace, - plugin, - flatConfig, - pluginConfigName, - ); - } - - // If we get here, then the config was either not found or is a legacy config - const message = - directConfig || flatConfig - ? `Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.` - : `Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`; - throw new TypeError(message); -} - -/** - * Flattens an array while keeping track of the index path. - * @param {any[]} configList The array to traverse. - * @param {string} indexPath The index path of the value in a multidimensional array. - * @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values. - */ -function* flatTraverse(configList, indexPath = "") { - for (let i = 0; i < configList.length; i++) { - const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`; - - // if it's an array then traverse it as well - if (Array.isArray(configList[i])) { - yield* flatTraverse(configList[i], newIndexPath); - continue; - } - - yield { indexPath: newIndexPath, value: configList[i] }; - } -} - -/** - * Extends a list of config files by creating every combination of base and extension files. - * @param {(string|string[])[]} [baseFiles] The base files. - * @param {(string|string[])[]} [extensionFiles] The extension files. - * @return {(string|string[])[]} The extended files. - */ -function extendConfigFiles(baseFiles = [], extensionFiles = []) { - if (!extensionFiles.length) { - return baseFiles.concat(); - } - - if (!baseFiles.length) { - return extensionFiles.concat(); - } - - /** @type {(string|string[])[]} */ - const result = []; - - for (const baseFile of baseFiles) { - for (const extensionFile of extensionFiles) { - /* - * Each entry can be a string or array of strings. The end result - * needs to be an array of strings, so we need to be sure to include - * all of the items when there's an array. - */ - - const entry = []; - - if (Array.isArray(baseFile)) { - entry.push(...baseFile); - } else { - entry.push(baseFile); - } - - if (Array.isArray(extensionFile)) { - entry.push(...extensionFile); - } else { - entry.push(extensionFile); - } - - result.push(entry); - } - } - - return result; -} - -/** - * Extends a config object with another config object. - * @param {Config} baseConfig The base config object. - * @param {string} baseConfigName The name of the base config object. - * @param {Config} extension The extension config object. - * @param {string} extensionName The index of the extension config object. - * @return {Config} The extended config object. - */ -function extendConfig(baseConfig, baseConfigName, extension, extensionName) { - const result = { ...extension }; - - // for global ignores there is no further work to be done, we just keep everything - if (!isGlobalIgnores(extension)) { - // for files we need to create every combination of base and extension files - if (baseConfig.files) { - result.files = extendConfigFiles(baseConfig.files, extension.files); - } - - // for ignores we just concatenation the extension ignores onto the base ignores - if (baseConfig.ignores) { - result.ignores = baseConfig.ignores.concat(extension.ignores ?? []); - } - } - - result.name = `${baseConfigName} > ${extensionName}`; - - if (baseConfig.basePath) { - result.basePath = baseConfig.basePath; - } - - return result; -} - -/** - * Processes a list of extends elements. - * @param {ConfigWithExtends} config The config object. - * @param {WeakMap} configNames The map of config objects to their names. - * @return {Config[]} The flattened list of config objects. - * @throws {TypeError} If the `extends` property is not an array or if nested `extends` is found. - */ -function processExtends(config, configNames) { - if (!config.extends) { - return [config]; - } - - if (!Array.isArray(config.extends)) { - throw new TypeError("The `extends` property must be an array."); - } - - const { - /** @type {Config[]} */ - extends: extendsList, - - /** @type {Config} */ - ...configObject - } = config; - - const extensionNames = new WeakMap(); - - // replace strings with the actual configs - const objectExtends = extendsList.map(extendsElement => { - if (typeof extendsElement === "string") { - const pluginConfig = findPluginConfig(config, extendsElement); - - // assign names - if (Array.isArray(pluginConfig)) { - pluginConfig.forEach((pluginConfigElement, index) => { - extensionNames.set( - pluginConfigElement, - `${extendsElement}[${index}]`, - ); - }); - } else { - extensionNames.set(pluginConfig, extendsElement); - } - - return pluginConfig; - } - - return /** @type {Config} */ (extendsElement); - }); - - const result = []; - - for (const { indexPath, value: extendsElement } of flatTraverse( - objectExtends, - )) { - const extension = /** @type {Config} */ (extendsElement); - - if ("basePath" in extension) { - throw new TypeError("'basePath' in `extends` is not allowed."); - } - - if ("extends" in extension) { - throw new TypeError("Nested 'extends' is not allowed."); - } - - const baseConfigName = /** @type {string} */ (configNames.get(config)); - const extensionName = - extensionNames.get(extendsElement) ?? - getExtensionName(extendsElement, indexPath); - - result.push( - extendConfig( - configObject, - baseConfigName, - extension, - extensionName, - ), - ); - } - - /* - * If the base config object has only `ignores` and `extends`, then - * removing `extends` turns it into a global ignores, which is not what - * we want. So we need to check if the base config object is a global ignores - * and if so, we don't add it to the array. - * - * (The other option would be to add a `files` entry, but that would result - * in a config that didn't actually do anything because there are no - * other keys in the config.) - */ - if (!isGlobalIgnores(configObject)) { - result.push(configObject); - } - - return result.flat(); -} - -/** - * Processes a list of config objects and arrays. - * @param {ConfigWithExtends[]} configList The list of config objects and arrays. - * @param {WeakMap} configNames The map of config objects to their names. - * @return {Config[]} The flattened list of config objects. - */ -function processConfigList(configList, configNames) { - return configList.flatMap(config => processExtends(config, configNames)); -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * Helper function to define a config array. - * @param {ConfigWithExtendsArray} args The arguments to the function. - * @returns {Config[]} The config array. - * @throws {TypeError} If no arguments are provided or if an argument is not an object. - */ -function defineConfig(...args) { - const configNames = new WeakMap(); - const configs = []; - - if (args.length === 0) { - throw new TypeError("Expected one or more arguments."); - } - - // first flatten the list of configs and get the names - for (const { indexPath, value } of flatTraverse(args)) { - if (typeof value !== "object" || value === null) { - throw new TypeError( - `Expected an object but received ${String(value)}.`, - ); - } - - const config = /** @type {ConfigWithExtends} */ (value); - - // save config name for easy reference later - configNames.set(config, getConfigName(config, indexPath)); - configs.push(config); - } - - return processConfigList(configs, configNames); -} - -/** - * @fileoverview Global ignores helper function. - * @author Nicholas C. Zakas - */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -let globalIgnoreCount = 0; - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * Creates a global ignores config with the given patterns. - * @param {string[]} ignorePatterns The ignore patterns. - * @param {string} [name] The name of the global ignores config. - * @returns {Config} The global ignores config. - * @throws {TypeError} If ignorePatterns is not an array or if it is empty. - */ -function globalIgnores(ignorePatterns, name) { - if (!Array.isArray(ignorePatterns)) { - throw new TypeError("ignorePatterns must be an array"); - } - - if (ignorePatterns.length === 0) { - throw new TypeError("ignorePatterns must contain at least one pattern"); - } - - const id = globalIgnoreCount++; - - return { - name: name || `globalIgnores ${id}`, - ignores: ignorePatterns, - }; -} - -export { defineConfig, globalIgnores }; diff --git a/node_modules/@eslint/config-helpers/dist/esm/types.d.ts b/node_modules/@eslint/config-helpers/dist/esm/types.d.ts deleted file mode 100644 index b95d1eb..0000000 --- a/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @fileoverview Types for this package. - */ -import type { ConfigObject } from "@eslint/core"; -/** - * Infinite array type. - */ -export type InfiniteArray = T | InfiniteArray[]; -/** - * A config object that may appear inside of `extends`. - * `basePath` and nested `extends` are not allowed on extension config objects. - */ -export type ExtensionConfigObject = Omit & { - extends?: never; -}; -/** - * The type of array element in the `extends` property after flattening. - */ -export type SimpleExtendsElement = string | ExtensionConfigObject; -/** - * The type of array element in the `extends` property before flattening. - */ -export type ExtendsElement = SimpleExtendsElement | InfiniteArray; -/** - * Config with extends. Valid only inside of `defineConfig()`. - */ -export interface ConfigWithExtends extends ConfigObject { - extends?: ExtendsElement[]; -} -export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/node_modules/@eslint/config-helpers/dist/esm/types.ts b/node_modules/@eslint/config-helpers/dist/esm/types.ts deleted file mode 100644 index 9140c9c..0000000 --- a/node_modules/@eslint/config-helpers/dist/esm/types.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @fileoverview Types for this package. - */ - -import type { ConfigObject } from "@eslint/core"; - -/** - * Infinite array type. - */ -export type InfiniteArray = T | InfiniteArray[]; - -/** - * A config object that may appear inside of `extends`. - * `basePath` and nested `extends` are not allowed on extension config objects. - */ -export type ExtensionConfigObject = Omit & { - extends?: never; -}; - -/** - * The type of array element in the `extends` property after flattening. - */ -export type SimpleExtendsElement = string | ExtensionConfigObject; - -/** - * The type of array element in the `extends` property before flattening. - */ -export type ExtendsElement = - | SimpleExtendsElement - | InfiniteArray; - -/** - * Config with extends. Valid only inside of `defineConfig()`. - */ -export interface ConfigWithExtends extends ConfigObject { - extends?: ExtendsElement[]; -} - -export type ConfigWithExtendsArray = InfiniteArray[]; diff --git a/node_modules/@eslint/config-helpers/package.json b/node_modules/@eslint/config-helpers/package.json deleted file mode 100644 index 59149ff..0000000 --- a/node_modules/@eslint/config-helpers/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@eslint/config-helpers", - "version": "0.5.5", - "description": "Helper utilities for creating ESLint configuration", - "type": "module", - "main": "dist/esm/index.js", - "types": "dist/esm/index.d.ts", - "exports": { - "require": { - "types": "./dist/cjs/index.d.cts", - "default": "./dist/cjs/index.cjs" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - } - }, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "directories": { - "test": "tests" - }, - "scripts": { - "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", - "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", - "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", - "lint:types": "attw --pack", - "pretest": "npm run build", - "test": "npm run test:types && npm run test:unit", - "test:coverage": "c8 npm run test:unit", - "test:jsr": "npx -y jsr@latest publish --dry-run", - "test:pnpm": "cd tests/pnpm && pnpm install && pnpm exec tsc", - "test:types": "tsc -p tests/types/tsconfig.json", - "test:unit": "mocha \"tests/**/*.test.js\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/rewrite.git", - "directory": "packages/config-helpers" - }, - "keywords": [ - "eslint" - ], - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/rewrite/issues" - }, - "homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-helpers#readme", - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "devDependencies": { - "rollup-plugin-copy": "^3.5.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@eslint/core/LICENSE b/node_modules/@eslint/core/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@eslint/core/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@eslint/core/README.md b/node_modules/@eslint/core/README.md deleted file mode 100644 index bbe6bce..0000000 --- a/node_modules/@eslint/core/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# ESLint Core - -## Overview - -This package is the future home of the rewritten, runtime-agnostic ESLint core. - -Right now, it exports the core types necessary to implement language plugins. - -## License - -Apache 2.0 - - - - -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) -to get your logo on our READMEs and [website](https://eslint.org/sponsors). - -

Platinum Sponsors

-

Automattic

Gold Sponsors

-

Qlty Software

Silver Sponsors

-

Vite Liftoff StackBlitz

Bronze Sponsors

-

Cybozu SAP CrawlJobs aeriusventilation's Org Depot Icons8 Discord GitBook HeroCoders TestMu AI Open Source Office (Formerly LambdaTest)

-

Technology Sponsors

-Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. -

Netlify Algolia 1Password

- diff --git a/node_modules/@eslint/core/dist/cjs/types.d.cts b/node_modules/@eslint/core/dist/cjs/types.d.cts deleted file mode 100644 index 9467047..0000000 --- a/node_modules/@eslint/core/dist/cjs/types.d.cts +++ /dev/null @@ -1,1159 +0,0 @@ -/** - * @fileoverview Shared types for ESLint Core. - */ -import type { JSONSchema4 } from "json-schema"; -/** - * Represents an error inside of a file. - */ -export interface FileError { - message: string; - line: number; - column: number; - endLine?: number; - endColumn?: number; -} -/** - * Represents a problem found in a file. - */ -export interface FileProblem { - ruleId: string | null; - message: string; - loc: SourceLocation; -} -/** - * Represents the start and end coordinates of a node inside the source. - */ -export interface SourceLocation { - start: Position; - end: Position; -} -/** - * Represents the start and end coordinates of a node inside the source with an offset. - */ -export interface SourceLocationWithOffset { - start: PositionWithOffset; - end: PositionWithOffset; -} -/** - * Represents a location coordinate inside the source. ESLint-style formats - * have just `line` and `column` while others may have `offset` as well. - */ -export interface Position { - line: number; - column: number; -} -/** - * Represents a location coordinate inside the source with an offset. - */ -export interface PositionWithOffset extends Position { - offset: number; -} -/** - * Represents a range of characters in the source. - */ -export type SourceRange = [number, number]; -/** - * What the rule is responsible for finding: - * - `problem` means the rule has noticed a potential error. - * - `suggestion` means the rule suggests an alternate or better approach. - * - `layout` means the rule is looking at spacing, indentation, etc. - */ -export type RuleType = "problem" | "suggestion" | "layout"; -/** - * The type of fix the rule can provide: - * - `code` means the rule can fix syntax. - * - `whitespace` means the rule can fix spacing and indentation. - */ -export type RuleFixType = "code" | "whitespace"; -/** - * An object containing visitor information for a rule. Each method is either the - * name of a node type or a selector, or is a method that will be called at specific - * times during the traversal. - */ -export type RuleVisitor = Record void) | undefined>; -/** - * Rule meta information used for documentation. - */ -export interface RulesMetaDocs { - /** - * A short description of the rule. - */ - description?: string | undefined; - /** - * The URL to the documentation for the rule. - */ - url?: string | undefined; - /** - * Indicates if the rule is generally recommended for all users. - * - * Note - this will always be a boolean for core rules, but may be used in any way by plugins. - */ - recommended?: unknown; - /** - * Indicates if the rule is frozen (no longer accepting feature requests). - */ - frozen?: boolean | undefined; - /** - * The dialects of the languages that the rule is intended to lint. - * @example - * ["JavaScript", "TypeScript"] - */ - dialects?: string[] | undefined; -} -/** - * Meta information about a rule. - */ -export interface RulesMeta { - /** - * Properties that are used when documenting the rule. - */ - docs?: (RulesMetaDocs & ExtRuleDocs) | undefined; - /** - * The type of rule. - */ - type?: RuleType | undefined; - /** - * The schema for the rule options. Required if the rule has options. - */ - schema?: JSONSchema4 | JSONSchema4[] | false | undefined; - /** - * Any default options to be recursively merged on top of any user-provided options. - */ - defaultOptions?: RuleOptions; - /** - * The messages that the rule can report. - */ - messages?: Record; - /** - * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated. - */ - deprecated?: boolean | DeprecatedInfo | undefined; - /** - * @deprecated Use deprecated.replacedBy instead. - * The name of the rule(s) this rule was replaced by, if it was deprecated. - */ - replacedBy?: readonly string[] | undefined; - /** - * Indicates if the rule is fixable, and if so, what type of fix it provides. - */ - fixable?: RuleFixType | undefined; - /** - * Indicates if the rule may provide suggestions. - */ - hasSuggestions?: boolean | undefined; - /** - * The language the rule is intended to lint. - * @deprecated Use `languages` instead. - */ - language?: string; - /** - * The dialects of `language` that the rule is intended to lint. - * @deprecated Use `docs.dialects` instead. - */ - dialects?: string[]; - /** - * Languages supported by this rule in the format `"plugin/language"`. - * Use `"*"` for any language or `"plugin/*"` for any language from a specific plugin. - * @example - * ["js/js", "markdown/gfm", "json/jsonc", "css/css"] - */ - languages?: string[] | undefined; -} -/** - * Provides additional metadata about a deprecation. - */ -export interface DeprecatedInfo { - /** - * General message presented to the user, e.g. for the key rule why the rule - * is deprecated or for info how to replace the rule. - */ - message?: string; - /** - * URL to more information about this deprecation in general. - */ - url?: string; - /** - * An empty array explicitly states that there is no replacement. - */ - replacedBy?: ReplacedByInfo[]; - /** - * The package version since when the rule is deprecated (should use full - * semver without a leading "v"). - */ - deprecatedSince?: string; - /** - * The estimated version when the rule is removed (probably the next major - * version). null means the rule is "frozen" (will be available but will not - * be changed). - */ - availableUntil?: string | null; -} -/** - * Provides metadata about a replacement - */ -export interface ReplacedByInfo { - /** - * General message presented to the user, e.g. how to replace the rule - */ - message?: string; - /** - * URL to more information about this replacement in general - */ - url?: string; - /** - * Name should be "eslint" if the replacement is an ESLint core rule. Omit - * the property if the replacement is in the same plugin. - */ - plugin?: ExternalSpecifier; - /** - * Name and documentation of the replacement rule - */ - rule?: ExternalSpecifier; -} -/** - * Specifies the name and url of an external resource. At least one property - * should be set. - */ -export interface ExternalSpecifier { - /** - * Name of the referenced plugin / rule. - */ - name?: string; - /** - * URL pointing to documentation for the plugin / rule. - */ - url?: string; -} -/** - * Generic type for `RuleContext`. - */ -export interface RuleContextTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RuleOptions: unknown[]; - Node: unknown; - MessageIds: string; -} -/** - * Represents the context object that is passed to a rule. This object contains - * information about the current state of the linting process and is the rule's - * view into the outside world. - */ -export interface RuleContext { - /** - * The current working directory for the session. - */ - cwd: string; - /** - * The filename of the file being linted. - */ - filename: string; - /** - * The physical filename of the file being linted. - */ - physicalFilename: string; - /** - * The source code object that the rule is running on. - */ - sourceCode: Options["Code"]; - /** - * Shared settings for the configuration. - */ - settings: SettingsConfig; - /** - * The language options for the configuration. - */ - languageOptions: Options["LangOptions"]; - /** - * The rule ID. - */ - id: string; - /** - * The rule's configured options. - */ - options: Options["RuleOptions"]; - /** - * The report function that the rule should use to report problems. - * @param violation The violation to report. - */ - report(violation: ViolationReport): void; -} -/** - * Manager of text edits for a rule fix. - */ -export interface RuleTextEditor { - /** - * Inserts text after the specified node or token. - * @param syntaxElement The node or token to insert after. - * @param text The edit to insert after the node or token. - */ - insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Inserts text after the specified range. - * @param range The range to insert after. - * @param text The edit to insert after the range. - */ - insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit; - /** - * Inserts text before the specified node or token. - * @param syntaxElement A syntax element with location information to insert before. - * @param text The edit to insert before the node or token. - */ - insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Inserts text before the specified range. - * @param range The range to insert before. - * @param text The edit to insert before the range. - */ - insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit; - /** - * Removes the specified node or token. - * @param syntaxElement A syntax element with location information to remove. - * @returns The edit to remove the node or token. - */ - remove(syntaxElement: EditableSyntaxElement): RuleTextEdit; - /** - * Removes the specified range. - * @param range The range to remove. - * @returns The edit to remove the range. - */ - removeRange(range: SourceRange): RuleTextEdit; - /** - * Replaces the specified node or token with the given text. - * @param syntaxElement A syntax element with location information to replace. - * @param text The text to replace the node or token with. - * @returns The edit to replace the node or token. - */ - replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Replaces the specified range with the given text. - * @param range The range to replace. - * @param text The text to replace the range with. - * @returns The edit to replace the range. - */ - replaceTextRange(range: SourceRange, text: string): RuleTextEdit; -} -/** - * Represents a fix for a rule violation implemented as a text edit. - */ -export interface RuleTextEdit { - /** - * The range to replace. - */ - range: SourceRange; - /** - * The text to insert. - */ - text: string; -} -/** - * Fixes a violation. - * @param fixer The text editor to apply the fix. - * @returns The fix(es) for the violation. - */ -export type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable | null; -/** - * Data that can be used to fill placeholders in error messages. - */ -export type MessagePlaceholderData = Record; -export interface ViolationReportBase { - /** - * The data to insert into the message. - */ - data?: MessagePlaceholderData | undefined; - /** - * The fix to be applied for the violation. - */ - fix?: RuleFixer | null | undefined; - /** - * An array of suggested fixes for the problem. These fixes may change the - * behavior of the code, so they are not applied automatically. - */ - suggest?: SuggestedEdit[] | null | undefined; -} -export type ViolationMessage = { - message: string; -} | { - messageId: MessageIds; -}; -export type ViolationLocation = { - loc: SourceLocation | Position; -} | { - node: Node; -}; -export type ViolationReport = ViolationReportBase & ViolationMessage & ViolationLocation; -export interface SuggestedEditBase { - /** - * The data to insert into the message. - */ - data?: MessagePlaceholderData | undefined; - /** - * The fix to be applied for the suggestion. - */ - fix: RuleFixer; -} -export type SuggestionMessage = { - desc: string; -} | { - messageId: MessageIds; -}; -/** - * A suggested edit for a rule violation. - */ -export type SuggestedEdit = SuggestedEditBase & SuggestionMessage; -/** - * The normalized version of a lint suggestion. - */ -export interface LintSuggestion { - /** A short description. */ - desc: string; - /** Fix result info. */ - fix: RuleTextEdit; - /** Id referencing a message for the description. */ - messageId?: string | undefined; -} -/** - * The normalized version of a lint violation message. - */ -export interface LintMessage { - /** The 1-based column number. */ - column: number; - /** The 1-based line number. */ - line: number; - /** The 1-based column number of the end location. */ - endColumn?: number | undefined; - /** The 1-based line number of the end location. */ - endLine?: number | undefined; - /** The ID of the rule which makes this message. */ - ruleId: string | null; - /** The reported message. */ - message: string; - /** The ID of the message in the rule's meta. */ - messageId?: string | undefined; - /** If `true` then this is a fatal error. */ - fatal?: true | undefined; - /** The severity of this message. */ - severity: Exclude; - /** Information for autofix. */ - fix?: RuleTextEdit | undefined; - /** Information for suggestions. */ - suggestions?: LintSuggestion[] | undefined; -} -/** - * Generic options for the `RuleDefinition` type. - */ -export interface RuleDefinitionTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RuleOptions: unknown[]; - Visitor: RuleVisitor; - Node: unknown; - MessageIds: string; - ExtRuleDocs: unknown; -} -/** - * The definition of an ESLint rule. - */ -export interface RuleDefinition { - /** - * The meta information for the rule. - */ - meta?: RulesMeta; - /** - * Creates the visitor that ESLint uses to apply the rule during traversal. - * @param context The rule context. - * @returns The rule visitor. - */ - create(context: RuleContext<{ - LangOptions: Options["LangOptions"]; - Code: Options["Code"]; - RuleOptions: Options["RuleOptions"]; - Node: Options["Node"]; - MessageIds: Options["MessageIds"]; - }>): Options["Visitor"]; -} -/** - * Defaults for non-language-related `RuleDefinition` options. - * @deprecated Use the same type from `@eslint/plugin-kit` instead. - */ -export interface CustomRuleTypeDefinitions { - RuleOptions: unknown[]; - MessageIds: string; - ExtRuleDocs: Record; -} -/** - * A helper type to define language specific specializations of the `RuleDefinition` type. - * @deprecated Use the same type from `@eslint/plugin-kit` instead. - * - * @example - * ```ts - * type YourRuleDefinition< - * Options extends Partial = {}, - * > = CustomRuleDefinitionType< - * { - * LangOptions: YourLanguageOptions; - * Code: YourSourceCode; - * Visitor: YourRuleVisitor; - * Node: YourNode; - * }, - * Options - * >; - * ``` - */ -export type CustomRuleDefinitionType, Options extends Partial> = RuleDefinition>>; -/** - * The human readable severity level used in a configuration. - */ -export type SeverityName = "off" | "warn" | "error"; -/** - * The numeric severity level for a rule. - * - * - `0` means off. - * - `1` means warn. - * - `2` means error. - */ -export type SeverityLevel = 0 | 1 | 2; -/** - * The severity of a rule in a configuration. - */ -export type Severity = SeverityName | SeverityLevel; -/** - * Represents the metadata for an object, such as a plugin or processor. - */ -export interface ObjectMetaProperties { - /** @deprecated Use `meta.name` instead. */ - name?: string | undefined; - /** @deprecated Use `meta.version` instead. */ - version?: string | undefined; - meta?: { - name?: string | undefined; - version?: string | undefined; - }; -} -/** - * Represents the configuration options for the core linter. - */ -export interface LinterOptionsConfig { - /** - * Indicates whether or not inline configuration is evaluated. - */ - noInlineConfig?: boolean; - /** - * Indicates what to do when an unused disable directive is found. - */ - reportUnusedDisableDirectives?: boolean | Severity; - /** - * A severity value indicating if and how unused inline configs should be - * tracked and reported. - */ - reportUnusedInlineConfigs?: Severity; -} -/** - * The configuration for a rule. - */ -export type RuleConfig = Severity | [Severity, ...Partial]; -/** - * A collection of rules and their configurations. - */ -export interface RulesConfig { - [key: string]: RuleConfig; -} -/** - * A collection of settings. - */ -export interface SettingsConfig { - [key: string]: unknown; -} -/** - * The configuration for a set of files. - */ -export interface ConfigObject { - /** - * A string to identify the configuration object. Used in error messages and - * inspection tools. - */ - name?: string; - /** - * Path to the directory where the configuration object should apply. - * `files` and `ignores` patterns in the configuration object are - * interpreted as relative to this path. - */ - basePath?: string; - /** - * An array of glob patterns indicating the files that the configuration - * object should apply to. If not specified, the configuration object applies - * to all files - */ - files?: (string | string[])[]; - /** - * An array of glob patterns indicating the files that the configuration - * object should not apply to. If not specified, the configuration object - * applies to all files matched by files - */ - ignores?: string[]; - /** - * The name of the language used for linting. This is used to determine the - * parser and other language-specific settings. - * @since 9.7.0 - */ - language?: string; - /** - * An object containing settings related to how the language is configured for - * linting. - */ - languageOptions?: LanguageOptions; - /** - * An object containing settings related to the linting process - */ - linterOptions?: LinterOptionsConfig; - /** - * Either an object containing preprocess() and postprocess() methods or a - * string indicating the name of a processor inside of a plugin - * (i.e., "pluginName/processorName"). - */ - processor?: string | Processor; - /** - * An object containing a name-value mapping of plugin names to plugin objects. - * When files is specified, these plugins are only available to the matching files. - */ - plugins?: Record; - /** - * An object containing the configured rules. When files or ignores are specified, - * these rule configurations are only available to the matching files. - */ - rules?: Partial; - /** - * An object containing name-value pairs of information that should be - * available to all rules. - */ - settings?: SettingsConfig; -} -/** @deprecated Only supported in legacy eslintrc config format. */ -export type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable"; -/** @deprecated Only supported in legacy eslintrc config format. */ -export interface GlobalsConfig { - [name: string]: GlobalAccess; -} -/** - * The ECMAScript version of the code being linted. - * @deprecated Only supported in legacy eslintrc config format. - */ -export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"; -/** - * The type of JavaScript source code. - * @deprecated Only supported in legacy eslintrc config format. - */ -export type JavaScriptSourceType = "script" | "module" | "commonjs"; -/** - * Parser options. - * @deprecated Only supported in legacy eslintrc config format. - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options) - */ -export interface JavaScriptParserOptionsConfig { - /** - * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3). - * - * @default false - */ - allowReserved?: boolean | undefined; - /** - * Accepts any valid ECMAScript version number or `'latest'`: - * - * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or - * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or - * - `'latest'` - * - * When it's a version or a year, the value must be a number - so do not include the `es` prefix. - * - * Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default - * - * @default 5 - */ - ecmaVersion?: EcmaVersion | undefined; - /** - * The type of JavaScript source code. Possible values are "script" for - * traditional script files, "module" for ECMAScript modules (ESM), and - * "commonjs" for CommonJS files. - * - * @default 'script' - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - sourceType?: JavaScriptSourceType | undefined; - /** - * An object indicating which additional language features you'd like to use. - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - ecmaFeatures?: { - globalReturn?: boolean | undefined; - impliedStrict?: boolean | undefined; - jsx?: boolean | undefined; - [key: string]: any; - } | undefined; - [key: string]: any; -} -/** @deprecated Only supported in legacy eslintrc config format. */ -export interface EnvironmentConfig { - /** The definition of global variables. */ - globals?: GlobalsConfig | undefined; - /** The parser options that will be enabled under this environment. */ - parserOptions?: JavaScriptParserOptionsConfig | undefined; -} -/** - * A configuration object that may have a `rules` block. - */ -export interface HasRules { - rules?: Partial | undefined; -} -/** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ -export interface BaseConfig extends HasRules { - $schema?: string | undefined; - /** - * An environment provides predefined global variables. - * - * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments) - */ - env?: { - [name: string]: boolean; - } | undefined; - /** - * Extending configuration files. - * - * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files) - */ - extends?: string | string[] | undefined; - /** - * Specifying globals. - * - * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals) - */ - globals?: GlobalsConfig | undefined; - /** - * Disable processing of inline comments. - * - * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments) - */ - noInlineConfig?: boolean | undefined; - /** - * Overrides can be used to use a differing configuration for matching sub-directories and files. - * - * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work) - */ - overrides?: ConfigOverride[] | undefined; - /** - * Parser. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated) - */ - parser?: string | undefined; - /** - * Parser options. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options) - */ - parserOptions?: JavaScriptParserOptionsConfig | undefined; - /** - * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use. - * - * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins) - */ - plugins?: string[] | undefined; - /** - * Specifying processor. - * - * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor) - */ - processor?: string | undefined; - /** - * Report unused eslint-disable comments as warning. - * - * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments) - */ - reportUnusedDisableDirectives?: boolean | undefined; - /** - * Settings. - * - * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings) - */ - settings?: SettingsConfig | undefined; -} -/** - * The overwrites that apply more differing configuration to specific files or directories. - */ -export interface ConfigOverride extends BaseConfig { - /** - * The glob patterns for excluded files. - */ - excludedFiles?: string | string[] | undefined; - /** - * The glob patterns for target files. - */ - files: string | string[]; -} -/** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ -export interface LegacyConfigObject extends BaseConfig { - /** - * Tell ESLint to ignore specific files and directories. - * - * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files) - */ - ignorePatterns?: string | string[] | undefined; - /** - * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files) - */ - root?: boolean | undefined; -} -/** - * File information passed to a processor. - */ -export interface ProcessorFile { - text: string; - filename: string; -} -/** - * A processor is an object that can preprocess and postprocess files. - */ -export interface Processor extends ObjectMetaProperties { - /** If `true` then it means the processor supports autofix. */ - supportsAutofix?: boolean | undefined; - /** The function to extract code blocks. */ - preprocess?(text: string, filename: string): T[]; - /** The function to merge messages. */ - postprocess?(messages: LintMessage[][], filename: string): LintMessage[]; -} -export interface Plugin extends ObjectMetaProperties { - meta?: ObjectMetaProperties["meta"] & { - namespace?: string | undefined; - }; - configs?: Record | undefined; - environments?: Record | undefined; - languages?: Record | undefined; - processors?: Record | undefined; - rules?: Record | undefined; -} -/** - * Generic options for the `Language` type. - */ -export interface LanguageTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RootNode: unknown; - Node: unknown; -} -/** - * Represents a plugin language. - */ -export interface Language { - /** - * Indicates how ESLint should read the file. - */ - fileType: "text"; - /** - * First line number returned from the parser (text mode only). - */ - lineStart: 0 | 1; - /** - * First column number returned from the parser (text mode only). - */ - columnStart: 0 | 1; - /** - * The property to read the node type from. Used in selector querying. - */ - nodeTypeKey: string; - /** - * The traversal path that tools should take when evaluating the AST - */ - visitorKeys?: Record; - /** - * Default language options. User-defined options are merged with this object. - */ - defaultLanguageOptions?: Options["LangOptions"]; - /** - * Validates languageOptions for this language. - */ - validateLanguageOptions(languageOptions: Options["LangOptions"]): void; - /** - * Normalizes languageOptions for this language. - */ - normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"]; - /** - * Helper for esquery that allows languages to match nodes against - * class. esquery currently has classes like `function` that will - * match all the various function nodes. This method allows languages - * to implement similar shorthands. - */ - matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean; - /** - * Parses the given file input into its component parts. This file should not - * throws errors for parsing errors but rather should return any parsing - * errors as parse of the ParseResult object. - */ - parse(file: File, context: LanguageContext): ParseResult; - /** - * Creates SourceCode object that ESLint uses to work with a file. - */ - createSourceCode(file: File, input: OkParseResult, context: LanguageContext): Options["Code"]; -} -/** - * Plugin-defined options for the language. - */ -export type LanguageOptions = Record; -/** - * The context object that is passed to the language plugin methods. - */ -export interface LanguageContext { - languageOptions: LangOptions; -} -/** - * Represents a file read by ESLint. - */ -export interface File { - /** - * The path that ESLint uses for this file. May be a virtual path - * if it was returned by a processor. - */ - path: string; - /** - * The path to the file on disk. This always maps directly to a file - * regardless of whether it was returned from a processor. - */ - physicalPath: string; - /** - * Indicates if the original source contained a byte-order marker. - * ESLint strips the BOM from the `body`, but this info is needed - * to correctly apply autofixing. - */ - bom: boolean; - /** - * The body of the file to parse. - */ - body: string | Uint8Array; -} -/** - * Represents the successful result of parsing a file. - */ -export interface OkParseResult { - /** - * Indicates if the parse was successful. If true, the parse was successful - * and ESLint should continue on to create a SourceCode object and run rules; - * if false, ESLint should just report the error(s) without doing anything - * else. - */ - ok: true; - /** - * The abstract syntax tree created by the parser. (only when ok: true) - */ - ast: RootNode; - /** - * Any additional data that the parser wants to provide. - */ - [key: string]: any; -} -/** - * Represents the unsuccessful result of parsing a file. - */ -export interface NotOkParseResult { - /** - * Indicates if the parse was successful. If true, the parse was successful - * and ESLint should continue on to create a SourceCode object and run rules; - * if false, ESLint should just report the error(s) without doing anything - * else. - */ - ok: false; - /** - * Any parsing errors, whether fatal or not. (only when ok: false) - */ - errors: FileError[]; - /** - * Any additional data that the parser wants to provide. - */ - [key: string]: any; -} -export type ParseResult = OkParseResult | NotOkParseResult; -/** - * Represents inline configuration found in the source code. - */ -interface InlineConfigElement { - /** - * The location of the inline config element. - */ - loc: SourceLocation; - /** - * The interpreted configuration from the inline config element. - */ - config: { - rules: RulesConfig; - }; -} -/** - * Generic options for the `SourceCodeBase` type. - */ -export interface SourceCodeBaseTypeOptions { - LangOptions: LanguageOptions; - RootNode: unknown; - SyntaxElementWithLoc: unknown; - ConfigNode: unknown; -} -/** - * Represents the basic interface for a source code object. - */ -interface SourceCodeBase { - /** - * Root of the AST. - */ - ast: Options["RootNode"]; - /** - * The traversal path that tools should take when evaluating the AST. - * When present, this overrides the `visitorKeys` on the language for - * just this source code object. - */ - visitorKeys?: Record; - /** - * Retrieves the equivalent of `loc` for a given node or token. - * @param syntaxElement The node or token to get the location for. - * @returns The location of the node or token. - */ - getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation; - /** - * Retrieves the equivalent of `range` for a given node or token. - * @param syntaxElement The node or token to get the range for. - * @returns The range of the node or token. - */ - getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange; - /** - * Traversal of AST. - */ - traverse(): Iterable; - /** - * Applies language options passed in from the ESLint core. - */ - applyLanguageOptions?(languageOptions: Options["LangOptions"]): void; - /** - * Return all of the inline areas where ESLint should be disabled/enabled - * along with any problems found in evaluating the directives. - */ - getDisableDirectives?(): { - directives: Directive[]; - problems: FileProblem[]; - }; - /** - * Returns an array of all inline configuration nodes found in the - * source code. - */ - getInlineConfigNodes?(): Options["ConfigNode"][]; - /** - * Applies configuration found inside of the source code. This method is only - * called when ESLint is running with inline configuration allowed. - */ - applyInlineConfig?(): { - configs: InlineConfigElement[]; - problems: FileProblem[]; - }; - /** - * Called by ESLint core to indicate that it has finished providing - * information. We now add in all the missing variables and ensure that - * state-changing methods cannot be called by rules. - * @returns {void} - */ - finalize?(): void; -} -/** - * Represents the source of a text file being linted. - */ -export interface TextSourceCode extends SourceCodeBase { - /** - * The body of the file that you'd like rule developers to access. - */ - text: string; -} -/** - * Represents the source of a binary file being linted. - */ -export interface BinarySourceCode extends SourceCodeBase { - /** - * The body of the file that you'd like rule developers to access. - */ - body: Uint8Array; -} -export type SourceCode = TextSourceCode | BinarySourceCode; -/** - * Represents a traversal step visiting the AST. - */ -export interface VisitTraversalStep { - kind: 1; - target: unknown; - phase: 1 | 2; - args: unknown[]; -} -/** - * Represents a traversal step calling a function. - */ -export interface CallTraversalStep { - kind: 2; - target: string; - phase?: string; - args: unknown[]; -} -export type TraversalStep = VisitTraversalStep | CallTraversalStep; -/** - * The type of disable directive. This determines how ESLint will disable rules. - */ -export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line"; -/** - * Represents a disable directive. - */ -export interface Directive { - /** - * The type of directive. - */ - type: DirectiveType; - /** - * The node of the directive. May be in the AST or a comment/token. - */ - node: unknown; - /** - * The value of the directive. - */ - value: string; - /** - * The justification for the directive. - */ - justification?: string; -} -export {}; diff --git a/node_modules/@eslint/core/dist/esm/types.d.ts b/node_modules/@eslint/core/dist/esm/types.d.ts deleted file mode 100644 index 9467047..0000000 --- a/node_modules/@eslint/core/dist/esm/types.d.ts +++ /dev/null @@ -1,1159 +0,0 @@ -/** - * @fileoverview Shared types for ESLint Core. - */ -import type { JSONSchema4 } from "json-schema"; -/** - * Represents an error inside of a file. - */ -export interface FileError { - message: string; - line: number; - column: number; - endLine?: number; - endColumn?: number; -} -/** - * Represents a problem found in a file. - */ -export interface FileProblem { - ruleId: string | null; - message: string; - loc: SourceLocation; -} -/** - * Represents the start and end coordinates of a node inside the source. - */ -export interface SourceLocation { - start: Position; - end: Position; -} -/** - * Represents the start and end coordinates of a node inside the source with an offset. - */ -export interface SourceLocationWithOffset { - start: PositionWithOffset; - end: PositionWithOffset; -} -/** - * Represents a location coordinate inside the source. ESLint-style formats - * have just `line` and `column` while others may have `offset` as well. - */ -export interface Position { - line: number; - column: number; -} -/** - * Represents a location coordinate inside the source with an offset. - */ -export interface PositionWithOffset extends Position { - offset: number; -} -/** - * Represents a range of characters in the source. - */ -export type SourceRange = [number, number]; -/** - * What the rule is responsible for finding: - * - `problem` means the rule has noticed a potential error. - * - `suggestion` means the rule suggests an alternate or better approach. - * - `layout` means the rule is looking at spacing, indentation, etc. - */ -export type RuleType = "problem" | "suggestion" | "layout"; -/** - * The type of fix the rule can provide: - * - `code` means the rule can fix syntax. - * - `whitespace` means the rule can fix spacing and indentation. - */ -export type RuleFixType = "code" | "whitespace"; -/** - * An object containing visitor information for a rule. Each method is either the - * name of a node type or a selector, or is a method that will be called at specific - * times during the traversal. - */ -export type RuleVisitor = Record void) | undefined>; -/** - * Rule meta information used for documentation. - */ -export interface RulesMetaDocs { - /** - * A short description of the rule. - */ - description?: string | undefined; - /** - * The URL to the documentation for the rule. - */ - url?: string | undefined; - /** - * Indicates if the rule is generally recommended for all users. - * - * Note - this will always be a boolean for core rules, but may be used in any way by plugins. - */ - recommended?: unknown; - /** - * Indicates if the rule is frozen (no longer accepting feature requests). - */ - frozen?: boolean | undefined; - /** - * The dialects of the languages that the rule is intended to lint. - * @example - * ["JavaScript", "TypeScript"] - */ - dialects?: string[] | undefined; -} -/** - * Meta information about a rule. - */ -export interface RulesMeta { - /** - * Properties that are used when documenting the rule. - */ - docs?: (RulesMetaDocs & ExtRuleDocs) | undefined; - /** - * The type of rule. - */ - type?: RuleType | undefined; - /** - * The schema for the rule options. Required if the rule has options. - */ - schema?: JSONSchema4 | JSONSchema4[] | false | undefined; - /** - * Any default options to be recursively merged on top of any user-provided options. - */ - defaultOptions?: RuleOptions; - /** - * The messages that the rule can report. - */ - messages?: Record; - /** - * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated. - */ - deprecated?: boolean | DeprecatedInfo | undefined; - /** - * @deprecated Use deprecated.replacedBy instead. - * The name of the rule(s) this rule was replaced by, if it was deprecated. - */ - replacedBy?: readonly string[] | undefined; - /** - * Indicates if the rule is fixable, and if so, what type of fix it provides. - */ - fixable?: RuleFixType | undefined; - /** - * Indicates if the rule may provide suggestions. - */ - hasSuggestions?: boolean | undefined; - /** - * The language the rule is intended to lint. - * @deprecated Use `languages` instead. - */ - language?: string; - /** - * The dialects of `language` that the rule is intended to lint. - * @deprecated Use `docs.dialects` instead. - */ - dialects?: string[]; - /** - * Languages supported by this rule in the format `"plugin/language"`. - * Use `"*"` for any language or `"plugin/*"` for any language from a specific plugin. - * @example - * ["js/js", "markdown/gfm", "json/jsonc", "css/css"] - */ - languages?: string[] | undefined; -} -/** - * Provides additional metadata about a deprecation. - */ -export interface DeprecatedInfo { - /** - * General message presented to the user, e.g. for the key rule why the rule - * is deprecated or for info how to replace the rule. - */ - message?: string; - /** - * URL to more information about this deprecation in general. - */ - url?: string; - /** - * An empty array explicitly states that there is no replacement. - */ - replacedBy?: ReplacedByInfo[]; - /** - * The package version since when the rule is deprecated (should use full - * semver without a leading "v"). - */ - deprecatedSince?: string; - /** - * The estimated version when the rule is removed (probably the next major - * version). null means the rule is "frozen" (will be available but will not - * be changed). - */ - availableUntil?: string | null; -} -/** - * Provides metadata about a replacement - */ -export interface ReplacedByInfo { - /** - * General message presented to the user, e.g. how to replace the rule - */ - message?: string; - /** - * URL to more information about this replacement in general - */ - url?: string; - /** - * Name should be "eslint" if the replacement is an ESLint core rule. Omit - * the property if the replacement is in the same plugin. - */ - plugin?: ExternalSpecifier; - /** - * Name and documentation of the replacement rule - */ - rule?: ExternalSpecifier; -} -/** - * Specifies the name and url of an external resource. At least one property - * should be set. - */ -export interface ExternalSpecifier { - /** - * Name of the referenced plugin / rule. - */ - name?: string; - /** - * URL pointing to documentation for the plugin / rule. - */ - url?: string; -} -/** - * Generic type for `RuleContext`. - */ -export interface RuleContextTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RuleOptions: unknown[]; - Node: unknown; - MessageIds: string; -} -/** - * Represents the context object that is passed to a rule. This object contains - * information about the current state of the linting process and is the rule's - * view into the outside world. - */ -export interface RuleContext { - /** - * The current working directory for the session. - */ - cwd: string; - /** - * The filename of the file being linted. - */ - filename: string; - /** - * The physical filename of the file being linted. - */ - physicalFilename: string; - /** - * The source code object that the rule is running on. - */ - sourceCode: Options["Code"]; - /** - * Shared settings for the configuration. - */ - settings: SettingsConfig; - /** - * The language options for the configuration. - */ - languageOptions: Options["LangOptions"]; - /** - * The rule ID. - */ - id: string; - /** - * The rule's configured options. - */ - options: Options["RuleOptions"]; - /** - * The report function that the rule should use to report problems. - * @param violation The violation to report. - */ - report(violation: ViolationReport): void; -} -/** - * Manager of text edits for a rule fix. - */ -export interface RuleTextEditor { - /** - * Inserts text after the specified node or token. - * @param syntaxElement The node or token to insert after. - * @param text The edit to insert after the node or token. - */ - insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Inserts text after the specified range. - * @param range The range to insert after. - * @param text The edit to insert after the range. - */ - insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit; - /** - * Inserts text before the specified node or token. - * @param syntaxElement A syntax element with location information to insert before. - * @param text The edit to insert before the node or token. - */ - insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Inserts text before the specified range. - * @param range The range to insert before. - * @param text The edit to insert before the range. - */ - insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit; - /** - * Removes the specified node or token. - * @param syntaxElement A syntax element with location information to remove. - * @returns The edit to remove the node or token. - */ - remove(syntaxElement: EditableSyntaxElement): RuleTextEdit; - /** - * Removes the specified range. - * @param range The range to remove. - * @returns The edit to remove the range. - */ - removeRange(range: SourceRange): RuleTextEdit; - /** - * Replaces the specified node or token with the given text. - * @param syntaxElement A syntax element with location information to replace. - * @param text The text to replace the node or token with. - * @returns The edit to replace the node or token. - */ - replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit; - /** - * Replaces the specified range with the given text. - * @param range The range to replace. - * @param text The text to replace the range with. - * @returns The edit to replace the range. - */ - replaceTextRange(range: SourceRange, text: string): RuleTextEdit; -} -/** - * Represents a fix for a rule violation implemented as a text edit. - */ -export interface RuleTextEdit { - /** - * The range to replace. - */ - range: SourceRange; - /** - * The text to insert. - */ - text: string; -} -/** - * Fixes a violation. - * @param fixer The text editor to apply the fix. - * @returns The fix(es) for the violation. - */ -export type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable | null; -/** - * Data that can be used to fill placeholders in error messages. - */ -export type MessagePlaceholderData = Record; -export interface ViolationReportBase { - /** - * The data to insert into the message. - */ - data?: MessagePlaceholderData | undefined; - /** - * The fix to be applied for the violation. - */ - fix?: RuleFixer | null | undefined; - /** - * An array of suggested fixes for the problem. These fixes may change the - * behavior of the code, so they are not applied automatically. - */ - suggest?: SuggestedEdit[] | null | undefined; -} -export type ViolationMessage = { - message: string; -} | { - messageId: MessageIds; -}; -export type ViolationLocation = { - loc: SourceLocation | Position; -} | { - node: Node; -}; -export type ViolationReport = ViolationReportBase & ViolationMessage & ViolationLocation; -export interface SuggestedEditBase { - /** - * The data to insert into the message. - */ - data?: MessagePlaceholderData | undefined; - /** - * The fix to be applied for the suggestion. - */ - fix: RuleFixer; -} -export type SuggestionMessage = { - desc: string; -} | { - messageId: MessageIds; -}; -/** - * A suggested edit for a rule violation. - */ -export type SuggestedEdit = SuggestedEditBase & SuggestionMessage; -/** - * The normalized version of a lint suggestion. - */ -export interface LintSuggestion { - /** A short description. */ - desc: string; - /** Fix result info. */ - fix: RuleTextEdit; - /** Id referencing a message for the description. */ - messageId?: string | undefined; -} -/** - * The normalized version of a lint violation message. - */ -export interface LintMessage { - /** The 1-based column number. */ - column: number; - /** The 1-based line number. */ - line: number; - /** The 1-based column number of the end location. */ - endColumn?: number | undefined; - /** The 1-based line number of the end location. */ - endLine?: number | undefined; - /** The ID of the rule which makes this message. */ - ruleId: string | null; - /** The reported message. */ - message: string; - /** The ID of the message in the rule's meta. */ - messageId?: string | undefined; - /** If `true` then this is a fatal error. */ - fatal?: true | undefined; - /** The severity of this message. */ - severity: Exclude; - /** Information for autofix. */ - fix?: RuleTextEdit | undefined; - /** Information for suggestions. */ - suggestions?: LintSuggestion[] | undefined; -} -/** - * Generic options for the `RuleDefinition` type. - */ -export interface RuleDefinitionTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RuleOptions: unknown[]; - Visitor: RuleVisitor; - Node: unknown; - MessageIds: string; - ExtRuleDocs: unknown; -} -/** - * The definition of an ESLint rule. - */ -export interface RuleDefinition { - /** - * The meta information for the rule. - */ - meta?: RulesMeta; - /** - * Creates the visitor that ESLint uses to apply the rule during traversal. - * @param context The rule context. - * @returns The rule visitor. - */ - create(context: RuleContext<{ - LangOptions: Options["LangOptions"]; - Code: Options["Code"]; - RuleOptions: Options["RuleOptions"]; - Node: Options["Node"]; - MessageIds: Options["MessageIds"]; - }>): Options["Visitor"]; -} -/** - * Defaults for non-language-related `RuleDefinition` options. - * @deprecated Use the same type from `@eslint/plugin-kit` instead. - */ -export interface CustomRuleTypeDefinitions { - RuleOptions: unknown[]; - MessageIds: string; - ExtRuleDocs: Record; -} -/** - * A helper type to define language specific specializations of the `RuleDefinition` type. - * @deprecated Use the same type from `@eslint/plugin-kit` instead. - * - * @example - * ```ts - * type YourRuleDefinition< - * Options extends Partial = {}, - * > = CustomRuleDefinitionType< - * { - * LangOptions: YourLanguageOptions; - * Code: YourSourceCode; - * Visitor: YourRuleVisitor; - * Node: YourNode; - * }, - * Options - * >; - * ``` - */ -export type CustomRuleDefinitionType, Options extends Partial> = RuleDefinition>>; -/** - * The human readable severity level used in a configuration. - */ -export type SeverityName = "off" | "warn" | "error"; -/** - * The numeric severity level for a rule. - * - * - `0` means off. - * - `1` means warn. - * - `2` means error. - */ -export type SeverityLevel = 0 | 1 | 2; -/** - * The severity of a rule in a configuration. - */ -export type Severity = SeverityName | SeverityLevel; -/** - * Represents the metadata for an object, such as a plugin or processor. - */ -export interface ObjectMetaProperties { - /** @deprecated Use `meta.name` instead. */ - name?: string | undefined; - /** @deprecated Use `meta.version` instead. */ - version?: string | undefined; - meta?: { - name?: string | undefined; - version?: string | undefined; - }; -} -/** - * Represents the configuration options for the core linter. - */ -export interface LinterOptionsConfig { - /** - * Indicates whether or not inline configuration is evaluated. - */ - noInlineConfig?: boolean; - /** - * Indicates what to do when an unused disable directive is found. - */ - reportUnusedDisableDirectives?: boolean | Severity; - /** - * A severity value indicating if and how unused inline configs should be - * tracked and reported. - */ - reportUnusedInlineConfigs?: Severity; -} -/** - * The configuration for a rule. - */ -export type RuleConfig = Severity | [Severity, ...Partial]; -/** - * A collection of rules and their configurations. - */ -export interface RulesConfig { - [key: string]: RuleConfig; -} -/** - * A collection of settings. - */ -export interface SettingsConfig { - [key: string]: unknown; -} -/** - * The configuration for a set of files. - */ -export interface ConfigObject { - /** - * A string to identify the configuration object. Used in error messages and - * inspection tools. - */ - name?: string; - /** - * Path to the directory where the configuration object should apply. - * `files` and `ignores` patterns in the configuration object are - * interpreted as relative to this path. - */ - basePath?: string; - /** - * An array of glob patterns indicating the files that the configuration - * object should apply to. If not specified, the configuration object applies - * to all files - */ - files?: (string | string[])[]; - /** - * An array of glob patterns indicating the files that the configuration - * object should not apply to. If not specified, the configuration object - * applies to all files matched by files - */ - ignores?: string[]; - /** - * The name of the language used for linting. This is used to determine the - * parser and other language-specific settings. - * @since 9.7.0 - */ - language?: string; - /** - * An object containing settings related to how the language is configured for - * linting. - */ - languageOptions?: LanguageOptions; - /** - * An object containing settings related to the linting process - */ - linterOptions?: LinterOptionsConfig; - /** - * Either an object containing preprocess() and postprocess() methods or a - * string indicating the name of a processor inside of a plugin - * (i.e., "pluginName/processorName"). - */ - processor?: string | Processor; - /** - * An object containing a name-value mapping of plugin names to plugin objects. - * When files is specified, these plugins are only available to the matching files. - */ - plugins?: Record; - /** - * An object containing the configured rules. When files or ignores are specified, - * these rule configurations are only available to the matching files. - */ - rules?: Partial; - /** - * An object containing name-value pairs of information that should be - * available to all rules. - */ - settings?: SettingsConfig; -} -/** @deprecated Only supported in legacy eslintrc config format. */ -export type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable"; -/** @deprecated Only supported in legacy eslintrc config format. */ -export interface GlobalsConfig { - [name: string]: GlobalAccess; -} -/** - * The ECMAScript version of the code being linted. - * @deprecated Only supported in legacy eslintrc config format. - */ -export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"; -/** - * The type of JavaScript source code. - * @deprecated Only supported in legacy eslintrc config format. - */ -export type JavaScriptSourceType = "script" | "module" | "commonjs"; -/** - * Parser options. - * @deprecated Only supported in legacy eslintrc config format. - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options) - */ -export interface JavaScriptParserOptionsConfig { - /** - * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3). - * - * @default false - */ - allowReserved?: boolean | undefined; - /** - * Accepts any valid ECMAScript version number or `'latest'`: - * - * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or - * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or - * - `'latest'` - * - * When it's a version or a year, the value must be a number - so do not include the `es` prefix. - * - * Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default - * - * @default 5 - */ - ecmaVersion?: EcmaVersion | undefined; - /** - * The type of JavaScript source code. Possible values are "script" for - * traditional script files, "module" for ECMAScript modules (ESM), and - * "commonjs" for CommonJS files. - * - * @default 'script' - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - sourceType?: JavaScriptSourceType | undefined; - /** - * An object indicating which additional language features you'd like to use. - * - * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options - */ - ecmaFeatures?: { - globalReturn?: boolean | undefined; - impliedStrict?: boolean | undefined; - jsx?: boolean | undefined; - [key: string]: any; - } | undefined; - [key: string]: any; -} -/** @deprecated Only supported in legacy eslintrc config format. */ -export interface EnvironmentConfig { - /** The definition of global variables. */ - globals?: GlobalsConfig | undefined; - /** The parser options that will be enabled under this environment. */ - parserOptions?: JavaScriptParserOptionsConfig | undefined; -} -/** - * A configuration object that may have a `rules` block. - */ -export interface HasRules { - rules?: Partial | undefined; -} -/** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ -export interface BaseConfig extends HasRules { - $schema?: string | undefined; - /** - * An environment provides predefined global variables. - * - * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments) - */ - env?: { - [name: string]: boolean; - } | undefined; - /** - * Extending configuration files. - * - * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files) - */ - extends?: string | string[] | undefined; - /** - * Specifying globals. - * - * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals) - */ - globals?: GlobalsConfig | undefined; - /** - * Disable processing of inline comments. - * - * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments) - */ - noInlineConfig?: boolean | undefined; - /** - * Overrides can be used to use a differing configuration for matching sub-directories and files. - * - * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work) - */ - overrides?: ConfigOverride[] | undefined; - /** - * Parser. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated) - */ - parser?: string | undefined; - /** - * Parser options. - * - * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers) - * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options) - */ - parserOptions?: JavaScriptParserOptionsConfig | undefined; - /** - * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use. - * - * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins) - */ - plugins?: string[] | undefined; - /** - * Specifying processor. - * - * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor) - */ - processor?: string | undefined; - /** - * Report unused eslint-disable comments as warning. - * - * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments) - */ - reportUnusedDisableDirectives?: boolean | undefined; - /** - * Settings. - * - * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings) - */ - settings?: SettingsConfig | undefined; -} -/** - * The overwrites that apply more differing configuration to specific files or directories. - */ -export interface ConfigOverride extends BaseConfig { - /** - * The glob patterns for excluded files. - */ - excludedFiles?: string | string[] | undefined; - /** - * The glob patterns for target files. - */ - files: string | string[]; -} -/** - * ESLint legacy configuration. - * - * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/) - */ -export interface LegacyConfigObject extends BaseConfig { - /** - * Tell ESLint to ignore specific files and directories. - * - * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files) - */ - ignorePatterns?: string | string[] | undefined; - /** - * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files) - */ - root?: boolean | undefined; -} -/** - * File information passed to a processor. - */ -export interface ProcessorFile { - text: string; - filename: string; -} -/** - * A processor is an object that can preprocess and postprocess files. - */ -export interface Processor extends ObjectMetaProperties { - /** If `true` then it means the processor supports autofix. */ - supportsAutofix?: boolean | undefined; - /** The function to extract code blocks. */ - preprocess?(text: string, filename: string): T[]; - /** The function to merge messages. */ - postprocess?(messages: LintMessage[][], filename: string): LintMessage[]; -} -export interface Plugin extends ObjectMetaProperties { - meta?: ObjectMetaProperties["meta"] & { - namespace?: string | undefined; - }; - configs?: Record | undefined; - environments?: Record | undefined; - languages?: Record | undefined; - processors?: Record | undefined; - rules?: Record | undefined; -} -/** - * Generic options for the `Language` type. - */ -export interface LanguageTypeOptions { - LangOptions: LanguageOptions; - Code: SourceCode; - RootNode: unknown; - Node: unknown; -} -/** - * Represents a plugin language. - */ -export interface Language { - /** - * Indicates how ESLint should read the file. - */ - fileType: "text"; - /** - * First line number returned from the parser (text mode only). - */ - lineStart: 0 | 1; - /** - * First column number returned from the parser (text mode only). - */ - columnStart: 0 | 1; - /** - * The property to read the node type from. Used in selector querying. - */ - nodeTypeKey: string; - /** - * The traversal path that tools should take when evaluating the AST - */ - visitorKeys?: Record; - /** - * Default language options. User-defined options are merged with this object. - */ - defaultLanguageOptions?: Options["LangOptions"]; - /** - * Validates languageOptions for this language. - */ - validateLanguageOptions(languageOptions: Options["LangOptions"]): void; - /** - * Normalizes languageOptions for this language. - */ - normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"]; - /** - * Helper for esquery that allows languages to match nodes against - * class. esquery currently has classes like `function` that will - * match all the various function nodes. This method allows languages - * to implement similar shorthands. - */ - matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean; - /** - * Parses the given file input into its component parts. This file should not - * throws errors for parsing errors but rather should return any parsing - * errors as parse of the ParseResult object. - */ - parse(file: File, context: LanguageContext): ParseResult; - /** - * Creates SourceCode object that ESLint uses to work with a file. - */ - createSourceCode(file: File, input: OkParseResult, context: LanguageContext): Options["Code"]; -} -/** - * Plugin-defined options for the language. - */ -export type LanguageOptions = Record; -/** - * The context object that is passed to the language plugin methods. - */ -export interface LanguageContext { - languageOptions: LangOptions; -} -/** - * Represents a file read by ESLint. - */ -export interface File { - /** - * The path that ESLint uses for this file. May be a virtual path - * if it was returned by a processor. - */ - path: string; - /** - * The path to the file on disk. This always maps directly to a file - * regardless of whether it was returned from a processor. - */ - physicalPath: string; - /** - * Indicates if the original source contained a byte-order marker. - * ESLint strips the BOM from the `body`, but this info is needed - * to correctly apply autofixing. - */ - bom: boolean; - /** - * The body of the file to parse. - */ - body: string | Uint8Array; -} -/** - * Represents the successful result of parsing a file. - */ -export interface OkParseResult { - /** - * Indicates if the parse was successful. If true, the parse was successful - * and ESLint should continue on to create a SourceCode object and run rules; - * if false, ESLint should just report the error(s) without doing anything - * else. - */ - ok: true; - /** - * The abstract syntax tree created by the parser. (only when ok: true) - */ - ast: RootNode; - /** - * Any additional data that the parser wants to provide. - */ - [key: string]: any; -} -/** - * Represents the unsuccessful result of parsing a file. - */ -export interface NotOkParseResult { - /** - * Indicates if the parse was successful. If true, the parse was successful - * and ESLint should continue on to create a SourceCode object and run rules; - * if false, ESLint should just report the error(s) without doing anything - * else. - */ - ok: false; - /** - * Any parsing errors, whether fatal or not. (only when ok: false) - */ - errors: FileError[]; - /** - * Any additional data that the parser wants to provide. - */ - [key: string]: any; -} -export type ParseResult = OkParseResult | NotOkParseResult; -/** - * Represents inline configuration found in the source code. - */ -interface InlineConfigElement { - /** - * The location of the inline config element. - */ - loc: SourceLocation; - /** - * The interpreted configuration from the inline config element. - */ - config: { - rules: RulesConfig; - }; -} -/** - * Generic options for the `SourceCodeBase` type. - */ -export interface SourceCodeBaseTypeOptions { - LangOptions: LanguageOptions; - RootNode: unknown; - SyntaxElementWithLoc: unknown; - ConfigNode: unknown; -} -/** - * Represents the basic interface for a source code object. - */ -interface SourceCodeBase { - /** - * Root of the AST. - */ - ast: Options["RootNode"]; - /** - * The traversal path that tools should take when evaluating the AST. - * When present, this overrides the `visitorKeys` on the language for - * just this source code object. - */ - visitorKeys?: Record; - /** - * Retrieves the equivalent of `loc` for a given node or token. - * @param syntaxElement The node or token to get the location for. - * @returns The location of the node or token. - */ - getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation; - /** - * Retrieves the equivalent of `range` for a given node or token. - * @param syntaxElement The node or token to get the range for. - * @returns The range of the node or token. - */ - getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange; - /** - * Traversal of AST. - */ - traverse(): Iterable; - /** - * Applies language options passed in from the ESLint core. - */ - applyLanguageOptions?(languageOptions: Options["LangOptions"]): void; - /** - * Return all of the inline areas where ESLint should be disabled/enabled - * along with any problems found in evaluating the directives. - */ - getDisableDirectives?(): { - directives: Directive[]; - problems: FileProblem[]; - }; - /** - * Returns an array of all inline configuration nodes found in the - * source code. - */ - getInlineConfigNodes?(): Options["ConfigNode"][]; - /** - * Applies configuration found inside of the source code. This method is only - * called when ESLint is running with inline configuration allowed. - */ - applyInlineConfig?(): { - configs: InlineConfigElement[]; - problems: FileProblem[]; - }; - /** - * Called by ESLint core to indicate that it has finished providing - * information. We now add in all the missing variables and ensure that - * state-changing methods cannot be called by rules. - * @returns {void} - */ - finalize?(): void; -} -/** - * Represents the source of a text file being linted. - */ -export interface TextSourceCode extends SourceCodeBase { - /** - * The body of the file that you'd like rule developers to access. - */ - text: string; -} -/** - * Represents the source of a binary file being linted. - */ -export interface BinarySourceCode extends SourceCodeBase { - /** - * The body of the file that you'd like rule developers to access. - */ - body: Uint8Array; -} -export type SourceCode = TextSourceCode | BinarySourceCode; -/** - * Represents a traversal step visiting the AST. - */ -export interface VisitTraversalStep { - kind: 1; - target: unknown; - phase: 1 | 2; - args: unknown[]; -} -/** - * Represents a traversal step calling a function. - */ -export interface CallTraversalStep { - kind: 2; - target: string; - phase?: string; - args: unknown[]; -} -export type TraversalStep = VisitTraversalStep | CallTraversalStep; -/** - * The type of disable directive. This determines how ESLint will disable rules. - */ -export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line"; -/** - * Represents a disable directive. - */ -export interface Directive { - /** - * The type of directive. - */ - type: DirectiveType; - /** - * The node of the directive. May be in the AST or a comment/token. - */ - node: unknown; - /** - * The value of the directive. - */ - value: string; - /** - * The justification for the directive. - */ - justification?: string; -} -export {}; diff --git a/node_modules/@eslint/core/package.json b/node_modules/@eslint/core/package.json deleted file mode 100644 index 9025a7c..0000000 --- a/node_modules/@eslint/core/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@eslint/core", - "version": "1.2.1", - "description": "Runtime-agnostic core of ESLint", - "type": "module", - "types": "./dist/esm/types.d.ts", - "exports": { - "types": { - "import": "./dist/esm/types.d.ts", - "require": "./dist/cjs/types.d.cts" - } - }, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "scripts": { - "build:cts": "node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"", - "build": "tsc && npm run build:cts", - "lint:types": "attw --pack", - "pretest": "npm run build", - "test": "npm run test:types", - "test:jsr": "npx -y jsr@latest publish --dry-run", - "test:types": "tsc -p tests/types/tsconfig.json" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/rewrite.git", - "directory": "packages/core" - }, - "keywords": [ - "eslint", - "core" - ], - "author": "Nicholas C. Zakas", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/rewrite/issues" - }, - "homepage": "https://github.com/eslint/rewrite/tree/main/packages/core#readme", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "devDependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@eslint/js/LICENSE b/node_modules/@eslint/js/LICENSE deleted file mode 100644 index b607bb3..0000000 --- a/node_modules/@eslint/js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright OpenJS Foundation and other contributors, - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@eslint/js/README.md b/node_modules/@eslint/js/README.md deleted file mode 100644 index eae3d22..0000000 --- a/node_modules/@eslint/js/README.md +++ /dev/null @@ -1,103 +0,0 @@ -[![npm version](https://img.shields.io/npm/v/@eslint/js.svg)](https://www.npmjs.com/package/@eslint/js) -[![Downloads](https://img.shields.io/npm/dm/@eslint/js.svg)](https://www.npmjs.com/package/@eslint/js) -[![Build Status](https://github.com/eslint/eslint/workflows/CI/badge.svg)](https://github.com/eslint/eslint/actions) -
-[![Open Collective Backers](https://img.shields.io/opencollective/backers/eslint)](https://opencollective.com/eslint) -[![Open Collective Sponsors](https://img.shields.io/opencollective/sponsors/eslint)](https://opencollective.com/eslint) - -# ESLint JavaScript Plugin - -[Website](https://eslint.org) | -[Configure ESLint](https://eslint.org/docs/latest/use/configure) | -[Rules](https://eslint.org/docs/rules/) | -[Contribute to ESLint](https://eslint.org/docs/latest/contribute) | -[Report Bugs](https://eslint.org/docs/latest/contribute/report-bugs) | -[Code of Conduct](https://eslint.org/conduct) | -[X](https://x.com/geteslint) | -[Discord](https://eslint.org/chat) | -[Mastodon](https://fosstodon.org/@eslint) | -[Bluesky](https://bsky.app/profile/eslint.org) - -The beginnings of separating out JavaScript-specific functionality from ESLint. - -Right now, this plugin contains two configurations: - -- `recommended` - enables the rules recommended by the ESLint team (the replacement for `"eslint:recommended"`) -- `all` - enables all ESLint rules (the replacement for `"eslint:all"`) - -## Installation - -You can install ESLint using npm or other package managers: - -```shell -npm install eslint -D -# or -yarn add eslint -D -# or -pnpm install eslint -D -# or -bun add eslint -D -``` - -Then install this plugin: - -```shell -npm install @eslint/js -D -# or -yarn add @eslint/js -D -# or -pnpm install @eslint/js -D -# or -bun add @eslint/js -D -``` - -## Usage - -Use in your `eslint.config.js` file anytime you want to extend one of the configs: - -```js -import { defineConfig } from "eslint/config"; -import js from "@eslint/js"; - -export default defineConfig([ - // apply recommended rules to JS files - { - name: "your-project/recommended-rules", - files: ["**/*.js"], - plugins: { - js, - }, - extends: ["js/recommended"], - }, - - // apply recommended rules to JS files with an override - { - name: "your-project/recommended-rules-with-override", - files: ["**/*.js"], - plugins: { - js, - }, - extends: ["js/recommended"], - rules: { - "no-unused-vars": "warn", - }, - }, - - // apply all rules to JS files - { - name: "your-project/all-rules", - files: ["**/*.js"], - plugins: { - js, - }, - extends: ["js/all"], - rules: { - "no-unused-vars": "warn", - }, - }, -]); -``` - -## License - -MIT diff --git a/node_modules/@eslint/js/package.json b/node_modules/@eslint/js/package.json deleted file mode 100644 index 3a86691..0000000 --- a/node_modules/@eslint/js/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@eslint/js", - "version": "10.0.1", - "description": "ESLint JavaScript language implementation", - "funding": "https://eslint.org/donate", - "main": "./src/index.js", - "types": "./types/index.d.ts", - "scripts": { - "test:types": "tsc -p tests/types/tsconfig.json" - }, - "files": [ - "LICENSE", - "README.md", - "src", - "types" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/eslint/eslint.git", - "directory": "packages/js" - }, - "homepage": "https://eslint.org", - "bugs": "https://github.com/eslint/eslint/issues/", - "keywords": [ - "javascript", - "eslint-plugin", - "eslint" - ], - "license": "MIT", - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@eslint/js/src/configs/eslint-all.js b/node_modules/@eslint/js/src/configs/eslint-all.js deleted file mode 100644 index 43ee2ae..0000000 --- a/node_modules/@eslint/js/src/configs/eslint-all.js +++ /dev/null @@ -1,210 +0,0 @@ -/* - * WARNING: This file is autogenerated using the tools/update-eslint-all.js - * script. Do not edit manually. - */ -"use strict"; - -module.exports = Object.freeze({ - name: "@eslint/js/all", - rules: Object.freeze({ - "accessor-pairs": "error", - "array-callback-return": "error", - "arrow-body-style": "error", - "block-scoped-var": "error", - "camelcase": "error", - "capitalized-comments": "error", - "class-methods-use-this": "error", - "complexity": "error", - "consistent-return": "error", - "consistent-this": "error", - "constructor-super": "error", - "curly": "error", - "default-case": "error", - "default-case-last": "error", - "default-param-last": "error", - "dot-notation": "error", - "eqeqeq": "error", - "for-direction": "error", - "func-name-matching": "error", - "func-names": "error", - "func-style": "error", - "getter-return": "error", - "grouped-accessor-pairs": "error", - "guard-for-in": "error", - "id-denylist": "error", - "id-length": "error", - "id-match": "error", - "init-declarations": "error", - "logical-assignment-operators": "error", - "max-classes-per-file": "error", - "max-depth": "error", - "max-lines": "error", - "max-lines-per-function": "error", - "max-nested-callbacks": "error", - "max-params": "error", - "max-statements": "error", - "new-cap": "error", - "no-alert": "error", - "no-array-constructor": "error", - "no-async-promise-executor": "error", - "no-await-in-loop": "error", - "no-bitwise": "error", - "no-caller": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-console": "error", - "no-const-assign": "error", - "no-constant-binary-expression": "error", - "no-constant-condition": "error", - "no-constructor-return": "error", - "no-continue": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-div-regex": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-duplicate-imports": "error", - "no-else-return": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-function": "error", - "no-empty-pattern": "error", - "no-empty-static-block": "error", - "no-eq-null": "error", - "no-eval": "error", - "no-ex-assign": "error", - "no-extend-native": "error", - "no-extra-bind": "error", - "no-extra-boolean-cast": "error", - "no-extra-label": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-implicit-coercion": "error", - "no-implicit-globals": "error", - "no-implied-eval": "error", - "no-import-assign": "error", - "no-inline-comments": "error", - "no-inner-declarations": "error", - "no-invalid-regexp": "error", - "no-invalid-this": "error", - "no-irregular-whitespace": "error", - "no-iterator": "error", - "no-label-var": "error", - "no-labels": "error", - "no-lone-blocks": "error", - "no-lonely-if": "error", - "no-loop-func": "error", - "no-loss-of-precision": "error", - "no-magic-numbers": "error", - "no-misleading-character-class": "error", - "no-multi-assign": "error", - "no-multi-str": "error", - "no-negated-condition": "error", - "no-nested-ternary": "error", - "no-new": "error", - "no-new-func": "error", - "no-new-native-nonconstructor": "error", - "no-new-wrappers": "error", - "no-nonoctal-decimal-escape": "error", - "no-obj-calls": "error", - "no-object-constructor": "error", - "no-octal": "error", - "no-octal-escape": "error", - "no-param-reassign": "error", - "no-plusplus": "error", - "no-promise-executor-return": "error", - "no-proto": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-restricted-exports": "error", - "no-restricted-globals": "error", - "no-restricted-imports": "error", - "no-restricted-properties": "error", - "no-restricted-syntax": "error", - "no-return-assign": "error", - "no-script-url": "error", - "no-self-assign": "error", - "no-self-compare": "error", - "no-sequences": "error", - "no-setter-return": "error", - "no-shadow": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-template-curly-in-string": "error", - "no-ternary": "error", - "no-this-before-super": "error", - "no-throw-literal": "error", - "no-unassigned-vars": "error", - "no-undef": "error", - "no-undef-init": "error", - "no-undefined": "error", - "no-underscore-dangle": "error", - "no-unexpected-multiline": "error", - "no-unmodified-loop-condition": "error", - "no-unneeded-ternary": "error", - "no-unreachable": "error", - "no-unreachable-loop": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-expressions": "error", - "no-unused-labels": "error", - "no-unused-private-class-members": "error", - "no-unused-vars": "error", - "no-use-before-define": "error", - "no-useless-assignment": "error", - "no-useless-backreference": "error", - "no-useless-call": "error", - "no-useless-catch": "error", - "no-useless-computed-key": "error", - "no-useless-concat": "error", - "no-useless-constructor": "error", - "no-useless-escape": "error", - "no-useless-rename": "error", - "no-useless-return": "error", - "no-var": "error", - "no-void": "error", - "no-warning-comments": "error", - "no-with": "error", - "object-shorthand": "error", - "one-var": "error", - "operator-assignment": "error", - "prefer-arrow-callback": "error", - "prefer-const": "error", - "prefer-destructuring": "error", - "prefer-exponentiation-operator": "error", - "prefer-named-capture-group": "error", - "prefer-numeric-literals": "error", - "prefer-object-has-own": "error", - "prefer-object-spread": "error", - "prefer-promise-reject-errors": "error", - "prefer-regex-literals": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "prefer-template": "error", - "preserve-caught-error": "error", - "radix": "error", - "require-atomic-updates": "error", - "require-await": "error", - "require-unicode-regexp": "error", - "require-yield": "error", - "sort-imports": "error", - "sort-keys": "error", - "sort-vars": "error", - "strict": "error", - "symbol-description": "error", - "unicode-bom": "error", - "use-isnan": "error", - "valid-typeof": "error", - "vars-on-top": "error", - "yoda": "error" - }) -}); diff --git a/node_modules/@eslint/js/src/configs/eslint-recommended.js b/node_modules/@eslint/js/src/configs/eslint-recommended.js deleted file mode 100644 index fb27b4f..0000000 --- a/node_modules/@eslint/js/src/configs/eslint-recommended.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * WARNING: This file is autogenerated using the tools/update-eslint-recommended.js - * script. Do not edit manually. - */ -"use strict"; - -module.exports = Object.freeze({ - name: "@eslint/js/recommended", - rules: Object.freeze({ - "constructor-super": "error", - "for-direction": "error", - "getter-return": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-const-assign": "error", - "no-constant-binary-expression": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-args": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-empty-static-block": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-import-assign": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-misleading-character-class": "error", - "no-new-native-nonconstructor": "error", - "no-nonoctal-decimal-escape": "error", - "no-obj-calls": "error", - "no-octal": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-setter-return": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-this-before-super": "error", - "no-unassigned-vars": "error", - "no-undef": "error", - "no-unexpected-multiline": "error", - "no-unreachable": "error", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-labels": "error", - "no-unused-private-class-members": "error", - "no-unused-vars": "error", - "no-useless-assignment": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-escape": "error", - "no-with": "error", - "preserve-caught-error": "error", - "require-yield": "error", - "use-isnan": "error", - "valid-typeof": "error" - }), -}); diff --git a/node_modules/@eslint/js/src/index.js b/node_modules/@eslint/js/src/index.js deleted file mode 100644 index ff6a21d..0000000 --- a/node_modules/@eslint/js/src/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @fileoverview Main package entrypoint. - * @author Nicholas C. Zakas - */ - -"use strict"; - -const { name, version } = require("../package.json"); - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - meta: { - name, - version, - }, - configs: { - all: require("./configs/eslint-all"), - recommended: require("./configs/eslint-recommended"), - }, -}; diff --git a/node_modules/@eslint/js/types/index.d.ts b/node_modules/@eslint/js/types/index.d.ts deleted file mode 100644 index d4921d8..0000000 --- a/node_modules/@eslint/js/types/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Linter } from "eslint"; - -declare const js: { - readonly meta: { - readonly name: string; - readonly version: string; - }; - readonly configs: { - readonly recommended: { readonly rules: Readonly }; - readonly all: { readonly rules: Readonly }; - }; -}; - -export = js; diff --git a/node_modules/@eslint/object-schema/LICENSE b/node_modules/@eslint/object-schema/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@eslint/object-schema/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@eslint/object-schema/README.md b/node_modules/@eslint/object-schema/README.md deleted file mode 100644 index 75b77e3..0000000 --- a/node_modules/@eslint/object-schema/README.md +++ /dev/null @@ -1,275 +0,0 @@ -# ObjectSchema Package - -## Overview - -A JavaScript object merge/validation utility where you can define a different merge and validation strategy for each key. This is helpful when you need to validate complex data structures and then merge them in a way that is more complex than `Object.assign()`. This is used in the [`@eslint/config-array`](https://npmjs.com/package/@eslint/config-array) package but can also be used on its own. - -## Installation - -For Node.js and compatible runtimes: - -```shell -npm install @eslint/object-schema -# or -yarn add @eslint/object-schema -# or -pnpm install @eslint/object-schema -# or -bun add @eslint/object-schema -``` - -For Deno: - -```shell -deno add @eslint/object-schema -``` - -## Usage - -Import the `ObjectSchema` constructor: - -```js -// using ESM -import { ObjectSchema } from "@eslint/object-schema"; - -// using CommonJS -const { ObjectSchema } = require("@eslint/object-schema"); - -const schema = new ObjectSchema({ - // define a definition for the "downloads" key - downloads: { - required: true, - merge(value1 = 0, value2) { - return value1 + value2; - }, - validate(value) { - if (typeof value !== "number") { - throw new Error("Expected downloads to be a number."); - } - }, - }, - - // define a strategy for the "versions" key - versions: { - required: true, - merge(value1 = [], value2) { - return value1.concat(value2); - }, - validate(value) { - if (!Array.isArray(value)) { - throw new Error("Expected versions to be an array."); - } - }, - }, -}); - -const record1 = { - downloads: 25, - versions: ["v1.0.0", "v1.1.0", "v1.2.0"], -}; - -const record2 = { - downloads: 125, - versions: ["v2.0.0", "v2.1.0", "v3.0.0"], -}; - -// make sure the records are valid -schema.validate(record1); -schema.validate(record2); - -// merge together (schema.merge() accepts any number of objects) -const result = schema.merge(record1, record2); - -// result looks like this: -// { -// downloads: 150, -// versions: ["v1.0.0", "v1.1.0", "v1.2.0", "v2.0.0", "v2.1.0", "v3.0.0"], -// } -``` - -## Tips and Tricks - -### Named merge strategies - -Instead of specifying a `merge()` method, you can specify one of the following strings to use a default merge strategy: - -- `"assign"` - use `Object.assign()` to merge the two values into one object. -- `"overwrite"` - the second value always replaces the first. -- `"replace"` - the second value replaces the first if the second is not `undefined`. - -For example: - -```js -const schema = new ObjectSchema({ - name: { - merge: "replace", - validate() {}, - }, -}); -``` - -### Named validation strategies - -Instead of specifying a `validate()` method, you can specify one of the following strings to use a default validation strategy: - -- `"array"` - value must be an array. -- `"boolean"` - value must be a boolean. -- `"number"` - value must be a number. -- `"object"` - value must be a non-null object, including arrays and non-plain objects. -- `"object?"` - value must be an object or null, including arrays and non-plain objects. -- `"string"` - value must be a string. -- `"string!"` - value must be a non-empty string. - -For example: - -```js -const schema = new ObjectSchema({ - name: { - merge: "replace", - validate: "string", - }, -}); -``` - -### Built-in strategy classes - -The package also exports the built-in merge and validation strategies as two classes with static methods: - -- `MergeStrategy` - built-in merge functions (`assign`, `overwrite`, `replace`). -- `ValidationStrategy` - built-in validation functions (`array`, `boolean`, `number`, `object`, `object?`, `string`, `string!`). - -These are the same strategies used when you specify a strategy by name (for example, `merge: "replace"`). You can reference the functions directly if you prefer passing a function instead of a string: - -```js -import { - ObjectSchema, - MergeStrategy, - ValidationStrategy, -} from "@eslint/object-schema"; - -const schema = new ObjectSchema({ - name: { - required: true, - merge: MergeStrategy.replace, - validate: ValidationStrategy["string!"], - }, - options: { - required: false, - merge: MergeStrategy.assign, - validate: ValidationStrategy["object?"], - }, -}); -``` - -Note: Because `object?` and `string!` aren't valid identifiers, you must access them using bracket notation (for example, `ValidationStrategy["object?"]`). - -### Subschemas - -If you are defining a key that is, itself, an object, you can simplify the process by using a subschema. Instead of defining `merge()` and `validate()`, set a `schema` property that contains a schema definition, like this: - -```js -const schema = new ObjectSchema({ - name: { - schema: { - first: { - merge: "replace", - validate: "string", - }, - last: { - merge: "replace", - validate: "string", - }, - }, - }, -}); - -schema.validate({ - name: { - first: "n", - last: "z", - }, -}); -``` - -### Remove Keys During Merge - -If the merge strategy for a key returns `undefined`, then the key will not appear in the final object. For example: - -```js -const schema = new ObjectSchema({ - date: { - merge() { - return undefined; - }, - validate(value) { - if (isNaN(Date.parse(value))) { - throw new Error("Invalid date."); - } - }, - }, -}); - -const object1 = { date: "5/5/2005" }; -const object2 = { date: "6/6/2006" }; - -const result = schema.merge(object1, object2); - -console.log("date" in result); // false -``` - -### Requiring Another Key Be Present - -If you'd like the presence of one key to require the presence of another key, you can use the `requires` property to specify an array of other properties that any key requires. For example: - -```js -const schema = new ObjectSchema({ - date: { - merge() { - return undefined; - }, - validate(value) { - if (isNaN(Date.parse(value))) { - throw new Error("Invalid date."); - } - }, - }, - time: { - requires: ["date"], - merge(first, second) { - return second; - }, - validate(value) { - // ... - }, - }, -}); - -// throws error: Key "time" requires keys "date". -schema.validate({ - time: "13:45", -}); -``` - -In this example, even though `date` is an optional key, it is required to be present whenever `time` is present. - -## License - -Apache 2.0 - - - - -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) -to get your logo on our READMEs and [website](https://eslint.org/sponsors). - -

Platinum Sponsors

-

Automattic

Gold Sponsors

-

Qlty Software

Silver Sponsors

-

Vite Liftoff StackBlitz

Bronze Sponsors

-

Cybozu SAP CrawlJobs aeriusventilation's Org Depot Icons8 Discord GitBook HeroCoders TestMu AI Open Source Office (Formerly LambdaTest)

-

Technology Sponsors

-Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. -

Netlify Algolia 1Password

- diff --git a/node_modules/@eslint/object-schema/dist/cjs/index.cjs b/node_modules/@eslint/object-schema/dist/cjs/index.cjs deleted file mode 100644 index 9ce73ee..0000000 --- a/node_modules/@eslint/object-schema/dist/cjs/index.cjs +++ /dev/null @@ -1,470 +0,0 @@ -'use strict'; - -/** - * @fileoverview Merge Strategy - */ - -//----------------------------------------------------------------------------- -// Class -//----------------------------------------------------------------------------- - -/** - * Container class for several different merge strategies. - */ -class MergeStrategy { - /** - * Merges two keys by overwriting the first with the second. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue2} The second value. - */ - static overwrite(value1, value2) { - return value2; - } - - /** - * Merges two keys by replacing the first with the second only if the - * second is defined. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue1 | TValue2} The second value if it is defined. - */ - static replace(value1, value2) { - if (typeof value2 !== "undefined") { - return value2; - } - - return value1; - } - - /** - * Merges two properties by assigning properties from the second to the first. - * @template {Record | undefined} TValue1 The type of the value from the first object key. - * @template {Record} TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {Omit & TValue2} A new object containing properties from both value1 and - * value2. - */ - static assign(value1, value2) { - return Object.assign({}, value1, value2); - } -} - -/** - * @fileoverview Validation Strategy - */ - -//----------------------------------------------------------------------------- -// Class -//----------------------------------------------------------------------------- - -/** - * Container class for several different validation strategies. - */ -class ValidationStrategy { - /** - * Validates that a value is an array. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static array(value) { - if (!Array.isArray(value)) { - throw new TypeError("Expected an array."); - } - } - - /** - * Validates that a value is a boolean. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static boolean(value) { - if (typeof value !== "boolean") { - throw new TypeError("Expected a boolean."); - } - } - - /** - * Validates that a value is a number. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static number(value) { - if (typeof value !== "number") { - throw new TypeError("Expected a number."); - } - } - - /** - * Validates that a value is an object. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static object(value) { - if (!value || typeof value !== "object") { - throw new TypeError("Expected an object."); - } - } - - /** - * Validates that a value is an object or null. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "object?"(value) { - if (typeof value !== "object") { - throw new TypeError("Expected an object or null."); - } - } - - /** - * Validates that a value is a string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static string(value) { - if (typeof value !== "string") { - throw new TypeError("Expected a string."); - } - } - - /** - * Validates that a value is a non-empty string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "string!"(value) { - if (typeof value !== "string" || value.length === 0) { - throw new TypeError("Expected a non-empty string."); - } - } -} - -/** - * @fileoverview Object Schema - */ - - -//----------------------------------------------------------------------------- -// Types -//----------------------------------------------------------------------------- - -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.BuiltInMergeStrategy} BuiltInMergeStrategy */ -/** @typedef {$typests.BuiltInValidationStrategy} BuiltInValidationStrategy */ -/** @typedef {$typests.CustomMergeStrategy} CustomMergeStrategy */ -/** @typedef {$typests.CustomValidationStrategy} CustomValidationStrategy */ -/** @typedef {$typests.ObjectDefinition} ObjectDefinition */ -/** @typedef {$typests.PropertyDefinition} PropertyDefinition */ -/** @typedef {$typests.PropertyDefinitionWithSchema} PropertyDefinitionWithSchema */ -/** @typedef {$typests.PropertyDefinitionWithStrategies} PropertyDefinitionWithStrategies */ - -//----------------------------------------------------------------------------- -// Private -//----------------------------------------------------------------------------- - -/** - * Validates a schema strategy. - * @param {string} name The name of the key this strategy is for. - * @param {PropertyDefinition} definition The strategy for the object key. - * @returns {void} - * @throws {TypeError} When the strategy is missing a name. - * @throws {TypeError} When the strategy is missing a merge() method. - * @throws {TypeError} When the strategy is missing a validate() method. - */ -function validateDefinition(name, definition) { - let hasSchema = false; - if (definition.schema) { - if (typeof definition.schema === "object") { - hasSchema = true; - } else { - throw new TypeError("Schema must be an object."); - } - } - - if (typeof definition.merge === "string") { - if (!(definition.merge in MergeStrategy)) { - throw new TypeError( - `Definition for key "${name}" missing valid merge strategy.`, - ); - } - } else if (!hasSchema && typeof definition.merge !== "function") { - throw new TypeError( - `Definition for key "${name}" must have a merge property.`, - ); - } - - if (typeof definition.validate === "string") { - if (!(definition.validate in ValidationStrategy)) { - throw new TypeError( - `Definition for key "${name}" missing valid validation strategy.`, - ); - } - } else if (!hasSchema && typeof definition.validate !== "function") { - throw new TypeError( - `Definition for key "${name}" must have a validate() method.`, - ); - } -} - -//----------------------------------------------------------------------------- -// Errors -//----------------------------------------------------------------------------- - -/** - * Error when an unexpected key is found. - */ -class UnexpectedKeyError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was unexpected. - */ - constructor(key) { - super(`Unexpected key "${key}" found.`); - } -} - -/** - * Error when a required key is missing. - */ -class MissingKeyError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was missing. - */ - constructor(key) { - super(`Missing required key "${key}".`); - } -} - -/** - * Error when a key requires other keys that are missing. - */ -class MissingDependentKeysError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was unexpected. - * @param {Array} requiredKeys The keys that are required. - */ - constructor(key, requiredKeys) { - super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`); - } -} - -/** - * Wrapper error for errors occuring during a merge or validate operation. - */ -class WrapperError extends Error { - /** - * Creates a new instance. - * @param {string} key The object key causing the error. - * @param {Error} source The source error. - */ - constructor(key, source) { - super(`Key "${key}": ${source.message}`, { cause: source }); - - // copy over custom properties that aren't represented - for (const sourceKey of Object.keys(source)) { - if (!(sourceKey in this)) { - this[sourceKey] = source[sourceKey]; - } - } - } -} - -//----------------------------------------------------------------------------- -// Main -//----------------------------------------------------------------------------- - -/** - * Represents an object validation/merging schema. - */ -class ObjectSchema { - /** - * Track all definitions in the schema by key. - * @type {Map} - */ - #definitions = new Map(); - - /** - * Separately track any keys that are required for faster validation. - * @type {Map} - */ - #requiredKeys = new Map(); - - /** - * Creates a new instance. - * @param {ObjectDefinition} definitions The schema definitions. - * @throws {Error} When the definitions are missing or invalid. - */ - constructor(definitions) { - if (!definitions) { - throw new Error("Schema definitions missing."); - } - - // add in all strategies - for (const key of Object.keys(definitions)) { - const definition = definitions[key]; - - validateDefinition(key, definition); - - let normalizedDefinition = definition; - - // normalize merge and validate methods if subschema is present - if (typeof normalizedDefinition.schema === "object") { - const schema = new ObjectSchema(normalizedDefinition.schema); - normalizedDefinition = { - ...normalizedDefinition, - merge(first = {}, second = {}) { - return schema.merge(first, second); - }, - validate(value) { - ValidationStrategy.object(value); - schema.validate(value); - }, - }; - } - - // normalize the merge method in case there's a string - if (typeof normalizedDefinition.merge === "string") { - normalizedDefinition = { - ...normalizedDefinition, - merge: MergeStrategy[normalizedDefinition.merge], - }; - } - - // normalize the validate method in case there's a string - if (typeof normalizedDefinition.validate === "string") { - normalizedDefinition = { - ...normalizedDefinition, - validate: ValidationStrategy[normalizedDefinition.validate], - }; - } - - this.#definitions.set(key, normalizedDefinition); - - if (normalizedDefinition.required) { - this.#requiredKeys.set(key, normalizedDefinition); - } - } - } - - /** - * Determines if a strategy has been registered for the given object key. - * @param {string} key The object key to find a strategy for. - * @returns {boolean} True if the key has a strategy registered, false if not. - */ - hasKey(key) { - return this.#definitions.has(key); - } - - /** - * Merges objects together to create a new object comprised of the keys - * of the all objects. Keys are merged based on the each key's merge - * strategy. - * @param {...Object} objects The objects to merge. - * @returns {Object} A new object with a mix of all objects' keys. - * @throws {TypeError} If any object is invalid. - */ - merge(...objects) { - // double check arguments - if (objects.length < 2) { - throw new TypeError("merge() requires at least two arguments."); - } - - if ( - objects.some( - object => object === null || typeof object !== "object", - ) - ) { - throw new TypeError("All arguments must be objects."); - } - - return objects.reduce((result, object) => { - this.validate(object); - - for (const [key, strategy] of this.#definitions) { - try { - if (key in result || key in object) { - const merge = /** @type {Function} */ (strategy.merge); - const value = merge.call( - this, - result[key], - object[key], - ); - if (value !== undefined) { - result[key] = value; - } - } - } catch (ex) { - throw new WrapperError(key, ex); - } - } - return result; - }, {}); - } - - /** - * Validates an object's keys based on the validate strategy for each key. - * @param {Object} object The object to validate. - * @returns {void} - * @throws {Error} When the object is invalid. - */ - validate(object) { - // check existing keys first - for (const key of Object.keys(object)) { - // check to see if the key is defined - if (!this.hasKey(key)) { - throw new UnexpectedKeyError(key); - } - - // validate existing keys - const definition = /** @type {PropertyDefinition} */ ( - this.#definitions.get(key) - ); // `definition` is guaranteed to exist since we check with `hasKey()` above. - - // first check to see if any other keys are required - if (Array.isArray(definition.requires)) { - if ( - !definition.requires.every(otherKey => otherKey in object) - ) { - throw new MissingDependentKeysError( - key, - definition.requires, - ); - } - } - - // now apply remaining validation strategy - try { - const validate = /** @type {Function} */ (definition.validate); - validate.call(definition, object[key]); - } catch (ex) { - throw new WrapperError(key, ex); - } - } - - // ensure required keys aren't missing - for (const [key] of this.#requiredKeys) { - if (!(key in object)) { - throw new MissingKeyError(key); - } - } - } -} - -exports.MergeStrategy = MergeStrategy; -exports.ObjectSchema = ObjectSchema; -exports.ValidationStrategy = ValidationStrategy; diff --git a/node_modules/@eslint/object-schema/dist/cjs/index.d.cts b/node_modules/@eslint/object-schema/dist/cjs/index.d.cts deleted file mode 100644 index b7a2696..0000000 --- a/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +++ /dev/null @@ -1,137 +0,0 @@ -export type BuiltInMergeStrategy = $typests.BuiltInMergeStrategy; -export type BuiltInValidationStrategy = $typests.BuiltInValidationStrategy; -export type CustomMergeStrategy = $typests.CustomMergeStrategy; -export type CustomValidationStrategy = $typests.CustomValidationStrategy; -export type ObjectDefinition = $typests.ObjectDefinition; -export type PropertyDefinition = $typests.PropertyDefinition; -export type PropertyDefinitionWithSchema = $typests.PropertyDefinitionWithSchema; -export type PropertyDefinitionWithStrategies = $typests.PropertyDefinitionWithStrategies; -/** - * @fileoverview Merge Strategy - */ -/** - * Container class for several different merge strategies. - */ -export class MergeStrategy { - /** - * Merges two keys by overwriting the first with the second. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue2} The second value. - */ - static overwrite(value1: TValue1, value2: TValue2): TValue2; - /** - * Merges two keys by replacing the first with the second only if the - * second is defined. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue1 | TValue2} The second value if it is defined. - */ - static replace(value1: TValue1, value2: TValue2): TValue1 | TValue2; - /** - * Merges two properties by assigning properties from the second to the first. - * @template {Record | undefined} TValue1 The type of the value from the first object key. - * @template {Record} TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {Omit & TValue2} A new object containing properties from both value1 and - * value2. - */ - static assign | undefined, TValue2 extends Record>(value1: TValue1, value2: TValue2): Omit & TValue2; -} -/** - * Represents an object validation/merging schema. - */ -export class ObjectSchema { - /** - * Creates a new instance. - * @param {ObjectDefinition} definitions The schema definitions. - * @throws {Error} When the definitions are missing or invalid. - */ - constructor(definitions: ObjectDefinition); - /** - * Determines if a strategy has been registered for the given object key. - * @param {string} key The object key to find a strategy for. - * @returns {boolean} True if the key has a strategy registered, false if not. - */ - hasKey(key: string): boolean; - /** - * Merges objects together to create a new object comprised of the keys - * of the all objects. Keys are merged based on the each key's merge - * strategy. - * @param {...Object} objects The objects to merge. - * @returns {Object} A new object with a mix of all objects' keys. - * @throws {TypeError} If any object is invalid. - */ - merge(...objects: any[]): any; - /** - * Validates an object's keys based on the validate strategy for each key. - * @param {Object} object The object to validate. - * @returns {void} - * @throws {Error} When the object is invalid. - */ - validate(object: any): void; - #private; -} -/** - * @fileoverview Validation Strategy - */ -/** - * Container class for several different validation strategies. - */ -export class ValidationStrategy { - /** - * Validates that a value is an array. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static array(value: unknown): void; - /** - * Validates that a value is a boolean. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static boolean(value: unknown): void; - /** - * Validates that a value is a number. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static number(value: unknown): void; - /** - * Validates that a value is an object. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static object(value: unknown): void; - /** - * Validates that a value is an object or null. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "object?"(value: unknown): void; - /** - * Validates that a value is a string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static string(value: unknown): void; - /** - * Validates that a value is a non-empty string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "string!"(value: unknown): void; -} -import type * as $typests from "./types.cts"; diff --git a/node_modules/@eslint/object-schema/dist/cjs/types.cts b/node_modules/@eslint/object-schema/dist/cjs/types.cts deleted file mode 100644 index 4c27291..0000000 --- a/node_modules/@eslint/object-schema/dist/cjs/types.cts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @fileoverview Types for object-schema package. - */ - -/** - * Built-in validation strategies. - */ -export type BuiltInValidationStrategy = - | "array" - | "boolean" - | "number" - | "object" - | "object?" - | "string" - | "string!"; - -/** - * Built-in merge strategies. - */ -export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; - -/** - * Custom merge strategy. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 -export type CustomMergeStrategy = (target: any, source: any) => any; - -/** - * Custom validation strategy. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 -export type CustomValidationStrategy = (value: any) => void; - -interface BasePropertyDefinition { - /** - * Indicates if the property is required. - */ - required?: boolean; - - /** - * The other properties that must be present when this property is used. - */ - requires?: string[]; -} - -/** - * Property definition that specifies explicit merge and validation strategies. - * This form cannot include a `schema`. - */ -export interface PropertyDefinitionWithStrategies extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema?: never; - - /** - * The strategy to merge the property. - */ - merge: BuiltInMergeStrategy | CustomMergeStrategy; - - /** - * The strategy to validate the property. - */ - validate: BuiltInValidationStrategy | CustomValidationStrategy; -} - -/** - * Property definition that uses a nested `schema`. - * When `schema` is present, merge and validation strategies are optional. - */ -export interface PropertyDefinitionWithSchema extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema: ObjectDefinition; - - /** - * The strategy to merge the property. - */ - merge?: BuiltInMergeStrategy | CustomMergeStrategy; - - /** - * The strategy to validate the property. - */ - validate?: BuiltInValidationStrategy | CustomValidationStrategy; -} - -/** - * Property definition. - */ -export type PropertyDefinition = - | PropertyDefinitionWithStrategies - | PropertyDefinitionWithSchema; - -/** - * Object definition. - */ -export type ObjectDefinition = Record; diff --git a/node_modules/@eslint/object-schema/dist/esm/index.d.ts b/node_modules/@eslint/object-schema/dist/esm/index.d.ts deleted file mode 100644 index 89301c9..0000000 --- a/node_modules/@eslint/object-schema/dist/esm/index.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -export type BuiltInMergeStrategy = $typests.BuiltInMergeStrategy; -export type BuiltInValidationStrategy = $typests.BuiltInValidationStrategy; -export type CustomMergeStrategy = $typests.CustomMergeStrategy; -export type CustomValidationStrategy = $typests.CustomValidationStrategy; -export type ObjectDefinition = $typests.ObjectDefinition; -export type PropertyDefinition = $typests.PropertyDefinition; -export type PropertyDefinitionWithSchema = $typests.PropertyDefinitionWithSchema; -export type PropertyDefinitionWithStrategies = $typests.PropertyDefinitionWithStrategies; -/** - * @fileoverview Merge Strategy - */ -/** - * Container class for several different merge strategies. - */ -export class MergeStrategy { - /** - * Merges two keys by overwriting the first with the second. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue2} The second value. - */ - static overwrite(value1: TValue1, value2: TValue2): TValue2; - /** - * Merges two keys by replacing the first with the second only if the - * second is defined. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue1 | TValue2} The second value if it is defined. - */ - static replace(value1: TValue1, value2: TValue2): TValue1 | TValue2; - /** - * Merges two properties by assigning properties from the second to the first. - * @template {Record | undefined} TValue1 The type of the value from the first object key. - * @template {Record} TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {Omit & TValue2} A new object containing properties from both value1 and - * value2. - */ - static assign | undefined, TValue2 extends Record>(value1: TValue1, value2: TValue2): Omit & TValue2; -} -/** - * Represents an object validation/merging schema. - */ -export class ObjectSchema { - /** - * Creates a new instance. - * @param {ObjectDefinition} definitions The schema definitions. - * @throws {Error} When the definitions are missing or invalid. - */ - constructor(definitions: ObjectDefinition); - /** - * Determines if a strategy has been registered for the given object key. - * @param {string} key The object key to find a strategy for. - * @returns {boolean} True if the key has a strategy registered, false if not. - */ - hasKey(key: string): boolean; - /** - * Merges objects together to create a new object comprised of the keys - * of the all objects. Keys are merged based on the each key's merge - * strategy. - * @param {...Object} objects The objects to merge. - * @returns {Object} A new object with a mix of all objects' keys. - * @throws {TypeError} If any object is invalid. - */ - merge(...objects: any[]): any; - /** - * Validates an object's keys based on the validate strategy for each key. - * @param {Object} object The object to validate. - * @returns {void} - * @throws {Error} When the object is invalid. - */ - validate(object: any): void; - #private; -} -/** - * @fileoverview Validation Strategy - */ -/** - * Container class for several different validation strategies. - */ -export class ValidationStrategy { - /** - * Validates that a value is an array. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static array(value: unknown): void; - /** - * Validates that a value is a boolean. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static boolean(value: unknown): void; - /** - * Validates that a value is a number. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static number(value: unknown): void; - /** - * Validates that a value is an object. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static object(value: unknown): void; - /** - * Validates that a value is an object or null. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "object?"(value: unknown): void; - /** - * Validates that a value is a string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static string(value: unknown): void; - /** - * Validates that a value is a non-empty string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "string!"(value: unknown): void; -} -import type * as $typests from "./types.ts"; diff --git a/node_modules/@eslint/object-schema/dist/esm/index.js b/node_modules/@eslint/object-schema/dist/esm/index.js deleted file mode 100644 index ca5cb09..0000000 --- a/node_modules/@eslint/object-schema/dist/esm/index.js +++ /dev/null @@ -1,467 +0,0 @@ -// @ts-self-types="./index.d.ts" -/** - * @fileoverview Merge Strategy - */ - -//----------------------------------------------------------------------------- -// Class -//----------------------------------------------------------------------------- - -/** - * Container class for several different merge strategies. - */ -class MergeStrategy { - /** - * Merges two keys by overwriting the first with the second. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue2} The second value. - */ - static overwrite(value1, value2) { - return value2; - } - - /** - * Merges two keys by replacing the first with the second only if the - * second is defined. - * @template TValue1 The type of the value from the first object key. - * @template TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {TValue1 | TValue2} The second value if it is defined. - */ - static replace(value1, value2) { - if (typeof value2 !== "undefined") { - return value2; - } - - return value1; - } - - /** - * Merges two properties by assigning properties from the second to the first. - * @template {Record | undefined} TValue1 The type of the value from the first object key. - * @template {Record} TValue2 The type of the value from the second object key. - * @param {TValue1} value1 The value from the first object key. - * @param {TValue2} value2 The value from the second object key. - * @returns {Omit & TValue2} A new object containing properties from both value1 and - * value2. - */ - static assign(value1, value2) { - return Object.assign({}, value1, value2); - } -} - -/** - * @fileoverview Validation Strategy - */ - -//----------------------------------------------------------------------------- -// Class -//----------------------------------------------------------------------------- - -/** - * Container class for several different validation strategies. - */ -class ValidationStrategy { - /** - * Validates that a value is an array. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static array(value) { - if (!Array.isArray(value)) { - throw new TypeError("Expected an array."); - } - } - - /** - * Validates that a value is a boolean. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static boolean(value) { - if (typeof value !== "boolean") { - throw new TypeError("Expected a boolean."); - } - } - - /** - * Validates that a value is a number. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static number(value) { - if (typeof value !== "number") { - throw new TypeError("Expected a number."); - } - } - - /** - * Validates that a value is an object. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static object(value) { - if (!value || typeof value !== "object") { - throw new TypeError("Expected an object."); - } - } - - /** - * Validates that a value is an object or null. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "object?"(value) { - if (typeof value !== "object") { - throw new TypeError("Expected an object or null."); - } - } - - /** - * Validates that a value is a string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static string(value) { - if (typeof value !== "string") { - throw new TypeError("Expected a string."); - } - } - - /** - * Validates that a value is a non-empty string. - * @param {unknown} value The value to validate. - * @returns {void} - * @throws {TypeError} If the value is invalid. - */ - static "string!"(value) { - if (typeof value !== "string" || value.length === 0) { - throw new TypeError("Expected a non-empty string."); - } - } -} - -/** - * @fileoverview Object Schema - */ - - -//----------------------------------------------------------------------------- -// Types -//----------------------------------------------------------------------------- - -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.BuiltInMergeStrategy} BuiltInMergeStrategy */ -/** @typedef {$typests.BuiltInValidationStrategy} BuiltInValidationStrategy */ -/** @typedef {$typests.CustomMergeStrategy} CustomMergeStrategy */ -/** @typedef {$typests.CustomValidationStrategy} CustomValidationStrategy */ -/** @typedef {$typests.ObjectDefinition} ObjectDefinition */ -/** @typedef {$typests.PropertyDefinition} PropertyDefinition */ -/** @typedef {$typests.PropertyDefinitionWithSchema} PropertyDefinitionWithSchema */ -/** @typedef {$typests.PropertyDefinitionWithStrategies} PropertyDefinitionWithStrategies */ - -//----------------------------------------------------------------------------- -// Private -//----------------------------------------------------------------------------- - -/** - * Validates a schema strategy. - * @param {string} name The name of the key this strategy is for. - * @param {PropertyDefinition} definition The strategy for the object key. - * @returns {void} - * @throws {TypeError} When the strategy is missing a name. - * @throws {TypeError} When the strategy is missing a merge() method. - * @throws {TypeError} When the strategy is missing a validate() method. - */ -function validateDefinition(name, definition) { - let hasSchema = false; - if (definition.schema) { - if (typeof definition.schema === "object") { - hasSchema = true; - } else { - throw new TypeError("Schema must be an object."); - } - } - - if (typeof definition.merge === "string") { - if (!(definition.merge in MergeStrategy)) { - throw new TypeError( - `Definition for key "${name}" missing valid merge strategy.`, - ); - } - } else if (!hasSchema && typeof definition.merge !== "function") { - throw new TypeError( - `Definition for key "${name}" must have a merge property.`, - ); - } - - if (typeof definition.validate === "string") { - if (!(definition.validate in ValidationStrategy)) { - throw new TypeError( - `Definition for key "${name}" missing valid validation strategy.`, - ); - } - } else if (!hasSchema && typeof definition.validate !== "function") { - throw new TypeError( - `Definition for key "${name}" must have a validate() method.`, - ); - } -} - -//----------------------------------------------------------------------------- -// Errors -//----------------------------------------------------------------------------- - -/** - * Error when an unexpected key is found. - */ -class UnexpectedKeyError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was unexpected. - */ - constructor(key) { - super(`Unexpected key "${key}" found.`); - } -} - -/** - * Error when a required key is missing. - */ -class MissingKeyError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was missing. - */ - constructor(key) { - super(`Missing required key "${key}".`); - } -} - -/** - * Error when a key requires other keys that are missing. - */ -class MissingDependentKeysError extends Error { - /** - * Creates a new instance. - * @param {string} key The key that was unexpected. - * @param {Array} requiredKeys The keys that are required. - */ - constructor(key, requiredKeys) { - super(`Key "${key}" requires keys "${requiredKeys.join('", "')}".`); - } -} - -/** - * Wrapper error for errors occuring during a merge or validate operation. - */ -class WrapperError extends Error { - /** - * Creates a new instance. - * @param {string} key The object key causing the error. - * @param {Error} source The source error. - */ - constructor(key, source) { - super(`Key "${key}": ${source.message}`, { cause: source }); - - // copy over custom properties that aren't represented - for (const sourceKey of Object.keys(source)) { - if (!(sourceKey in this)) { - this[sourceKey] = source[sourceKey]; - } - } - } -} - -//----------------------------------------------------------------------------- -// Main -//----------------------------------------------------------------------------- - -/** - * Represents an object validation/merging schema. - */ -class ObjectSchema { - /** - * Track all definitions in the schema by key. - * @type {Map} - */ - #definitions = new Map(); - - /** - * Separately track any keys that are required for faster validation. - * @type {Map} - */ - #requiredKeys = new Map(); - - /** - * Creates a new instance. - * @param {ObjectDefinition} definitions The schema definitions. - * @throws {Error} When the definitions are missing or invalid. - */ - constructor(definitions) { - if (!definitions) { - throw new Error("Schema definitions missing."); - } - - // add in all strategies - for (const key of Object.keys(definitions)) { - const definition = definitions[key]; - - validateDefinition(key, definition); - - let normalizedDefinition = definition; - - // normalize merge and validate methods if subschema is present - if (typeof normalizedDefinition.schema === "object") { - const schema = new ObjectSchema(normalizedDefinition.schema); - normalizedDefinition = { - ...normalizedDefinition, - merge(first = {}, second = {}) { - return schema.merge(first, second); - }, - validate(value) { - ValidationStrategy.object(value); - schema.validate(value); - }, - }; - } - - // normalize the merge method in case there's a string - if (typeof normalizedDefinition.merge === "string") { - normalizedDefinition = { - ...normalizedDefinition, - merge: MergeStrategy[normalizedDefinition.merge], - }; - } - - // normalize the validate method in case there's a string - if (typeof normalizedDefinition.validate === "string") { - normalizedDefinition = { - ...normalizedDefinition, - validate: ValidationStrategy[normalizedDefinition.validate], - }; - } - - this.#definitions.set(key, normalizedDefinition); - - if (normalizedDefinition.required) { - this.#requiredKeys.set(key, normalizedDefinition); - } - } - } - - /** - * Determines if a strategy has been registered for the given object key. - * @param {string} key The object key to find a strategy for. - * @returns {boolean} True if the key has a strategy registered, false if not. - */ - hasKey(key) { - return this.#definitions.has(key); - } - - /** - * Merges objects together to create a new object comprised of the keys - * of the all objects. Keys are merged based on the each key's merge - * strategy. - * @param {...Object} objects The objects to merge. - * @returns {Object} A new object with a mix of all objects' keys. - * @throws {TypeError} If any object is invalid. - */ - merge(...objects) { - // double check arguments - if (objects.length < 2) { - throw new TypeError("merge() requires at least two arguments."); - } - - if ( - objects.some( - object => object === null || typeof object !== "object", - ) - ) { - throw new TypeError("All arguments must be objects."); - } - - return objects.reduce((result, object) => { - this.validate(object); - - for (const [key, strategy] of this.#definitions) { - try { - if (key in result || key in object) { - const merge = /** @type {Function} */ (strategy.merge); - const value = merge.call( - this, - result[key], - object[key], - ); - if (value !== undefined) { - result[key] = value; - } - } - } catch (ex) { - throw new WrapperError(key, ex); - } - } - return result; - }, {}); - } - - /** - * Validates an object's keys based on the validate strategy for each key. - * @param {Object} object The object to validate. - * @returns {void} - * @throws {Error} When the object is invalid. - */ - validate(object) { - // check existing keys first - for (const key of Object.keys(object)) { - // check to see if the key is defined - if (!this.hasKey(key)) { - throw new UnexpectedKeyError(key); - } - - // validate existing keys - const definition = /** @type {PropertyDefinition} */ ( - this.#definitions.get(key) - ); // `definition` is guaranteed to exist since we check with `hasKey()` above. - - // first check to see if any other keys are required - if (Array.isArray(definition.requires)) { - if ( - !definition.requires.every(otherKey => otherKey in object) - ) { - throw new MissingDependentKeysError( - key, - definition.requires, - ); - } - } - - // now apply remaining validation strategy - try { - const validate = /** @type {Function} */ (definition.validate); - validate.call(definition, object[key]); - } catch (ex) { - throw new WrapperError(key, ex); - } - } - - // ensure required keys aren't missing - for (const [key] of this.#requiredKeys) { - if (!(key in object)) { - throw new MissingKeyError(key); - } - } - } -} - -export { MergeStrategy, ObjectSchema, ValidationStrategy }; diff --git a/node_modules/@eslint/object-schema/dist/esm/types.d.ts b/node_modules/@eslint/object-schema/dist/esm/types.d.ts deleted file mode 100644 index 836d1cf..0000000 --- a/node_modules/@eslint/object-schema/dist/esm/types.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * @fileoverview Types for object-schema package. - */ -/** - * Built-in validation strategies. - */ -export type BuiltInValidationStrategy = "array" | "boolean" | "number" | "object" | "object?" | "string" | "string!"; -/** - * Built-in merge strategies. - */ -export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; -/** - * Custom merge strategy. - */ -export type CustomMergeStrategy = (target: any, source: any) => any; -/** - * Custom validation strategy. - */ -export type CustomValidationStrategy = (value: any) => void; -interface BasePropertyDefinition { - /** - * Indicates if the property is required. - */ - required?: boolean; - /** - * The other properties that must be present when this property is used. - */ - requires?: string[]; -} -/** - * Property definition that specifies explicit merge and validation strategies. - * This form cannot include a `schema`. - */ -export interface PropertyDefinitionWithStrategies extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema?: never; - /** - * The strategy to merge the property. - */ - merge: BuiltInMergeStrategy | CustomMergeStrategy; - /** - * The strategy to validate the property. - */ - validate: BuiltInValidationStrategy | CustomValidationStrategy; -} -/** - * Property definition that uses a nested `schema`. - * When `schema` is present, merge and validation strategies are optional. - */ -export interface PropertyDefinitionWithSchema extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema: ObjectDefinition; - /** - * The strategy to merge the property. - */ - merge?: BuiltInMergeStrategy | CustomMergeStrategy; - /** - * The strategy to validate the property. - */ - validate?: BuiltInValidationStrategy | CustomValidationStrategy; -} -/** - * Property definition. - */ -export type PropertyDefinition = PropertyDefinitionWithStrategies | PropertyDefinitionWithSchema; -/** - * Object definition. - */ -export type ObjectDefinition = Record; -export {}; diff --git a/node_modules/@eslint/object-schema/dist/esm/types.ts b/node_modules/@eslint/object-schema/dist/esm/types.ts deleted file mode 100644 index 4c27291..0000000 --- a/node_modules/@eslint/object-schema/dist/esm/types.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @fileoverview Types for object-schema package. - */ - -/** - * Built-in validation strategies. - */ -export type BuiltInValidationStrategy = - | "array" - | "boolean" - | "number" - | "object" - | "object?" - | "string" - | "string!"; - -/** - * Built-in merge strategies. - */ -export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; - -/** - * Custom merge strategy. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 -export type CustomMergeStrategy = (target: any, source: any) => any; - -/** - * Custom validation strategy. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/eslint/rewrite/pull/90#discussion_r1687206213 -export type CustomValidationStrategy = (value: any) => void; - -interface BasePropertyDefinition { - /** - * Indicates if the property is required. - */ - required?: boolean; - - /** - * The other properties that must be present when this property is used. - */ - requires?: string[]; -} - -/** - * Property definition that specifies explicit merge and validation strategies. - * This form cannot include a `schema`. - */ -export interface PropertyDefinitionWithStrategies extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema?: never; - - /** - * The strategy to merge the property. - */ - merge: BuiltInMergeStrategy | CustomMergeStrategy; - - /** - * The strategy to validate the property. - */ - validate: BuiltInValidationStrategy | CustomValidationStrategy; -} - -/** - * Property definition that uses a nested `schema`. - * When `schema` is present, merge and validation strategies are optional. - */ -export interface PropertyDefinitionWithSchema extends BasePropertyDefinition { - /** - * The schema for the object value of this property. - */ - schema: ObjectDefinition; - - /** - * The strategy to merge the property. - */ - merge?: BuiltInMergeStrategy | CustomMergeStrategy; - - /** - * The strategy to validate the property. - */ - validate?: BuiltInValidationStrategy | CustomValidationStrategy; -} - -/** - * Property definition. - */ -export type PropertyDefinition = - | PropertyDefinitionWithStrategies - | PropertyDefinitionWithSchema; - -/** - * Object definition. - */ -export type ObjectDefinition = Record; diff --git a/node_modules/@eslint/object-schema/package.json b/node_modules/@eslint/object-schema/package.json deleted file mode 100644 index 82fe388..0000000 --- a/node_modules/@eslint/object-schema/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "@eslint/object-schema", - "version": "3.0.5", - "description": "An object schema merger/validator", - "type": "module", - "main": "dist/esm/index.js", - "types": "dist/esm/index.d.ts", - "exports": { - "require": { - "types": "./dist/cjs/index.d.cts", - "default": "./dist/cjs/index.cjs" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - } - }, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "directories": { - "test": "tests" - }, - "scripts": { - "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", - "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", - "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", - "lint:types": "attw --pack", - "pretest": "npm run build", - "test": "npm run test:types && npm run test:unit", - "test:coverage": "c8 npm run test:unit", - "test:jsr": "npx -y jsr@latest publish --dry-run", - "test:types": "tsc -p tests/types/tsconfig.json", - "test:unit": "mocha \"tests/**/*.test.js\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/rewrite.git", - "directory": "packages/object-schema" - }, - "keywords": [ - "object", - "validation", - "schema", - "merge" - ], - "author": "Nicholas C. Zakas", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/eslint/rewrite/issues" - }, - "homepage": "https://github.com/eslint/rewrite/tree/main/packages/object-schema#readme", - "devDependencies": { - "rollup-plugin-copy": "^3.5.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@eslint/plugin-kit/LICENSE b/node_modules/@eslint/plugin-kit/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@eslint/plugin-kit/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@eslint/plugin-kit/README.md b/node_modules/@eslint/plugin-kit/README.md deleted file mode 100644 index 48af387..0000000 --- a/node_modules/@eslint/plugin-kit/README.md +++ /dev/null @@ -1,273 +0,0 @@ -# ESLint Plugin Kit - -## Description - -A collection of utilities to help build ESLint plugins. - -## Installation - -For Node.js and compatible runtimes: - -```shell -npm install @eslint/plugin-kit -# or -yarn add @eslint/plugin-kit -# or -pnpm install @eslint/plugin-kit -# or -bun add @eslint/plugin-kit -``` - -For Deno: - -```shell -deno add @eslint/plugin-kit -``` - -## Usage - -This package exports the following utilities: - -- [`ConfigCommentParser`](#configcommentparser) - used to parse ESLint configuration comments (i.e., `/* eslint-disable rule */`) -- [`VisitNodeStep` and `CallMethodStep`](#visitnodestep-and-callmethodstep) - used to help implement `SourceCode#traverse()` -- [`Directive`](#directive) - used to help implement `SourceCode#getDisableDirectives()` -- [`TextSourceCodeBase`](#textsourcecodebase) - base class to help implement the `SourceCode` interface - -### `ConfigCommentParser` - -To use the `ConfigCommentParser` class, import it from the package and create a new instance, such as: - -```js -import { ConfigCommentParser } from "@eslint/plugin-kit"; - -// create a new instance -const commentParser = new ConfigCommentParser(); - -// pass in a comment string without the comment delimiters -const directive = commentParser.parseDirective( - "eslint-disable prefer-const, no-var -- I don't want to use these.", -); - -// will be undefined when a directive can't be parsed -if (directive) { - console.log(directive.label); // "eslint-disable" - console.log(directive.value); // "prefer-const, no-var" - console.log(directive.justification); // "I don't want to use these." -} -``` - -There are different styles of directive values that you'll need to parse separately to get the correct format: - -```js -import { ConfigCommentParser } from "@eslint/plugin-kit"; - -// create a new instance -const commentParser = new ConfigCommentParser(); - -// list format -const list = commentParser.parseListConfig("prefer-const, no-var"); -console.log(Object.entries(list)); // [["prefer-const", true], ["no-var", true]] - -// string format -const strings = commentParser.parseStringConfig("foo:off, bar"); -console.log(Object.entries(strings)); // [["foo", "off"], ["bar", null]] - -// JSON-like config format -const jsonLike = commentParser.parseJSONLikeConfig( - "radix:[error, always], prefer-const: warn", -); -console.log(Object.entries(jsonLike.config)); // [["radix", ["error", "always"]], ["prefer-const", "warn"]] -``` - -### `VisitNodeStep` and `CallMethodStep` - -The `VisitNodeStep` and `CallMethodStep` classes represent steps in the traversal of source code. They implement the correct interfaces to return from the `SourceCode#traverse()` method. - -The `VisitNodeStep` class is the more common of the two, where you are describing a visit to a particular node during the traversal. The constructor accepts three arguments: - -- `target` - the node being visited. This is used to determine the method to call inside of a rule. For instance, if the node's type is `Literal` then ESLint will call a method named `Literal()` on the rule (if present). -- `phase` - either 1 for enter or 2 for exit. -- `args` - an array of arguments to pass into the visitor method of a rule. - -For example: - -```js -import { VisitNodeStep } from "@eslint/plugin-kit"; - -class MySourceCode { - traverse() { - const steps = []; - - for (const { node, parent, phase } of iterator(this.ast)) { - steps.push( - new VisitNodeStep({ - target: node, - phase: phase === "enter" ? 1 : 2, - args: [node, parent], - }), - ); - } - - return steps; - } -} -``` - -The `CallMethodStep` class is less common and is used to tell ESLint to call a specific method on the rule. The constructor accepts two arguments: - -- `target` - the name of the method to call, frequently beginning with `"on"` such as `"onCodePathStart"`. -- `args` - an array of arguments to pass to the method. - -For example: - -```js -import { VisitNodeStep, CallMethodStep } from "@eslint/plugin-kit"; - -class MySourceCode { - traverse() { - const steps = []; - - for (const { node, parent, phase } of iterator(this.ast)) { - steps.push( - new VisitNodeStep({ - target: node, - phase: phase === "enter" ? 1 : 2, - args: [node, parent], - }), - ); - - // call a method indicating how many times we've been through the loop - steps.push( - new CallMethodStep({ - target: "onIteration", - args: [steps.length] - }); - ) - } - - return steps; - } -} -``` - -### `Directive` - -The `Directive` class represents a disable directive in the source code and implements the `Directive` interface from `@eslint/core`. You can tell ESLint about disable directives using the `SourceCode#getDisableDirectives()` method, where part of the return value is an array of `Directive` objects. Here's an example: - -```js -import { Directive, ConfigCommentParser } from "@eslint/plugin-kit"; - -class MySourceCode { - getDisableDirectives() { - const directives = []; - const problems = []; - const commentParser = new ConfigCommentParser(); - - // read in the inline config nodes to check each one - this.getInlineConfigNodes().forEach(comment => { - // Step 1: Parse the directive - const { label, value, justification } = - commentParser.parseDirective(comment.value); - - // Step 2: Extract the directive value and create the `Directive` object - switch (label) { - case "eslint-disable": - case "eslint-enable": - case "eslint-disable-next-line": - case "eslint-disable-line": { - const directiveType = label.slice("eslint-".length); - - directives.push( - new Directive({ - type: directiveType, - node: comment, - value, - justification, - }), - ); - } - - // ignore any comments that don't begin with known labels - } - }); - - return { - directives, - problems, - }; - } -} -``` - -### `TextSourceCodeBase` - -The `TextSourceCodeBase` class is intended to be a base class that has several of the common members found in `SourceCode` objects already implemented. Those members are: - -- `lines` - an array of text lines that is created automatically when the constructor is called. -- `getLoc(nodeOrToken)` - gets the location of a node or token. Works for nodes that have the ESLint-style `loc` property and nodes that have the Unist-style [`position` property](https://github.com/syntax-tree/unist?tab=readme-ov-file#position). If you're using an AST with a different location format, you'll still need to implement this method yourself. -- `getLocFromIndex(index)` - Converts a source text index into a `{ line: number, column: number }` pair. (For this method to work, the root node should always cover the entire source code text, and the `getLoc()` method needs to be implemented correctly.) -- `getIndexFromLoc(loc)` - Converts a `{ line: number, column: number }` pair into a source text index. (For this method to work, the root node should always cover the entire source code text, and the `getLoc()` method needs to be implemented correctly.) -- `getRange(nodeOrToken)` - gets the range of a node or token within the source text. Works for nodes that have the ESLint-style `range` property and nodes that have the Unist-style [`position` property](https://github.com/syntax-tree/unist?tab=readme-ov-file#position). If you're using an AST with a different range format, you'll still need to implement this method yourself. -- `getText(node, beforeCount, afterCount)` - gets the source text for the given node that has range information attached. Optionally, can return additional characters before and after the given node. As long as `getRange()` is properly implemented, this method will just work. -- `getAncestors(node)` - returns the ancestry of the node. In order for this to work, you must implement the `getParent()` method yourself. - -Here's an example: - -```js -import { TextSourceCodeBase } from "@eslint/plugin-kit"; - -export class MySourceCode extends TextSourceCodeBase { - #parents = new Map(); - - constructor({ ast, text }) { - super({ ast, text }); - } - - getParent(node) { - return this.#parents.get(node); - } - - traverse() { - const steps = []; - - for (const { node, parent, phase } of iterator(this.ast)) { - //save the parent information - this.#parent.set(node, parent); - - steps.push( - new VisitNodeStep({ - target: node, - phase: phase === "enter" ? 1 : 2, - args: [node, parent], - }), - ); - } - - return steps; - } -} -``` - -In general, it's safe to collect the parent information during the `traverse()` method as `getParent()` and `getAncestor()` will only be called from rules once the AST has been traversed at least once. - -## License - -Apache 2.0 - - - - -## Sponsors - -The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate) -to get your logo on our READMEs and [website](https://eslint.org/sponsors). - -

Platinum Sponsors

-

Automattic

Gold Sponsors

-

Qlty Software

Silver Sponsors

-

Vite Liftoff StackBlitz

Bronze Sponsors

-

Cybozu SAP CrawlJobs aeriusventilation's Org Depot Icons8 Discord GitBook HeroCoders TestMu AI Open Source Office (Formerly LambdaTest)

-

Technology Sponsors

-Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work. -

Netlify Algolia 1Password

- diff --git a/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs b/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs deleted file mode 100644 index 00b7fcf..0000000 --- a/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs +++ /dev/null @@ -1,895 +0,0 @@ -'use strict'; - -var levn = require('levn'); - -/** - * @fileoverview Config Comment Parser - * @author Nicholas C. Zakas - */ - - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @import * as $eslintcore from "@eslint/core"; */ -/** @typedef {$eslintcore.RuleConfig} RuleConfig */ -/** @typedef {$eslintcore.RulesConfig} RulesConfig */ -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.StringConfig} StringConfig */ -/** @typedef {$typests.BooleanConfig} BooleanConfig */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const directivesPattern = /^([a-z]+(?:-[a-z]+)*)(?:\s|$)/u; -const validSeverities = new Set([0, 1, 2, "off", "warn", "error"]); - -/** - * Determines if the severity in the rule configuration is valid. - * @param {RuleConfig} ruleConfig A rule's configuration. - * @returns {boolean} `true` if the severity is valid, otherwise `false`. - */ -function isSeverityValid(ruleConfig) { - const severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; - return validSeverities.has(severity); -} - -/** - * Determines if all severities in the rules configuration are valid. - * @param {RulesConfig} rulesConfig The rules configuration to check. - * @returns {boolean} `true` if all severities are valid, otherwise `false`. - */ -function isEverySeverityValid(rulesConfig) { - return Object.values(rulesConfig).every(isSeverityValid); -} - -/** - * Represents a directive comment. - */ -class DirectiveComment { - /** - * The label of the directive, such as "eslint", "eslint-disable", etc. - * @type {string} - */ - label = ""; - - /** - * The value of the directive (the string after the label). - * @type {string} - */ - value = ""; - - /** - * The justification of the directive (the string after the --). - * @type {string} - */ - justification = ""; - - /** - * Creates a new directive comment. - * @param {string} label The label of the directive. - * @param {string} value The value of the directive. - * @param {string} justification The justification of the directive. - */ - constructor(label, value, justification) { - this.label = label; - this.value = value; - this.justification = justification; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** - * Object to parse ESLint configuration comments. - */ -class ConfigCommentParser { - /** - * Parses a list of "name:string_value" or/and "name" options divided by comma or - * whitespace. Used for "global" comments. - * @param {string} string The string to parse. - * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. - */ - parseStringConfig(string) { - const items = /** @type {StringConfig} */ ({}); - - // Collapse whitespace around `:` and `,` to make parsing easier - const trimmedString = string - .trim() - .replace(/(? { - if (!name) { - return; - } - - // value defaults to null (if not provided), e.g: "foo" => ["foo", null] - const [key, value = null] = name.split(":"); - - items[key] = value; - }); - - return items; - } - - /** - * Parses a JSON-like config. - * @param {string} string The string to parse. - * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object - */ - parseJSONLikeConfig(string) { - // Parses a JSON-like comment by the same way as parsing CLI option. - try { - const items = - /** @type {RulesConfig} */ (levn.parse("Object", string)) || {}; - - /* - * When the configuration has any invalid severities, it should be completely - * ignored. This is because the configuration is not valid and should not be - * applied. - * - * For example, the following configuration is invalid: - * - * "no-alert: 2 no-console: 2" - * - * This results in a configuration of { "no-alert": "2 no-console: 2" }, which is - * not valid. In this case, the configuration should be ignored. - */ - if (isEverySeverityValid(items)) { - return { - ok: true, - config: items, - }; - } - } catch { - // levn parsing error: ignore to parse the string by a fallback. - } - - /* - * Optionator cannot parse commaless notations. - * But we are supporting that. So this is a fallback for that. - */ - const normalizedString = string - .replace(/(? { - const trimmedName = name - .trim() - .replace( - /^(?['"]?)(?.*)\k$/su, - "$", - ); - - if (trimmedName) { - items[trimmedName] = true; - } - }); - - return items; - } - - /** - * Extract the directive and the justification from a given directive comment and trim them. - * @param {string} value The comment text to extract. - * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. - */ - #extractDirectiveComment(value) { - const match = /\s-{2,}\s/u.exec(value); - - if (!match) { - return { directivePart: value.trim(), justificationPart: "" }; - } - - const directive = value.slice(0, match.index).trim(); - const justification = value.slice(match.index + match[0].length).trim(); - - return { directivePart: directive, justificationPart: justification }; - } - - /** - * Parses a directive comment into directive text and value. - * @param {string} string The string with the directive to be parsed. - * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. - */ - parseDirective(string) { - const { directivePart, justificationPart } = - this.#extractDirectiveComment(string); - const match = directivesPattern.exec(directivePart); - - if (!match) { - return undefined; - } - - const directiveText = match[1]; - const directiveValue = directivePart.slice( - match.index + directiveText.length, - ); - - return new DirectiveComment( - directiveText, - directiveValue.trim(), - justificationPart, - ); - } -} - -/** - * @fileoverview A collection of helper classes for implementing `SourceCode`. - * @author Nicholas C. Zakas - */ - -/* eslint class-methods-use-this: off -- Required to complete interface. */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @typedef {$eslintcore.VisitTraversalStep} VisitTraversalStep */ -/** @typedef {$eslintcore.CallTraversalStep} CallTraversalStep */ -/** @typedef {$eslintcore.TraversalStep} TraversalStep */ -/** @typedef {$eslintcore.SourceLocation} SourceLocation */ -/** @typedef {$eslintcore.SourceLocationWithOffset} SourceLocationWithOffset */ -/** @typedef {$eslintcore.SourceRange} SourceRange */ -/** @typedef {$eslintcore.Directive} IDirective */ -/** @typedef {$eslintcore.DirectiveType} DirectiveType */ -/** @typedef {$eslintcore.SourceCodeBaseTypeOptions} SourceCodeBaseTypeOptions */ -/** - * @typedef {import("@eslint/core").TextSourceCode} TextSourceCode - * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] - */ -/** @typedef {$eslintcore.RuleVisitor} RuleVisitor */ -/** - * @typedef {import("./types.ts").CustomRuleVisitorWithExit} CustomRuleVisitorWithExit - * @template {RuleVisitor} RuleVisitorType - */ -/** @typedef {$typests.CustomRuleTypeDefinitions} CustomRuleTypeDefinitions */ -/** - * @typedef {import("./types.ts").CustomRuleDefinitionType} CustomRuleDefinitionType - * @template {Omit} LanguageSpecificOptions - * @template {Partial} Options - */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Determines if a node has ESTree-style loc information. - * @param {object} node The node to check. - * @returns {node is {loc:SourceLocation}} `true` if the node has ESTree-style loc information, `false` if not. - */ -function hasESTreeStyleLoc(node) { - return "loc" in node; -} - -/** - * Determines if a node has position-style loc information. - * @param {object} node The node to check. - * @returns {node is {position:SourceLocation}} `true` if the node has position-style range information, `false` if not. - */ -function hasPosStyleLoc(node) { - return "position" in node; -} - -/** - * Determines if a node has ESTree-style range information. - * @param {object} node The node to check. - * @returns {node is {range:SourceRange}} `true` if the node has ESTree-style range information, `false` if not. - */ -function hasESTreeStyleRange(node) { - return "range" in node; -} - -/** - * Determines if a node has position-style range information. - * @param {object} node The node to check. - * @returns {node is {position:SourceLocationWithOffset}} `true` if the node has position-style range information, `false` if not. - */ -function hasPosStyleRange(node) { - return "position" in node; -} - -/** - * Performs binary search to find the line number containing a given target index. - * Returns the lower bound - the index of the first element greater than the target. - * **Please note that the `lineStartIndices` should be sorted in ascending order**. - * - Time Complexity: O(log n) - Significantly faster than linear search for large files. - * @param {number[]} lineStartIndices Sorted array of line start indices. - * @param {number} targetIndex The target index to find the line number for. - * @returns {number} The line number for the target index. - */ -function findLineNumberBinarySearch(lineStartIndices, targetIndex) { - let low = 0; - let high = lineStartIndices.length - 1; - - while (low < high) { - const mid = ((low + high) / 2) | 0; // Use bitwise OR to floor the division. - - if (targetIndex < lineStartIndices[mid]) { - high = mid; - } else { - low = mid + 1; - } - } - - return low; -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class to represent a step in the traversal process where a node is visited. - * @implements {VisitTraversalStep} - */ -class VisitNodeStep { - /** - * The type of the step. - * @type {"visit"} - * @readonly - */ - type = "visit"; - - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {1} - * @readonly - */ - kind = 1; - - /** - * The target of the step. - * @type {object} - */ - target; - - /** - * The phase of the step. - * @type {1|2} - */ - phase; - - /** - * The arguments of the step. - * @type {Array} - */ - args; - - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {object} options.target The target of the step. - * @param {1|2} options.phase The phase of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, phase, args }) { - this.target = target; - this.phase = phase; - this.args = args; - } -} - -/** - * A class to represent a step in the traversal process where a - * method is called. - * @implements {CallTraversalStep} - */ -class CallMethodStep { - /** - * The type of the step. - * @type {"call"} - * @readonly - */ - type = "call"; - - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {2} - * @readonly - */ - kind = 2; - - /** - * The name of the method to call. - * @type {string} - */ - target; - - /** - * The arguments to pass to the method. - * @type {Array} - */ - args; - - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {string} options.target The target of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, args }) { - this.target = target; - this.args = args; - } -} - -/** - * A class to represent a directive comment. - * @implements {IDirective} - */ -class Directive { - /** - * The type of directive. - * @type {DirectiveType} - * @readonly - */ - type; - - /** - * The node representing the directive. - * @type {unknown} - * @readonly - */ - node; - - /** - * Everything after the "eslint-disable" portion of the directive, - * but before the "--" that indicates the justification. - * @type {string} - * @readonly - */ - value; - - /** - * The justification for the directive. - * @type {string} - * @readonly - */ - justification; - - /** - * Creates a new instance. - * @param {Object} options The options for the directive. - * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. - * @param {unknown} options.node The node representing the directive. - * @param {string} options.value The value of the directive. - * @param {string} options.justification The justification for the directive. - */ - constructor({ type, node, value, justification }) { - this.type = type; - this.node = node; - this.value = value; - this.justification = justification; - } -} - -/** - * Source Code Base Object - * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}] - * @implements {TextSourceCode} - */ -class TextSourceCodeBase { - /** - * The lines of text in the source code. - * @type {Array} - */ - #lines = []; - - /** - * The indices of the start of each line in the source code. - * @type {Array} - */ - #lineStartIndices = [0]; - - /** - * The pattern to match lineEndings in the source code. - * @type {RegExp} - */ - #lineEndingPattern; - - /** - * The AST of the source code. - * @type {Options['RootNode']} - */ - ast; - - /** - * The text of the source code. - * @type {string} - */ - text; - - /** - * Creates a new instance. - * @param {Object} options The options for the instance. - * @param {string} options.text The source code text. - * @param {Options['RootNode']} options.ast The root AST node. - * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`. - */ - constructor({ text, ast, lineEndingPattern = /\r?\n/u }) { - this.ast = ast; - this.text = text; - // Remove the global(`g`) and sticky(`y`) flags from the `lineEndingPattern` to avoid issues with lastIndex. - this.#lineEndingPattern = new RegExp( - lineEndingPattern.source, - lineEndingPattern.flags.replace(/[gy]/gu, ""), - ); - } - - /** - * Finds the next line in the source text and updates `#lines` and `#lineStartIndices`. - * @param {string} text The text to search for the next line. - * @returns {boolean} `true` if a next line was found, `false` otherwise. - */ - #findNextLine(text) { - const match = this.#lineEndingPattern.exec(text); - - if (!match) { - return false; - } - - this.#lines.push(text.slice(0, match.index)); - this.#lineStartIndices.push( - (this.#lineStartIndices.at(-1) ?? 0) + - match.index + - match[0].length, - ); - - return true; - } - - /** - * Ensures `#lines` is lazily calculated from the source text. - * @returns {void} - */ - #ensureLines() { - // If `#lines` has already been calculated, do nothing. - if (this.#lines.length === this.#lineStartIndices.length) { - return; - } - - while ( - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found. - } - - this.#lines.push(this.text.slice(this.#lineStartIndices.at(-1))); - - Object.freeze(this.#lines); - } - - /** - * Ensures `#lineStartIndices` is lazily calculated up to the specified index. - * @param {number} index The index of a character in a file. - * @returns {void} - */ - #ensureLineStartIndicesFromIndex(index) { - // If we've already parsed up to or beyond this index, do nothing. - if (index <= (this.#lineStartIndices.at(-1) ?? 0)) { - return; - } - - while ( - index > (this.#lineStartIndices.at(-1) ?? 0) && - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found. - } - } - - /** - * Ensures `#lineStartIndices` is lazily calculated up to the specified loc. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} lineStart The line number at which the parser starts counting. - * @returns {void} - */ - #ensureLineStartIndicesFromLoc(loc, lineStart) { - // Calculate line indices up to the potentially next line, as it is needed for the follow‑up calculation. - const nextLocLineIndex = loc.line - lineStart + 1; - const lastCalculatedLineIndex = this.#lineStartIndices.length - 1; - let additionalLinesNeeded = nextLocLineIndex - lastCalculatedLineIndex; - - // If we've already parsed up to or beyond this line, do nothing. - if (additionalLinesNeeded <= 0) { - return; - } - - while ( - additionalLinesNeeded > 0 && - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found or we have enough lines. - additionalLinesNeeded -= 1; - } - } - - /** - * Returns the loc information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. - * @returns {SourceLocation} The loc information for the node or token. - * @throws {Error} If the node or token does not have loc information. - */ - getLoc(nodeOrToken) { - if (hasESTreeStyleLoc(nodeOrToken)) { - return nodeOrToken.loc; - } - - if (hasPosStyleLoc(nodeOrToken)) { - return nodeOrToken.position; - } - - throw new Error( - "Custom getLoc() method must be implemented in the subclass.", - ); - } - - /** - * Converts a source text index into a `{ line: number, column: number }` pair. - * @param {number} index The index of a character in a file. - * @throws {TypeError|RangeError} If non-numeric index or index out of range. - * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language. - * @public - */ - getLocFromIndex(index) { - if (typeof index !== "number") { - throw new TypeError("Expected `index` to be a number."); - } - - if (index < 0 || index > this.text.length) { - throw new RangeError( - `Index out of range (requested index ${index}, but source text has length ${this.text.length}).`, - ); - } - - const { - start: { line: lineStart, column: columnStart }, - end: { line: lineEnd, column: columnEnd }, - } = this.getLoc(this.ast); - - // If the index is at the start, return the start location of the root node. - if (index === 0) { - return { - line: lineStart, - column: columnStart, - }; - } - - // If the index is `this.text.length`, return the location one "spot" past the last character of the file. - if (index === this.text.length) { - return { - line: lineEnd, - column: columnEnd, - }; - } - - // Ensure `#lineStartIndices` are lazily calculated. - this.#ensureLineStartIndicesFromIndex(index); - - /* - * To figure out which line `index` is on, determine the last place at which index could - * be inserted into `#lineStartIndices` to keep the list sorted. - */ - const lineNumber = - (index >= (this.#lineStartIndices.at(-1) ?? 0) - ? this.#lineStartIndices.length - : findLineNumberBinarySearch(this.#lineStartIndices, index)) - - 1 + - lineStart; - - return { - line: lineNumber, - column: - index - - this.#lineStartIndices[lineNumber - lineStart] + - columnStart, - }; - } - - /** - * Converts a `{ line: number, column: number }` pair into a source text index. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.) - * @throws {TypeError|RangeError} If `loc` is not an object with a numeric - * `line` and `column`, if the `line` is less than or equal to zero or - * the `line` or `column` is out of the expected range. - * @returns {number} The index of the line/column location in a file. - * @public - */ - getIndexFromLoc(loc) { - if ( - loc === null || - typeof loc !== "object" || - typeof loc.line !== "number" || - typeof loc.column !== "number" - ) { - throw new TypeError( - "Expected `loc` to be an object with numeric `line` and `column` properties.", - ); - } - - const { - start: { line: lineStart, column: columnStart }, - end: { line: lineEnd, column: columnEnd }, - } = this.getLoc(this.ast); - - if (loc.line < lineStart || lineEnd < loc.line) { - throw new RangeError( - `Line number out of range (line ${loc.line} requested). Valid range: ${lineStart}-${lineEnd}`, - ); - } - - // If the loc is at the start, return the start index of the root node. - if (loc.line === lineStart && loc.column === columnStart) { - return 0; - } - - // If the loc is at the end, return the index one "spot" past the last character of the file. - if (loc.line === lineEnd && loc.column === columnEnd) { - return this.text.length; - } - - // Ensure `#lineStartIndices` are lazily calculated. - this.#ensureLineStartIndicesFromLoc(loc, lineStart); - - const isLastLine = loc.line === lineEnd; - const lineStartIndex = this.#lineStartIndices[loc.line - lineStart]; - const lineEndIndex = isLastLine - ? this.text.length - : this.#lineStartIndices[loc.line - lineStart + 1]; - const positionIndex = lineStartIndex + loc.column - columnStart; - - if ( - loc.column < columnStart || - (isLastLine && positionIndex > lineEndIndex) || - (!isLastLine && positionIndex >= lineEndIndex) - ) { - throw new RangeError( - `Column number out of range (column ${loc.column} requested). Valid range for line ${loc.line}: ${columnStart}-${lineEndIndex - lineStartIndex + columnStart + (isLastLine ? 0 : -1)}`, - ); - } - - return positionIndex; - } - - /** - * Returns the range information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. - * @returns {SourceRange} The range information for the node or token. - * @throws {Error} If the node or token does not have range information. - */ - getRange(nodeOrToken) { - if (hasESTreeStyleRange(nodeOrToken)) { - return nodeOrToken.range; - } - - if (hasPosStyleRange(nodeOrToken)) { - return [ - nodeOrToken.position.start.offset, - nodeOrToken.position.end.offset, - ]; - } - - throw new Error( - "Custom getRange() method must be implemented in the subclass.", - ); - } - - /* eslint-disable no-unused-vars -- Required to complete interface. */ - /** - * Returns the parent of the given node. - * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. - * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. - * @throws {Error} If the method is not implemented in the subclass. - */ - getParent(node) { - throw new Error("Not implemented."); - } - /* eslint-enable no-unused-vars -- Required to complete interface. */ - - /** - * Gets all the ancestors of a given node - * @param {Options['SyntaxElementWithLoc']} node The node - * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting - * from the root node at index 0 and going inwards to the parent node. - * @throws {TypeError} When `node` is missing. - */ - getAncestors(node) { - if (!node) { - throw new TypeError("Missing required argument: node."); - } - - const ancestorsStartingAtParent = []; - - for ( - let ancestor = this.getParent(node); - ancestor; - ancestor = this.getParent(ancestor) - ) { - ancestorsStartingAtParent.push(ancestor); - } - - return ancestorsStartingAtParent.reverse(); - } - - /** - * Gets the source code for the given node. - * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. - * @param {number} [beforeCount] The number of characters before the node to retrieve. - * @param {number} [afterCount] The number of characters after the node to retrieve. - * @returns {string} The text representing the AST node. - * @public - */ - getText(node, beforeCount, afterCount) { - if (node) { - const range = this.getRange(node); - return this.text.slice( - Math.max(range[0] - (beforeCount || 0), 0), - range[1] + (afterCount || 0), - ); - } - return this.text; - } - - /** - * Gets the entire source text split into an array of lines. - * @returns {Array} The source text as an array of lines. - * @public - */ - get lines() { - this.#ensureLines(); // Ensure `#lines` is lazily calculated. - - return this.#lines; - } - - /** - * Traverse the source code and return the steps that were taken. - * @returns {Iterable} The steps that were taken while traversing the source code. - */ - traverse() { - throw new Error("Not implemented."); - } -} - -exports.CallMethodStep = CallMethodStep; -exports.ConfigCommentParser = ConfigCommentParser; -exports.Directive = Directive; -exports.TextSourceCodeBase = TextSourceCodeBase; -exports.VisitNodeStep = VisitNodeStep; diff --git a/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts b/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts deleted file mode 100644 index fbaf42e..0000000 --- a/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts +++ /dev/null @@ -1,329 +0,0 @@ -export type VisitTraversalStep = $eslintcore.VisitTraversalStep; -export type CallTraversalStep = $eslintcore.CallTraversalStep; -export type TraversalStep = $eslintcore.TraversalStep; -export type SourceLocation = $eslintcore.SourceLocation; -export type SourceLocationWithOffset = $eslintcore.SourceLocationWithOffset; -export type SourceRange = $eslintcore.SourceRange; -export type IDirective = $eslintcore.Directive; -export type DirectiveType = $eslintcore.DirectiveType; -export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions; -export type TextSourceCode = import("@eslint/core").TextSourceCode; -export type RuleVisitor = $eslintcore.RuleVisitor; -export type CustomRuleVisitorWithExit = import("./types.cts").CustomRuleVisitorWithExit; -export type CustomRuleTypeDefinitions = $typests.CustomRuleTypeDefinitions; -export type CustomRuleDefinitionType, Options extends Partial> = import("./types.cts").CustomRuleDefinitionType; -export type RuleConfig = $eslintcore.RuleConfig; -export type RulesConfig = $eslintcore.RulesConfig; -export type StringConfig = $typests.StringConfig; -export type BooleanConfig = $typests.BooleanConfig; -/** - * A class to represent a step in the traversal process where a - * method is called. - * @implements {CallTraversalStep} - */ -export class CallMethodStep implements CallTraversalStep { - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {string} options.target The target of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, args }: { - target: string; - args: Array; - }); - /** - * The type of the step. - * @type {"call"} - * @readonly - */ - readonly type: "call"; - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {2} - * @readonly - */ - readonly kind: 2; - /** - * The name of the method to call. - * @type {string} - */ - target: string; - /** - * The arguments to pass to the method. - * @type {Array} - */ - args: Array; -} -/** - * Object to parse ESLint configuration comments. - */ -export class ConfigCommentParser { - /** - * Parses a list of "name:string_value" or/and "name" options divided by comma or - * whitespace. Used for "global" comments. - * @param {string} string The string to parse. - * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. - */ - parseStringConfig(string: string): StringConfig; - /** - * Parses a JSON-like config. - * @param {string} string The string to parse. - * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object - */ - parseJSONLikeConfig(string: string): ({ - ok: true; - config: RulesConfig; - } | { - ok: false; - error: { - message: string; - }; - }); - /** - * Parses a config of values separated by comma. - * @param {string} string The string to parse. - * @returns {BooleanConfig} Result map of values and true values - */ - parseListConfig(string: string): BooleanConfig; - /** - * Parses a directive comment into directive text and value. - * @param {string} string The string with the directive to be parsed. - * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. - */ - parseDirective(string: string): DirectiveComment | undefined; - #private; -} -/** - * A class to represent a directive comment. - * @implements {IDirective} - */ -export class Directive implements IDirective { - /** - * Creates a new instance. - * @param {Object} options The options for the directive. - * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. - * @param {unknown} options.node The node representing the directive. - * @param {string} options.value The value of the directive. - * @param {string} options.justification The justification for the directive. - */ - constructor({ type, node, value, justification }: { - type: "disable" | "enable" | "disable-next-line" | "disable-line"; - node: unknown; - value: string; - justification: string; - }); - /** - * The type of directive. - * @type {DirectiveType} - * @readonly - */ - readonly type: DirectiveType; - /** - * The node representing the directive. - * @type {unknown} - * @readonly - */ - readonly node: unknown; - /** - * Everything after the "eslint-disable" portion of the directive, - * but before the "--" that indicates the justification. - * @type {string} - * @readonly - */ - readonly value: string; - /** - * The justification for the directive. - * @type {string} - * @readonly - */ - readonly justification: string; -} -/** - * Source Code Base Object - * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}] - * @implements {TextSourceCode} - */ -export class TextSourceCodeBase implements TextSourceCode { - /** - * Creates a new instance. - * @param {Object} options The options for the instance. - * @param {string} options.text The source code text. - * @param {Options['RootNode']} options.ast The root AST node. - * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`. - */ - constructor({ text, ast, lineEndingPattern }: { - text: string; - ast: Options["RootNode"]; - lineEndingPattern?: RegExp; - }); - /** - * The AST of the source code. - * @type {Options['RootNode']} - */ - ast: Options["RootNode"]; - /** - * The text of the source code. - * @type {string} - */ - text: string; - /** - * Returns the loc information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. - * @returns {SourceLocation} The loc information for the node or token. - * @throws {Error} If the node or token does not have loc information. - */ - getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation; - /** - * Converts a source text index into a `{ line: number, column: number }` pair. - * @param {number} index The index of a character in a file. - * @throws {TypeError|RangeError} If non-numeric index or index out of range. - * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language. - * @public - */ - public getLocFromIndex(index: number): { - line: number; - column: number; - }; - /** - * Converts a `{ line: number, column: number }` pair into a source text index. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.) - * @throws {TypeError|RangeError} If `loc` is not an object with a numeric - * `line` and `column`, if the `line` is less than or equal to zero or - * the `line` or `column` is out of the expected range. - * @returns {number} The index of the line/column location in a file. - * @public - */ - public getIndexFromLoc(loc: { - line: number; - column: number; - }): number; - /** - * Returns the range information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. - * @returns {SourceRange} The range information for the node or token. - * @throws {Error} If the node or token does not have range information. - */ - getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange; - /** - * Returns the parent of the given node. - * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. - * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. - * @throws {Error} If the method is not implemented in the subclass. - */ - getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined; - /** - * Gets all the ancestors of a given node - * @param {Options['SyntaxElementWithLoc']} node The node - * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting - * from the root node at index 0 and going inwards to the parent node. - * @throws {TypeError} When `node` is missing. - */ - getAncestors(node: Options["SyntaxElementWithLoc"]): Array; - /** - * Gets the source code for the given node. - * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. - * @param {number} [beforeCount] The number of characters before the node to retrieve. - * @param {number} [afterCount] The number of characters after the node to retrieve. - * @returns {string} The text representing the AST node. - * @public - */ - public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string; - /** - * Gets the entire source text split into an array of lines. - * @returns {Array} The source text as an array of lines. - * @public - */ - public get lines(): Array; - /** - * Traverse the source code and return the steps that were taken. - * @returns {Iterable} The steps that were taken while traversing the source code. - */ - traverse(): Iterable; - #private; -} -/** - * A class to represent a step in the traversal process where a node is visited. - * @implements {VisitTraversalStep} - */ -export class VisitNodeStep implements VisitTraversalStep { - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {object} options.target The target of the step. - * @param {1|2} options.phase The phase of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, phase, args }: { - target: object; - phase: 1 | 2; - args: Array; - }); - /** - * The type of the step. - * @type {"visit"} - * @readonly - */ - readonly type: "visit"; - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {1} - * @readonly - */ - readonly kind: 1; - /** - * The target of the step. - * @type {object} - */ - target: object; - /** - * The phase of the step. - * @type {1|2} - */ - phase: 1 | 2; - /** - * The arguments of the step. - * @type {Array} - */ - args: Array; -} -import type * as $eslintcore from "@eslint/core"; -import type * as $typests from "./types.cts"; -/** - * Represents a directive comment. - */ -declare class DirectiveComment { - /** - * Creates a new directive comment. - * @param {string} label The label of the directive. - * @param {string} value The value of the directive. - * @param {string} justification The justification of the directive. - */ - constructor(label: string, value: string, justification: string); - /** - * The label of the directive, such as "eslint", "eslint-disable", etc. - * @type {string} - */ - label: string; - /** - * The value of the directive (the string after the label). - * @type {string} - */ - value: string; - /** - * The justification of the directive (the string after the --). - * @type {string} - */ - justification: string; -} -export {}; diff --git a/node_modules/@eslint/plugin-kit/dist/cjs/types.cts b/node_modules/@eslint/plugin-kit/dist/cjs/types.cts deleted file mode 100644 index 19a5c67..0000000 --- a/node_modules/@eslint/plugin-kit/dist/cjs/types.cts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @fileoverview Types for the plugin-kit package. - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Imports -//------------------------------------------------------------------------------ - -import type { - RuleDefinition, - RuleDefinitionTypeOptions, - RuleVisitor, -} from "@eslint/core"; - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * Defaults for non-language-related `RuleDefinition` options. - */ -export interface CustomRuleTypeDefinitions { - RuleOptions: unknown[]; - MessageIds: string; - ExtRuleDocs: Record; -} - -/** - * A helper type to define language specific specializations of the `RuleDefinition` type. - * - * @example - * ```ts - * type YourRuleDefinition< - * Options extends Partial = {}, - * > = CustomRuleDefinitionType< - * { - * LangOptions: YourLanguageOptions; - * Code: YourSourceCode; - * Visitor: YourRuleVisitor; - * Node: YourNode; - * }, - * Options - * >; - * ``` - */ -export type CustomRuleDefinitionType< - LanguageSpecificOptions extends Omit< - RuleDefinitionTypeOptions, - keyof CustomRuleTypeDefinitions - >, - Options extends Partial, -> = RuleDefinition< - // Language specific type options (non-configurable) - LanguageSpecificOptions & - Required< - // Rule specific type options (custom) - Options & - // Rule specific type options (defaults) - Omit - > ->; - -/** - * Adds matching `:exit` selector properties for each key of a `RuleVisitor`. - */ -export type CustomRuleVisitorWithExit = { - [Key in keyof RuleVisitorType as - | Key - | `${Key & string}:exit`]: RuleVisitorType[Key]; -}; - -/** - * A map of names to string values, or `null` when no value is provided. - */ -export type StringConfig = Record; - -/** - * A map of names to boolean flags. - */ -export type BooleanConfig = Record; diff --git a/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts b/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts deleted file mode 100644 index 6ade6e0..0000000 --- a/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts +++ /dev/null @@ -1,329 +0,0 @@ -export type VisitTraversalStep = $eslintcore.VisitTraversalStep; -export type CallTraversalStep = $eslintcore.CallTraversalStep; -export type TraversalStep = $eslintcore.TraversalStep; -export type SourceLocation = $eslintcore.SourceLocation; -export type SourceLocationWithOffset = $eslintcore.SourceLocationWithOffset; -export type SourceRange = $eslintcore.SourceRange; -export type IDirective = $eslintcore.Directive; -export type DirectiveType = $eslintcore.DirectiveType; -export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions; -export type TextSourceCode = import("@eslint/core").TextSourceCode; -export type RuleVisitor = $eslintcore.RuleVisitor; -export type CustomRuleVisitorWithExit = import("./types.ts").CustomRuleVisitorWithExit; -export type CustomRuleTypeDefinitions = $typests.CustomRuleTypeDefinitions; -export type CustomRuleDefinitionType, Options extends Partial> = import("./types.ts").CustomRuleDefinitionType; -export type RuleConfig = $eslintcore.RuleConfig; -export type RulesConfig = $eslintcore.RulesConfig; -export type StringConfig = $typests.StringConfig; -export type BooleanConfig = $typests.BooleanConfig; -/** - * A class to represent a step in the traversal process where a - * method is called. - * @implements {CallTraversalStep} - */ -export class CallMethodStep implements CallTraversalStep { - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {string} options.target The target of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, args }: { - target: string; - args: Array; - }); - /** - * The type of the step. - * @type {"call"} - * @readonly - */ - readonly type: "call"; - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {2} - * @readonly - */ - readonly kind: 2; - /** - * The name of the method to call. - * @type {string} - */ - target: string; - /** - * The arguments to pass to the method. - * @type {Array} - */ - args: Array; -} -/** - * Object to parse ESLint configuration comments. - */ -export class ConfigCommentParser { - /** - * Parses a list of "name:string_value" or/and "name" options divided by comma or - * whitespace. Used for "global" comments. - * @param {string} string The string to parse. - * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. - */ - parseStringConfig(string: string): StringConfig; - /** - * Parses a JSON-like config. - * @param {string} string The string to parse. - * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object - */ - parseJSONLikeConfig(string: string): ({ - ok: true; - config: RulesConfig; - } | { - ok: false; - error: { - message: string; - }; - }); - /** - * Parses a config of values separated by comma. - * @param {string} string The string to parse. - * @returns {BooleanConfig} Result map of values and true values - */ - parseListConfig(string: string): BooleanConfig; - /** - * Parses a directive comment into directive text and value. - * @param {string} string The string with the directive to be parsed. - * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. - */ - parseDirective(string: string): DirectiveComment | undefined; - #private; -} -/** - * A class to represent a directive comment. - * @implements {IDirective} - */ -export class Directive implements IDirective { - /** - * Creates a new instance. - * @param {Object} options The options for the directive. - * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. - * @param {unknown} options.node The node representing the directive. - * @param {string} options.value The value of the directive. - * @param {string} options.justification The justification for the directive. - */ - constructor({ type, node, value, justification }: { - type: "disable" | "enable" | "disable-next-line" | "disable-line"; - node: unknown; - value: string; - justification: string; - }); - /** - * The type of directive. - * @type {DirectiveType} - * @readonly - */ - readonly type: DirectiveType; - /** - * The node representing the directive. - * @type {unknown} - * @readonly - */ - readonly node: unknown; - /** - * Everything after the "eslint-disable" portion of the directive, - * but before the "--" that indicates the justification. - * @type {string} - * @readonly - */ - readonly value: string; - /** - * The justification for the directive. - * @type {string} - * @readonly - */ - readonly justification: string; -} -/** - * Source Code Base Object - * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}] - * @implements {TextSourceCode} - */ -export class TextSourceCodeBase implements TextSourceCode { - /** - * Creates a new instance. - * @param {Object} options The options for the instance. - * @param {string} options.text The source code text. - * @param {Options['RootNode']} options.ast The root AST node. - * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`. - */ - constructor({ text, ast, lineEndingPattern }: { - text: string; - ast: Options["RootNode"]; - lineEndingPattern?: RegExp; - }); - /** - * The AST of the source code. - * @type {Options['RootNode']} - */ - ast: Options["RootNode"]; - /** - * The text of the source code. - * @type {string} - */ - text: string; - /** - * Returns the loc information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. - * @returns {SourceLocation} The loc information for the node or token. - * @throws {Error} If the node or token does not have loc information. - */ - getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation; - /** - * Converts a source text index into a `{ line: number, column: number }` pair. - * @param {number} index The index of a character in a file. - * @throws {TypeError|RangeError} If non-numeric index or index out of range. - * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language. - * @public - */ - public getLocFromIndex(index: number): { - line: number; - column: number; - }; - /** - * Converts a `{ line: number, column: number }` pair into a source text index. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.) - * @throws {TypeError|RangeError} If `loc` is not an object with a numeric - * `line` and `column`, if the `line` is less than or equal to zero or - * the `line` or `column` is out of the expected range. - * @returns {number} The index of the line/column location in a file. - * @public - */ - public getIndexFromLoc(loc: { - line: number; - column: number; - }): number; - /** - * Returns the range information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. - * @returns {SourceRange} The range information for the node or token. - * @throws {Error} If the node or token does not have range information. - */ - getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange; - /** - * Returns the parent of the given node. - * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. - * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. - * @throws {Error} If the method is not implemented in the subclass. - */ - getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined; - /** - * Gets all the ancestors of a given node - * @param {Options['SyntaxElementWithLoc']} node The node - * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting - * from the root node at index 0 and going inwards to the parent node. - * @throws {TypeError} When `node` is missing. - */ - getAncestors(node: Options["SyntaxElementWithLoc"]): Array; - /** - * Gets the source code for the given node. - * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. - * @param {number} [beforeCount] The number of characters before the node to retrieve. - * @param {number} [afterCount] The number of characters after the node to retrieve. - * @returns {string} The text representing the AST node. - * @public - */ - public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string; - /** - * Gets the entire source text split into an array of lines. - * @returns {Array} The source text as an array of lines. - * @public - */ - public get lines(): Array; - /** - * Traverse the source code and return the steps that were taken. - * @returns {Iterable} The steps that were taken while traversing the source code. - */ - traverse(): Iterable; - #private; -} -/** - * A class to represent a step in the traversal process where a node is visited. - * @implements {VisitTraversalStep} - */ -export class VisitNodeStep implements VisitTraversalStep { - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {object} options.target The target of the step. - * @param {1|2} options.phase The phase of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, phase, args }: { - target: object; - phase: 1 | 2; - args: Array; - }); - /** - * The type of the step. - * @type {"visit"} - * @readonly - */ - readonly type: "visit"; - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {1} - * @readonly - */ - readonly kind: 1; - /** - * The target of the step. - * @type {object} - */ - target: object; - /** - * The phase of the step. - * @type {1|2} - */ - phase: 1 | 2; - /** - * The arguments of the step. - * @type {Array} - */ - args: Array; -} -import type * as $eslintcore from "@eslint/core"; -import type * as $typests from "./types.ts"; -/** - * Represents a directive comment. - */ -declare class DirectiveComment { - /** - * Creates a new directive comment. - * @param {string} label The label of the directive. - * @param {string} value The value of the directive. - * @param {string} justification The justification of the directive. - */ - constructor(label: string, value: string, justification: string); - /** - * The label of the directive, such as "eslint", "eslint-disable", etc. - * @type {string} - */ - label: string; - /** - * The value of the directive (the string after the label). - * @type {string} - */ - value: string; - /** - * The justification of the directive (the string after the --). - * @type {string} - */ - justification: string; -} -export {}; diff --git a/node_modules/@eslint/plugin-kit/dist/esm/index.js b/node_modules/@eslint/plugin-kit/dist/esm/index.js deleted file mode 100644 index e2ba99d..0000000 --- a/node_modules/@eslint/plugin-kit/dist/esm/index.js +++ /dev/null @@ -1,890 +0,0 @@ -// @ts-self-types="./index.d.ts" -import levn from 'levn'; - -/** - * @fileoverview Config Comment Parser - * @author Nicholas C. Zakas - */ - - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @import * as $eslintcore from "@eslint/core"; */ -/** @typedef {$eslintcore.RuleConfig} RuleConfig */ -/** @typedef {$eslintcore.RulesConfig} RulesConfig */ -/** @import * as $typests from "./types.ts"; */ -/** @typedef {$typests.StringConfig} StringConfig */ -/** @typedef {$typests.BooleanConfig} BooleanConfig */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const directivesPattern = /^([a-z]+(?:-[a-z]+)*)(?:\s|$)/u; -const validSeverities = new Set([0, 1, 2, "off", "warn", "error"]); - -/** - * Determines if the severity in the rule configuration is valid. - * @param {RuleConfig} ruleConfig A rule's configuration. - * @returns {boolean} `true` if the severity is valid, otherwise `false`. - */ -function isSeverityValid(ruleConfig) { - const severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; - return validSeverities.has(severity); -} - -/** - * Determines if all severities in the rules configuration are valid. - * @param {RulesConfig} rulesConfig The rules configuration to check. - * @returns {boolean} `true` if all severities are valid, otherwise `false`. - */ -function isEverySeverityValid(rulesConfig) { - return Object.values(rulesConfig).every(isSeverityValid); -} - -/** - * Represents a directive comment. - */ -class DirectiveComment { - /** - * The label of the directive, such as "eslint", "eslint-disable", etc. - * @type {string} - */ - label = ""; - - /** - * The value of the directive (the string after the label). - * @type {string} - */ - value = ""; - - /** - * The justification of the directive (the string after the --). - * @type {string} - */ - justification = ""; - - /** - * Creates a new directive comment. - * @param {string} label The label of the directive. - * @param {string} value The value of the directive. - * @param {string} justification The justification of the directive. - */ - constructor(label, value, justification) { - this.label = label; - this.value = value; - this.justification = justification; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** - * Object to parse ESLint configuration comments. - */ -class ConfigCommentParser { - /** - * Parses a list of "name:string_value" or/and "name" options divided by comma or - * whitespace. Used for "global" comments. - * @param {string} string The string to parse. - * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided. - */ - parseStringConfig(string) { - const items = /** @type {StringConfig} */ ({}); - - // Collapse whitespace around `:` and `,` to make parsing easier - const trimmedString = string - .trim() - .replace(/(? { - if (!name) { - return; - } - - // value defaults to null (if not provided), e.g: "foo" => ["foo", null] - const [key, value = null] = name.split(":"); - - items[key] = value; - }); - - return items; - } - - /** - * Parses a JSON-like config. - * @param {string} string The string to parse. - * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object - */ - parseJSONLikeConfig(string) { - // Parses a JSON-like comment by the same way as parsing CLI option. - try { - const items = - /** @type {RulesConfig} */ (levn.parse("Object", string)) || {}; - - /* - * When the configuration has any invalid severities, it should be completely - * ignored. This is because the configuration is not valid and should not be - * applied. - * - * For example, the following configuration is invalid: - * - * "no-alert: 2 no-console: 2" - * - * This results in a configuration of { "no-alert": "2 no-console: 2" }, which is - * not valid. In this case, the configuration should be ignored. - */ - if (isEverySeverityValid(items)) { - return { - ok: true, - config: items, - }; - } - } catch { - // levn parsing error: ignore to parse the string by a fallback. - } - - /* - * Optionator cannot parse commaless notations. - * But we are supporting that. So this is a fallback for that. - */ - const normalizedString = string - .replace(/(? { - const trimmedName = name - .trim() - .replace( - /^(?['"]?)(?.*)\k$/su, - "$", - ); - - if (trimmedName) { - items[trimmedName] = true; - } - }); - - return items; - } - - /** - * Extract the directive and the justification from a given directive comment and trim them. - * @param {string} value The comment text to extract. - * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. - */ - #extractDirectiveComment(value) { - const match = /\s-{2,}\s/u.exec(value); - - if (!match) { - return { directivePart: value.trim(), justificationPart: "" }; - } - - const directive = value.slice(0, match.index).trim(); - const justification = value.slice(match.index + match[0].length).trim(); - - return { directivePart: directive, justificationPart: justification }; - } - - /** - * Parses a directive comment into directive text and value. - * @param {string} string The string with the directive to be parsed. - * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid. - */ - parseDirective(string) { - const { directivePart, justificationPart } = - this.#extractDirectiveComment(string); - const match = directivesPattern.exec(directivePart); - - if (!match) { - return undefined; - } - - const directiveText = match[1]; - const directiveValue = directivePart.slice( - match.index + directiveText.length, - ); - - return new DirectiveComment( - directiveText, - directiveValue.trim(), - justificationPart, - ); - } -} - -/** - * @fileoverview A collection of helper classes for implementing `SourceCode`. - * @author Nicholas C. Zakas - */ - -/* eslint class-methods-use-this: off -- Required to complete interface. */ - -//----------------------------------------------------------------------------- -// Type Definitions -//----------------------------------------------------------------------------- - -/** @typedef {$eslintcore.VisitTraversalStep} VisitTraversalStep */ -/** @typedef {$eslintcore.CallTraversalStep} CallTraversalStep */ -/** @typedef {$eslintcore.TraversalStep} TraversalStep */ -/** @typedef {$eslintcore.SourceLocation} SourceLocation */ -/** @typedef {$eslintcore.SourceLocationWithOffset} SourceLocationWithOffset */ -/** @typedef {$eslintcore.SourceRange} SourceRange */ -/** @typedef {$eslintcore.Directive} IDirective */ -/** @typedef {$eslintcore.DirectiveType} DirectiveType */ -/** @typedef {$eslintcore.SourceCodeBaseTypeOptions} SourceCodeBaseTypeOptions */ -/** - * @typedef {import("@eslint/core").TextSourceCode} TextSourceCode - * @template {SourceCodeBaseTypeOptions} [Options=SourceCodeBaseTypeOptions] - */ -/** @typedef {$eslintcore.RuleVisitor} RuleVisitor */ -/** - * @typedef {import("./types.ts").CustomRuleVisitorWithExit} CustomRuleVisitorWithExit - * @template {RuleVisitor} RuleVisitorType - */ -/** @typedef {$typests.CustomRuleTypeDefinitions} CustomRuleTypeDefinitions */ -/** - * @typedef {import("./types.ts").CustomRuleDefinitionType} CustomRuleDefinitionType - * @template {Omit} LanguageSpecificOptions - * @template {Partial} Options - */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Determines if a node has ESTree-style loc information. - * @param {object} node The node to check. - * @returns {node is {loc:SourceLocation}} `true` if the node has ESTree-style loc information, `false` if not. - */ -function hasESTreeStyleLoc(node) { - return "loc" in node; -} - -/** - * Determines if a node has position-style loc information. - * @param {object} node The node to check. - * @returns {node is {position:SourceLocation}} `true` if the node has position-style range information, `false` if not. - */ -function hasPosStyleLoc(node) { - return "position" in node; -} - -/** - * Determines if a node has ESTree-style range information. - * @param {object} node The node to check. - * @returns {node is {range:SourceRange}} `true` if the node has ESTree-style range information, `false` if not. - */ -function hasESTreeStyleRange(node) { - return "range" in node; -} - -/** - * Determines if a node has position-style range information. - * @param {object} node The node to check. - * @returns {node is {position:SourceLocationWithOffset}} `true` if the node has position-style range information, `false` if not. - */ -function hasPosStyleRange(node) { - return "position" in node; -} - -/** - * Performs binary search to find the line number containing a given target index. - * Returns the lower bound - the index of the first element greater than the target. - * **Please note that the `lineStartIndices` should be sorted in ascending order**. - * - Time Complexity: O(log n) - Significantly faster than linear search for large files. - * @param {number[]} lineStartIndices Sorted array of line start indices. - * @param {number} targetIndex The target index to find the line number for. - * @returns {number} The line number for the target index. - */ -function findLineNumberBinarySearch(lineStartIndices, targetIndex) { - let low = 0; - let high = lineStartIndices.length - 1; - - while (low < high) { - const mid = ((low + high) / 2) | 0; // Use bitwise OR to floor the division. - - if (targetIndex < lineStartIndices[mid]) { - high = mid; - } else { - low = mid + 1; - } - } - - return low; -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class to represent a step in the traversal process where a node is visited. - * @implements {VisitTraversalStep} - */ -class VisitNodeStep { - /** - * The type of the step. - * @type {"visit"} - * @readonly - */ - type = "visit"; - - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {1} - * @readonly - */ - kind = 1; - - /** - * The target of the step. - * @type {object} - */ - target; - - /** - * The phase of the step. - * @type {1|2} - */ - phase; - - /** - * The arguments of the step. - * @type {Array} - */ - args; - - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {object} options.target The target of the step. - * @param {1|2} options.phase The phase of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, phase, args }) { - this.target = target; - this.phase = phase; - this.args = args; - } -} - -/** - * A class to represent a step in the traversal process where a - * method is called. - * @implements {CallTraversalStep} - */ -class CallMethodStep { - /** - * The type of the step. - * @type {"call"} - * @readonly - */ - type = "call"; - - /** - * The kind of the step. Represents the same data as the `type` property - * but it's a number for performance. - * @type {2} - * @readonly - */ - kind = 2; - - /** - * The name of the method to call. - * @type {string} - */ - target; - - /** - * The arguments to pass to the method. - * @type {Array} - */ - args; - - /** - * Creates a new instance. - * @param {Object} options The options for the step. - * @param {string} options.target The target of the step. - * @param {Array} options.args The arguments of the step. - */ - constructor({ target, args }) { - this.target = target; - this.args = args; - } -} - -/** - * A class to represent a directive comment. - * @implements {IDirective} - */ -class Directive { - /** - * The type of directive. - * @type {DirectiveType} - * @readonly - */ - type; - - /** - * The node representing the directive. - * @type {unknown} - * @readonly - */ - node; - - /** - * Everything after the "eslint-disable" portion of the directive, - * but before the "--" that indicates the justification. - * @type {string} - * @readonly - */ - value; - - /** - * The justification for the directive. - * @type {string} - * @readonly - */ - justification; - - /** - * Creates a new instance. - * @param {Object} options The options for the directive. - * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive. - * @param {unknown} options.node The node representing the directive. - * @param {string} options.value The value of the directive. - * @param {string} options.justification The justification for the directive. - */ - constructor({ type, node, value, justification }) { - this.type = type; - this.node = node; - this.value = value; - this.justification = justification; - } -} - -/** - * Source Code Base Object - * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}] - * @implements {TextSourceCode} - */ -class TextSourceCodeBase { - /** - * The lines of text in the source code. - * @type {Array} - */ - #lines = []; - - /** - * The indices of the start of each line in the source code. - * @type {Array} - */ - #lineStartIndices = [0]; - - /** - * The pattern to match lineEndings in the source code. - * @type {RegExp} - */ - #lineEndingPattern; - - /** - * The AST of the source code. - * @type {Options['RootNode']} - */ - ast; - - /** - * The text of the source code. - * @type {string} - */ - text; - - /** - * Creates a new instance. - * @param {Object} options The options for the instance. - * @param {string} options.text The source code text. - * @param {Options['RootNode']} options.ast The root AST node. - * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`. - */ - constructor({ text, ast, lineEndingPattern = /\r?\n/u }) { - this.ast = ast; - this.text = text; - // Remove the global(`g`) and sticky(`y`) flags from the `lineEndingPattern` to avoid issues with lastIndex. - this.#lineEndingPattern = new RegExp( - lineEndingPattern.source, - lineEndingPattern.flags.replace(/[gy]/gu, ""), - ); - } - - /** - * Finds the next line in the source text and updates `#lines` and `#lineStartIndices`. - * @param {string} text The text to search for the next line. - * @returns {boolean} `true` if a next line was found, `false` otherwise. - */ - #findNextLine(text) { - const match = this.#lineEndingPattern.exec(text); - - if (!match) { - return false; - } - - this.#lines.push(text.slice(0, match.index)); - this.#lineStartIndices.push( - (this.#lineStartIndices.at(-1) ?? 0) + - match.index + - match[0].length, - ); - - return true; - } - - /** - * Ensures `#lines` is lazily calculated from the source text. - * @returns {void} - */ - #ensureLines() { - // If `#lines` has already been calculated, do nothing. - if (this.#lines.length === this.#lineStartIndices.length) { - return; - } - - while ( - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found. - } - - this.#lines.push(this.text.slice(this.#lineStartIndices.at(-1))); - - Object.freeze(this.#lines); - } - - /** - * Ensures `#lineStartIndices` is lazily calculated up to the specified index. - * @param {number} index The index of a character in a file. - * @returns {void} - */ - #ensureLineStartIndicesFromIndex(index) { - // If we've already parsed up to or beyond this index, do nothing. - if (index <= (this.#lineStartIndices.at(-1) ?? 0)) { - return; - } - - while ( - index > (this.#lineStartIndices.at(-1) ?? 0) && - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found. - } - } - - /** - * Ensures `#lineStartIndices` is lazily calculated up to the specified loc. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} lineStart The line number at which the parser starts counting. - * @returns {void} - */ - #ensureLineStartIndicesFromLoc(loc, lineStart) { - // Calculate line indices up to the potentially next line, as it is needed for the follow‑up calculation. - const nextLocLineIndex = loc.line - lineStart + 1; - const lastCalculatedLineIndex = this.#lineStartIndices.length - 1; - let additionalLinesNeeded = nextLocLineIndex - lastCalculatedLineIndex; - - // If we've already parsed up to or beyond this line, do nothing. - if (additionalLinesNeeded <= 0) { - return; - } - - while ( - additionalLinesNeeded > 0 && - this.#findNextLine(this.text.slice(this.#lineStartIndices.at(-1))) - ) { - // Continue parsing until no more matches are found or we have enough lines. - additionalLinesNeeded -= 1; - } - } - - /** - * Returns the loc information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for. - * @returns {SourceLocation} The loc information for the node or token. - * @throws {Error} If the node or token does not have loc information. - */ - getLoc(nodeOrToken) { - if (hasESTreeStyleLoc(nodeOrToken)) { - return nodeOrToken.loc; - } - - if (hasPosStyleLoc(nodeOrToken)) { - return nodeOrToken.position; - } - - throw new Error( - "Custom getLoc() method must be implemented in the subclass.", - ); - } - - /** - * Converts a source text index into a `{ line: number, column: number }` pair. - * @param {number} index The index of a character in a file. - * @throws {TypeError|RangeError} If non-numeric index or index out of range. - * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language. - * @public - */ - getLocFromIndex(index) { - if (typeof index !== "number") { - throw new TypeError("Expected `index` to be a number."); - } - - if (index < 0 || index > this.text.length) { - throw new RangeError( - `Index out of range (requested index ${index}, but source text has length ${this.text.length}).`, - ); - } - - const { - start: { line: lineStart, column: columnStart }, - end: { line: lineEnd, column: columnEnd }, - } = this.getLoc(this.ast); - - // If the index is at the start, return the start location of the root node. - if (index === 0) { - return { - line: lineStart, - column: columnStart, - }; - } - - // If the index is `this.text.length`, return the location one "spot" past the last character of the file. - if (index === this.text.length) { - return { - line: lineEnd, - column: columnEnd, - }; - } - - // Ensure `#lineStartIndices` are lazily calculated. - this.#ensureLineStartIndicesFromIndex(index); - - /* - * To figure out which line `index` is on, determine the last place at which index could - * be inserted into `#lineStartIndices` to keep the list sorted. - */ - const lineNumber = - (index >= (this.#lineStartIndices.at(-1) ?? 0) - ? this.#lineStartIndices.length - : findLineNumberBinarySearch(this.#lineStartIndices, index)) - - 1 + - lineStart; - - return { - line: lineNumber, - column: - index - - this.#lineStartIndices[lineNumber - lineStart] + - columnStart, - }; - } - - /** - * Converts a `{ line: number, column: number }` pair into a source text index. - * @param {Object} loc A line/column location. - * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.) - * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.) - * @throws {TypeError|RangeError} If `loc` is not an object with a numeric - * `line` and `column`, if the `line` is less than or equal to zero or - * the `line` or `column` is out of the expected range. - * @returns {number} The index of the line/column location in a file. - * @public - */ - getIndexFromLoc(loc) { - if ( - loc === null || - typeof loc !== "object" || - typeof loc.line !== "number" || - typeof loc.column !== "number" - ) { - throw new TypeError( - "Expected `loc` to be an object with numeric `line` and `column` properties.", - ); - } - - const { - start: { line: lineStart, column: columnStart }, - end: { line: lineEnd, column: columnEnd }, - } = this.getLoc(this.ast); - - if (loc.line < lineStart || lineEnd < loc.line) { - throw new RangeError( - `Line number out of range (line ${loc.line} requested). Valid range: ${lineStart}-${lineEnd}`, - ); - } - - // If the loc is at the start, return the start index of the root node. - if (loc.line === lineStart && loc.column === columnStart) { - return 0; - } - - // If the loc is at the end, return the index one "spot" past the last character of the file. - if (loc.line === lineEnd && loc.column === columnEnd) { - return this.text.length; - } - - // Ensure `#lineStartIndices` are lazily calculated. - this.#ensureLineStartIndicesFromLoc(loc, lineStart); - - const isLastLine = loc.line === lineEnd; - const lineStartIndex = this.#lineStartIndices[loc.line - lineStart]; - const lineEndIndex = isLastLine - ? this.text.length - : this.#lineStartIndices[loc.line - lineStart + 1]; - const positionIndex = lineStartIndex + loc.column - columnStart; - - if ( - loc.column < columnStart || - (isLastLine && positionIndex > lineEndIndex) || - (!isLastLine && positionIndex >= lineEndIndex) - ) { - throw new RangeError( - `Column number out of range (column ${loc.column} requested). Valid range for line ${loc.line}: ${columnStart}-${lineEndIndex - lineStartIndex + columnStart + (isLastLine ? 0 : -1)}`, - ); - } - - return positionIndex; - } - - /** - * Returns the range information for the given node or token. - * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for. - * @returns {SourceRange} The range information for the node or token. - * @throws {Error} If the node or token does not have range information. - */ - getRange(nodeOrToken) { - if (hasESTreeStyleRange(nodeOrToken)) { - return nodeOrToken.range; - } - - if (hasPosStyleRange(nodeOrToken)) { - return [ - nodeOrToken.position.start.offset, - nodeOrToken.position.end.offset, - ]; - } - - throw new Error( - "Custom getRange() method must be implemented in the subclass.", - ); - } - - /* eslint-disable no-unused-vars -- Required to complete interface. */ - /** - * Returns the parent of the given node. - * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of. - * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node. - * @throws {Error} If the method is not implemented in the subclass. - */ - getParent(node) { - throw new Error("Not implemented."); - } - /* eslint-enable no-unused-vars -- Required to complete interface. */ - - /** - * Gets all the ancestors of a given node - * @param {Options['SyntaxElementWithLoc']} node The node - * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting - * from the root node at index 0 and going inwards to the parent node. - * @throws {TypeError} When `node` is missing. - */ - getAncestors(node) { - if (!node) { - throw new TypeError("Missing required argument: node."); - } - - const ancestorsStartingAtParent = []; - - for ( - let ancestor = this.getParent(node); - ancestor; - ancestor = this.getParent(ancestor) - ) { - ancestorsStartingAtParent.push(ancestor); - } - - return ancestorsStartingAtParent.reverse(); - } - - /** - * Gets the source code for the given node. - * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for. - * @param {number} [beforeCount] The number of characters before the node to retrieve. - * @param {number} [afterCount] The number of characters after the node to retrieve. - * @returns {string} The text representing the AST node. - * @public - */ - getText(node, beforeCount, afterCount) { - if (node) { - const range = this.getRange(node); - return this.text.slice( - Math.max(range[0] - (beforeCount || 0), 0), - range[1] + (afterCount || 0), - ); - } - return this.text; - } - - /** - * Gets the entire source text split into an array of lines. - * @returns {Array} The source text as an array of lines. - * @public - */ - get lines() { - this.#ensureLines(); // Ensure `#lines` is lazily calculated. - - return this.#lines; - } - - /** - * Traverse the source code and return the steps that were taken. - * @returns {Iterable} The steps that were taken while traversing the source code. - */ - traverse() { - throw new Error("Not implemented."); - } -} - -export { CallMethodStep, ConfigCommentParser, Directive, TextSourceCodeBase, VisitNodeStep }; diff --git a/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts b/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts deleted file mode 100644 index 71c4b47..0000000 --- a/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @fileoverview Types for the plugin-kit package. - * @author Nicholas C. Zakas - */ -import type { RuleDefinition, RuleDefinitionTypeOptions, RuleVisitor } from "@eslint/core"; -/** - * Defaults for non-language-related `RuleDefinition` options. - */ -export interface CustomRuleTypeDefinitions { - RuleOptions: unknown[]; - MessageIds: string; - ExtRuleDocs: Record; -} -/** - * A helper type to define language specific specializations of the `RuleDefinition` type. - * - * @example - * ```ts - * type YourRuleDefinition< - * Options extends Partial = {}, - * > = CustomRuleDefinitionType< - * { - * LangOptions: YourLanguageOptions; - * Code: YourSourceCode; - * Visitor: YourRuleVisitor; - * Node: YourNode; - * }, - * Options - * >; - * ``` - */ -export type CustomRuleDefinitionType, Options extends Partial> = RuleDefinition>>; -/** - * Adds matching `:exit` selector properties for each key of a `RuleVisitor`. - */ -export type CustomRuleVisitorWithExit = { - [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key]; -}; -/** - * A map of names to string values, or `null` when no value is provided. - */ -export type StringConfig = Record; -/** - * A map of names to boolean flags. - */ -export type BooleanConfig = Record; diff --git a/node_modules/@eslint/plugin-kit/dist/esm/types.ts b/node_modules/@eslint/plugin-kit/dist/esm/types.ts deleted file mode 100644 index 19a5c67..0000000 --- a/node_modules/@eslint/plugin-kit/dist/esm/types.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @fileoverview Types for the plugin-kit package. - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// Imports -//------------------------------------------------------------------------------ - -import type { - RuleDefinition, - RuleDefinitionTypeOptions, - RuleVisitor, -} from "@eslint/core"; - -//------------------------------------------------------------------------------ -// Exports -//------------------------------------------------------------------------------ - -/** - * Defaults for non-language-related `RuleDefinition` options. - */ -export interface CustomRuleTypeDefinitions { - RuleOptions: unknown[]; - MessageIds: string; - ExtRuleDocs: Record; -} - -/** - * A helper type to define language specific specializations of the `RuleDefinition` type. - * - * @example - * ```ts - * type YourRuleDefinition< - * Options extends Partial = {}, - * > = CustomRuleDefinitionType< - * { - * LangOptions: YourLanguageOptions; - * Code: YourSourceCode; - * Visitor: YourRuleVisitor; - * Node: YourNode; - * }, - * Options - * >; - * ``` - */ -export type CustomRuleDefinitionType< - LanguageSpecificOptions extends Omit< - RuleDefinitionTypeOptions, - keyof CustomRuleTypeDefinitions - >, - Options extends Partial, -> = RuleDefinition< - // Language specific type options (non-configurable) - LanguageSpecificOptions & - Required< - // Rule specific type options (custom) - Options & - // Rule specific type options (defaults) - Omit - > ->; - -/** - * Adds matching `:exit` selector properties for each key of a `RuleVisitor`. - */ -export type CustomRuleVisitorWithExit = { - [Key in keyof RuleVisitorType as - | Key - | `${Key & string}:exit`]: RuleVisitorType[Key]; -}; - -/** - * A map of names to string values, or `null` when no value is provided. - */ -export type StringConfig = Record; - -/** - * A map of names to boolean flags. - */ -export type BooleanConfig = Record; diff --git a/node_modules/@eslint/plugin-kit/package.json b/node_modules/@eslint/plugin-kit/package.json deleted file mode 100644 index 10ccf5a..0000000 --- a/node_modules/@eslint/plugin-kit/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@eslint/plugin-kit", - "version": "0.7.1", - "description": "Utilities for building ESLint plugins.", - "author": "Nicholas C. Zakas", - "type": "module", - "main": "dist/esm/index.js", - "types": "dist/esm/index.d.ts", - "exports": { - "require": { - "types": "./dist/cjs/index.d.cts", - "default": "./dist/cjs/index.cjs" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - } - }, - "files": [ - "dist" - ], - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/rewrite.git", - "directory": "packages/plugin-kit" - }, - "bugs": { - "url": "https://github.com/eslint/rewrite/issues" - }, - "homepage": "https://github.com/eslint/rewrite/tree/main/packages/plugin-kit#readme", - "scripts": { - "build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js", - "build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts", - "build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts", - "lint:types": "attw --pack", - "pretest": "npm run build", - "test": "npm run test:types && npm run test:unit", - "test:coverage": "npm run build && c8 npm run test:unit", - "test:jsr": "npx -y jsr@latest publish --dry-run", - "test:types": "tsc -p tests/types/tsconfig.json", - "test:unit": "mocha \"tests/**/*.test.js\"" - }, - "keywords": [ - "eslint", - "eslintplugin", - "eslint-plugin" - ], - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "devDependencies": { - "@types/levn": "^0.4.0", - "rollup-plugin-copy": "^3.5.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } -} diff --git a/node_modules/@humanfs/core/LICENSE b/node_modules/@humanfs/core/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@humanfs/core/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@humanfs/core/README.md b/node_modules/@humanfs/core/README.md deleted file mode 100644 index 4f86d14..0000000 --- a/node_modules/@humanfs/core/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# `@humanfs/core` - -by [Nicholas C. Zakas](https://humanwhocodes.com) - -If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. - -## Description - -The core functionality for humanfs that is shared across all implementations for all runtimes. The contents of this package are intentionally runtime agnostic and are not intended to be used alone. - -Currently, this package simply exports the `Hfs` class, which is an abstract base class intended to be inherited from in runtime-specific hfs packages (like `@humanfs/node`). - -> [!WARNING] -> This project is **experimental** and may change significantly before v1.0.0. Use at your own caution and definitely not in production! - -## Installation - -### Node.js - -Install using your favorite package manager for Node.js: - -```shell -npm install @humanfs/core - -# or - -pnpm install @humanfs/core - -# or - -yarn add @humanfs/core - -# or - -bun install @humanfs/core -``` - -Then you can import the `Hfs` and `Path` classes like this: - -```js -import { Hfs, Path } from "@humanfs/core"; -``` - -### Deno - -Install using [JSR](https://jsr.io): - -```shell -deno add @humanfs/core - -# or - -jsr add @humanfs/core -``` - -Then you can import the `Hfs` class like this: - -```js -import { Hfs, Path } from "@humanfs/core"; -``` - -### Browser - -It's recommended to import the minified version to save bandwidth: - -```js -import { Hfs, Path } from "https://cdn.skypack.dev/@humanfs/core?min"; -``` - -However, you can also import the unminified version for debugging purposes: - -```js -import { Hfs, Path } from "https://cdn.skypack.dev/@humanfs/core"; -``` - -## Usage - -### `Hfs` Class - -The `Hfs` class contains all of the basic functionality for an `Hfs` instance *without* a predefined impl. This class is mostly used for creating runtime-specific impls, such as `NodeHfs` and `DenoHfs`. - -You can create your own instance by providing an `impl` directly: - -```js -const hfs = new Hfs({ impl: { async text() {} }}); -``` - -The specified `impl` becomes the base impl for the instance, meaning you can always reset back to it using `resetImpl()`. - -You can also inherit from `Hfs` to create your own class with a preconfigured impl, such as: - -```js -class MyHfs extends Hfs { - constructor() { - super({ - impl: myImpl - }); - } -} -``` - -### `Path` Class - -The `Path` class represents the path to a directory or file within a file system. It's an abstract representation that can be used even outside of traditional file systems where string paths might not make sense. - -```js -const myPath = new Path(["dir", "subdir"]); -console.log(myPath.toString()); // "dir/subdir" - -// add another step -myPath.push("file.txt"); -console.log(myPath.toString()); // "dir/subdir/file.txt" - -// get just the last step -console.log(myPath.name); // "file.txt" - -// change just the last step -myPath.name = "file.json"; -console.log(myPath.name); // "file.json" -console.log(myPath.toString()); // "dir/subdir/file.json" - -// get the size of the path -console.log(myPath.size); // 3 - -// remove the last step -myPath.pop(); -console.log(myPath.toString()); // "dir/subdir" - -// iterate over the steps -for (const step of myPath) { - // do something -} - -// create a new path from a string -const newPath = Path.fromString("/foo/bar"); -``` - -## License - -Apache 2.0 diff --git a/node_modules/@humanfs/core/dist/errors.d.ts b/node_modules/@humanfs/core/dist/errors.d.ts deleted file mode 100644 index c885bbf..0000000 --- a/node_modules/@humanfs/core/dist/errors.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @fileoverview Common error classes - * @author Nicholas C. Zakas - */ -/** - * Error thrown when a file or directory is not found. - */ -export class NotFoundError extends Error { - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message: string); - /** - * Error code. - * @type {string} - */ - code: string; -} -/** - * Error thrown when an operation is not permitted. - */ -export class PermissionError extends Error { - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message: string); - /** - * Error code. - * @type {string} - */ - code: string; -} -/** - * Error thrown when an operation is not allowed on a directory. - */ -export class DirectoryError extends Error { - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message: string); - /** - * Error code. - * @type {string} - */ - code: string; -} -/** - * Error thrown when a directory is not empty. - */ -export class NotEmptyError extends Error { - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message: string); - /** - * Error code. - * @type {string} - */ - code: string; -} diff --git a/node_modules/@humanfs/core/dist/fsx.d.ts b/node_modules/@humanfs/core/dist/fsx.d.ts deleted file mode 100644 index ef85093..0000000 --- a/node_modules/@humanfs/core/dist/fsx.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -/** - * @fileoverview The main file for the hfs package. - * @author Nicholas C. Zakas - */ -/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */ -/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ -/** - * Error to represent when a method is missing on an impl. - */ -export class NoSuchMethodError extends Error { - /** - * Creates a new instance. - * @param {string} methodName The name of the method that was missing. - */ - constructor(methodName: string); -} -/** - * Error to represent when an impl is already set. - */ -export class ImplAlreadySetError extends Error { - /** - * Creates a new instance. - */ - constructor(); -} -/** - * A class representing a log entry. - */ -export class LogEntry { - /** - * Creates a new instance. - * @param {string} type The type of log entry. - * @param {any} [data] The data associated with the log entry. - */ - constructor(type: string, data?: any); - /** - * The time at which the log entry was created. - * @type {number} - */ - timestamp: number; - methodName: string; - data: any; - #private; -} -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class Hfs implements HfsImpl { - /** - * Creates a new instance. - * @param {object} options The options for the instance. - * @param {HfsImpl} options.impl The implementation to use. - */ - constructor({ impl }: { - impl: HfsImpl; - }); - /** - * Starts a new log with the given name. - * @param {string} name The name of the log to start; - * @returns {void} - * @throws {Error} When the log already exists. - * @throws {TypeError} When the name is not a non-empty string. - */ - logStart(name: string): void; - /** - * Ends a log with the given name and returns the entries. - * @param {string} name The name of the log to end. - * @returns {Array} The entries in the log. - * @throws {Error} When the log does not exist. - */ - logEnd(name: string): Array; - /** - * Determines if the current implementation is the base implementation. - * @returns {boolean} True if the current implementation is the base implementation. - */ - isBaseImpl(): boolean; - /** - * Sets the implementation for this instance. - * @param {object} impl The implementation to use. - * @returns {void} - */ - setImpl(impl: object): void; - /** - * Resets the implementation for this instance back to its original. - * @returns {void} - */ - resetImpl(): void; - /** - * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. - * @param {string} filePath The file to read. - * @returns {Promise} The contents of the file. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - text(filePath: string): Promise; - /** - * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. - * @param {string} filePath The file to read. - * @returns {Promise} The contents of the file as JSON. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {SyntaxError} When the file contents are not valid JSON. - * @throws {TypeError} When the file path is not a non-empty string. - */ - json(filePath: string): Promise; - /** - * Reads the given file and returns the contents as an ArrayBuffer. - * @param {string} filePath The file to read. - * @returns {Promise} The contents of the file as an ArrayBuffer. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - * @deprecated Use bytes() instead. - */ - arrayBuffer(filePath: string): Promise; - /** - * Reads the given file and returns the contents as an Uint8Array. - * @param {string} filePath The file to read. - * @returns {Promise} The contents of the file as an Uint8Array. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - bytes(filePath: string): Promise; - /** - * Writes the given data to the given file. Creates any necessary directories along the way. - * If the data is a string, UTF-8 encoding is used. - * @param {string} filePath The file to write. - * @param {any} contents The data to write. - * @returns {Promise} A promise that resolves when the file is written. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - write(filePath: string, contents: any): Promise; - /** - * Determines if the given file exists. - * @param {string} filePath The file to check. - * @returns {Promise} True if the file exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - isFile(filePath: string): Promise; - /** - * Determines if the given directory exists. - * @param {string} dirPath The directory to check. - * @returns {Promise} True if the directory exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - isDirectory(dirPath: string): Promise; - /** - * Creates the given directory. - * @param {string} dirPath The directory to create. - * @returns {Promise} A promise that resolves when the directory is created. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - createDirectory(dirPath: string): Promise; - /** - * Deletes the given file. - * @param {string} filePath The file to delete. - * @returns {Promise} A promise that resolves when the file is deleted. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - delete(filePath: string): Promise; - /** - * Deletes the given directory. - * @param {string} dirPath The directory to delete. - * @returns {Promise} A promise that resolves when the directory is deleted. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - deleteAll(dirPath: string): Promise; - /** - * Returns a list of directory entries for the given path. - * @param {string} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string. - * @throws {Error} If the directory cannot be read. - */ - list(dirPath: string): AsyncIterable; - /** - * Returns the size of the given file. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the file. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be read. - */ - size(filePath: string): Promise; - #private; -} -export type HfsImpl = import("@humanfs/types").HfsImpl; -export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; diff --git a/node_modules/@humanfs/core/dist/hfs.d.ts b/node_modules/@humanfs/core/dist/hfs.d.ts deleted file mode 100644 index 69ec368..0000000 --- a/node_modules/@humanfs/core/dist/hfs.d.ts +++ /dev/null @@ -1,288 +0,0 @@ -/** - * Error to represent when a method is missing on an impl. - */ -export class NoSuchMethodError extends Error { - /** - * Creates a new instance. - * @param {string} methodName The name of the method that was missing. - */ - constructor(methodName: string); -} -/** - * Error to represent when a method is not supported on an impl. This happens - * when a method on `Hfs` is called with one name and the corresponding method - * on the impl has a different name. (Example: `text()` and `bytes()`.) - */ -export class MethodNotSupportedError extends Error { - /** - * Creates a new instance. - * @param {string} methodName The name of the method that was missing. - */ - constructor(methodName: string); -} -/** - * Error to represent when an impl is already set. - */ -export class ImplAlreadySetError extends Error { - /** - * Creates a new instance. - */ - constructor(); -} -/** - * A class representing a log entry. - */ -export class LogEntry { - /** - * Creates a new instance. - * @param {string} type The type of log entry. - * @param {any} [data] The data associated with the log entry. - */ - constructor(type: string, data?: any); - /** - * The type of log entry. - * @type {string} - */ - type: string; - /** - * The data associated with the log entry. - * @type {any} - */ - data: any; - /** - * The time at which the log entry was created. - * @type {number} - */ - timestamp: number; -} -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class Hfs implements HfsImpl { - /** - * Creates a new instance. - * @param {object} options The options for the instance. - * @param {HfsImpl} options.impl The implementation to use. - */ - constructor({ impl }: { - impl: HfsImpl; - }); - /** - * Starts a new log with the given name. - * @param {string} name The name of the log to start; - * @returns {void} - * @throws {Error} When the log already exists. - * @throws {TypeError} When the name is not a non-empty string. - */ - logStart(name: string): void; - /** - * Ends a log with the given name and returns the entries. - * @param {string} name The name of the log to end. - * @returns {Array} The entries in the log. - * @throws {Error} When the log does not exist. - */ - logEnd(name: string): Array; - /** - * Determines if the current implementation is the base implementation. - * @returns {boolean} True if the current implementation is the base implementation. - */ - isBaseImpl(): boolean; - /** - * Sets the implementation for this instance. - * @param {object} impl The implementation to use. - * @returns {void} - */ - setImpl(impl: object): void; - /** - * Resets the implementation for this instance back to its original. - * @returns {void} - */ - resetImpl(): void; - /** - * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - text(filePath: string | URL): Promise; - /** - * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as JSON. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {SyntaxError} When the file contents are not valid JSON. - * @throws {TypeError} When the file path is not a non-empty string. - */ - json(filePath: string | URL): Promise; - /** - * Reads the given file and returns the contents as an ArrayBuffer. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as an ArrayBuffer. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - * @deprecated Use bytes() instead. - */ - arrayBuffer(filePath: string | URL): Promise; - /** - * Reads the given file and returns the contents as an Uint8Array. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as an Uint8Array. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - bytes(filePath: string | URL): Promise; - /** - * Writes the given data to the given file. Creates any necessary directories along the way. - * If the data is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The file to write. - * @param {string|ArrayBuffer|ArrayBufferView} contents The data to write. - * @returns {Promise} A promise that resolves when the file is written. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - write(filePath: string | URL, contents: string | ArrayBuffer | ArrayBufferView): Promise; - /** - * Appends the given data to the given file. Creates any necessary directories along the way. - * If the data is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The file to append to. - * @param {string|ArrayBuffer|ArrayBufferView} contents The data to append. - * @returns {Promise} A promise that resolves when the file is appended to. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - * @throws {TypeError} When the file contents are not a string or ArrayBuffer. - * @throws {Error} When the file cannot be appended to. - */ - append(filePath: string | URL, contents: string | ArrayBuffer | ArrayBufferView): Promise; - /** - * Determines if the given file exists. - * @param {string|URL} filePath The file to check. - * @returns {Promise} True if the file exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - isFile(filePath: string | URL): Promise; - /** - * Determines if the given directory exists. - * @param {string|URL} dirPath The directory to check. - * @returns {Promise} True if the directory exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - isDirectory(dirPath: string | URL): Promise; - /** - * Creates the given directory. - * @param {string|URL} dirPath The directory to create. - * @returns {Promise} A promise that resolves when the directory is created. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - createDirectory(dirPath: string | URL): Promise; - /** - * Deletes the given file or empty directory. - * @param {string|URL} filePath The file to delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - delete(filePath: string | URL): Promise; - /** - * Deletes the given file or directory recursively. - * @param {string|URL} dirPath The directory to delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - deleteAll(dirPath: string | URL): Promise; - /** - * Returns a list of directory entries for the given path. - * @param {string|URL} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be read. - */ - list(dirPath: string | URL): AsyncIterable; - /** - * Walks a directory using a depth-first traversal and returns the entries - * from the traversal. - * @param {string|URL} dirPath The path to the directory to walk. - * @param {Object} [options] The options for the walk. - * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.directoryFilter] A filter function to determine - * if a directory's entries should be included in the walk. - * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.entryFilter] A filter function to determine if - * an entry should be included in the walk. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be read. - */ - walk(dirPath: string | URL, { directoryFilter, entryFilter }?: { - directoryFilter?: (entry: HfsWalkEntry) => Promise | boolean; - entryFilter?: (entry: HfsWalkEntry) => Promise | boolean; - }): AsyncIterable; - /** - * Returns the size of the given file. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the file. - * @throws {TypeError} If the file path is not a string or URL. - * @throws {Error} If the file cannot be read. - */ - size(filePath: string | URL): Promise; - /** - * Returns the last modified timestamp of the given file or directory. - * @param {string|URL} fileOrDirPath The path to the file or directory. - * @returns {Promise} A promise that resolves with the last modified date - * or undefined if the file or directory does not exist. - * @throws {TypeError} If the path is not a string or URL. - */ - lastModified(fileOrDirPath: string | URL): Promise; - /** - * Copys a file from one location to another. - * @param {string|URL} source The path to the file to copy. - * @param {string|URL} destination The path to the new file. - * @returns {Promise} A promise that resolves when the file is copied. - * @throws {TypeError} If the file path is not a string or URL. - * @throws {Error} If the file cannot be copied. - */ - copy(source: string | URL, destination: string | URL): Promise; - /** - * Copies a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to copy. - * @param {string|URL} destination The path to copy the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * copied. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be copied. - */ - copyAll(source: string | URL, destination: string | URL): Promise; - /** - * Moves a file from the source path to the destination path. - * @param {string|URL} source The location of the file to move. - * @param {string|URL} destination The destination of the file to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file or directory paths are not strings. - * @throws {Error} If the file or directory cannot be moved. - */ - move(source: string | URL, destination: string | URL): Promise; - /** - * Moves a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to move. - * @param {string|URL} destination The path to move the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * moved. - * @throws {TypeError} If the source is not a string or URL. - * @throws {TypeError} If the destination is not a string or URL. - * @throws {Error} If the file or directory cannot be moved. - */ - moveAll(source: string | URL, destination: string | URL): Promise; - #private; -} -export type HfsImpl = import("@humanfs/types").HfsImpl; -export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; -export type HfsWalkEntry = import("@humanfs/types").HfsWalkEntry; diff --git a/node_modules/@humanfs/core/dist/index.d.ts b/node_modules/@humanfs/core/dist/index.d.ts deleted file mode 100644 index d2dd30f..0000000 --- a/node_modules/@humanfs/core/dist/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { Hfs } from "./hfs.js"; -export { Path } from "./path.js"; -export * from "./errors.js"; diff --git a/node_modules/@humanfs/core/dist/path.d.ts b/node_modules/@humanfs/core/dist/path.d.ts deleted file mode 100644 index 6e29395..0000000 --- a/node_modules/@humanfs/core/dist/path.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -export class Path { - /** - * Creates a new path based on the argument type. If the argument is a string, - * it is assumed to be a file or directory path and is converted to a Path - * instance. If the argument is a URL, it is assumed to be a file URL and is - * converted to a Path instance. If the argument is a Path instance, it is - * copied into a new Path instance. If the argument is an array, it is assumed - * to be the steps of a path and is used to create a new Path instance. - * @param {string|URL|Path|Array} pathish The value to convert to a Path instance. - * @returns {Path} A new Path instance. - * @throws {TypeError} When pathish is not a string, URL, Path, or Array. - * @throws {TypeError} When pathish is a string and is empty. - */ - static from(pathish: string | URL | Path | Array): Path; - /** - * Creates a new Path instance from a string. - * @param {string} fileOrDirPath The file or directory path to convert. - * @returns {Path} A new Path instance. - * @deprecated Use Path.from() instead. - */ - static fromString(fileOrDirPath: string): Path; - /** - * Creates a new Path instance from a URL. - * @param {URL} url The URL to convert. - * @returns {Path} A new Path instance. - * @throws {TypeError} When url is not a URL instance. - * @throws {TypeError} When url.pathname is empty. - * @throws {TypeError} When url.protocol is not "file:". - * @deprecated Use Path.from() instead. - */ - static fromURL(url: URL): Path; - /** - * Creates a new instance. - * @param {Iterable} [steps] The steps to use for the path. - * @throws {TypeError} When steps is not iterable. - */ - constructor(steps?: Iterable); - /** - * Adds steps to the end of the path. - * @param {...string} steps The steps to add to the path. - * @returns {void} - */ - push(...steps: string[]): void; - /** - * Removes the last step from the path. - * @returns {string} The last step in the path. - */ - pop(): string; - /** - * Returns an iterator for steps in the path. - * @returns {IterableIterator} An iterator for the steps in the path. - */ - steps(): IterableIterator; - /** - * Sets the name (the last step) of the path. - * @type {string} - */ - set name(value: string); - /** - * Retrieves the name (the last step) of the path. - * @type {string} - */ - get name(): string; - /** - * Retrieves the size of the path. - * @type {number} - */ - get size(): number; - /** - * Returns the path as a string. - * @returns {string} The path as a string. - */ - toString(): string; - /** - * Returns an iterator for the steps in the path. - * @returns {IterableIterator} An iterator for the steps in the path. - */ - [Symbol.iterator](): IterableIterator; - #private; -} -export type HfsImpl = import("@humanfs/types").HfsImpl; -export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; diff --git a/node_modules/@humanfs/core/package.json b/node_modules/@humanfs/core/package.json deleted file mode 100644 index 806a2a5..0000000 --- a/node_modules/@humanfs/core/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "@humanfs/core", - "version": "0.19.2", - "description": "The core of the humanfs library.", - "type": "module", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": { - "types": "./dist/index.d.ts", - "default": "./src/index.js" - } - }, - "files": [ - "dist", - "src" - ], - "scripts": { - "build": "tsc", - "prepare": "npm run build", - "pretest": "npm run build", - "test": "c8 mocha tests" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/humanwhocodes/humanfs.git" - }, - "publishConfig": { - "access": "public" - }, - "keywords": [ - "filesystem", - "fs", - "hfs", - "files" - ], - "author": "Nicholas C. Zakas", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/humanwhocodes/humanfs/issues" - }, - "homepage": "https://github.com/humanwhocodes/humanfs#readme", - "engines": { - "node": ">=18.18.0" - }, - "devDependencies": { - "c8": "^9.0.0", - "mocha": "^10.2.0", - "typescript": "^5.2.2" - }, - "dependencies": { - "@humanfs/types": "^0.15.0" - } -} diff --git a/node_modules/@humanfs/core/src/errors.js b/node_modules/@humanfs/core/src/errors.js deleted file mode 100644 index 8fb35be..0000000 --- a/node_modules/@humanfs/core/src/errors.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * @fileoverview Common error classes - * @author Nicholas C. Zakas - */ - -/** - * Error thrown when a file or directory is not found. - */ -export class NotFoundError extends Error { - /** - * Name of the error class. - * @type {string} - */ - name = "NotFoundError"; - - /** - * Error code. - * @type {string} - */ - code = "ENOENT"; - - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message) { - super(`ENOENT: No such file or directory, ${message}`); - } -} - -/** - * Error thrown when an operation is not permitted. - */ -export class PermissionError extends Error { - /** - * Name of the error class. - * @type {string} - */ - name = "PermissionError"; - - /** - * Error code. - * @type {string} - */ - code = "EPERM"; - - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message) { - super(`EPERM: Operation not permitted, ${message}`); - } -} - -/** - * Error thrown when an operation is not allowed on a directory. - */ - -export class DirectoryError extends Error { - /** - * Name of the error class. - * @type {string} - */ - name = "DirectoryError"; - - /** - * Error code. - * @type {string} - */ - code = "EISDIR"; - - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message) { - super(`EISDIR: Illegal operation on a directory, ${message}`); - } -} - -/** - * Error thrown when a directory is not empty. - */ -export class NotEmptyError extends Error { - /** - * Name of the error class. - * @type {string} - */ - name = "NotEmptyError"; - - /** - * Error code. - * @type {string} - */ - code = "ENOTEMPTY"; - - /** - * Creates a new instance. - * @param {string} message The error message. - */ - constructor(message) { - super(`ENOTEMPTY: Directory not empty, ${message}`); - } -} diff --git a/node_modules/@humanfs/core/src/hfs.js b/node_modules/@humanfs/core/src/hfs.js deleted file mode 100644 index 38ee31c..0000000 --- a/node_modules/@humanfs/core/src/hfs.js +++ /dev/null @@ -1,699 +0,0 @@ -/** - * @fileoverview The main file for the humanfs package. - * @author Nicholas C. Zakas - */ - -/* global URL, TextDecoder, TextEncoder */ - -//----------------------------------------------------------------------------- -// Types -//----------------------------------------------------------------------------- - -/** @typedef {import("@humanfs/types").HfsImpl} HfsImpl */ -/** @typedef {import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ -/** @typedef {import("@humanfs/types").HfsWalkEntry} HfsWalkEntry */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const decoder = new TextDecoder(); -const encoder = new TextEncoder(); - -/** - * Error to represent when a method is missing on an impl. - */ -export class NoSuchMethodError extends Error { - /** - * Creates a new instance. - * @param {string} methodName The name of the method that was missing. - */ - constructor(methodName) { - super(`Method "${methodName}" does not exist on impl.`); - } -} - -/** - * Error to represent when a method is not supported on an impl. This happens - * when a method on `Hfs` is called with one name and the corresponding method - * on the impl has a different name. (Example: `text()` and `bytes()`.) - */ -export class MethodNotSupportedError extends Error { - /** - * Creates a new instance. - * @param {string} methodName The name of the method that was missing. - */ - constructor(methodName) { - super(`Method "${methodName}" is not supported on this impl.`); - } -} - -/** - * Error to represent when an impl is already set. - */ -export class ImplAlreadySetError extends Error { - /** - * Creates a new instance. - */ - constructor() { - super(`Implementation already set.`); - } -} - -/** - * Asserts that the given path is a valid file path. - * @param {any} fileOrDirPath The path to check. - * @returns {void} - * @throws {TypeError} When the path is not a non-empty string. - */ -function assertValidFileOrDirPath(fileOrDirPath) { - if ( - !fileOrDirPath || - (!(fileOrDirPath instanceof URL) && typeof fileOrDirPath !== "string") - ) { - throw new TypeError("Path must be a non-empty string or URL."); - } -} - -/** - * Asserts that the given file contents are valid. - * @param {any} contents The contents to check. - * @returns {void} - * @throws {TypeError} When the contents are not a string or ArrayBuffer. - */ -function assertValidFileContents(contents) { - if ( - typeof contents !== "string" && - !(contents instanceof ArrayBuffer) && - !ArrayBuffer.isView(contents) - ) { - throw new TypeError( - "File contents must be a string, ArrayBuffer, or ArrayBuffer view.", - ); - } -} - -/** - * Converts the given contents to Uint8Array. - * @param {any} contents The data to convert. - * @returns {Uint8Array} The converted Uint8Array. - * @throws {TypeError} When the contents are not a string or ArrayBuffer. - */ -function toUint8Array(contents) { - if (contents instanceof Uint8Array) { - return contents; - } - - if (typeof contents === "string") { - return encoder.encode(contents); - } - - if (contents instanceof ArrayBuffer) { - return new Uint8Array(contents); - } - - if (ArrayBuffer.isView(contents)) { - const bytes = contents.buffer.slice( - contents.byteOffset, - contents.byteOffset + contents.byteLength, - ); - return new Uint8Array(bytes); - } - throw new TypeError( - "Invalid contents type. Expected string or ArrayBuffer.", - ); -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class representing a log entry. - */ -export class LogEntry { - /** - * The type of log entry. - * @type {string} - */ - type; - - /** - * The data associated with the log entry. - * @type {any} - */ - data; - - /** - * The time at which the log entry was created. - * @type {number} - */ - timestamp = Date.now(); - - /** - * Creates a new instance. - * @param {string} type The type of log entry. - * @param {any} [data] The data associated with the log entry. - */ - constructor(type, data) { - this.type = type; - this.data = data; - } -} - -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class Hfs { - /** - * The base implementation for this instance. - * @type {HfsImpl} - */ - #baseImpl; - - /** - * The current implementation for this instance. - * @type {HfsImpl} - */ - #impl; - - /** - * A map of log names to their corresponding entries. - * @type {Map>} - */ - #logs = new Map(); - - /** - * Creates a new instance. - * @param {object} options The options for the instance. - * @param {HfsImpl} options.impl The implementation to use. - */ - constructor({ impl }) { - this.#baseImpl = impl; - this.#impl = impl; - } - - /** - * Logs an entry onto all currently open logs. - * @param {string} methodName The name of the method being called. - * @param {...*} args The arguments to the method. - * @returns {void} - */ - #log(methodName, ...args) { - for (const logs of this.#logs.values()) { - logs.push(new LogEntry("call", { methodName, args })); - } - } - - /** - * Starts a new log with the given name. - * @param {string} name The name of the log to start; - * @returns {void} - * @throws {Error} When the log already exists. - * @throws {TypeError} When the name is not a non-empty string. - */ - logStart(name) { - if (!name || typeof name !== "string") { - throw new TypeError("Log name must be a non-empty string."); - } - - if (this.#logs.has(name)) { - throw new Error(`Log "${name}" already exists.`); - } - - this.#logs.set(name, []); - } - - /** - * Ends a log with the given name and returns the entries. - * @param {string} name The name of the log to end. - * @returns {Array} The entries in the log. - * @throws {Error} When the log does not exist. - */ - logEnd(name) { - if (this.#logs.has(name)) { - const logs = this.#logs.get(name); - this.#logs.delete(name); - return logs; - } - - throw new Error(`Log "${name}" does not exist.`); - } - - /** - * Determines if the current implementation is the base implementation. - * @returns {boolean} True if the current implementation is the base implementation. - */ - isBaseImpl() { - return this.#impl === this.#baseImpl; - } - - /** - * Sets the implementation for this instance. - * @param {object} impl The implementation to use. - * @returns {void} - */ - setImpl(impl) { - this.#log("implSet", impl); - - if (this.#impl !== this.#baseImpl) { - throw new ImplAlreadySetError(); - } - - this.#impl = impl; - } - - /** - * Resets the implementation for this instance back to its original. - * @returns {void} - */ - resetImpl() { - this.#log("implReset"); - this.#impl = this.#baseImpl; - } - - /** - * Asserts that the given method exists on the current implementation. - * @param {string} methodName The name of the method to check. - * @returns {void} - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - */ - #assertImplMethod(methodName) { - if (typeof this.#impl[methodName] !== "function") { - throw new NoSuchMethodError(methodName); - } - } - - /** - * Asserts that the given method exists on the current implementation, and if not, - * throws an error with a different method name. - * @param {string} methodName The name of the method to check. - * @param {string} targetMethodName The name of the method that should be reported - * as an error when methodName does not exist. - * @returns {void} - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - */ - #assertImplMethodAlt(methodName, targetMethodName) { - if (typeof this.#impl[methodName] !== "function") { - throw new MethodNotSupportedError(targetMethodName); - } - } - - /** - * Calls the given method on the current implementation. - * @param {string} methodName The name of the method to call. - * @param {...any} args The arguments to the method. - * @returns {any} The return value from the method. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - */ - #callImplMethod(methodName, ...args) { - this.#log(methodName, ...args); - this.#assertImplMethod(methodName); - return this.#impl[methodName](...args); - } - - /** - * Calls the given method on the current implementation and doesn't log the call. - * @param {string} methodName The name of the method to call. - * @param {...any} args The arguments to the method. - * @returns {any} The return value from the method. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - */ - #callImplMethodWithoutLog(methodName, ...args) { - this.#assertImplMethod(methodName); - return this.#impl[methodName](...args); - } - - /** - * Calls the given method on the current implementation but logs a different method name. - * @param {string} methodName The name of the method to call. - * @param {string} targetMethodName The name of the method to log. - * @param {...any} args The arguments to the method. - * @returns {any} The return value from the method. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - */ - #callImplMethodAlt(methodName, targetMethodName, ...args) { - this.#log(targetMethodName, ...args); - this.#assertImplMethodAlt(methodName, targetMethodName); - return this.#impl[methodName](...args); - } - - /** - * Reads the given file and returns the contents as text. Assumes UTF-8 encoding. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async text(filePath) { - assertValidFileOrDirPath(filePath); - - const result = await this.#callImplMethodAlt("bytes", "text", filePath); - return result ? decoder.decode(result) : undefined; - } - - /** - * Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as JSON. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {SyntaxError} When the file contents are not valid JSON. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async json(filePath) { - assertValidFileOrDirPath(filePath); - - const result = await this.#callImplMethodAlt("bytes", "json", filePath); - return result ? JSON.parse(decoder.decode(result)) : undefined; - } - - /** - * Reads the given file and returns the contents as an ArrayBuffer. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as an ArrayBuffer. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - * @deprecated Use bytes() instead. - */ - async arrayBuffer(filePath) { - assertValidFileOrDirPath(filePath); - - const result = await this.#callImplMethodAlt( - "bytes", - "arrayBuffer", - filePath, - ); - return result?.buffer; - } - - /** - * Reads the given file and returns the contents as an Uint8Array. - * @param {string|URL} filePath The file to read. - * @returns {Promise} The contents of the file as an Uint8Array. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async bytes(filePath) { - assertValidFileOrDirPath(filePath); - return this.#callImplMethod("bytes", filePath); - } - - /** - * Writes the given data to the given file. Creates any necessary directories along the way. - * If the data is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The file to write. - * @param {string|ArrayBuffer|ArrayBufferView} contents The data to write. - * @returns {Promise} A promise that resolves when the file is written. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async write(filePath, contents) { - assertValidFileOrDirPath(filePath); - assertValidFileContents(contents); - this.#log("write", filePath, contents); - - let value = toUint8Array(contents); - return this.#callImplMethodWithoutLog("write", filePath, value); - } - - /** - * Appends the given data to the given file. Creates any necessary directories along the way. - * If the data is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The file to append to. - * @param {string|ArrayBuffer|ArrayBufferView} contents The data to append. - * @returns {Promise} A promise that resolves when the file is appended to. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - * @throws {TypeError} When the file contents are not a string or ArrayBuffer. - * @throws {Error} When the file cannot be appended to. - */ - async append(filePath, contents) { - assertValidFileOrDirPath(filePath); - assertValidFileContents(contents); - this.#log("append", filePath, contents); - - let value = toUint8Array(contents); - return this.#callImplMethodWithoutLog("append", filePath, value); - } - - /** - * Determines if the given file exists. - * @param {string|URL} filePath The file to check. - * @returns {Promise} True if the file exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async isFile(filePath) { - assertValidFileOrDirPath(filePath); - return this.#callImplMethod("isFile", filePath); - } - - /** - * Determines if the given directory exists. - * @param {string|URL} dirPath The directory to check. - * @returns {Promise} True if the directory exists. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - async isDirectory(dirPath) { - assertValidFileOrDirPath(dirPath); - return this.#callImplMethod("isDirectory", dirPath); - } - - /** - * Creates the given directory. - * @param {string|URL} dirPath The directory to create. - * @returns {Promise} A promise that resolves when the directory is created. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - async createDirectory(dirPath) { - assertValidFileOrDirPath(dirPath); - return this.#callImplMethod("createDirectory", dirPath); - } - - /** - * Deletes the given file or empty directory. - * @param {string|URL} filePath The file to delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the file path is not a non-empty string. - */ - async delete(filePath) { - assertValidFileOrDirPath(filePath); - return this.#callImplMethod("delete", filePath); - } - - /** - * Deletes the given file or directory recursively. - * @param {string|URL} dirPath The directory to delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {NoSuchMethodError} When the method does not exist on the current implementation. - * @throws {TypeError} When the directory path is not a non-empty string. - */ - async deleteAll(dirPath) { - assertValidFileOrDirPath(dirPath); - return this.#callImplMethod("deleteAll", dirPath); - } - - /** - * Returns a list of directory entries for the given path. - * @param {string|URL} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be read. - */ - async *list(dirPath) { - assertValidFileOrDirPath(dirPath); - yield* await this.#callImplMethod("list", dirPath); - } - - /** - * Walks a directory using a depth-first traversal and returns the entries - * from the traversal. - * @param {string|URL} dirPath The path to the directory to walk. - * @param {Object} [options] The options for the walk. - * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.directoryFilter] A filter function to determine - * if a directory's entries should be included in the walk. - * @param {(entry:HfsWalkEntry) => Promise|boolean} [options.entryFilter] A filter function to determine if - * an entry should be included in the walk. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be read. - */ - async *walk( - dirPath, - { directoryFilter = () => true, entryFilter = () => true } = {}, - ) { - assertValidFileOrDirPath(dirPath); - this.#log("walk", dirPath, { directoryFilter, entryFilter }); - - // inner function for recursion without additional logging - const walk = async function* ( - dirPath, - { directoryFilter, entryFilter, parentPath = "", depth = 1 }, - ) { - let dirEntries; - - try { - dirEntries = await this.#callImplMethodWithoutLog( - "list", - dirPath, - ); - } catch (error) { - // if the directory does not exist then return an empty array - if (error.code === "ENOENT") { - return; - } - - // otherwise, rethrow the error - throw error; - } - - for await (const listEntry of dirEntries) { - const walkEntry = { - path: listEntry.name, - depth, - ...listEntry, - }; - - if (parentPath) { - walkEntry.path = `${parentPath}/${walkEntry.path}`; - } - - // first emit the entry but only if the entry filter returns true - let shouldEmitEntry = entryFilter(walkEntry); - if (shouldEmitEntry.then) { - shouldEmitEntry = await shouldEmitEntry; - } - - if (shouldEmitEntry) { - yield walkEntry; - } - - // if it's a directory then yield the entry and walk the directory - if (listEntry.isDirectory) { - // if the directory filter returns false, skip the directory - let shouldWalkDirectory = directoryFilter(walkEntry); - if (shouldWalkDirectory.then) { - shouldWalkDirectory = await shouldWalkDirectory; - } - - if (!shouldWalkDirectory) { - continue; - } - - // make sure there's a trailing slash on the directory path before appending - const directoryPath = - dirPath instanceof URL - ? new URL( - listEntry.name, - dirPath.href.endsWith("/") - ? dirPath.href - : `${dirPath.href}/`, - ) - : `${dirPath.endsWith("/") ? dirPath : `${dirPath}/`}${listEntry.name}`; - - yield* walk(directoryPath, { - directoryFilter, - entryFilter, - parentPath: walkEntry.path, - depth: depth + 1, - }); - } - } - }.bind(this); - - yield* walk(dirPath, { directoryFilter, entryFilter }); - } - - /** - * Returns the size of the given file. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the file. - * @throws {TypeError} If the file path is not a string or URL. - * @throws {Error} If the file cannot be read. - */ - async size(filePath) { - assertValidFileOrDirPath(filePath); - return this.#callImplMethod("size", filePath); - } - - /** - * Returns the last modified timestamp of the given file or directory. - * @param {string|URL} fileOrDirPath The path to the file or directory. - * @returns {Promise} A promise that resolves with the last modified date - * or undefined if the file or directory does not exist. - * @throws {TypeError} If the path is not a string or URL. - */ - async lastModified(fileOrDirPath) { - assertValidFileOrDirPath(fileOrDirPath); - return this.#callImplMethod("lastModified", fileOrDirPath); - } - - /** - * Copys a file from one location to another. - * @param {string|URL} source The path to the file to copy. - * @param {string|URL} destination The path to the new file. - * @returns {Promise} A promise that resolves when the file is copied. - * @throws {TypeError} If the file path is not a string or URL. - * @throws {Error} If the file cannot be copied. - */ - async copy(source, destination) { - assertValidFileOrDirPath(source); - assertValidFileOrDirPath(destination); - return this.#callImplMethod("copy", source, destination); - } - - /** - * Copies a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to copy. - * @param {string|URL} destination The path to copy the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * copied. - * @throws {TypeError} If the directory path is not a string or URL. - * @throws {Error} If the directory cannot be copied. - */ - async copyAll(source, destination) { - assertValidFileOrDirPath(source); - assertValidFileOrDirPath(destination); - return this.#callImplMethod("copyAll", source, destination); - } - - /** - * Moves a file from the source path to the destination path. - * @param {string|URL} source The location of the file to move. - * @param {string|URL} destination The destination of the file to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file or directory paths are not strings. - * @throws {Error} If the file or directory cannot be moved. - */ - async move(source, destination) { - assertValidFileOrDirPath(source); - assertValidFileOrDirPath(destination); - return this.#callImplMethod("move", source, destination); - } - - /** - * Moves a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to move. - * @param {string|URL} destination The path to move the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * moved. - * @throws {TypeError} If the source is not a string or URL. - * @throws {TypeError} If the destination is not a string or URL. - * @throws {Error} If the file or directory cannot be moved. - */ - async moveAll(source, destination) { - assertValidFileOrDirPath(source); - assertValidFileOrDirPath(destination); - return this.#callImplMethod("moveAll", source, destination); - } -} diff --git a/node_modules/@humanfs/core/src/index.js b/node_modules/@humanfs/core/src/index.js deleted file mode 100644 index 1b662d4..0000000 --- a/node_modules/@humanfs/core/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @fileoverview API entrypoint for hfs/core - * @author Nicholas C. Zakas - */ - -export { Hfs } from "./hfs.js"; -export { Path } from "./path.js"; -export * from "./errors.js"; diff --git a/node_modules/@humanfs/core/src/path.js b/node_modules/@humanfs/core/src/path.js deleted file mode 100644 index 4798091..0000000 --- a/node_modules/@humanfs/core/src/path.js +++ /dev/null @@ -1,237 +0,0 @@ -/** - * @fileoverview The Path class. - * @author Nicholas C. Zakas - */ - -/* globals URL */ - -//----------------------------------------------------------------------------- -// Types -//----------------------------------------------------------------------------- - -/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */ -/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Normalizes a path to use forward slashes. - * @param {string} filePath The path to normalize. - * @returns {string} The normalized path. - */ -function normalizePath(filePath) { - let startIndex = 0; - let endIndex = filePath.length; - - if (/[a-z]:\//i.test(filePath)) { - startIndex = 3; - } - - if (filePath.startsWith("./")) { - startIndex = 2; - } - - if (filePath.startsWith("/")) { - startIndex = 1; - } - - if (filePath.endsWith("/")) { - endIndex = filePath.length - 1; - } - - return filePath.slice(startIndex, endIndex).replace(/\\/g, "/"); -} - -/** - * Asserts that the given name is a non-empty string, no equal to "." or "..", - * and does not contain a forward slash or backslash. - * @param {string} name The name to check. - * @returns {void} - * @throws {TypeError} When name is not valid. - */ -function assertValidName(name) { - if (typeof name !== "string") { - throw new TypeError("name must be a string"); - } - - if (!name) { - throw new TypeError("name cannot be empty"); - } - - if (name === ".") { - throw new TypeError(`name cannot be "."`); - } - - if (name === "..") { - throw new TypeError(`name cannot be ".."`); - } - - if (name.includes("/") || name.includes("\\")) { - throw new TypeError( - `name cannot contain a slash or backslash: "${name}"`, - ); - } -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -export class Path { - /** - * The steps in the path. - * @type {Array} - */ - #steps; - - /** - * Creates a new instance. - * @param {Iterable} [steps] The steps to use for the path. - * @throws {TypeError} When steps is not iterable. - */ - constructor(steps = []) { - if (typeof steps[Symbol.iterator] !== "function") { - throw new TypeError("steps must be iterable"); - } - - this.#steps = [...steps]; - this.#steps.forEach(assertValidName); - } - - /** - * Adds steps to the end of the path. - * @param {...string} steps The steps to add to the path. - * @returns {void} - */ - push(...steps) { - steps.forEach(assertValidName); - this.#steps.push(...steps); - } - - /** - * Removes the last step from the path. - * @returns {string} The last step in the path. - */ - pop() { - return this.#steps.pop(); - } - - /** - * Returns an iterator for steps in the path. - * @returns {IterableIterator} An iterator for the steps in the path. - */ - steps() { - return this.#steps.values(); - } - - /** - * Returns an iterator for the steps in the path. - * @returns {IterableIterator} An iterator for the steps in the path. - */ - [Symbol.iterator]() { - return this.steps(); - } - - /** - * Retrieves the name (the last step) of the path. - * @type {string} - */ - get name() { - return this.#steps[this.#steps.length - 1]; - } - - /** - * Sets the name (the last step) of the path. - * @type {string} - */ - set name(value) { - assertValidName(value); - this.#steps[this.#steps.length - 1] = value; - } - - /** - * Retrieves the size of the path. - * @type {number} - */ - get size() { - return this.#steps.length; - } - - /** - * Returns the path as a string. - * @returns {string} The path as a string. - */ - toString() { - return this.#steps.join("/"); - } - - /** - * Creates a new path based on the argument type. If the argument is a string, - * it is assumed to be a file or directory path and is converted to a Path - * instance. If the argument is a URL, it is assumed to be a file URL and is - * converted to a Path instance. If the argument is a Path instance, it is - * copied into a new Path instance. If the argument is an array, it is assumed - * to be the steps of a path and is used to create a new Path instance. - * @param {string|URL|Path|Array} pathish The value to convert to a Path instance. - * @returns {Path} A new Path instance. - * @throws {TypeError} When pathish is not a string, URL, Path, or Array. - * @throws {TypeError} When pathish is a string and is empty. - */ - static from(pathish) { - if (typeof pathish === "string") { - if (!pathish) { - throw new TypeError("argument cannot be empty"); - } - - return Path.fromString(pathish); - } - - if (pathish instanceof URL) { - return Path.fromURL(pathish); - } - - if (pathish instanceof Path || Array.isArray(pathish)) { - return new Path(pathish); - } - - throw new TypeError("argument must be a string, URL, Path, or Array"); - } - - /** - * Creates a new Path instance from a string. - * @param {string} fileOrDirPath The file or directory path to convert. - * @returns {Path} A new Path instance. - * @deprecated Use Path.from() instead. - */ - static fromString(fileOrDirPath) { - return new Path(normalizePath(fileOrDirPath).split("/")); - } - - /** - * Creates a new Path instance from a URL. - * @param {URL} url The URL to convert. - * @returns {Path} A new Path instance. - * @throws {TypeError} When url is not a URL instance. - * @throws {TypeError} When url.pathname is empty. - * @throws {TypeError} When url.protocol is not "file:". - * @deprecated Use Path.from() instead. - */ - static fromURL(url) { - if (!(url instanceof URL)) { - throw new TypeError("url must be a URL instance"); - } - - if (!url.pathname || url.pathname === "/") { - throw new TypeError("url.pathname cannot be empty"); - } - - if (url.protocol !== "file:") { - throw new TypeError(`url.protocol must be "file:"`); - } - - // Remove leading slash in pathname - return new Path(normalizePath(url.pathname.slice(1)).split("/")); - } -} diff --git a/node_modules/@humanfs/node/LICENSE b/node_modules/@humanfs/node/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@humanfs/node/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@humanfs/node/README.md b/node_modules/@humanfs/node/README.md deleted file mode 100644 index c3e4be4..0000000 --- a/node_modules/@humanfs/node/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# `@humanfs/node` - -by [Nicholas C. Zakas](https://humanwhocodes.com) - -If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. - -## Description - -The `hfs` bindings for use in Node.js and Node.js-compatible runtimes. - -> [!WARNING] -> This project is **experimental** and may change significantly before v1.0.0. Use at your own caution and definitely not in production! - -## Installation - -Install using your favorite package manager: - -```shell -npm install @humanfs/node - -# or - -pnpm install @humanfs/node - -# or - -yarn add @humanfs/node - -# or - -bun install @humanfs/node -``` - -## Usage - -The easiest way to use hfs in your project is to import the `hfs` object: - -```js -import { hfs } from "@humanfs/node"; -``` - -Then, you can use the API methods: - -```js -// 1. Files - -// read from a text file -const text = await hfs.text("file.txt"); - -// read from a JSON file -const json = await hfs.json("file.json"); - -// read raw bytes from a text file -const arrayBuffer = await hfs.arrayBuffer("file.txt"); - -// write text to a file -await hfs.write("file.txt", "Hello world!"); - -// write bytes to a file -await hfs.write("file.txt", new TextEncoder().encode("Hello world!")); - -// append text to a file -await hfs.append("file.txt", "Hello world!"); - -// append bytes to a file -await hfs.append("file.txt", new TextEncoder().encode("Hello world!")); - -// does the file exist? -const found = await hfs.isFile("file.txt"); - -// how big is the file? -const size = await hfs.size("file.txt"); - -// when was the file modified? -const mtime = await hfs.lastModified("file.txt"); - -// copy a file from one location to another -await hfs.copy("file.txt", "file-copy.txt"); - -// move a file from one location to another -await hfs.move("file.txt", "renamed.txt"); - -// delete a file -await hfs.delete("file.txt"); - -// 2. Directories - -// create a directory -await hfs.createDirectory("dir"); - -// create a directory recursively -await hfs.createDirectory("dir/subdir"); - -// does the directory exist? -const dirFound = await hfs.isDirectory("dir"); - -// copy the entire directory -hfs.copyAll("from-dir", "to-dir"); - -// move the entire directory -hfs.moveAll("from-dir", "to-dir"); - -// delete a directory -await hfs.delete("dir"); - -// delete a non-empty directory -await hfs.deleteAll("dir"); -``` - -If you'd like to create your own instance, import the `NodeHfs` constructor: - -```js -import { NodeHfs } from "@humanfs/node"; -import fsp from "fs/promises"; - -const hfs = new NodeHfs(); - -// optionally specify the fs/promises object to use -const hfs = new NodeHfs({ fsp }); -``` - -If you'd like to use just the impl, import the `NodeHfsImpl` constructor: - -```js -import { NodeHfsImpl } from "@humanfs/node"; -import fsp from "fs/promises"; - -const hfs = new NodeHfsImpl(); - -// optionally specify the fs/promises object to use -const hfs = new NodeHfsImpl({ fsp }); -``` - -## Errors Handled - -* `ENOENT` - in most cases, these errors are handled silently. -* `ENFILE` and `EMFILE` - calls that result in these errors are retried for up to 60 seconds before giving up for good. - -## License - -Apache 2.0 diff --git a/node_modules/@humanfs/node/dist/index.d.ts b/node_modules/@humanfs/node/dist/index.d.ts deleted file mode 100644 index c2d1d30..0000000 --- a/node_modules/@humanfs/node/dist/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./node-hfs.js"; -export { Hfs } from "@humanfs/core"; diff --git a/node_modules/@humanfs/node/dist/node-fsx.d.ts b/node_modules/@humanfs/node/dist/node-fsx.d.ts deleted file mode 100644 index 78e8dbd..0000000 --- a/node_modules/@humanfs/node/dist/node-fsx.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/// -/** - * A class representing the Node.js implementation of Hfs. - * @implements {HfsImpl} - */ -export class NodeHfsImpl implements HfsImpl { - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp }?: { - fsp?: Fsp; - }); - /** - * Reads a file and returns the contents as a string. Assumes UTF-8 encoding. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents of - * the file or undefined if the file doesn't exist. - * @throws {TypeError} If the file path is not a string. - * @throws {RangeError} If the file path is empty. - * @throws {RangeError} If the file path is not absolute. - * @throws {RangeError} If the file path is not a file. - * @throws {RangeError} If the file path is not readable. - */ - text(filePath: string): Promise; - /** - * Reads a file and returns the contents as a JSON object. Assumes UTF-8 encoding. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents of - * the file or undefined if the file doesn't exist. - * @throws {SyntaxError} If the file contents are not valid JSON. - * @throws {Error} If the file cannot be read. - * @throws {TypeError} If the file path is not a string. - */ - json(filePath: string): Promise; - /** - * Reads a file and returns the contents as an ArrayBuffer. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents - * of the file or undefined if the file doesn't exist. - * @throws {Error} If the file cannot be read. - * @throws {TypeError} If the file path is not a string. - * @deprecated Use bytes() instead. - */ - arrayBuffer(filePath: string): Promise; - /** - * Reads a file and returns the contents as an Uint8Array. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents - * of the file or undefined if the file doesn't exist. - * @throws {Error} If the file cannot be read. - * @throws {TypeError} If the file path is not a string. - */ - bytes(filePath: string): Promise; - /** - * Writes a value to a file. If the value is a string, UTF-8 encoding is used. - * @param {string} filePath The path to the file to write. - * @param {string|ArrayBuffer|ArrayBufferView} contents The contents to write to the - * file. - * @returns {Promise} A promise that resolves when the file is - * written. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be written. - */ - write(filePath: string, contents: string | ArrayBuffer | ArrayBufferView): Promise; - /** - * Checks if a file exists. - * @param {string} filePath The path to the file to check. - * @returns {Promise} A promise that resolves with true if the - * file exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isFile(filePath: string): Promise; - /** - * Checks if a directory exists. - * @param {string} dirPath The path to the directory to check. - * @returns {Promise} A promise that resolves with true if the - * directory exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isDirectory(dirPath: string): Promise; - /** - * Creates a directory recursively. - * @param {string} dirPath The path to the directory to create. - * @returns {Promise} A promise that resolves when the directory is - * created. - */ - createDirectory(dirPath: string): Promise; - /** - * Deletes a file or empty directory. - * @param {string} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - * @throws {Error} If the file or directory is not found. - */ - delete(fileOrDirPath: string): Promise; - /** - * Deletes a file or directory recursively. - * @param {string} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - * @throws {Error} If the file or directory is not found. - */ - deleteAll(fileOrDirPath: string): Promise; - /** - * Returns a list of directory entries for the given path. - * @param {string} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string. - * @throws {Error} If the directory cannot be read. - */ - list(dirPath: string): AsyncIterable; - /** - * Returns the size of a file. - * @param {string} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the - * file in bytes or undefined if the file doesn't exist. - */ - size(filePath: string): Promise; - #private; -} -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class NodeHfs extends Hfs implements HfsImpl { - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp }?: { - fsp?: Fsp; - }); -} -export const hfs: NodeHfs; -export type HfsImpl = import("@humanfs/types").HfsImpl; -export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; -export type Fsp = typeof nativeFsp; -export type Dirent = import("fs").Dirent; -import { Hfs } from "@humanfs/core"; -import nativeFsp from "node:fs/promises"; diff --git a/node_modules/@humanfs/node/dist/node-hfs.d.ts b/node_modules/@humanfs/node/dist/node-hfs.d.ts deleted file mode 100644 index 1fd6322..0000000 --- a/node_modules/@humanfs/node/dist/node-hfs.d.ts +++ /dev/null @@ -1,176 +0,0 @@ -/// -/** - * A class representing the Node.js implementation of Hfs. - * @implements {HfsImpl} - */ -export class NodeHfsImpl implements HfsImpl { - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp }?: { - fsp?: Fsp; - }); - /** - * Reads a file and returns the contents as an Uint8Array. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents - * of the file or undefined if the file doesn't exist. - * @throws {Error} If the file cannot be read. - * @throws {TypeError} If the file path is not a string. - */ - bytes(filePath: string | URL): Promise; - /** - * Writes a value to a file. If the value is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The path to the file to write. - * @param {Uint8Array} contents The contents to write to the - * file. - * @returns {Promise} A promise that resolves when the file is - * written. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be written. - */ - write(filePath: string | URL, contents: Uint8Array): Promise; - /** - * Appends a value to a file. If the value is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The path to the file to append to. - * @param {Uint8Array} contents The contents to append to the - * file. - * @returns {Promise} A promise that resolves when the file is - * written. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be appended to. - */ - append(filePath: string | URL, contents: Uint8Array): Promise; - /** - * Checks if a file exists. - * @param {string|URL} filePath The path to the file to check. - * @returns {Promise} A promise that resolves with true if the - * file exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isFile(filePath: string | URL): Promise; - /** - * Checks if a directory exists. - * @param {string|URL} dirPath The path to the directory to check. - * @returns {Promise} A promise that resolves with true if the - * directory exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isDirectory(dirPath: string | URL): Promise; - /** - * Creates a directory recursively. - * @param {string|URL} dirPath The path to the directory to create. - * @returns {Promise} A promise that resolves when the directory is - * created. - */ - createDirectory(dirPath: string | URL): Promise; - /** - * Deletes a file or empty directory. - * @param {string|URL} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - */ - delete(fileOrDirPath: string | URL): Promise; - /** - * Deletes a file or directory recursively. - * @param {string|URL} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - */ - deleteAll(fileOrDirPath: string | URL): Promise; - /** - * Returns a list of directory entries for the given path. - * @param {string|URL} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string. - * @throws {Error} If the directory cannot be read. - */ - list(dirPath: string | URL): AsyncIterable; - /** - * Returns the size of a file. This method handles ENOENT errors - * and returns undefined in that case. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the - * file in bytes or undefined if the file doesn't exist. - */ - size(filePath: string | URL): Promise; - /** - * Returns the last modified date of a file or directory. This method handles ENOENT errors - * and returns undefined in that case. - * @param {string|URL} fileOrDirPath The path to the file to read. - * @returns {Promise} A promise that resolves with the last modified - * date of the file or directory, or undefined if the file doesn't exist. - */ - lastModified(fileOrDirPath: string | URL): Promise; - /** - * Copies a file from one location to another. - * @param {string|URL} source The path to the file to copy. - * @param {string|URL} destination The path to copy the file to. - * @returns {Promise} A promise that resolves when the file is copied. - * @throws {Error} If the source file does not exist. - * @throws {Error} If the source file is a directory. - * @throws {Error} If the destination file is a directory. - */ - copy(source: string | URL, destination: string | URL): Promise; - /** - * Copies a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to copy. - * @param {string|URL} destination The path to copy the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * copied. - * @throws {Error} If the source file or directory does not exist. - * @throws {Error} If the destination file or directory is a directory. - */ - copyAll(source: string | URL, destination: string | URL): Promise; - /** - * Moves a file from the source path to the destination path. - * @param {string|URL} source The location of the file to move. - * @param {string|URL} destination The destination of the file to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file paths are not strings. - * @throws {Error} If the file cannot be moved. - */ - move(source: string | URL, destination: string | URL): Promise; - /** - * Moves a file or directory from the source path to the destination path. - * @param {string|URL} source The location of the file or directory to move. - * @param {string|URL} destination The destination of the file or directory to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file paths are not strings. - * @throws {Error} If the file or directory cannot be moved. - */ - moveAll(source: string | URL, destination: string | URL): Promise; - #private; -} -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class NodeHfs extends Hfs implements HfsImpl { - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp }?: { - fsp?: Fsp; - }); -} -export const hfs: NodeHfs; -export type HfsImpl = import("@humanfs/types").HfsImpl; -export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry; -export type Fsp = typeof nativeFsp; -export type Dirent = import("fs").Dirent; -import { Hfs } from "@humanfs/core"; -import nativeFsp from "node:fs/promises"; diff --git a/node_modules/@humanfs/node/package.json b/node_modules/@humanfs/node/package.json deleted file mode 100644 index 0d6de7d..0000000 --- a/node_modules/@humanfs/node/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@humanfs/node", - "version": "0.16.8", - "description": "The Node.js bindings of the humanfs library.", - "type": "module", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "import": { - "types": "./dist/index.d.ts", - "default": "./src/index.js" - } - }, - "files": [ - "dist", - "src" - ], - "scripts": { - "build": "tsc", - "prepare": "npm run build", - "pretest": "npm run build", - "test": "mocha ./tests/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/humanwhocodes/humanfs.git", - "directory": "packages/node" - }, - "publishConfig": { - "access": "public" - }, - "keywords": [ - "filesystem", - "fs", - "hfs", - "files" - ], - "author": "Nicholas C. Zakas", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/humanwhocodes/humanfs/issues" - }, - "homepage": "https://github.com/humanwhocodes/humanfs#readme", - "engines": { - "node": ">=18.18.0" - }, - "devDependencies": { - "@types/node": "^20.9.4", - "@humanfs/test": "^0.15.0", - "mocha": "^10.2.0", - "typescript": "^5.2.2" - }, - "dependencies": { - "@humanwhocodes/retry": "^0.4.0", - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0" - } -} diff --git a/node_modules/@humanfs/node/src/index.js b/node_modules/@humanfs/node/src/index.js deleted file mode 100644 index 6d551aa..0000000 --- a/node_modules/@humanfs/node/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @fileoverview This file exports everything for this package. - * @author Nicholas C. Zakas - */ - -export * from "./node-hfs.js"; -export { Hfs } from "@humanfs/core"; diff --git a/node_modules/@humanfs/node/src/node-hfs.js b/node_modules/@humanfs/node/src/node-hfs.js deleted file mode 100644 index e098b28..0000000 --- a/node_modules/@humanfs/node/src/node-hfs.js +++ /dev/null @@ -1,460 +0,0 @@ -/** - * @fileoverview The main file for the hfs package. - * @author Nicholas C. Zakas - */ -/* global Buffer:readonly, URL */ - -//----------------------------------------------------------------------------- -// Types -//----------------------------------------------------------------------------- - -/** @typedef {import("@humanfs/types").HfsImpl} HfsImpl */ -/** @typedef {import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */ -/** @typedef {import("node:fs/promises")} Fsp */ -/** @typedef {import("fs").Dirent} Dirent */ - -//----------------------------------------------------------------------------- -// Imports -//----------------------------------------------------------------------------- - -import { Hfs } from "@humanfs/core"; -import path from "node:path"; -import { Retrier } from "@humanwhocodes/retry"; -import nativeFsp from "node:fs/promises"; -import { fileURLToPath } from "node:url"; - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -const RETRY_ERROR_CODES = new Set(["ENFILE", "EMFILE"]); - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * A class representing a directory entry. - * @implements {HfsDirectoryEntry} - */ -class NodeHfsDirectoryEntry { - /** - * The name of the directory entry. - * @type {string} - */ - name; - - /** - * True if the entry is a file. - * @type {boolean} - */ - isFile; - - /** - * True if the entry is a directory. - * @type {boolean} - */ - isDirectory; - - /** - * True if the entry is a symbolic link. - * @type {boolean} - */ - isSymlink; - - /** - * Creates a new instance. - * @param {Dirent} dirent The directory entry to wrap. - */ - constructor(dirent) { - this.name = dirent.name; - this.isFile = dirent.isFile(); - this.isDirectory = dirent.isDirectory(); - this.isSymlink = dirent.isSymbolicLink(); - } -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class representing the Node.js implementation of Hfs. - * @implements {HfsImpl} - */ -export class NodeHfsImpl { - /** - * The file system module to use. - * @type {Fsp} - */ - #fsp; - - /** - * The retryer object used for retrying operations. - * @type {Retrier} - */ - #retrier; - - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp = nativeFsp } = {}) { - this.#fsp = fsp; - this.#retrier = new Retrier(error => RETRY_ERROR_CODES.has(error.code)); - } - - /** - * Reads a file and returns the contents as an Uint8Array. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the contents - * of the file or undefined if the file doesn't exist. - * @throws {Error} If the file cannot be read. - * @throws {TypeError} If the file path is not a string. - */ - bytes(filePath) { - return this.#retrier - .retry(() => this.#fsp.readFile(filePath)) - .then(buffer => new Uint8Array(buffer.buffer)) - .catch(error => { - if (error.code === "ENOENT") { - return undefined; - } - - throw error; - }); - } - - /** - * Writes a value to a file. If the value is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The path to the file to write. - * @param {Uint8Array} contents The contents to write to the - * file. - * @returns {Promise} A promise that resolves when the file is - * written. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be written. - */ - async write(filePath, contents) { - const value = Buffer.from(contents); - - return this.#retrier - .retry(() => this.#fsp.writeFile(filePath, value)) - .catch(error => { - // the directory may not exist, so create it - if (error.code === "ENOENT") { - const dirPath = path.dirname( - filePath instanceof URL - ? fileURLToPath(filePath) - : filePath, - ); - - return this.#fsp - .mkdir(dirPath, { recursive: true }) - .then(() => this.#fsp.writeFile(filePath, value)); - } - - throw error; - }); - } - - /** - * Appends a value to a file. If the value is a string, UTF-8 encoding is used. - * @param {string|URL} filePath The path to the file to append to. - * @param {Uint8Array} contents The contents to append to the - * file. - * @returns {Promise} A promise that resolves when the file is - * written. - * @throws {TypeError} If the file path is not a string. - * @throws {Error} If the file cannot be appended to. - */ - async append(filePath, contents) { - const value = Buffer.from(contents); - - return this.#retrier - .retry(() => this.#fsp.appendFile(filePath, value)) - .catch(error => { - // the directory may not exist, so create it - if (error.code === "ENOENT") { - const dirPath = path.dirname( - filePath instanceof URL - ? fileURLToPath(filePath) - : filePath, - ); - - return this.#fsp - .mkdir(dirPath, { recursive: true }) - .then(() => this.#fsp.appendFile(filePath, value)); - } - - throw error; - }); - } - - /** - * Checks if a file exists. - * @param {string|URL} filePath The path to the file to check. - * @returns {Promise} A promise that resolves with true if the - * file exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isFile(filePath) { - return this.#fsp - .stat(filePath) - .then(stat => stat.isFile()) - .catch(error => { - if (error.code === "ENOENT") { - return false; - } - - throw error; - }); - } - - /** - * Checks if a directory exists. - * @param {string|URL} dirPath The path to the directory to check. - * @returns {Promise} A promise that resolves with true if the - * directory exists or false if it does not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isDirectory(dirPath) { - return this.#fsp - .stat(dirPath) - .then(stat => stat.isDirectory()) - .catch(error => { - if (error.code === "ENOENT") { - return false; - } - - throw error; - }); - } - - /** - * Creates a directory recursively. - * @param {string|URL} dirPath The path to the directory to create. - * @returns {Promise} A promise that resolves when the directory is - * created. - */ - async createDirectory(dirPath) { - await this.#fsp.mkdir(dirPath, { recursive: true }); - } - - /** - * Deletes a file or empty directory. - * @param {string|URL} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - */ - delete(fileOrDirPath) { - return this.#fsp - .rm(fileOrDirPath) - .then(() => true) - .catch(error => { - if (error.code === "ERR_FS_EISDIR") { - return this.#fsp.rmdir(fileOrDirPath).then(() => true); - } - - if (error.code === "ENOENT") { - return false; - } - - throw error; - }); - } - - /** - * Deletes a file or directory recursively. - * @param {string|URL} fileOrDirPath The path to the file or directory to - * delete. - * @returns {Promise} A promise that resolves when the file or - * directory is deleted, true if the file or directory is deleted, false - * if the file or directory does not exist. - * @throws {TypeError} If the file or directory path is not a string. - * @throws {Error} If the file or directory cannot be deleted. - */ - deleteAll(fileOrDirPath) { - return this.#fsp - .rm(fileOrDirPath, { recursive: true }) - .then(() => true) - .catch(error => { - if (error.code === "ENOENT") { - return false; - } - - throw error; - }); - } - - /** - * Returns a list of directory entries for the given path. - * @param {string|URL} dirPath The path to the directory to read. - * @returns {AsyncIterable} A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string. - * @throws {Error} If the directory cannot be read. - */ - async *list(dirPath) { - const entries = await this.#fsp.readdir(dirPath, { - withFileTypes: true, - }); - - for (const entry of entries) { - yield new NodeHfsDirectoryEntry(entry); - } - } - - /** - * Returns the size of a file. This method handles ENOENT errors - * and returns undefined in that case. - * @param {string|URL} filePath The path to the file to read. - * @returns {Promise} A promise that resolves with the size of the - * file in bytes or undefined if the file doesn't exist. - */ - size(filePath) { - return this.#fsp - .stat(filePath) - .then(stat => stat.size) - .catch(error => { - if (error.code === "ENOENT") { - return undefined; - } - - throw error; - }); - } - - /** - * Returns the last modified date of a file or directory. This method handles ENOENT errors - * and returns undefined in that case. - * @param {string|URL} fileOrDirPath The path to the file to read. - * @returns {Promise} A promise that resolves with the last modified - * date of the file or directory, or undefined if the file doesn't exist. - */ - lastModified(fileOrDirPath) { - return this.#fsp - .stat(fileOrDirPath) - .then(stat => stat.mtime) - .catch(error => { - if (error.code === "ENOENT") { - return undefined; - } - - throw error; - }); - } - - /** - * Copies a file from one location to another. - * @param {string|URL} source The path to the file to copy. - * @param {string|URL} destination The path to copy the file to. - * @returns {Promise} A promise that resolves when the file is copied. - * @throws {Error} If the source file does not exist. - * @throws {Error} If the source file is a directory. - * @throws {Error} If the destination file is a directory. - */ - async copy(source, destination) { - const stat = await this.#fsp.lstat(source); - if (stat.isSymbolicLink()) { - const target = await this.#fsp.readlink(source); - return this.#fsp.symlink(target, destination); - } - return this.#fsp.copyFile(source, destination); - } - - /** - * Copies a file or directory from one location to another. - * @param {string|URL} source The path to the file or directory to copy. - * @param {string|URL} destination The path to copy the file or directory to. - * @returns {Promise} A promise that resolves when the file or directory is - * copied. - * @throws {Error} If the source file or directory does not exist. - * @throws {Error} If the destination file or directory is a directory. - */ - async copyAll(source, destination) { - // for files use copy() and exit - if (await this.isFile(source)) { - return this.copy(source, destination); - } - - const sourceStr = - source instanceof URL ? fileURLToPath(source) : source; - - const destinationStr = - destination instanceof URL - ? fileURLToPath(destination) - : destination; - - // for directories, create the destination directory and copy each entry - await this.createDirectory(destination); - - for await (const entry of this.list(source)) { - const fromEntryPath = path.join(sourceStr, entry.name); - const toEntryPath = path.join(destinationStr, entry.name); - - if (entry.isSymlink) { - const target = await this.#fsp.readlink(fromEntryPath); - await this.#fsp.symlink(target, toEntryPath); - } else if (entry.isDirectory) { - await this.copyAll(fromEntryPath, toEntryPath); - } else { - await this.copy(fromEntryPath, toEntryPath); - } - } - } - - /** - * Moves a file from the source path to the destination path. - * @param {string|URL} source The location of the file to move. - * @param {string|URL} destination The destination of the file to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file paths are not strings. - * @throws {Error} If the file cannot be moved. - */ - move(source, destination) { - return this.#fsp.stat(source).then(stat => { - if (stat.isDirectory()) { - throw new Error( - `EISDIR: illegal operation on a directory, move '${source}' -> '${destination}'`, - ); - } - - return this.#fsp.rename(source, destination); - }); - } - - /** - * Moves a file or directory from the source path to the destination path. - * @param {string|URL} source The location of the file or directory to move. - * @param {string|URL} destination The destination of the file or directory to move. - * @returns {Promise} A promise that resolves when the move is complete. - * @throws {TypeError} If the file paths are not strings. - * @throws {Error} If the file or directory cannot be moved. - */ - async moveAll(source, destination) { - return this.#fsp.rename(source, destination); - } -} - -/** - * A class representing a file system utility library. - * @implements {HfsImpl} - */ -export class NodeHfs extends Hfs { - /** - * Creates a new instance. - * @param {object} [options] The options for the instance. - * @param {Fsp} [options.fsp] The file system module to use. - */ - constructor({ fsp } = {}) { - super({ impl: new NodeHfsImpl({ fsp }) }); - } -} - -export const hfs = new NodeHfs(); diff --git a/node_modules/@humanfs/types/CHANGELOG.md b/node_modules/@humanfs/types/CHANGELOG.md deleted file mode 100644 index fd9725f..0000000 --- a/node_modules/@humanfs/types/CHANGELOG.md +++ /dev/null @@ -1,150 +0,0 @@ -# Changelog - -## [0.15.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.14.0...types-v0.15.0) (2024-09-09) - - -### Features - -* Add depth to HfsWalkEntry ([#130](https://github.com/humanwhocodes/humanfs/issues/130)) ([a633452](https://github.com/humanwhocodes/humanfs/commit/a63345260562b798e73c2ea63612e6fe95ac400d)) - -## [0.14.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.13.0...types-v0.14.0) (2024-06-12) - - -### Features - -* Implement Hfs#walk() method ([#119](https://github.com/humanwhocodes/humanfs/issues/119)) ([2aeade0](https://github.com/humanwhocodes/humanfs/commit/2aeade0ffbef886103dc38d16694e9b63191a8df)) - -## [0.13.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.12.0...types-v0.13.0) (2024-03-20) - - -### ⚠ BREAKING CHANGES - -* delete/deleteAll should not throw on ENOENT ([#105](https://github.com/humanwhocodes/humanfs/issues/105)) - -### Features - -* delete/deleteAll should not throw on ENOENT ([#105](https://github.com/humanwhocodes/humanfs/issues/105)) ([b508df1](https://github.com/humanwhocodes/humanfs/commit/b508df19845f7a914895c13cfe47707c0cd1a7c7)) - -## [0.12.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.11.0...types-v0.12.0) (2024-02-27) - - -### Features - -* impl write() method only needs to handle Uint8Arrays ([#92](https://github.com/humanwhocodes/humanfs/issues/92)) ([68bcfb5](https://github.com/humanwhocodes/humanfs/commit/68bcfb59a6684b184c55f97536aad730636299b5)) - -## [0.11.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.10.0...types-v0.11.0) (2024-02-23) - - -### Features - -* Impls only need bytes() method to read data ([#90](https://github.com/humanwhocodes/humanfs/issues/90)) ([c0c3b36](https://github.com/humanwhocodes/humanfs/commit/c0c3b36413c8d10e63a94ad1cc6a5cead7b52e88)) - -## [0.10.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.9.0...types-v0.10.0) (2024-02-16) - - -### ⚠ BREAKING CHANGES - -* Rewrite MemoryHfsImpl to support lastModified() ([#87](https://github.com/humanwhocodes/humanfs/issues/87)) - -### Features - -* Add lastModified() method ([#84](https://github.com/humanwhocodes/humanfs/issues/84)) ([9cbcd03](https://github.com/humanwhocodes/humanfs/commit/9cbcd03c86e4c1bed5985e10da6ab452e8c2b44c)) -* Rewrite MemoryHfsImpl to support lastModified() ([#87](https://github.com/humanwhocodes/humanfs/issues/87)) ([84e9812](https://github.com/humanwhocodes/humanfs/commit/84e98129e48acb3f2ea067b0ea745d591e8d8b91)) - -## [0.9.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.8.0...types-v0.9.0) (2024-02-14) - - -### Features - -* Add append() method ([#82](https://github.com/humanwhocodes/humanfs/issues/82)) ([ab7b978](https://github.com/humanwhocodes/humanfs/commit/ab7b978ff3be84dc3fd2fd4d6fa1131dfdec8134)) -* Add move() and moveAll() methods ([#80](https://github.com/humanwhocodes/humanfs/issues/80)) ([85f100b](https://github.com/humanwhocodes/humanfs/commit/85f100b721c99b920b307779548c2a043e7e18b5)) - -## [0.8.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.7.0...types-v0.8.0) (2024-02-09) - - -### Features - -* Add copyAll() method ([#77](https://github.com/humanwhocodes/humanfs/issues/77)) ([3c0852a](https://github.com/humanwhocodes/humanfs/commit/3c0852af99cb835b3941f58fdc2206e7b1179e21)) - -## [0.7.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.6.0...types-v0.7.0) (2024-02-08) - - -### Features - -* Add copy() method ([#69](https://github.com/humanwhocodes/humanfs/issues/69)) ([f252bac](https://github.com/humanwhocodes/humanfs/commit/f252bac6692a5b5c973ee3c696f5190caa5f12c7)) - -## [0.6.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.5.1...types-v0.6.0) (2024-02-07) - - -### Features - -* Allow URL file and directory paths ([#62](https://github.com/humanwhocodes/humanfs/issues/62)) ([a767e37](https://github.com/humanwhocodes/humanfs/commit/a767e372287b1556c4c9e8bdb26c23ff81866f99)) - -## [0.5.1](https://github.com/humanwhocodes/humanfs/compare/types-v0.5.0...types-v0.5.1) (2024-01-31) - - -### Bug Fixes - -* Order of exports and engines in package.json ([66204c2](https://github.com/humanwhocodes/humanfs/commit/66204c24bc2dd02380aa2fb3c5769ca2cf5238a7)), closes [#61](https://github.com/humanwhocodes/humanfs/issues/61) - -## [0.5.0](https://github.com/humanwhocodes/humanfs/compare/types-v0.4.0...types-v0.5.0) (2024-01-30) - - -### ⚠ BREAKING CHANGES - -* Rename fsx -> humanfs ([#56](https://github.com/humanwhocodes/humanfs/issues/56)) - -### Features - -* Rename fsx -> humanfs ([#56](https://github.com/humanwhocodes/humanfs/issues/56)) ([f5dc533](https://github.com/humanwhocodes/humanfs/commit/f5dc533c8a46d45afd7aad602af39a6074f8a07b)) - -## [0.4.0](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.3.0...fsx-types-v0.4.0) (2024-01-27) - - -### Features - -* New size() method ([#51](https://github.com/humanwhocodes/fsx/issues/51)) ([ffd12e6](https://github.com/humanwhocodes/fsx/commit/ffd12e6b0db318320dd5a9dbb8eb248106d60afa)) - -## [0.3.0](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.2.0...fsx-types-v0.3.0) (2024-01-23) - - -### ⚠ BREAKING CHANGES - -* Safer delete(); new deleteAll() method ([#37](https://github.com/humanwhocodes/fsx/issues/37)) - -### Features - -* Safer delete(); new deleteAll() method ([#37](https://github.com/humanwhocodes/fsx/issues/37)) ([2e85142](https://github.com/humanwhocodes/fsx/commit/2e85142e34bdc3cc18e18aa0b051cc9007fca4b8)) -* write() to accept ArrayBuffer views as file contents ([1fd5517](https://github.com/humanwhocodes/fsx/commit/1fd55174a528ef3dcbabc154347006bec799f3f9)) - - -### Bug Fixes - -* **types:** Ensure FsxImpl methods also return undefined ([14eadc6](https://github.com/humanwhocodes/fsx/commit/14eadc66b19e40d7406a166e019004d9888075d3)), closes [#32](https://github.com/humanwhocodes/fsx/issues/32) - -## [0.2.0](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.1.0...fsx-types-v0.2.0) (2024-01-19) - - -### Features - -* Add list() method ([#25](https://github.com/humanwhocodes/fsx/issues/25)) ([dad841b](https://github.com/humanwhocodes/fsx/commit/dad841b7c9f5312996ff23db9be36774af985157)) - -## [0.1.0](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.0.3...fsx-types-v0.1.0) (2024-01-18) - - -### Features - -* Add bytes() method, deprecate arrayBuffer() ([718c9c8](https://github.com/humanwhocodes/fsx/commit/718c9c84a0a1dcaef3cc032c882b1308e9cb3273)) - -## [0.0.3](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.0.2...fsx-types-v0.0.3) (2024-01-16) - - -### Bug Fixes - -* Ensure isFile/isDirectory rethrow non-ENOENT errors. ([d31ee56](https://github.com/humanwhocodes/fsx/commit/d31ee56788e898cbc1fc0d6a54d1551f9b17cd45)), closes [#14](https://github.com/humanwhocodes/fsx/issues/14) - -## [0.0.2](https://github.com/humanwhocodes/fsx/compare/fsx-types-v0.0.1...fsx-types-v0.0.2) (2024-01-06) - -### Bug Fixes - -- **docs:** Correct package names in READMEs ([6c552ac](https://github.com/humanwhocodes/fsx/commit/6c552ac74542a245cdc2675101858da022336a1a)) diff --git a/node_modules/@humanfs/types/README.md b/node_modules/@humanfs/types/README.md deleted file mode 100644 index 7a476fc..0000000 --- a/node_modules/@humanfs/types/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# `@humanfs/types` - -by [Nicholas C. Zakas](https://humanwhocodes.com) - -If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. - -## Description - -Additional type definitions for humanfs. These are used primarily to share type definitions across packages because there is no easy way to export imported type definitions using JavaScript and JSDoc. - -## License - -Apache 2.0 diff --git a/node_modules/@humanfs/types/package.json b/node_modules/@humanfs/types/package.json deleted file mode 100644 index bdbeff8..0000000 --- a/node_modules/@humanfs/types/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@humanfs/types", - "version": "0.15.0", - "description": "The TypeScript types for the hfs project.", - "type": "module", - "types": "src/hfs-types.ts", - "exports": { - ".": { - "types": "./src/hfs-types.ts" - }, - "./package.json": "./package.json" - }, - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/humanwhocodes/humanfs.git" - }, - "publishConfig": { - "access": "public" - }, - "keywords": [ - "filesystem", - "fs", - "hfs", - "files" - ], - "author": "Nicholas C. Zakas", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/humanwhocodes/humanfs/issues" - }, - "homepage": "https://github.com/humanwhocodes/humanfs#readme", - "engines": { - "node": ">=18.18.0" - }, - "devDependencies": { - "typescript": "^5.2.2" - } -} diff --git a/node_modules/@humanfs/types/src/hfs-types.ts b/node_modules/@humanfs/types/src/hfs-types.ts deleted file mode 100644 index c6d1096..0000000 --- a/node_modules/@humanfs/types/src/hfs-types.ts +++ /dev/null @@ -1,192 +0,0 @@ -/** - * @fileoverview The types file for the hfs package. - * @author Nicholas C. Zakas - */ - -//------------------------------------------------------------------------------ -// HfsImpl -//------------------------------------------------------------------------------ - -export interface HfsImpl { - - /** - * Reads the given file and returns the contents as an Uint8Array. - * @param filePath The file to read. - * @returns The contents of the file as a Uint8Array or undefined if the file is empty. - */ - bytes?(filePath: string|URL): Promise; - - /** - * Writes the given data to the given file. For text, assumes UTF-8 encoding. - * @param filePath The file to write to. - * @param data The data to write. - * @returns A promise that resolves when the file is written. - * @throws {Error} If the file cannot be written. - */ - write?(filePath: string|URL, data: Uint8Array): Promise; - - /** - * Appends the given data to the given file. For text, assumes UTF-8 encoding. - * @param filePath The file to append to. - * @param data The data to append. - * @returns A promise that resolves when the file is written. - * @throws {Error} If the file cannot be written. - */ - append?(filePath: string|URL, data: Uint8Array): Promise; - - /** - * Checks if the given file exists. - * @param filePath The file to check. - * @returns True if the file exists, false if not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isFile?(filePath: string|URL): Promise; - - /** - * Checks if the given directory exists. - * @param dirPath The directory to check. - * @returns True if the directory exists, false if not. - * @throws {Error} If the operation fails with a code other than ENOENT. - */ - isDirectory?(dirPath: string|URL): Promise; - - /** - * Creates the given directory, including any necessary parents. - * @param dirPath The directory to create. - * @returns A promise that resolves when the directory is created. - * @throws {Error} If the directory cannot be created. - */ - createDirectory?(dirPath: string|URL): Promise; - - /** - * Deletes the given file or empty directory. - * @param fileOrDirPath The file or directory to delete. - * @returns A promise that resolves when the file or directory is deleted, - * true if the file or directory was deleted, false if it did not exist. - * @throws {Error} If the file or directory cannot be deleted. - */ - delete?(fileOrDirPath: string|URL): Promise; - - /** - * Deletes the given file or directory recursively. - * @param fileOrDirPath The file or directory to delete. - * @returns A promise that resolves when the file or directory is deleted, - * true if the file or directory was deleted, false if it did not exist. - * @throws {Error} If the file or directory cannot be deleted. - */ - deleteAll?(fileOrDirPath: string|URL): Promise; - - /** - * Returns a list of directory entries for the given path. - * @param dirPath The path to the directory to read. - * @returns A promise that resolves with the - * directory entries. - * @throws {TypeError} If the directory path is not a string. - * @throws {Error} If the directory cannot be read. - */ - list?(dirPath: string|URL): AsyncIterable; - - /** - * Returns the size of the given file. - * @param filePath The path to the file to check. - * @returns A promise that resolves with the size of the file in bytes or - * undefined if the file does not exist. - * @throws {Error} If the file cannot be read. - */ - size?(filePath: string|URL): Promise; - - /** - * Returns the last modified date of the given file or directory. - * @param fileOrDirPath The path to the file or directory to check. - * @returns A promise that resolves with the last modified date of the file or - * directory, undefined if the file does not exist. - * @throws {Error} If the file or directory cannot be read. - */ - lastModified?(fileOrDirPath: string|URL): Promise; - - /** - * Copies the file from the source path to the destination path. - * @param source The source file to copy. - * @param destination The destination file to copy to. - * @returns A promise that resolves when the file is copied. - * @throws {Error} If the file cannot be copied. - */ - copy?(source: string|URL, destination: string|URL): Promise; - - /** - * Copies a file or directory from one location to another. - * @param source The path to the file or directory to copy. - * @param destination The path to copy the file or directory to. - * @returns A promise that resolves when the file or directory is - * copied. - * @throws {Error} If the source file or directory does not exist. - * @throws {Error} If the source cannot be read. - */ - copyAll?(source: string|URL, destination: string|URL): Promise; - - /** - * Moves a file from the source path to the destination path. - * @param source The location of the file to move. - * @param destination The destination of the file to move. - * @returns A promise that resolves when the file is moved. - * @throws {Error} If the source is a directory. - * @throws {Error} If the file cannot be moved. - */ - move?(source: string|URL, destination: string|URL): Promise; - - /** - * Moves a file or directory from one location to another. - * @param source The path to the file or directory to move. - * @param destination The path to move the file or directory to. - * @returns A promise that resolves when the file or directory is - * moved. - * @throws {Error} If the source file or directory does not exist. - * @throws {Error} If the source cannot be read. - */ - moveAll?(source: string|URL, destination: string|URL): Promise; -} - -//------------------------------------------------------------------------------ -// HfsDirectoryEntry -//------------------------------------------------------------------------------ - -export interface HfsDirectoryEntry { - - /** - * The name of the file or directory. - */ - name: string; - - /** - * True if the entry is a directory, false if not. - */ - isDirectory: boolean; - - /** - * True if the entry is a file, false if not. - */ - isFile: boolean; - - /** - * True if the entry is a symbolic link, false if not. - */ - isSymlink: boolean; - -} - -//------------------------------------------------------------------------------ -// HfsWalkEntry -//------------------------------------------------------------------------------ - -export interface HfsWalkEntry extends HfsDirectoryEntry { - - /** - * The path of the entry relative to the directory that was walked. - */ - path: string; - - /** - * The depth of the entry in the directory tree from the directory that was walked. - */ - depth: number; -} diff --git a/node_modules/@humanfs/types/tsconfig.json b/node_modules/@humanfs/types/tsconfig.json deleted file mode 100644 index 22daf84..0000000 --- a/node_modules/@humanfs/types/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "files": ["src/hfs-types.ts"], - "compilerOptions": { - "declaration": true, - "emitDeclarationOnly": true, - "allowJs": true, - "checkJs": true, - "outDir": "dist", - "target": "ES2022", - "moduleResolution": "NodeNext", - "module": "NodeNext" - } -} diff --git a/node_modules/@humanwhocodes/module-importer/CHANGELOG.md b/node_modules/@humanwhocodes/module-importer/CHANGELOG.md deleted file mode 100644 index 1b442a1..0000000 --- a/node_modules/@humanwhocodes/module-importer/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Changelog - -## [1.0.1](https://github.com/humanwhocodes/module-importer/compare/v1.0.0...v1.0.1) (2022-08-18) - - -### Bug Fixes - -* Ensure CommonJS mode works correctly. ([cf54a0b](https://github.com/humanwhocodes/module-importer/commit/cf54a0b998085066fbe1776dd0b4cacd808cc192)), closes [#6](https://github.com/humanwhocodes/module-importer/issues/6) - -## 1.0.0 (2022-08-17) - - -### Features - -* Implement ModuleImporter ([3ce4e82](https://www.github.com/humanwhocodes/module-importer/commit/3ce4e820c30c114e787bfed00a0966ac4772f563)) diff --git a/node_modules/@humanwhocodes/module-importer/LICENSE b/node_modules/@humanwhocodes/module-importer/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@humanwhocodes/module-importer/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@humanwhocodes/module-importer/README.md b/node_modules/@humanwhocodes/module-importer/README.md deleted file mode 100644 index 3de07a7..0000000 --- a/node_modules/@humanwhocodes/module-importer/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# ModuleImporter - -by [Nicholas C. Zakas](https://humanwhocodes.com) - -If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). - -## Description - -A utility for seamlessly importing modules in Node.js regardless if they are CommonJS or ESM format. Under the hood, this uses `import()` and relies on Node.js's CommonJS compatibility to work correctly. This ensures that the correct locations and formats are used for CommonJS so you can call one method and not worry about any compatibility issues. - -The problem with the default `import()` is that it always resolves relative to the file location in which it is called. If you want to resolve from a different location, you need to jump through a few hoops to achieve that. This package makes it easy to both resolve and import modules from any directory. - -## Usage - -### Node.js - -Install using [npm][npm] or [yarn][yarn]: - -``` -npm install @humanwhocodes/module-importer - -# or - -yarn add @humanwhocodes/module-importer -``` - -Import into your Node.js project: - -```js -// CommonJS -const { ModuleImporter } = require("@humanwhocodes/module-importer"); - -// ESM -import { ModuleImporter } from "@humanwhocodes/module-importer"; -``` - -### Bun - -Install using this command: - -``` -bun add @humanwhocodes/module-importer -``` - -Import into your Bun project: - -```js -import { ModuleImporter } from "@humanwhocodes/module-importer"; -``` - -## API - -After importing, create a new instance of `ModuleImporter` to start emitting events: - -```js -// cwd can be omitted to use process.cwd() -const importer = new ModuleImporter(cwd); - -// you can resolve the location of any package -const location = importer.resolve("./some-file.cjs"); - -// you can also import directly -const module = importer.import("./some-file.cjs"); -``` - -For both `resolve()` and `import()`, you can pass in package names and filenames. - -## Developer Setup - -1. Fork the repository -2. Clone your fork -3. Run `npm install` to setup dependencies -4. Run `npm test` to run tests - -## License - -Apache 2.0 - -[npm]: https://npmjs.com/ -[yarn]: https://yarnpkg.com/ diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs b/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs deleted file mode 100644 index 779e0cf..0000000 --- a/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var module$1 = require('module'); -var url = require('url'); -var path = require('path'); - -/** - * @fileoverview Universal module importer - */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('module-importer.cjs', document.baseURI).href))); -const __dirname$1 = path.dirname(__filename$1); -const require$1 = module$1.createRequire(__dirname$1 + "/"); -const { ModuleImporter } = require$1("./module-importer.cjs"); - -exports.ModuleImporter = ModuleImporter; diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts deleted file mode 100644 index a1acbb6..0000000 --- a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts +++ /dev/null @@ -1,27 +0,0 @@ -export class ModuleImporter { - /** - * Creates a new instance. - * @param {string} [cwd] The current working directory to resolve from. - */ - constructor(cwd?: string); - /** - * The base directory from which paths should be resolved. - * @type {string} - */ - cwd: string; - /** - * Resolves a module based on its name or location. - * @param {string} specifier Either an npm package name or - * relative file path. - * @returns {string|undefined} The location of the import. - * @throws {Error} If specifier cannot be located. - */ - resolve(specifier: string): string | undefined; - /** - * Imports a module based on its name or location. - * @param {string} specifier Either an npm package name or - * relative file path. - * @returns {Promise} The module's object. - */ - import(specifier: string): Promise; -} diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts deleted file mode 100644 index 498f0a2..0000000 --- a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { ModuleImporter }; -import { ModuleImporter } from "./module-importer.cjs"; diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.js b/node_modules/@humanwhocodes/module-importer/dist/module-importer.js deleted file mode 100644 index 26e052d..0000000 --- a/node_modules/@humanwhocodes/module-importer/dist/module-importer.js +++ /dev/null @@ -1,18 +0,0 @@ -import { createRequire } from 'module'; -import { fileURLToPath } from 'url'; -import { dirname } from 'path'; - -/** - * @fileoverview Universal module importer - */ - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const require = createRequire(__dirname + "/"); -const { ModuleImporter } = require("./module-importer.cjs"); - -export { ModuleImporter }; diff --git a/node_modules/@humanwhocodes/module-importer/package.json b/node_modules/@humanwhocodes/module-importer/package.json deleted file mode 100644 index 8ece071..0000000 --- a/node_modules/@humanwhocodes/module-importer/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@humanwhocodes/module-importer", - "version": "1.0.1", - "description": "Universal module importer for Node.js", - "main": "src/module-importer.cjs", - "module": "src/module-importer.js", - "type": "module", - "types": "dist/module-importer.d.ts", - "exports": { - "require": "./src/module-importer.cjs", - "import": "./src/module-importer.js" - }, - "files": [ - "dist", - "src" - ], - "publishConfig": { - "access": "public" - }, - "gitHooks": { - "pre-commit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix" - ] - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - }, - "scripts": { - "build": "rollup -c && tsc", - "prepare": "npm run build", - "lint": "eslint src/ tests/", - "test:unit": "c8 mocha tests/module-importer.test.js", - "test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs", - "test": "npm run test:unit && npm run test:build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/humanwhocodes/module-importer.git" - }, - "keywords": [ - "modules", - "esm", - "commonjs" - ], - "engines": { - "node": ">=12.22" - }, - "author": "Nicholas C. Zaks", - "license": "Apache-2.0", - "devDependencies": { - "@types/node": "^18.7.6", - "c8": "7.12.0", - "chai": "4.3.6", - "eslint": "8.22.0", - "lint-staged": "13.0.3", - "mocha": "9.2.2", - "rollup": "2.78.0", - "typescript": "4.7.4", - "yorkie": "2.0.0" - } -} diff --git a/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs b/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs deleted file mode 100644 index 3efb095..0000000 --- a/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @fileoverview Universal module importer - */ - -//----------------------------------------------------------------------------- -// Imports -//----------------------------------------------------------------------------- - -const { createRequire } = require("module"); -const { pathToFileURL } = require("url"); - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const SLASHES = new Set(["/", "\\"]); - -/** - * Normalizes directories to have a trailing slash. - * Resolve is pretty finicky -- if the directory name doesn't have - * a trailing slash then it tries to look in the parent directory. - * i.e., if the directory is "/usr/nzakas/foo" it will start the - * search in /usr/nzakas. However, if the directory is "/user/nzakas/foo/", - * then it will start the search in /user/nzakas/foo. - * @param {string} directory The directory to check. - * @returns {string} The normalized directory. - */ -function normalizeDirectory(directory) { - if (!SLASHES.has(directory[directory.length-1])) { - return directory + "/"; - } - - return directory; -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * Class for importing both CommonJS and ESM modules in Node.js. - */ -exports.ModuleImporter = class ModuleImporter { - - /** - * Creates a new instance. - * @param {string} [cwd] The current working directory to resolve from. - */ - constructor(cwd = process.cwd()) { - - /** - * The base directory from which paths should be resolved. - * @type {string} - */ - this.cwd = normalizeDirectory(cwd); - } - - /** - * Resolves a module based on its name or location. - * @param {string} specifier Either an npm package name or - * relative file path. - * @returns {string|undefined} The location of the import. - * @throws {Error} If specifier cannot be located. - */ - resolve(specifier) { - const require = createRequire(this.cwd); - return require.resolve(specifier); - } - - /** - * Imports a module based on its name or location. - * @param {string} specifier Either an npm package name or - * relative file path. - * @returns {Promise} The module's object. - */ - import(specifier) { - const location = this.resolve(specifier); - return import(pathToFileURL(location).href); - } - -} diff --git a/node_modules/@humanwhocodes/module-importer/src/module-importer.js b/node_modules/@humanwhocodes/module-importer/src/module-importer.js deleted file mode 100644 index f5464e1..0000000 --- a/node_modules/@humanwhocodes/module-importer/src/module-importer.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @fileoverview Universal module importer - */ - -//----------------------------------------------------------------------------- -// Imports -//----------------------------------------------------------------------------- - -import { createRequire } from "module"; -import { fileURLToPath } from "url"; -import { dirname } from "path"; - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); -const require = createRequire(__dirname + "/"); -const { ModuleImporter } = require("./module-importer.cjs"); - -export { ModuleImporter }; diff --git a/node_modules/@humanwhocodes/retry/LICENSE b/node_modules/@humanwhocodes/retry/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/@humanwhocodes/retry/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [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. diff --git a/node_modules/@humanwhocodes/retry/README.md b/node_modules/@humanwhocodes/retry/README.md deleted file mode 100644 index 0ec7a47..0000000 --- a/node_modules/@humanwhocodes/retry/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# Retry utility - -by [Nicholas C. Zakas](https://humanwhocodes.com) - -If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star. - -## Description - -A utility for retrying failed async JavaScript calls based on the error returned. - -## Usage - -### Node.js - -Install using [npm][npm] or [yarn][yarn]: - -``` -npm install @humanwhocodes/retry - -# or - -yarn add @humanwhocodes/retry -``` - -Import into your Node.js project: - -```js -// CommonJS -const { Retrier } = require("@humanwhocodes/retry"); - -// ESM -import { Retrier } from "@humanwhocodes/retry"; -``` - -### Deno - -Install using [JSR](https://jsr.io): - -```shell -deno add @humanwhocodes/retry - -#or - -jsr add @humanwhocodes/retry -``` - -Then import into your Deno project: - -```js -import { Retrier } from "@humanwhocodes/retry"; -``` - -### Bun - -Install using this command: - -``` -bun add @humanwhocodes/retry -``` - -Import into your Bun project: - -```js -import { Retrier } from "@humanwhocodes/retry"; -``` - -### Browser - -It's recommended to import the minified version to save bandwidth: - -```js -import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry?min"; -``` - -However, you can also import the unminified version for debugging purposes: - -```js -import { Retrier } from "https://cdn.skypack.dev/@humanwhocodes/retry"; -``` - -## API - -After importing, create a new instance of `Retrier` and specify the function to run on the error. This function should return `true` if you want the call retried and `false` if not. - -```js -// this instance will retry if the specific error code is found -const retrier = new Retrier(error => { - return error.code === "ENFILE" || error.code === "EMFILE"; -}); -``` - -Then, call the `retry()` method around the function you'd like to retry, such as: - -```js -import fs from "fs/promises"; - -const retrier = new Retrier(error => { - return error.code === "ENFILE" || error.code === "EMFILE"; -}); - -const text = await retrier.retry(() => fs.readFile("README.md", "utf8")); -``` - -The `retry()` method will either pass through the result on success or wait and retry on failure. Any error that isn't caught by the retrier is automatically rejected so the end result is a transparent passing through of both success and failure. - -### Setting a Timeout - -You can control how long a task will attempt to retry before giving up by passing the `timeout` option to the `Retrier` constructor. By default, the timeout is one minute. - -```js -import fs from "fs/promises"; - -const retrier = new Retrier(error => { - return error.code === "ENFILE" || error.code === "EMFILE"; -}, { timeout: 100_000 }); - -const text = await retrier.retry(() => fs.readFile("README.md", "utf8")); -``` - -When a call times out, it rejects the first error that was received from calling the function. - -### Setting a Concurrency Limit - -When processing a large number of function calls, you can limit the number of concurrent function calls by passing the `concurrency` option to the `Retrier` constructor. By default, `concurrency` is 1000. - -```js -import fs from "fs/promises"; - -const retrier = new Retrier(error => { - return error.code === "ENFILE" || error.code === "EMFILE"; -}, { concurrency: 100 }); - -const filenames = getFilenames(); -const contents = await Promise.all( - filenames.map(filename => retrier.retry(() => fs.readFile(filename, "utf8")) -); -``` - -### Aborting with `AbortSignal` - -You can also pass an `AbortSignal` to cancel a retry: - -```js -import fs from "fs/promises"; - -const controller = new AbortController(); -const retrier = new Retrier(error => { - return error.code === "ENFILE" || error.code === "EMFILE"; -}); - -const text = await retrier.retry( - () => fs.readFile("README.md", "utf8"), - { signal: controller.signal } -); -``` - -## Developer Setup - -1. Fork the repository -2. Clone your fork -3. Run `npm install` to setup dependencies -4. Run `npm test` to run tests - -### Debug Output - -Enable debugging output by setting the `DEBUG` environment variable to `"@hwc/retry"` before running. - -## License - -Apache 2.0 - -## Prior Art - -This utility is inspired by, and contains code from [`graceful-fs`](https://github.com/isaacs/node-graceful-fs). - -[npm]: https://npmjs.com/ -[yarn]: https://yarnpkg.com/ diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.cjs b/node_modules/@humanwhocodes/retry/dist/retrier.cjs deleted file mode 100644 index 635e1e0..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.cjs +++ /dev/null @@ -1,478 +0,0 @@ -'use strict'; - -/** - * @fileoverview A utility for retrying failed async method calls. - */ - -/* global setTimeout, clearTimeout */ - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -const MAX_TASK_TIMEOUT = 60000; -const MAX_TASK_DELAY = 100; -const MAX_CONCURRENCY = 1000; - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Logs a message to the console if the DEBUG environment variable is set. - * @param {string} message The message to log. - * @returns {void} - */ -function debug(message) { - if (globalThis?.process?.env.DEBUG === "@hwc/retry") { - console.debug(message); - } -} - -/* - * The following logic has been extracted from graceful-fs. - * - * The ISC License - * - * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/** - * Checks if it is time to retry a task based on the timestamp and last attempt time. - * @param {RetryTask} task The task to check. - * @param {number} maxDelay The maximum delay for the queue. - * @returns {boolean} true if it is time to retry, false otherwise. - */ -function isTimeToRetry(task, maxDelay) { - const timeSinceLastAttempt = Date.now() - task.lastAttempt; - const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); - const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); - - return timeSinceLastAttempt >= desiredDelay; -} - -/** - * Checks if it is time to bail out based on the given timestamp. - * @param {RetryTask} task The task to check. - * @param {number} timeout The timeout for the queue. - * @returns {boolean} true if it is time to bail, false otherwise. - */ -function isTimeToBail(task, timeout) { - return task.age > timeout; -} - -/** - * Creates a new promise with resolve and reject functions. - * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. - */ -function createPromise() { - if (Promise.withResolvers) { - return Promise.withResolvers(); - } - - let resolve, reject; - - const promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - - if (resolve === undefined || reject === undefined) { - throw new Error("Promise executor did not initialize resolve or reject."); - } - - return { promise, resolve, reject }; -} - - -/** - * A class to represent a task in the retry queue. - */ -class RetryTask { - - /** - * The unique ID for the task. - * @type {string} - */ - id = Math.random().toString(36).slice(2); - - /** - * The function to call. - * @type {Function} - */ - fn; - - /** - * The error that was thrown. - * @type {Error} - */ - error; - - /** - * The timestamp of the task. - * @type {number} - */ - timestamp = Date.now(); - - /** - * The timestamp of the last attempt. - * @type {number} - */ - lastAttempt = this.timestamp; - - /** - * The resolve function for the promise. - * @type {Function} - */ - resolve; - - /** - * The reject function for the promise. - * @type {Function} - */ - reject; - - /** - * The AbortSignal to monitor for cancellation. - * @type {AbortSignal|undefined} - */ - signal; - - /** - * Creates a new instance. - * @param {Function} fn The function to call. - * @param {Error} error The error that was thrown. - * @param {Function} resolve The resolve function for the promise. - * @param {Function} reject The reject function for the promise. - * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. - */ - constructor(fn, error, resolve, reject, signal) { - this.fn = fn; - this.error = error; - this.timestamp = Date.now(); - this.lastAttempt = Date.now(); - this.resolve = resolve; - this.reject = reject; - this.signal = signal; - } - - /** - * Gets the age of the task. - * @returns {number} The age of the task in milliseconds. - * @readonly - */ - get age() { - return Date.now() - this.timestamp; - } -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class that manages a queue of retry jobs. - */ -class Retrier { - - /** - * Represents the queue for processing tasks. - * @type {Array} - */ - #retrying = []; - - /** - * Represents the queue for pending tasks. - * @type {Array} - */ - #pending = []; - - /** - * The number of tasks currently being processed. - * @type {number} - */ - #working = 0; - - /** - * The timeout for the queue. - * @type {number} - */ - #timeout; - - /** - * The maximum delay for the queue. - * @type {number} - */ - #maxDelay; - - /** - * The setTimeout() timer ID. - * @type {NodeJS.Timeout|undefined} - */ - #timerId; - - /** - * The function to call. - * @type {Function} - */ - #check; - - /** - * The maximum number of concurrent tasks. - * @type {number} - */ - #concurrency; - - /** - * Creates a new instance. - * @param {Function} check The function to call. - * @param {object} [options] The options for the instance. - * @param {number} [options.timeout] The timeout for the queue. - * @param {number} [options.maxDelay] The maximum delay for the queue. - * @param {number} [options.concurrency] The maximum number of concurrent tasks. - */ - constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { - - if (typeof check !== "function") { - throw new Error("Missing function to check errors"); - } - - this.#check = check; - this.#timeout = timeout; - this.#maxDelay = maxDelay; - this.#concurrency = concurrency; - } - - /** - * Gets the number of tasks waiting to be retried. - * @returns {number} The number of tasks in the retry queue. - */ - get retrying() { - return this.#retrying.length; - } - - /** - * Gets the number of tasks waiting to be processed in the pending queue. - * @returns {number} The number of tasks in the pending queue. - */ - get pending() { - return this.#pending.length; - } - - /** - * Gets the number of tasks currently being processed. - * @returns {number} The number of tasks currently being processed. - */ - get working() { - return this.#working; - } - - /** - * Calls the function and retries if it fails. - * @param {Function} fn The function to call. - * @param {Object} options The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @param {Promise} options.promise The promise to return when the function settles. - * @param {Function} options.resolve The resolve function for the promise. - * @param {Function} options.reject The reject function for the promise. - * @returns {Promise} A promise that resolves when the function is - * called successfully. - */ - #call(fn, { signal, promise, resolve, reject }) { - - let result; - - try { - result = fn(); - } catch (/** @type {any} */ error) { - reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); - return promise; - } - - // if the result is not a promise then reject an error - if (!result || typeof result.then !== "function") { - reject(new Error("Result is not a promise.")); - return promise; - } - - this.#working++; - promise.finally(() => { - this.#working--; - this.#processPending(); - }) - // `promise.finally` creates a new promise that may be rejected, so it must be handled. - .catch(() => { }); - - // call the original function and catch any ENFILE or EMFILE errors - Promise.resolve(result) - .then(value => { - debug("Function called successfully without retry."); - resolve(value); - }) - .catch(error => { - if (!this.#check(error)) { - reject(error); - return; - } - - const task = new RetryTask(fn, error, resolve, reject, signal); - - debug(`Function failed, queuing for retry with task ${task.id}.`); - this.#retrying.push(task); - - signal?.addEventListener("abort", () => { - debug(`Task ${task.id} was aborted due to AbortSignal.`); - reject(signal.reason); - }); - - this.#processQueue(); - }); - - return promise; - } - - /** - * Adds a new retry job to the queue. - * @template {(...args: unknown[]) => Promise} Func - * @template {Awaited>} RetVal - * @param {Func} fn The function to call. - * @param {object} [options] The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @returns {Promise} A promise that resolves when the queue is processed. - */ - retry(fn, { signal } = {}) { - - signal?.throwIfAborted(); - - const { promise, resolve, reject } = createPromise(); - - this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); - this.#processPending(); - - return promise; - } - - - /** - * Processes the pending queue and the retry queue. - * @returns {void} - */ - #processAll() { - if (this.pending) { - this.#processPending(); - } - - if (this.retrying) { - this.#processQueue(); - } - } - - /** - * Processes the pending queue to see which tasks can be started. - * @returns {void} - */ - #processPending() { - - debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); - - const available = this.#concurrency - this.working; - - if (available <= 0) { - return; - } - - const count = Math.min(this.pending, available); - - for (let i = 0; i < count; i++) { - const task = this.#pending.shift(); - task?.(); - } - - debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); - } - - /** - * Processes the queue. - * @returns {void} - */ - #processQueue() { - // clear any timer because we're going to check right now - clearTimeout(this.#timerId); - this.#timerId = undefined; - - debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); - - const processAgain = () => { - this.#timerId = setTimeout(() => this.#processAll(), 0); - }; - - // if there's nothing in the queue, we're done - const task = this.#retrying.shift(); - if (!task) { - debug("Queue is empty, exiting."); - - if (this.pending) { - processAgain(); - } - return; - } - - // if it's time to bail, then bail - if (isTimeToBail(task, this.#timeout)) { - debug(`Task ${task.id} was abandoned due to timeout.`); - task.reject(task.error); - processAgain(); - return; - } - - // if it's not time to retry, then wait and try again - if (!isTimeToRetry(task, this.#maxDelay)) { - debug(`Task ${task.id} is not ready to retry, skipping.`); - this.#retrying.push(task); - processAgain(); - return; - } - - // otherwise, try again - task.lastAttempt = Date.now(); - - // Promise.resolve needed in case it's a thenable but not a Promise - Promise.resolve(task.fn()) - // @ts-ignore because we know it's any - .then(result => { - debug(`Task ${task.id} succeeded after ${task.age}ms.`); - task.resolve(result); - }) - - // @ts-ignore because we know it's any - .catch(error => { - if (!this.#check(error)) { - debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); - task.reject(error); - return; - } - - // update the task timestamp and push to back of queue to try again - task.lastAttempt = Date.now(); - this.#retrying.push(task); - debug(`Task ${task.id} failed, requeueing to try again.`); - }) - .finally(() => { - this.#processAll(); - }); - } -} - -exports.Retrier = Retrier; diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.d.cts b/node_modules/@humanwhocodes/retry/dist/retrier.d.cts deleted file mode 100644 index 2d3811e..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.d.cts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A class that manages a queue of retry jobs. - */ -export class Retrier { - /** - * Creates a new instance. - * @param {Function} check The function to call. - * @param {object} [options] The options for the instance. - * @param {number} [options.timeout] The timeout for the queue. - * @param {number} [options.maxDelay] The maximum delay for the queue. - * @param {number} [options.concurrency] The maximum number of concurrent tasks. - */ - constructor(check: Function, { timeout, maxDelay, concurrency }?: { - timeout?: number | undefined; - maxDelay?: number | undefined; - concurrency?: number | undefined; - } | undefined); - /** - * Gets the number of tasks waiting to be retried. - * @returns {number} The number of tasks in the retry queue. - */ - get retrying(): number; - /** - * Gets the number of tasks waiting to be processed in the pending queue. - * @returns {number} The number of tasks in the pending queue. - */ - get pending(): number; - /** - * Gets the number of tasks currently being processed. - * @returns {number} The number of tasks currently being processed. - */ - get working(): number; - /** - * Adds a new retry job to the queue. - * @template {(...args: unknown[]) => Promise} Func - * @template {Awaited>} RetVal - * @param {Func} fn The function to call. - * @param {object} [options] The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @returns {Promise} A promise that resolves when the queue is processed. - */ - retry Promise, RetVal extends Awaited>>(fn: Func, { signal }?: { - signal?: AbortSignal | undefined; - } | undefined): Promise; - #private; -} diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.d.ts b/node_modules/@humanwhocodes/retry/dist/retrier.d.ts deleted file mode 100644 index 2d3811e..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A class that manages a queue of retry jobs. - */ -export class Retrier { - /** - * Creates a new instance. - * @param {Function} check The function to call. - * @param {object} [options] The options for the instance. - * @param {number} [options.timeout] The timeout for the queue. - * @param {number} [options.maxDelay] The maximum delay for the queue. - * @param {number} [options.concurrency] The maximum number of concurrent tasks. - */ - constructor(check: Function, { timeout, maxDelay, concurrency }?: { - timeout?: number | undefined; - maxDelay?: number | undefined; - concurrency?: number | undefined; - } | undefined); - /** - * Gets the number of tasks waiting to be retried. - * @returns {number} The number of tasks in the retry queue. - */ - get retrying(): number; - /** - * Gets the number of tasks waiting to be processed in the pending queue. - * @returns {number} The number of tasks in the pending queue. - */ - get pending(): number; - /** - * Gets the number of tasks currently being processed. - * @returns {number} The number of tasks currently being processed. - */ - get working(): number; - /** - * Adds a new retry job to the queue. - * @template {(...args: unknown[]) => Promise} Func - * @template {Awaited>} RetVal - * @param {Func} fn The function to call. - * @param {object} [options] The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @returns {Promise} A promise that resolves when the queue is processed. - */ - retry Promise, RetVal extends Awaited>>(fn: Func, { signal }?: { - signal?: AbortSignal | undefined; - } | undefined): Promise; - #private; -} diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.js b/node_modules/@humanwhocodes/retry/dist/retrier.js deleted file mode 100644 index 29c9d3e..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.js +++ /dev/null @@ -1,477 +0,0 @@ -// @ts-self-types="./retrier.d.ts" -/** - * @fileoverview A utility for retrying failed async method calls. - */ - -/* global setTimeout, clearTimeout */ - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -const MAX_TASK_TIMEOUT = 60000; -const MAX_TASK_DELAY = 100; -const MAX_CONCURRENCY = 1000; - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Logs a message to the console if the DEBUG environment variable is set. - * @param {string} message The message to log. - * @returns {void} - */ -function debug(message) { - if (globalThis?.process?.env.DEBUG === "@hwc/retry") { - console.debug(message); - } -} - -/* - * The following logic has been extracted from graceful-fs. - * - * The ISC License - * - * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/** - * Checks if it is time to retry a task based on the timestamp and last attempt time. - * @param {RetryTask} task The task to check. - * @param {number} maxDelay The maximum delay for the queue. - * @returns {boolean} true if it is time to retry, false otherwise. - */ -function isTimeToRetry(task, maxDelay) { - const timeSinceLastAttempt = Date.now() - task.lastAttempt; - const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); - const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); - - return timeSinceLastAttempt >= desiredDelay; -} - -/** - * Checks if it is time to bail out based on the given timestamp. - * @param {RetryTask} task The task to check. - * @param {number} timeout The timeout for the queue. - * @returns {boolean} true if it is time to bail, false otherwise. - */ -function isTimeToBail(task, timeout) { - return task.age > timeout; -} - -/** - * Creates a new promise with resolve and reject functions. - * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. - */ -function createPromise() { - if (Promise.withResolvers) { - return Promise.withResolvers(); - } - - let resolve, reject; - - const promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - - if (resolve === undefined || reject === undefined) { - throw new Error("Promise executor did not initialize resolve or reject."); - } - - return { promise, resolve, reject }; -} - - -/** - * A class to represent a task in the retry queue. - */ -class RetryTask { - - /** - * The unique ID for the task. - * @type {string} - */ - id = Math.random().toString(36).slice(2); - - /** - * The function to call. - * @type {Function} - */ - fn; - - /** - * The error that was thrown. - * @type {Error} - */ - error; - - /** - * The timestamp of the task. - * @type {number} - */ - timestamp = Date.now(); - - /** - * The timestamp of the last attempt. - * @type {number} - */ - lastAttempt = this.timestamp; - - /** - * The resolve function for the promise. - * @type {Function} - */ - resolve; - - /** - * The reject function for the promise. - * @type {Function} - */ - reject; - - /** - * The AbortSignal to monitor for cancellation. - * @type {AbortSignal|undefined} - */ - signal; - - /** - * Creates a new instance. - * @param {Function} fn The function to call. - * @param {Error} error The error that was thrown. - * @param {Function} resolve The resolve function for the promise. - * @param {Function} reject The reject function for the promise. - * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. - */ - constructor(fn, error, resolve, reject, signal) { - this.fn = fn; - this.error = error; - this.timestamp = Date.now(); - this.lastAttempt = Date.now(); - this.resolve = resolve; - this.reject = reject; - this.signal = signal; - } - - /** - * Gets the age of the task. - * @returns {number} The age of the task in milliseconds. - * @readonly - */ - get age() { - return Date.now() - this.timestamp; - } -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class that manages a queue of retry jobs. - */ -class Retrier { - - /** - * Represents the queue for processing tasks. - * @type {Array} - */ - #retrying = []; - - /** - * Represents the queue for pending tasks. - * @type {Array} - */ - #pending = []; - - /** - * The number of tasks currently being processed. - * @type {number} - */ - #working = 0; - - /** - * The timeout for the queue. - * @type {number} - */ - #timeout; - - /** - * The maximum delay for the queue. - * @type {number} - */ - #maxDelay; - - /** - * The setTimeout() timer ID. - * @type {NodeJS.Timeout|undefined} - */ - #timerId; - - /** - * The function to call. - * @type {Function} - */ - #check; - - /** - * The maximum number of concurrent tasks. - * @type {number} - */ - #concurrency; - - /** - * Creates a new instance. - * @param {Function} check The function to call. - * @param {object} [options] The options for the instance. - * @param {number} [options.timeout] The timeout for the queue. - * @param {number} [options.maxDelay] The maximum delay for the queue. - * @param {number} [options.concurrency] The maximum number of concurrent tasks. - */ - constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { - - if (typeof check !== "function") { - throw new Error("Missing function to check errors"); - } - - this.#check = check; - this.#timeout = timeout; - this.#maxDelay = maxDelay; - this.#concurrency = concurrency; - } - - /** - * Gets the number of tasks waiting to be retried. - * @returns {number} The number of tasks in the retry queue. - */ - get retrying() { - return this.#retrying.length; - } - - /** - * Gets the number of tasks waiting to be processed in the pending queue. - * @returns {number} The number of tasks in the pending queue. - */ - get pending() { - return this.#pending.length; - } - - /** - * Gets the number of tasks currently being processed. - * @returns {number} The number of tasks currently being processed. - */ - get working() { - return this.#working; - } - - /** - * Calls the function and retries if it fails. - * @param {Function} fn The function to call. - * @param {Object} options The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @param {Promise} options.promise The promise to return when the function settles. - * @param {Function} options.resolve The resolve function for the promise. - * @param {Function} options.reject The reject function for the promise. - * @returns {Promise} A promise that resolves when the function is - * called successfully. - */ - #call(fn, { signal, promise, resolve, reject }) { - - let result; - - try { - result = fn(); - } catch (/** @type {any} */ error) { - reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); - return promise; - } - - // if the result is not a promise then reject an error - if (!result || typeof result.then !== "function") { - reject(new Error("Result is not a promise.")); - return promise; - } - - this.#working++; - promise.finally(() => { - this.#working--; - this.#processPending(); - }) - // `promise.finally` creates a new promise that may be rejected, so it must be handled. - .catch(() => { }); - - // call the original function and catch any ENFILE or EMFILE errors - Promise.resolve(result) - .then(value => { - debug("Function called successfully without retry."); - resolve(value); - }) - .catch(error => { - if (!this.#check(error)) { - reject(error); - return; - } - - const task = new RetryTask(fn, error, resolve, reject, signal); - - debug(`Function failed, queuing for retry with task ${task.id}.`); - this.#retrying.push(task); - - signal?.addEventListener("abort", () => { - debug(`Task ${task.id} was aborted due to AbortSignal.`); - reject(signal.reason); - }); - - this.#processQueue(); - }); - - return promise; - } - - /** - * Adds a new retry job to the queue. - * @template {(...args: unknown[]) => Promise} Func - * @template {Awaited>} RetVal - * @param {Func} fn The function to call. - * @param {object} [options] The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @returns {Promise} A promise that resolves when the queue is processed. - */ - retry(fn, { signal } = {}) { - - signal?.throwIfAborted(); - - const { promise, resolve, reject } = createPromise(); - - this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); - this.#processPending(); - - return promise; - } - - - /** - * Processes the pending queue and the retry queue. - * @returns {void} - */ - #processAll() { - if (this.pending) { - this.#processPending(); - } - - if (this.retrying) { - this.#processQueue(); - } - } - - /** - * Processes the pending queue to see which tasks can be started. - * @returns {void} - */ - #processPending() { - - debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); - - const available = this.#concurrency - this.working; - - if (available <= 0) { - return; - } - - const count = Math.min(this.pending, available); - - for (let i = 0; i < count; i++) { - const task = this.#pending.shift(); - task?.(); - } - - debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); - } - - /** - * Processes the queue. - * @returns {void} - */ - #processQueue() { - // clear any timer because we're going to check right now - clearTimeout(this.#timerId); - this.#timerId = undefined; - - debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); - - const processAgain = () => { - this.#timerId = setTimeout(() => this.#processAll(), 0); - }; - - // if there's nothing in the queue, we're done - const task = this.#retrying.shift(); - if (!task) { - debug("Queue is empty, exiting."); - - if (this.pending) { - processAgain(); - } - return; - } - - // if it's time to bail, then bail - if (isTimeToBail(task, this.#timeout)) { - debug(`Task ${task.id} was abandoned due to timeout.`); - task.reject(task.error); - processAgain(); - return; - } - - // if it's not time to retry, then wait and try again - if (!isTimeToRetry(task, this.#maxDelay)) { - debug(`Task ${task.id} is not ready to retry, skipping.`); - this.#retrying.push(task); - processAgain(); - return; - } - - // otherwise, try again - task.lastAttempt = Date.now(); - - // Promise.resolve needed in case it's a thenable but not a Promise - Promise.resolve(task.fn()) - // @ts-ignore because we know it's any - .then(result => { - debug(`Task ${task.id} succeeded after ${task.age}ms.`); - task.resolve(result); - }) - - // @ts-ignore because we know it's any - .catch(error => { - if (!this.#check(error)) { - debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); - task.reject(error); - return; - } - - // update the task timestamp and push to back of queue to try again - task.lastAttempt = Date.now(); - this.#retrying.push(task); - debug(`Task ${task.id} failed, requeueing to try again.`); - }) - .finally(() => { - this.#processAll(); - }); - } -} - -export { Retrier }; diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.min.js b/node_modules/@humanwhocodes/retry/dist/retrier.min.js deleted file mode 100644 index 3760926..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.min.js +++ /dev/null @@ -1 +0,0 @@ -function e(e){"@hwc/retry"===globalThis?.process?.env.DEBUG&&console.debug(e)}class RetryTask{id=Math.random().toString(36).slice(2);fn;error;timestamp=Date.now();lastAttempt=this.timestamp;resolve;reject;signal;constructor(e,t,r,i,s){this.fn=e,this.error=t,this.timestamp=Date.now(),this.lastAttempt=Date.now(),this.resolve=r,this.reject=i,this.signal=s}get age(){return Date.now()-this.timestamp}}class Retrier{#e=[];#t=[];#r=0;#i;#s;#n;#o;#c;constructor(e,{timeout:t=6e4,maxDelay:r=100,concurrency:i=1e3}={}){if("function"!=typeof e)throw new Error("Missing function to check errors");this.#o=e,this.#i=t,this.#s=r,this.#c=i}get retrying(){return this.#e.length}get pending(){return this.#t.length}get working(){return this.#r}#a(t,{signal:r,promise:i,resolve:s,reject:n}){let o;try{o=t()}catch(e){return n(new Error(`Synchronous error: ${e.message}`,{cause:e})),i}return o&&"function"==typeof o.then?(this.#r++,i.finally((()=>{this.#r--,this.#h()})).catch((()=>{})),Promise.resolve(o).then((t=>{e("Function called successfully without retry."),s(t)})).catch((i=>{if(!this.#o(i))return void n(i);const o=new RetryTask(t,i,s,n,r);e(`Function failed, queuing for retry with task ${o.id}.`),this.#e.push(o),r?.addEventListener("abort",(()=>{e(`Task ${o.id} was aborted due to AbortSignal.`),n(r.reason)})),this.#g()})),i):(n(new Error("Result is not a promise.")),i)}retry(e,{signal:t}={}){t?.throwIfAborted();const{promise:r,resolve:i,reject:s}=function(){if(Promise.withResolvers)return Promise.withResolvers();let e,t;const r=new Promise(((r,i)=>{e=r,t=i}));if(void 0===e||void 0===t)throw new Error("Promise executor did not initialize resolve or reject.");return{promise:r,resolve:e,reject:t}}();return this.#t.push((()=>this.#a(e,{signal:t,promise:r,resolve:i,reject:s}))),this.#h(),r}#u(){this.pending&&this.#h(),this.retrying&&this.#g()}#h(){e(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`);const t=this.#c-this.working;if(t<=0)return;const r=Math.min(this.pending,t);for(let e=0;e{this.#n=setTimeout((()=>this.#u()),0)},r=this.#e.shift();return r?function(e,t){return e.age>t}(r,this.#i)?(e(`Task ${r.id} was abandoned due to timeout.`),r.reject(r.error),void t()):function(e,t){const r=Date.now()-e.lastAttempt,i=Math.max(e.lastAttempt-e.timestamp,1);return r>=Math.min(1.2*i,t)}(r,this.#s)?(r.lastAttempt=Date.now(),void Promise.resolve(r.fn()).then((t=>{e(`Task ${r.id} succeeded after ${r.age}ms.`),r.resolve(t)})).catch((t=>{if(!this.#o(t))return e(`Task ${r.id} failed with non-retryable error: ${t.message}.`),void r.reject(t);r.lastAttempt=Date.now(),this.#e.push(r),e(`Task ${r.id} failed, requeueing to try again.`)})).finally((()=>{this.#u()}))):(e(`Task ${r.id} is not ready to retry, skipping.`),this.#e.push(r),void t()):(e("Queue is empty, exiting."),void(this.pending&&t()))}}export{Retrier}; diff --git a/node_modules/@humanwhocodes/retry/dist/retrier.mjs b/node_modules/@humanwhocodes/retry/dist/retrier.mjs deleted file mode 100644 index a05cd0d..0000000 --- a/node_modules/@humanwhocodes/retry/dist/retrier.mjs +++ /dev/null @@ -1,476 +0,0 @@ -/** - * @fileoverview A utility for retrying failed async method calls. - */ - -/* global setTimeout, clearTimeout */ - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- - -const MAX_TASK_TIMEOUT = 60000; -const MAX_TASK_DELAY = 100; -const MAX_CONCURRENCY = 1000; - -//----------------------------------------------------------------------------- -// Helpers -//----------------------------------------------------------------------------- - -/** - * Logs a message to the console if the DEBUG environment variable is set. - * @param {string} message The message to log. - * @returns {void} - */ -function debug(message) { - if (globalThis?.process?.env.DEBUG === "@hwc/retry") { - console.debug(message); - } -} - -/* - * The following logic has been extracted from graceful-fs. - * - * The ISC License - * - * Copyright (c) 2011-2023 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/** - * Checks if it is time to retry a task based on the timestamp and last attempt time. - * @param {RetryTask} task The task to check. - * @param {number} maxDelay The maximum delay for the queue. - * @returns {boolean} true if it is time to retry, false otherwise. - */ -function isTimeToRetry(task, maxDelay) { - const timeSinceLastAttempt = Date.now() - task.lastAttempt; - const timeSinceStart = Math.max(task.lastAttempt - task.timestamp, 1); - const desiredDelay = Math.min(timeSinceStart * 1.2, maxDelay); - - return timeSinceLastAttempt >= desiredDelay; -} - -/** - * Checks if it is time to bail out based on the given timestamp. - * @param {RetryTask} task The task to check. - * @param {number} timeout The timeout for the queue. - * @returns {boolean} true if it is time to bail, false otherwise. - */ -function isTimeToBail(task, timeout) { - return task.age > timeout; -} - -/** - * Creates a new promise with resolve and reject functions. - * @returns {{promise:Promise, resolve:(value:any) => any, reject: (value:any) => any}} A new promise. - */ -function createPromise() { - if (Promise.withResolvers) { - return Promise.withResolvers(); - } - - let resolve, reject; - - const promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - - if (resolve === undefined || reject === undefined) { - throw new Error("Promise executor did not initialize resolve or reject."); - } - - return { promise, resolve, reject }; -} - - -/** - * A class to represent a task in the retry queue. - */ -class RetryTask { - - /** - * The unique ID for the task. - * @type {string} - */ - id = Math.random().toString(36).slice(2); - - /** - * The function to call. - * @type {Function} - */ - fn; - - /** - * The error that was thrown. - * @type {Error} - */ - error; - - /** - * The timestamp of the task. - * @type {number} - */ - timestamp = Date.now(); - - /** - * The timestamp of the last attempt. - * @type {number} - */ - lastAttempt = this.timestamp; - - /** - * The resolve function for the promise. - * @type {Function} - */ - resolve; - - /** - * The reject function for the promise. - * @type {Function} - */ - reject; - - /** - * The AbortSignal to monitor for cancellation. - * @type {AbortSignal|undefined} - */ - signal; - - /** - * Creates a new instance. - * @param {Function} fn The function to call. - * @param {Error} error The error that was thrown. - * @param {Function} resolve The resolve function for the promise. - * @param {Function} reject The reject function for the promise. - * @param {AbortSignal|undefined} signal The AbortSignal to monitor for cancellation. - */ - constructor(fn, error, resolve, reject, signal) { - this.fn = fn; - this.error = error; - this.timestamp = Date.now(); - this.lastAttempt = Date.now(); - this.resolve = resolve; - this.reject = reject; - this.signal = signal; - } - - /** - * Gets the age of the task. - * @returns {number} The age of the task in milliseconds. - * @readonly - */ - get age() { - return Date.now() - this.timestamp; - } -} - -//----------------------------------------------------------------------------- -// Exports -//----------------------------------------------------------------------------- - -/** - * A class that manages a queue of retry jobs. - */ -class Retrier { - - /** - * Represents the queue for processing tasks. - * @type {Array} - */ - #retrying = []; - - /** - * Represents the queue for pending tasks. - * @type {Array} - */ - #pending = []; - - /** - * The number of tasks currently being processed. - * @type {number} - */ - #working = 0; - - /** - * The timeout for the queue. - * @type {number} - */ - #timeout; - - /** - * The maximum delay for the queue. - * @type {number} - */ - #maxDelay; - - /** - * The setTimeout() timer ID. - * @type {NodeJS.Timeout|undefined} - */ - #timerId; - - /** - * The function to call. - * @type {Function} - */ - #check; - - /** - * The maximum number of concurrent tasks. - * @type {number} - */ - #concurrency; - - /** - * Creates a new instance. - * @param {Function} check The function to call. - * @param {object} [options] The options for the instance. - * @param {number} [options.timeout] The timeout for the queue. - * @param {number} [options.maxDelay] The maximum delay for the queue. - * @param {number} [options.concurrency] The maximum number of concurrent tasks. - */ - constructor(check, { timeout = MAX_TASK_TIMEOUT, maxDelay = MAX_TASK_DELAY, concurrency = MAX_CONCURRENCY } = {}) { - - if (typeof check !== "function") { - throw new Error("Missing function to check errors"); - } - - this.#check = check; - this.#timeout = timeout; - this.#maxDelay = maxDelay; - this.#concurrency = concurrency; - } - - /** - * Gets the number of tasks waiting to be retried. - * @returns {number} The number of tasks in the retry queue. - */ - get retrying() { - return this.#retrying.length; - } - - /** - * Gets the number of tasks waiting to be processed in the pending queue. - * @returns {number} The number of tasks in the pending queue. - */ - get pending() { - return this.#pending.length; - } - - /** - * Gets the number of tasks currently being processed. - * @returns {number} The number of tasks currently being processed. - */ - get working() { - return this.#working; - } - - /** - * Calls the function and retries if it fails. - * @param {Function} fn The function to call. - * @param {Object} options The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @param {Promise} options.promise The promise to return when the function settles. - * @param {Function} options.resolve The resolve function for the promise. - * @param {Function} options.reject The reject function for the promise. - * @returns {Promise} A promise that resolves when the function is - * called successfully. - */ - #call(fn, { signal, promise, resolve, reject }) { - - let result; - - try { - result = fn(); - } catch (/** @type {any} */ error) { - reject(new Error(`Synchronous error: ${error.message}`, { cause: error })); - return promise; - } - - // if the result is not a promise then reject an error - if (!result || typeof result.then !== "function") { - reject(new Error("Result is not a promise.")); - return promise; - } - - this.#working++; - promise.finally(() => { - this.#working--; - this.#processPending(); - }) - // `promise.finally` creates a new promise that may be rejected, so it must be handled. - .catch(() => { }); - - // call the original function and catch any ENFILE or EMFILE errors - Promise.resolve(result) - .then(value => { - debug("Function called successfully without retry."); - resolve(value); - }) - .catch(error => { - if (!this.#check(error)) { - reject(error); - return; - } - - const task = new RetryTask(fn, error, resolve, reject, signal); - - debug(`Function failed, queuing for retry with task ${task.id}.`); - this.#retrying.push(task); - - signal?.addEventListener("abort", () => { - debug(`Task ${task.id} was aborted due to AbortSignal.`); - reject(signal.reason); - }); - - this.#processQueue(); - }); - - return promise; - } - - /** - * Adds a new retry job to the queue. - * @template {(...args: unknown[]) => Promise} Func - * @template {Awaited>} RetVal - * @param {Func} fn The function to call. - * @param {object} [options] The options for the job. - * @param {AbortSignal} [options.signal] The AbortSignal to monitor for cancellation. - * @returns {Promise} A promise that resolves when the queue is processed. - */ - retry(fn, { signal } = {}) { - - signal?.throwIfAborted(); - - const { promise, resolve, reject } = createPromise(); - - this.#pending.push(() => this.#call(fn, { signal, promise, resolve, reject })); - this.#processPending(); - - return promise; - } - - - /** - * Processes the pending queue and the retry queue. - * @returns {void} - */ - #processAll() { - if (this.pending) { - this.#processPending(); - } - - if (this.retrying) { - this.#processQueue(); - } - } - - /** - * Processes the pending queue to see which tasks can be started. - * @returns {void} - */ - #processPending() { - - debug(`Processing pending tasks: ${this.pending} pending, ${this.working} working.`); - - const available = this.#concurrency - this.working; - - if (available <= 0) { - return; - } - - const count = Math.min(this.pending, available); - - for (let i = 0; i < count; i++) { - const task = this.#pending.shift(); - task?.(); - } - - debug(`Processed pending tasks: ${this.pending} pending, ${this.working} working.`); - } - - /** - * Processes the queue. - * @returns {void} - */ - #processQueue() { - // clear any timer because we're going to check right now - clearTimeout(this.#timerId); - this.#timerId = undefined; - - debug(`Processing retry queue: ${this.retrying} retrying, ${this.working} working.`); - - const processAgain = () => { - this.#timerId = setTimeout(() => this.#processAll(), 0); - }; - - // if there's nothing in the queue, we're done - const task = this.#retrying.shift(); - if (!task) { - debug("Queue is empty, exiting."); - - if (this.pending) { - processAgain(); - } - return; - } - - // if it's time to bail, then bail - if (isTimeToBail(task, this.#timeout)) { - debug(`Task ${task.id} was abandoned due to timeout.`); - task.reject(task.error); - processAgain(); - return; - } - - // if it's not time to retry, then wait and try again - if (!isTimeToRetry(task, this.#maxDelay)) { - debug(`Task ${task.id} is not ready to retry, skipping.`); - this.#retrying.push(task); - processAgain(); - return; - } - - // otherwise, try again - task.lastAttempt = Date.now(); - - // Promise.resolve needed in case it's a thenable but not a Promise - Promise.resolve(task.fn()) - // @ts-ignore because we know it's any - .then(result => { - debug(`Task ${task.id} succeeded after ${task.age}ms.`); - task.resolve(result); - }) - - // @ts-ignore because we know it's any - .catch(error => { - if (!this.#check(error)) { - debug(`Task ${task.id} failed with non-retryable error: ${error.message}.`); - task.reject(error); - return; - } - - // update the task timestamp and push to back of queue to try again - task.lastAttempt = Date.now(); - this.#retrying.push(task); - debug(`Task ${task.id} failed, requeueing to try again.`); - }) - .finally(() => { - this.#processAll(); - }); - } -} - -export { Retrier }; diff --git a/node_modules/@humanwhocodes/retry/package.json b/node_modules/@humanwhocodes/retry/package.json deleted file mode 100644 index df8e943..0000000 --- a/node_modules/@humanwhocodes/retry/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "@humanwhocodes/retry", - "version": "0.4.3", - "description": "A utility to retry failed async methods.", - "type": "module", - "main": "dist/retrier.cjs", - "module": "dist/retrier.js", - "types": "dist/retrier.d.ts", - "exports": { - "require": { - "types": "./dist/retrier.d.cts", - "default": "./dist/retrier.cjs" - }, - "import": { - "types": "./dist/retrier.d.ts", - "default": "./dist/retrier.js" - } - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=18.18" - }, - "publishConfig": { - "access": "public" - }, - "gitHooks": { - "pre-commit": "lint-staged" - }, - "lint-staged": { - "*.js": [ - "eslint --fix" - ] - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - }, - "scripts": { - "build:cts-types": "node -e \"fs.copyFileSync('dist/retrier.d.ts', 'dist/retrier.d.cts')\"", - "build": "rollup -c && tsc && npm run build:cts-types", - "prepare": "npm run build", - "lint": "eslint src/ tests/", - "pretest": "npm run build", - "test:unit": "mocha tests/retrier.test.js", - "test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs", - "test:jsr": "npx jsr@latest publish --dry-run", - "test:emfile": "node tools/check-emfile-handling.js", - "test": "npm run test:unit && npm run test:build" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/humanwhocodes/retry.git" - }, - "keywords": [ - "nodejs", - "retry", - "async", - "promises" - ], - "author": "Nicholas C. Zaks", - "license": "Apache-2.0", - "devDependencies": { - "@eslint/js": "^8.49.0", - "@rollup/plugin-terser": "0.4.4", - "@tsconfig/node16": "^16.1.1", - "@types/mocha": "^10.0.3", - "@types/node": "20.12.6", - "eslint": "^8.21.0", - "lint-staged": "15.2.1", - "mocha": "^10.3.0", - "rollup": "3.29.4", - "typescript": "5.4.4", - "yorkie": "2.0.0" - } -} diff --git a/node_modules/@jridgewell/gen-mapping/LICENSE b/node_modules/@jridgewell/gen-mapping/LICENSE deleted file mode 100644 index 1f6ce94..0000000 --- a/node_modules/@jridgewell/gen-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2024 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/gen-mapping/README.md b/node_modules/@jridgewell/gen-mapping/README.md deleted file mode 100644 index 93692b1..0000000 --- a/node_modules/@jridgewell/gen-mapping/README.md +++ /dev/null @@ -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/sourcemaps/tree/main/packages/trace-mapping diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs deleted file mode 100644 index bbb0cac..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs +++ /dev/null @@ -1,292 +0,0 @@ -// src/set-array.ts -var SetArray = class { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } -}; -function cast(set) { - return set; -} -function get(setarr, key) { - return cast(setarr)._indexes[key]; -} -function put(setarr, key) { - const index = get(setarr, key); - if (index !== void 0) return index; - const { array, _indexes: indexes } = cast(setarr); - const length = array.push(key); - return indexes[key] = length - 1; -} -function remove(setarr, key) { - const index = get(setarr, key); - if (index === void 0) return; - const { array, _indexes: indexes } = cast(setarr); - for (let i = index + 1; i < array.length; i++) { - const k = array[i]; - array[i - 1] = k; - indexes[k]--; - } - indexes[key] = void 0; - array.pop(); -} - -// src/gen-mapping.ts -import { - encode -} from "@jridgewell/sourcemap-codec"; -import { TraceMap, decodedMappings } from "@jridgewell/trace-mapping"; - -// src/sourcemap-segment.ts -var COLUMN = 0; -var SOURCES_INDEX = 1; -var SOURCE_LINE = 2; -var SOURCE_COLUMN = 3; -var NAMES_INDEX = 4; - -// src/gen-mapping.ts -var NO_NAME = -1; -var GenMapping = class { - constructor({ file, sourceRoot } = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } -}; -function cast2(map) { - return map; -} -function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - return addSegmentInternal( - false, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content - ); -} -function addMapping(map, mapping) { - return addMappingInternal(false, map, mapping); -} -var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { - return addSegmentInternal( - true, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content - ); -}; -var maybeAddMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping); -}; -function setSourceContent(map, source, content) { - const { - _sources: sources, - _sourcesContent: sourcesContent - // _originalScopes: originalScopes, - } = cast2(map); - const index = put(sources, source); - sourcesContent[index] = content; -} -function setIgnore(map, source, ignore = true) { - const { - _sources: sources, - _sourcesContent: sourcesContent, - _ignoreList: ignoreList - // _originalScopes: originalScopes, - } = cast2(map); - const index = put(sources, source); - if (index === sourcesContent.length) sourcesContent[index] = null; - if (ignore) put(ignoreList, index); - else remove(ignoreList, index); -} -function toDecodedMap(map) { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names, - _ignoreList: ignoreList - // _originalScopes: originalScopes, - // _generatedRanges: generatedRanges, - } = cast2(map); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map.file || void 0, - names: names.array, - sourceRoot: map.sourceRoot || void 0, - sources: sources.array, - sourcesContent, - mappings, - // originalScopes, - // generatedRanges, - ignoreList: ignoreList.array - }; -} -function toEncodedMap(map) { - const decoded = toDecodedMap(map); - return Object.assign({}, decoded, { - // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), - // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), - mappings: encode(decoded.mappings) - }); -} -function fromMap(input) { - const map = new TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - putAll(cast2(gen)._names, map.names); - putAll(cast2(gen)._sources, map.sources); - cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast2(gen)._mappings = decodedMappings(map); - if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); - return gen; -} -function allMappings(map) { - const out = []; - const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); - for (let i = 0; i < mappings.length; i++) { - const line = mappings[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generated = { line: i + 1, column: seg[COLUMN] }; - let source = void 0; - let original = void 0; - let name = void 0; - if (seg.length !== 1) { - source = sources.array[seg[SOURCES_INDEX]]; - original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; - if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; - } - out.push({ generated, source, original, name }); - } - } - return out; -} -function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names - // _originalScopes: originalScopes, - } = cast2(map); - const line = getIndex(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) return; - return insert(line, index, [genColumn]); - } - assert(sourceLine); - assert(sourceColumn); - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - return insert( - line, - index, - name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] - ); -} -function assert(_val) { -} -function getIndex(arr, index) { - for (let i = arr.length; i <= index; i++) { - arr[i] = []; - } - return arr[index]; -} -function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) break; - } - return index; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) break; - } - if (len < length) mappings.length = len; -} -function putAll(setarr, array) { - for (let i = 0; i < array.length; i++) put(setarr, array[i]); -} -function skipSourceless(line, index) { - if (index === 0) return true; - const prev = line[index - 1]; - return prev.length === 1; -} -function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - if (index === 0) return false; - const prev = line[index - 1]; - if (prev.length === 1) return false; - return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); -} -function addMappingInternal(skipable, map, mapping) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - null, - null, - null, - null, - null - ); - } - assert(original); - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - source, - original.line - 1, - original.column, - name, - content - ); -} -export { - GenMapping, - addMapping, - addSegment, - allMappings, - fromMap, - maybeAddMapping, - maybeAddSegment, - setIgnore, - setSourceContent, - toDecodedMap, - toEncodedMap -}; -//# sourceMappingURL=gen-mapping.mjs.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map deleted file mode 100644 index 4e37e45..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/set-array.ts", "../src/gen-mapping.ts", "../src/sourcemap-segment.ts"], - "mappings": ";AAUO,IAAM,WAAN,MAAoC;AAAA,EAIzC,cAAc;AACZ,SAAK,WAAW,EAAE,WAAW,KAAK;AAClC,SAAK,QAAQ,CAAC;AAAA,EAChB;AACF;AAWA,SAAS,KAAoB,KAAgC;AAC3D,SAAO;AACT;AAKO,SAAS,IAAmB,QAAqB,KAA4B;AAClF,SAAO,KAAK,MAAM,EAAE,SAAS,GAAG;AAClC;AAMO,SAAS,IAAmB,QAAqB,KAAgB;AAEtE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW,QAAO;AAEhC,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAEhD,QAAM,SAAS,MAAM,KAAK,GAAG;AAC7B,SAAQ,QAAQ,GAAG,IAAI,SAAS;AAClC;AAgBO,SAAS,OAAsB,QAAqB,KAAc;AACvE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW;AAEzB,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAChD,WAAS,IAAI,QAAQ,GAAG,IAAI,MAAM,QAAQ,KAAK;AAC7C,UAAM,IAAI,MAAM,CAAC;AACjB,UAAM,IAAI,CAAC,IAAI;AACf,YAAQ,CAAC;AAAA,EACX;AACA,UAAQ,GAAG,IAAI;AACf,QAAM,IAAI;AACZ;;;AChFA;AAAA,E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QAAqB,OAAY;AAC1E,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,IAAK,KAAI,QAAQ,MAAM,CAAC,CAAC;AAC7D;AAEA,SAAS,eAAe,MAA0B,OAAwB;AAGxE,MAAI,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAI3B,SAAO,KAAK,WAAW;AACzB;AAEA,SAAS,WACP,MACA,OACA,cACA,YACA,cACA,YACS;AAET,MAAI,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAG3B,MAAI,KAAK,WAAW,EAAG,QAAO;AAI9B,SACE,iBAAiB,KAAK,aAAa,KACnC,eAAe,KAAK,WAAW,KAC/B,iBAAiB,KAAK,aAAa,KACnC,gBAAgB,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI;AAE5D;AAEA,SAAS,mBACP,UACA,KACA,SAOA;AACA,QAAM,EAAE,WAAW,QAAQ,UAAU,MAAM,QAAQ,IAAI;AACvD,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU,OAAO;AAAA,MACjB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAY,QAAQ;AACpB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,OAAO;AAAA,IACjB,UAAU;AAAA,IACV;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", - "names": ["cast"] -} diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js deleted file mode 100644 index cb84af5..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js +++ /dev/null @@ -1,358 +0,0 @@ -(function (global, factory) { - if (typeof exports === 'object' && typeof module !== 'undefined') { - factory(module, require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')); - module.exports = def(module); - } else if (typeof define === 'function' && define.amd) { - define(['module', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], function(mod) { - factory.apply(this, arguments); - mod.exports = def(mod); - }); - } else { - const mod = { exports: {} }; - factory(mod, global.sourcemapCodec, global.traceMapping); - global = typeof globalThis !== 'undefined' ? globalThis : global || self; - global.genMapping = def(mod); - } - function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } -})(this, (function (module, require_sourcemapCodec, require_traceMapping) { -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// umd:@jridgewell/sourcemap-codec -var require_sourcemap_codec = __commonJS({ - "umd:@jridgewell/sourcemap-codec"(exports, module2) { - module2.exports = require_sourcemapCodec; - } -}); - -// umd:@jridgewell/trace-mapping -var require_trace_mapping = __commonJS({ - "umd:@jridgewell/trace-mapping"(exports, module2) { - module2.exports = require_traceMapping; - } -}); - -// src/gen-mapping.ts -var gen_mapping_exports = {}; -__export(gen_mapping_exports, { - GenMapping: () => GenMapping, - addMapping: () => addMapping, - addSegment: () => addSegment, - allMappings: () => allMappings, - fromMap: () => fromMap, - maybeAddMapping: () => maybeAddMapping, - maybeAddSegment: () => maybeAddSegment, - setIgnore: () => setIgnore, - setSourceContent: () => setSourceContent, - toDecodedMap: () => toDecodedMap, - toEncodedMap: () => toEncodedMap -}); -module.exports = __toCommonJS(gen_mapping_exports); - -// src/set-array.ts -var SetArray = class { - constructor() { - this._indexes = { __proto__: null }; - this.array = []; - } -}; -function cast(set) { - return set; -} -function get(setarr, key) { - return cast(setarr)._indexes[key]; -} -function put(setarr, key) { - const index = get(setarr, key); - if (index !== void 0) return index; - const { array, _indexes: indexes } = cast(setarr); - const length = array.push(key); - return indexes[key] = length - 1; -} -function remove(setarr, key) { - const index = get(setarr, key); - if (index === void 0) return; - const { array, _indexes: indexes } = cast(setarr); - for (let i = index + 1; i < array.length; i++) { - const k = array[i]; - array[i - 1] = k; - indexes[k]--; - } - indexes[key] = void 0; - array.pop(); -} - -// src/gen-mapping.ts -var import_sourcemap_codec = __toESM(require_sourcemap_codec()); -var import_trace_mapping = __toESM(require_trace_mapping()); - -// src/sourcemap-segment.ts -var COLUMN = 0; -var SOURCES_INDEX = 1; -var SOURCE_LINE = 2; -var SOURCE_COLUMN = 3; -var NAMES_INDEX = 4; - -// src/gen-mapping.ts -var NO_NAME = -1; -var GenMapping = class { - constructor({ file, sourceRoot } = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } -}; -function cast2(map) { - return map; -} -function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - return addSegmentInternal( - false, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content - ); -} -function addMapping(map, mapping) { - return addMappingInternal(false, map, mapping); -} -var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { - return addSegmentInternal( - true, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content - ); -}; -var maybeAddMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping); -}; -function setSourceContent(map, source, content) { - const { - _sources: sources, - _sourcesContent: sourcesContent - // _originalScopes: originalScopes, - } = cast2(map); - const index = put(sources, source); - sourcesContent[index] = content; -} -function setIgnore(map, source, ignore = true) { - const { - _sources: sources, - _sourcesContent: sourcesContent, - _ignoreList: ignoreList - // _originalScopes: originalScopes, - } = cast2(map); - const index = put(sources, source); - if (index === sourcesContent.length) sourcesContent[index] = null; - if (ignore) put(ignoreList, index); - else remove(ignoreList, index); -} -function toDecodedMap(map) { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names, - _ignoreList: ignoreList - // _originalScopes: originalScopes, - // _generatedRanges: generatedRanges, - } = cast2(map); - removeEmptyFinalLines(mappings); - return { - version: 3, - file: map.file || void 0, - names: names.array, - sourceRoot: map.sourceRoot || void 0, - sources: sources.array, - sourcesContent, - mappings, - // originalScopes, - // generatedRanges, - ignoreList: ignoreList.array - }; -} -function toEncodedMap(map) { - const decoded = toDecodedMap(map); - return Object.assign({}, decoded, { - // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), - // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), - mappings: (0, import_sourcemap_codec.encode)(decoded.mappings) - }); -} -function fromMap(input) { - const map = new import_trace_mapping.TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - putAll(cast2(gen)._names, map.names); - putAll(cast2(gen)._sources, map.sources); - cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map); - if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); - return gen; -} -function allMappings(map) { - const out = []; - const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); - for (let i = 0; i < mappings.length; i++) { - const line = mappings[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generated = { line: i + 1, column: seg[COLUMN] }; - let source = void 0; - let original = void 0; - let name = void 0; - if (seg.length !== 1) { - source = sources.array[seg[SOURCES_INDEX]]; - original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; - if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; - } - out.push({ generated, source, original, name }); - } - } - return out; -} -function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names - // _originalScopes: originalScopes, - } = cast2(map); - const line = getIndex(mappings, genLine); - const index = getColumnIndex(line, genColumn); - if (!source) { - if (skipable && skipSourceless(line, index)) return; - return insert(line, index, [genColumn]); - } - assert(sourceLine); - assert(sourceColumn); - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - return insert( - line, - index, - name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] - ); -} -function assert(_val) { -} -function getIndex(arr, index) { - for (let i = arr.length; i <= index; i++) { - arr[i] = []; - } - return arr[index]; -} -function getColumnIndex(line, genColumn) { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) break; - } - return index; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -function removeEmptyFinalLines(mappings) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) break; - } - if (len < length) mappings.length = len; -} -function putAll(setarr, array) { - for (let i = 0; i < array.length; i++) put(setarr, array[i]); -} -function skipSourceless(line, index) { - if (index === 0) return true; - const prev = line[index - 1]; - return prev.length === 1; -} -function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { - if (index === 0) return false; - const prev = line[index - 1]; - if (prev.length === 1) return false; - return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); -} -function addMappingInternal(skipable, map, mapping) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - null, - null, - null, - null, - null - ); - } - assert(original); - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - source, - original.line - 1, - original.column, - name, - content - ); -} -})); -//# sourceMappingURL=gen-mapping.umd.js.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map deleted file mode 100644 index b13750b..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/trace-mapping", "../src/gen-mapping.ts", "../src/set-array.ts", "../src/sourcemap-segment.ts"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,2CAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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EAAG,QAAO;AAI9B,SACE,iBAAiB,KAAK,aAAa,KACnC,eAAe,KAAK,WAAW,KAC/B,iBAAiB,KAAK,aAAa,KACnC,gBAAgB,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI;AAE5D;AAEA,SAAS,mBACP,UACA,KACA,SAOA;AACA,QAAM,EAAE,WAAW,QAAQ,UAAU,MAAM,QAAQ,IAAI;AACvD,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU,OAAO;AAAA,MACjB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAY,QAAQ;AACpB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,OAAO;AAAA,IACjB,UAAU;AAAA,IACV;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", - "names": ["module", "module", "cast"] -} diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts deleted file mode 100644 index 9ba936e..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types'; -export type { DecodedSourceMap, EncodedSourceMap, Mapping }; -export type Options = { - file?: string | null; - sourceRoot?: string | null; -}; -/** - * Provides the state to generate a sourcemap. - */ -export declare class GenMapping { - private _names; - private _sources; - private _sourcesContent; - private _mappings; - private _ignoreList; - file: string | null | undefined; - sourceRoot: string | null | undefined; - constructor({ file, sourceRoot }?: Options); -} -/** - * A low-level API to associate a generated position with an original source position. Line and - * column here are 0-based, unlike `addMapping`. - */ -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; -/** - * A high-level API to associate a generated position with an original source position. Line is - * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. - */ -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source?: null; - original?: null; - name?: null; - content?: null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name?: null; - content?: string | null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name: string; - content?: string | null; -}): void; -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -export declare const maybeAddSegment: typeof addSegment; -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -export declare const maybeAddMapping: typeof addMapping; -/** - * Adds/removes the content of the source file to the source map. - */ -export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; -export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -export declare function fromMap(input: SourceMapInput): GenMapping; -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -export declare function allMappings(map: GenMapping): Mapping[]; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts deleted file mode 100644 index 6ed4354..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -type Key = string | number | symbol; -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), 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. - */ -export declare class SetArray { - private _indexes; - array: readonly T[]; - constructor(); -} -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -export declare function get(setarr: SetArray, key: T): number | undefined; -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -export declare function put(setarr: SetArray, key: T): number; -/** - * Pops the last added item out of the SetArray. - */ -export declare function pop(setarr: SetArray): void; -/** - * Removes the key, if it exists in the set. - */ -export declare function remove(setarr: SetArray, key: T): void; -export {}; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts deleted file mode 100644 index aa19fb5..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export {}; diff --git a/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts deleted file mode 100644 index 8eb90fb..0000000 --- a/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -export interface SourceMapV3 { - file?: string | null; - names: readonly string[]; - sourceRoot?: string; - sources: readonly (string | null)[]; - sourcesContent?: readonly (string | null)[]; - version: 3; - ignoreList?: readonly number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: readonly SourceMapSegment[][]; -} -export interface Pos { - line: number; - column: number; -} -export interface OriginalPos extends Pos { - source: string; -} -export interface BindingExpressionRange { - start: Pos; - expression: string; -} -export type Mapping = { - generated: Pos; - source: undefined; - original: undefined; - name: undefined; -} | { - generated: Pos; - source: string; - original: Pos; - name: string; -} | { - generated: Pos; - source: string; - original: Pos; - name: undefined; -}; diff --git a/node_modules/@jridgewell/gen-mapping/package.json b/node_modules/@jridgewell/gen-mapping/package.json deleted file mode 100644 index 036f9b7..0000000 --- a/node_modules/@jridgewell/gen-mapping/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@jridgewell/gen-mapping", - "version": "0.3.13", - "description": "Generate source maps", - "keywords": [ - "source", - "map" - ], - "main": "dist/gen-mapping.umd.js", - "module": "dist/gen-mapping.mjs", - "types": "types/gen-mapping.d.cts", - "files": [ - "dist", - "src", - "types" - ], - "exports": { - ".": [ - { - "import": { - "types": "./types/gen-mapping.d.mts", - "default": "./dist/gen-mapping.mjs" - }, - "default": { - "types": "./types/gen-mapping.d.cts", - "default": "./dist/gen-mapping.umd.js" - } - }, - "./dist/gen-mapping.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:code benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:code build:types", - "build:code": "node ../../esbuild.mjs gen-mapping.ts", - "build:types": "run-s build:types:force build:types:emit build:types:mts", - "build:types:force": "rimraf tsconfig.build.tsbuildinfo", - "build:types:emit": "tsc --project tsconfig.build.json", - "build:types:mts": "node ../../mts-types.mjs", - "clean": "run-s -n clean:code clean:types", - "clean:code": "tsc --build --clean tsconfig.build.json", - "clean:types": "rimraf dist types", - "test": "run-s -n test:types test:only test:format", - "test:format": "prettier --check '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:types": "eslint '{src,test}/**/*.ts'", - "lint": "run-s -n lint:types lint:format", - "lint:format": "npm run test:format -- --write", - "lint:types": "npm run test:types -- --fix", - "prepublishOnly": "npm run-s -n build test" - }, - "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemaps.git", - "directory": "packages/gen-mapping" - }, - "author": "Justin Ridgewell ", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } -} diff --git a/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts b/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts deleted file mode 100644 index ecc878c..0000000 --- a/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts +++ /dev/null @@ -1,614 +0,0 @@ -import { SetArray, put, remove } from './set-array'; -import { - encode, - // encodeGeneratedRanges, - // encodeOriginalScopes -} from '@jridgewell/sourcemap-codec'; -import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; - -import { - COLUMN, - SOURCES_INDEX, - SOURCE_LINE, - SOURCE_COLUMN, - NAMES_INDEX, -} from './sourcemap-segment'; - -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -// import type { OriginalScope, GeneratedRange } from '@jridgewell/sourcemap-codec'; -import type { SourceMapSegment } from './sourcemap-segment'; -import type { - DecodedSourceMap, - EncodedSourceMap, - Pos, - Mapping, - // BindingExpressionRange, - // OriginalPos, - // OriginalScopeInfo, - // GeneratedRangeInfo, -} from './types'; - -export type { DecodedSourceMap, EncodedSourceMap, Mapping }; - -export type Options = { - file?: string | null; - sourceRoot?: string | null; -}; - -const NO_NAME = -1; - -/** - * Provides the state to generate a sourcemap. - */ -export class GenMapping { - declare private _names: SetArray; - declare private _sources: SetArray; - declare private _sourcesContent: (string | null)[]; - declare private _mappings: SourceMapSegment[][]; - // private declare _originalScopes: OriginalScope[][]; - // private declare _generatedRanges: GeneratedRange[]; - declare private _ignoreList: SetArray; - declare file: string | null | undefined; - declare sourceRoot: string | null | undefined; - - constructor({ file, sourceRoot }: Options = {}) { - this._names = new SetArray(); - this._sources = new SetArray(); - this._sourcesContent = []; - this._mappings = []; - // this._originalScopes = []; - // this._generatedRanges = []; - this.file = file; - this.sourceRoot = sourceRoot; - this._ignoreList = new SetArray(); - } -} - -interface PublicMap { - _names: GenMapping['_names']; - _sources: GenMapping['_sources']; - _sourcesContent: GenMapping['_sourcesContent']; - _mappings: GenMapping['_mappings']; - // _originalScopes: GenMapping['_originalScopes']; - // _generatedRanges: GenMapping['_generatedRanges']; - _ignoreList: GenMapping['_ignoreList']; -} - -/** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ -function cast(map: unknown): PublicMap { - return map as any; -} - -/** - * A low-level API to associate a generated position with an original source position. Line and - * column here are 0-based, unlike `addMapping`. - */ -export function addSegment( - map: GenMapping, - genLine: number, - genColumn: number, - source?: null, - sourceLine?: null, - sourceColumn?: null, - name?: null, - content?: null, -): void; -export function addSegment( - map: GenMapping, - genLine: number, - genColumn: number, - source: string, - sourceLine: number, - sourceColumn: number, - name?: null, - content?: string | null, -): void; -export function addSegment( - map: GenMapping, - genLine: number, - genColumn: number, - source: string, - sourceLine: number, - sourceColumn: number, - name: string, - content?: string | null, -): void; -export function addSegment( - map: GenMapping, - genLine: number, - genColumn: number, - source?: string | null, - sourceLine?: number | null, - sourceColumn?: number | null, - name?: string | null, - content?: string | null, -): void { - return addSegmentInternal( - false, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content, - ); -} - -/** - * A high-level API to associate a generated position with an original source position. Line is - * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. - */ -export function addMapping( - map: GenMapping, - mapping: { - generated: Pos; - source?: null; - original?: null; - name?: null; - content?: null; - }, -): void; -export function addMapping( - map: GenMapping, - mapping: { - generated: Pos; - source: string; - original: Pos; - name?: null; - content?: string | null; - }, -): void; -export function addMapping( - map: GenMapping, - mapping: { - generated: Pos; - source: string; - original: Pos; - name: string; - content?: string | null; - }, -): void; -export function addMapping( - map: GenMapping, - mapping: { - generated: Pos; - source?: string | null; - original?: Pos | null; - name?: string | null; - content?: string | null; - }, -): void { - return addMappingInternal(false, map, mapping as Parameters[2]); -} - -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -export const maybeAddSegment: typeof addSegment = ( - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content, -) => { - return addSegmentInternal( - true, - map, - genLine, - genColumn, - source, - sourceLine, - sourceColumn, - name, - content, - ); -}; - -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -export const maybeAddMapping: typeof addMapping = (map, mapping) => { - return addMappingInternal(true, map, mapping as Parameters[2]); -}; - -/** - * Adds/removes the content of the source file to the source map. - */ -export function setSourceContent(map: GenMapping, source: string, content: string | null): void { - const { - _sources: sources, - _sourcesContent: sourcesContent, - // _originalScopes: originalScopes, - } = cast(map); - const index = put(sources, source); - sourcesContent[index] = content; - // if (index === originalScopes.length) originalScopes[index] = []; -} - -export function setIgnore(map: GenMapping, source: string, ignore = true) { - const { - _sources: sources, - _sourcesContent: sourcesContent, - _ignoreList: ignoreList, - // _originalScopes: originalScopes, - } = cast(map); - const index = put(sources, source); - if (index === sourcesContent.length) sourcesContent[index] = null; - // if (index === originalScopes.length) originalScopes[index] = []; - if (ignore) put(ignoreList, index); - else remove(ignoreList, index); -} - -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export function toDecodedMap(map: GenMapping): DecodedSourceMap { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names, - _ignoreList: ignoreList, - // _originalScopes: originalScopes, - // _generatedRanges: generatedRanges, - } = cast(map); - removeEmptyFinalLines(mappings); - - return { - version: 3, - file: map.file || undefined, - names: names.array, - sourceRoot: map.sourceRoot || undefined, - sources: sources.array, - sourcesContent, - mappings, - // originalScopes, - // generatedRanges, - ignoreList: ignoreList.array, - }; -} - -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export function toEncodedMap(map: GenMapping): EncodedSourceMap { - const decoded = toDecodedMap(map); - return Object.assign({}, decoded, { - // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), - // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), - mappings: encode(decoded.mappings as SourceMapSegment[][]), - }); -} - -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -export function fromMap(input: SourceMapInput): GenMapping { - const map = new TraceMap(input); - const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); - - putAll(cast(gen)._names, map.names); - putAll(cast(gen)._sources, map.sources as string[]); - cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); - cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings']; - // TODO: implement originalScopes/generatedRanges - if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList); - - return gen; -} - -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -export function allMappings(map: GenMapping): Mapping[] { - const out: Mapping[] = []; - const { _mappings: mappings, _sources: sources, _names: names } = cast(map); - - for (let i = 0; i < mappings.length; i++) { - const line = mappings[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - - const generated = { line: i + 1, column: seg[COLUMN] }; - let source: string | undefined = undefined; - let original: Pos | undefined = undefined; - let name: string | undefined = undefined; - - if (seg.length !== 1) { - source = sources.array[seg[SOURCES_INDEX]]; - original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; - - if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; - } - - out.push({ generated, source, original, name } as Mapping); - } - } - - return out; -} - -// This split declaration is only so that terser can elminiate the static initialization block. -function addSegmentInternal( - skipable: boolean, - map: GenMapping, - genLine: number, - genColumn: number, - source: S, - sourceLine: S extends string ? number : null | undefined, - sourceColumn: S extends string ? number : null | undefined, - name: S extends string ? string | null | undefined : null | undefined, - content: S extends string ? string | null | undefined : null | undefined, -): void { - const { - _mappings: mappings, - _sources: sources, - _sourcesContent: sourcesContent, - _names: names, - // _originalScopes: originalScopes, - } = cast(map); - const line = getIndex(mappings, genLine); - const index = getColumnIndex(line, genColumn); - - if (!source) { - if (skipable && skipSourceless(line, index)) return; - return insert(line, index, [genColumn]); - } - - // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source - // isn't nullish. - assert(sourceLine); - assert(sourceColumn); - - const sourcesIndex = put(sources, source); - const namesIndex = name ? put(names, name) : NO_NAME; - if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null; - // if (sourcesIndex === originalScopes.length) originalScopes[sourcesIndex] = []; - - if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { - return; - } - - return insert( - line, - index, - name - ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] - : [genColumn, sourcesIndex, sourceLine, sourceColumn], - ); -} - -function assert(_val: unknown): asserts _val is T { - // noop. -} - -function getIndex(arr: T[][], index: number): T[] { - for (let i = arr.length; i <= index; i++) { - arr[i] = []; - } - return arr[index]; -} - -function getColumnIndex(line: SourceMapSegment[], genColumn: number): number { - let index = line.length; - for (let i = index - 1; i >= 0; index = i--) { - const current = line[i]; - if (genColumn >= current[COLUMN]) break; - } - return index; -} - -function insert(array: T[], index: number, value: T) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} - -function removeEmptyFinalLines(mappings: SourceMapSegment[][]) { - const { length } = mappings; - let len = length; - for (let i = len - 1; i >= 0; len = i, i--) { - if (mappings[i].length > 0) break; - } - if (len < length) mappings.length = len; -} - -function putAll(setarr: SetArray, array: T[]) { - for (let i = 0; i < array.length; i++) put(setarr, array[i]); -} - -function skipSourceless(line: SourceMapSegment[], index: number): boolean { - // The start of a line is already sourceless, so adding a sourceless segment to the beginning - // doesn't generate any useful information. - if (index === 0) return true; - - const prev = line[index - 1]; - // If the previous segment is also sourceless, then adding another sourceless segment doesn't - // genrate any new information. Else, this segment will end the source/named segment and point to - // a sourceless position, which is useful. - return prev.length === 1; -} - -function skipSource( - line: SourceMapSegment[], - index: number, - sourcesIndex: number, - sourceLine: number, - sourceColumn: number, - namesIndex: number, -): boolean { - // A source/named segment at the start of a line gives position at that genColumn - if (index === 0) return false; - - const prev = line[index - 1]; - - // If the previous segment is sourceless, then we're transitioning to a source. - if (prev.length === 1) return false; - - // If the previous segment maps to the exact same source position, then this segment doesn't - // provide any new position information. - return ( - sourcesIndex === prev[SOURCES_INDEX] && - sourceLine === prev[SOURCE_LINE] && - sourceColumn === prev[SOURCE_COLUMN] && - namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME) - ); -} - -function addMappingInternal( - skipable: boolean, - map: GenMapping, - mapping: { - generated: Pos; - source: S; - original: S extends string ? Pos : null | undefined; - name: S extends string ? string | null | undefined : null | undefined; - content: S extends string ? string | null | undefined : null | undefined; - }, -) { - const { generated, source, original, name, content } = mapping; - if (!source) { - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - null, - null, - null, - null, - null, - ); - } - assert(original); - return addSegmentInternal( - skipable, - map, - generated.line - 1, - generated.column, - source as string, - original.line - 1, - original.column, - name, - content, - ); -} - -/* -export function addOriginalScope( - map: GenMapping, - data: { - start: Pos; - end: Pos; - source: string; - kind: string; - name?: string; - variables?: string[]; - }, -): OriginalScopeInfo { - const { start, end, source, kind, name, variables } = data; - const { - _sources: sources, - _sourcesContent: sourcesContent, - _originalScopes: originalScopes, - _names: names, - } = cast(map); - const index = put(sources, source); - if (index === sourcesContent.length) sourcesContent[index] = null; - if (index === originalScopes.length) originalScopes[index] = []; - - const kindIndex = put(names, kind); - const scope: OriginalScope = name - ? [start.line - 1, start.column, end.line - 1, end.column, kindIndex, put(names, name)] - : [start.line - 1, start.column, end.line - 1, end.column, kindIndex]; - if (variables) { - scope.vars = variables.map((v) => put(names, v)); - } - const len = originalScopes[index].push(scope); - return [index, len - 1, variables]; -} -*/ - -// Generated Ranges -/* -export function addGeneratedRange( - map: GenMapping, - data: { - start: Pos; - isScope: boolean; - originalScope?: OriginalScopeInfo; - callsite?: OriginalPos; - }, -): GeneratedRangeInfo { - const { start, isScope, originalScope, callsite } = data; - const { - _originalScopes: originalScopes, - _sources: sources, - _sourcesContent: sourcesContent, - _generatedRanges: generatedRanges, - } = cast(map); - - const range: GeneratedRange = [ - start.line - 1, - start.column, - 0, - 0, - originalScope ? originalScope[0] : -1, - originalScope ? originalScope[1] : -1, - ]; - if (originalScope?.[2]) { - range.bindings = originalScope[2].map(() => [[-1]]); - } - if (callsite) { - const index = put(sources, callsite.source); - if (index === sourcesContent.length) sourcesContent[index] = null; - if (index === originalScopes.length) originalScopes[index] = []; - range.callsite = [index, callsite.line - 1, callsite.column]; - } - if (isScope) range.isScope = true; - generatedRanges.push(range); - - return [range, originalScope?.[2]]; -} - -export function setEndPosition(range: GeneratedRangeInfo, pos: Pos) { - range[0][2] = pos.line - 1; - range[0][3] = pos.column; -} - -export function addBinding( - map: GenMapping, - range: GeneratedRangeInfo, - variable: string, - expression: string | BindingExpressionRange, -) { - const { _names: names } = cast(map); - const bindings = (range[0].bindings ||= []); - const vars = range[1]; - - const index = vars!.indexOf(variable); - const binding = getIndex(bindings, index); - - if (typeof expression === 'string') binding[0] = [put(names, expression)]; - else { - const { start } = expression; - binding.push([put(names, expression.expression), start.line - 1, start.column]); - } -} -*/ diff --git a/node_modules/@jridgewell/gen-mapping/src/set-array.ts b/node_modules/@jridgewell/gen-mapping/src/set-array.ts deleted file mode 100644 index a2a73a5..0000000 --- a/node_modules/@jridgewell/gen-mapping/src/set-array.ts +++ /dev/null @@ -1,82 +0,0 @@ -type Key = string | number | symbol; - -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), 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. - */ -export class SetArray { - declare private _indexes: Record; - declare array: readonly T[]; - - constructor() { - this._indexes = { __proto__: null } as any; - this.array = []; - } -} - -interface PublicSet { - array: T[]; - _indexes: SetArray['_indexes']; -} - -/** - * Typescript doesn't allow friend access to private fields, so this just casts the set into a type - * with public access modifiers. - */ -function cast(set: SetArray): PublicSet { - return set as any; -} - -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -export function get(setarr: SetArray, key: T): number | undefined { - return cast(setarr)._indexes[key]; -} - -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -export function put(setarr: SetArray, key: T): number { - // The key may or may not be present. If it is present, it's a number. - const index = get(setarr, key); - if (index !== undefined) return index; - - const { array, _indexes: indexes } = cast(setarr); - - const length = array.push(key); - return (indexes[key] = length - 1); -} - -/** - * Pops the last added item out of the SetArray. - */ -export function pop(setarr: SetArray): void { - const { array, _indexes: indexes } = cast(setarr); - if (array.length === 0) return; - - const last = array.pop()!; - indexes[last] = undefined; -} - -/** - * Removes the key, if it exists in the set. - */ -export function remove(setarr: SetArray, key: T): void { - const index = get(setarr, key); - if (index === undefined) return; - - const { array, _indexes: indexes } = cast(setarr); - for (let i = index + 1; i < array.length; i++) { - const k = array[i]; - array[i - 1] = k; - indexes[k]!--; - } - indexes[key] = undefined; - array.pop(); -} diff --git a/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts deleted file mode 100644 index fb296dd..0000000 --- a/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts +++ /dev/null @@ -1,16 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; - -export type SourceMapSegment = - | [GeneratedColumn] - | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] - | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; - -export const COLUMN = 0; -export const SOURCES_INDEX = 1; -export const SOURCE_LINE = 2; -export const SOURCE_COLUMN = 3; -export const NAMES_INDEX = 4; diff --git a/node_modules/@jridgewell/gen-mapping/src/types.ts b/node_modules/@jridgewell/gen-mapping/src/types.ts deleted file mode 100644 index b087f70..0000000 --- a/node_modules/@jridgewell/gen-mapping/src/types.ts +++ /dev/null @@ -1,61 +0,0 @@ -// import type { GeneratedRange, OriginalScope } from '@jridgewell/sourcemap-codec'; -import type { SourceMapSegment } from './sourcemap-segment'; - -export interface SourceMapV3 { - file?: string | null; - names: readonly string[]; - sourceRoot?: string; - sources: readonly (string | null)[]; - sourcesContent?: readonly (string | null)[]; - version: 3; - ignoreList?: readonly number[]; -} - -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; - // originalScopes: string[]; - // generatedRanges: string; -} - -export interface DecodedSourceMap extends SourceMapV3 { - mappings: readonly SourceMapSegment[][]; - // originalScopes: readonly OriginalScope[][]; - // generatedRanges: readonly GeneratedRange[]; -} - -export interface Pos { - line: number; // 1-based - column: number; // 0-based -} - -export interface OriginalPos extends Pos { - source: string; -} - -export interface BindingExpressionRange { - start: Pos; - expression: string; -} - -// export type OriginalScopeInfo = [number, number, string[] | undefined]; -// export type GeneratedRangeInfo = [GeneratedRange, string[] | undefined]; - -export type Mapping = - | { - generated: Pos; - source: undefined; - original: undefined; - name: undefined; - } - | { - generated: Pos; - source: string; - original: Pos; - name: string; - } - | { - generated: Pos; - source: string; - original: Pos; - name: undefined; - }; diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts deleted file mode 100644 index 7618d85..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts +++ /dev/null @@ -1,89 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.cts'; -export type { DecodedSourceMap, EncodedSourceMap, Mapping }; -export type Options = { - file?: string | null; - sourceRoot?: string | null; -}; -/** - * Provides the state to generate a sourcemap. - */ -export declare class GenMapping { - private _names; - private _sources; - private _sourcesContent; - private _mappings; - private _ignoreList; - file: string | null | undefined; - sourceRoot: string | null | undefined; - constructor({ file, sourceRoot }?: Options); -} -/** - * A low-level API to associate a generated position with an original source position. Line and - * column here are 0-based, unlike `addMapping`. - */ -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; -/** - * A high-level API to associate a generated position with an original source position. Line is - * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. - */ -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source?: null; - original?: null; - name?: null; - content?: null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name?: null; - content?: string | null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name: string; - content?: string | null; -}): void; -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -export declare const maybeAddSegment: typeof addSegment; -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -export declare const maybeAddMapping: typeof addMapping; -/** - * Adds/removes the content of the source file to the source map. - */ -export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; -export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -export declare function fromMap(input: SourceMapInput): GenMapping; -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -export declare function allMappings(map: GenMapping): Mapping[]; -//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map deleted file mode 100644 index 8a2b183..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"","sources":["../src/gen-mapping.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,EACH,OAAO,EAKR,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,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,GAAG,gBAAgB,CAO9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts deleted file mode 100644 index bbc0d89..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +++ /dev/null @@ -1,89 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.mts'; -export type { DecodedSourceMap, EncodedSourceMap, Mapping }; -export type Options = { - file?: string | null; - sourceRoot?: string | null; -}; -/** - * Provides the state to generate a sourcemap. - */ -export declare class GenMapping { - private _names; - private _sources; - private _sourcesContent; - private _mappings; - private _ignoreList; - file: string | null | undefined; - sourceRoot: string | null | undefined; - constructor({ file, sourceRoot }?: Options); -} -/** - * A low-level API to associate a generated position with an original source position. Line and - * column here are 0-based, unlike `addMapping`. - */ -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; -export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; -/** - * A high-level API to associate a generated position with an original source position. Line is - * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. - */ -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source?: null; - original?: null; - name?: null; - content?: null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name?: null; - content?: string | null; -}): void; -export declare function addMapping(map: GenMapping, mapping: { - generated: Pos; - source: string; - original: Pos; - name: string; - content?: string | null; -}): void; -/** - * Same as `addSegment`, but will only add the segment if it generates useful information in the - * resulting map. This only works correctly if segments are added **in order**, meaning you should - * not add a segment with a lower generated line/column than one that came before. - */ -export declare const maybeAddSegment: typeof addSegment; -/** - * Same as `addMapping`, but will only add the mapping if it generates useful information in the - * resulting map. This only works correctly if mappings are added **in order**, meaning you should - * not add a mapping with a lower generated line/column than one that came before. - */ -export declare const maybeAddMapping: typeof addMapping; -/** - * Adds/removes the content of the source file to the source map. - */ -export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; -export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; -/** - * Constructs a new GenMapping, using the already present mappings of the input. - */ -export declare function fromMap(input: SourceMapInput): GenMapping; -/** - * Returns an array of high-level mapping objects for every recorded segment, which could then be - * passed to the `source-map` library. - */ -export declare function allMappings(map: GenMapping): Mapping[]; -//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map deleted file mode 100644 index 8a2b183..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"","sources":["../src/gen-mapping.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,EACH,OAAO,EAKR,MAAM,SAAS,CAAC;A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CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAwB9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAO9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts deleted file mode 100644 index 5d8cda3..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts +++ /dev/null @@ -1,33 +0,0 @@ -type Key = string | number | symbol; -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), 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. - */ -export declare class SetArray { - private _indexes; - array: readonly T[]; - constructor(); -} -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -export declare function get(setarr: SetArray, key: T): number | undefined; -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -export declare function put(setarr: SetArray, key: T): number; -/** - * Pops the last added item out of the SetArray. - */ -export declare function pop(setarr: SetArray): void; -/** - * Removes the key, if it exists in the set. - */ -export declare function remove(setarr: SetArray, key: T): void; -export {}; -//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map deleted file mode 100644 index c52b8bc..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts deleted file mode 100644 index 5d8cda3..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +++ /dev/null @@ -1,33 +0,0 @@ -type Key = string | number | symbol; -/** - * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), 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. - */ -export declare class SetArray { - private _indexes; - array: readonly T[]; - constructor(); -} -/** - * Gets the index associated with `key` in the backing array, if it is already present. - */ -export declare function get(setarr: SetArray, key: T): number | undefined; -/** - * Puts `key` into the backing array, if it is not already present. Returns - * the index of the `key` in the backing array. - */ -export declare function put(setarr: SetArray, key: T): number; -/** - * Pops the last added item out of the SetArray. - */ -export declare function pop(setarr: SetArray): void; -/** - * Removes the key, if it exists in the set. - */ -export declare function remove(setarr: SetArray, key: T): void; -export {}; -//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map deleted file mode 100644 index c52b8bc..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts deleted file mode 100644 index 6886295..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts +++ /dev/null @@ -1,13 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export {}; -//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map deleted file mode 100644 index 23cdc45..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts deleted file mode 100644 index 6886295..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +++ /dev/null @@ -1,13 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export {}; -//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map deleted file mode 100644 index 23cdc45..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts b/node_modules/@jridgewell/gen-mapping/types/types.d.cts deleted file mode 100644 index 58da00a..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/types.d.cts +++ /dev/null @@ -1,44 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.cts'; -export interface SourceMapV3 { - file?: string | null; - names: readonly string[]; - sourceRoot?: string; - sources: readonly (string | null)[]; - sourcesContent?: readonly (string | null)[]; - version: 3; - ignoreList?: readonly number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: readonly SourceMapSegment[][]; -} -export interface Pos { - line: number; - column: number; -} -export interface OriginalPos extends Pos { - source: string; -} -export interface BindingExpressionRange { - start: Pos; - expression: string; -} -export type Mapping = { - generated: Pos; - source: undefined; - original: undefined; - name: undefined; -} | { - generated: Pos; - source: string; - original: Pos; - name: string; -} | { - generated: Pos; - source: string; - original: Pos; - name: undefined; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map deleted file mode 100644 index 159e734..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBA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;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts b/node_modules/@jridgewell/gen-mapping/types/types.d.mts deleted file mode 100644 index e9837eb..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/types.d.mts +++ /dev/null @@ -1,44 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.mts'; -export interface SourceMapV3 { - file?: string | null; - names: readonly string[]; - sourceRoot?: string; - sources: readonly (string | null)[]; - sourcesContent?: readonly (string | null)[]; - version: 3; - ignoreList?: readonly number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: readonly SourceMapSegment[][]; -} -export interface Pos { - line: number; - column: number; -} -export interface OriginalPos extends Pos { - source: string; -} -export interface BindingExpressionRange { - start: Pos; - expression: string; -} -export type Mapping = { - generated: Pos; - source: undefined; - original: undefined; - name: undefined; -} | { - generated: Pos; - source: string; - original: Pos; - name: string; -} | { - generated: Pos; - source: string; - original: Pos; - name: undefined; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map deleted file mode 100644 index 159e734..0000000 --- a/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/LICENSE b/node_modules/@jridgewell/remapping/LICENSE deleted file mode 100644 index 1f6ce94..0000000 --- a/node_modules/@jridgewell/remapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2024 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/remapping/README.md b/node_modules/@jridgewell/remapping/README.md deleted file mode 100644 index 6d092d7..0000000 --- a/node_modules/@jridgewell/remapping/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# @jridgewell/remapping - -> Remap sequential sourcemaps through transformations to point at the original source code - -Remapping allows you to take the sourcemaps generated through transforming your code and "remap" -them to the original source locations. Think "my minified code, transformed with babel and bundled -with webpack", all pointing to the correct location in your original source code. - -With remapping, none of your source code transformations need to be aware of the input's sourcemap, -they only need to generate an output sourcemap. This greatly simplifies building custom -transformations (think a find-and-replace). - -## Installation - -```sh -npm install @jridgewell/remapping -``` - -## Usage - -```typescript -function remapping( - map: SourceMap | SourceMap[], - loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined), - options?: { excludeContent: boolean, decodedMappings: boolean } -): SourceMap; - -// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the -// "source" location (where child sources are resolved relative to, or the location of original -// source), and the ability to override the "content" of an original source for inclusion in the -// output sourcemap. -type LoaderContext = { - readonly importer: string; - readonly depth: number; - source: string; - content: string | null | undefined; -} -``` - -`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer -in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents -a transformed file (it has a sourcmap associated with it), then the `loader` should return that -sourcemap. If not, the path will be treated as an original, untransformed source code. - -```js -// Babel transformed "helloworld.js" into "transformed.js" -const transformedMap = JSON.stringify({ - file: 'transformed.js', - // 1st column of 2nd line of output file translates into the 1st source - // file, line 3, column 2 - mappings: ';CAEE', - sources: ['helloworld.js'], - version: 3, -}); - -// Uglify minified "transformed.js" into "transformed.min.js" -const minifiedTransformedMap = JSON.stringify({ - file: 'transformed.min.js', - // 0th column of 1st line of output file translates into the 1st source - // file, line 2, column 1. - mappings: 'AACC', - names: [], - sources: ['transformed.js'], - version: 3, -}); - -const remapped = remapping( - minifiedTransformedMap, - (file, ctx) => { - - // The "transformed.js" file is an transformed file. - if (file === 'transformed.js') { - // The root importer is empty. - console.assert(ctx.importer === ''); - // The depth in the sourcemap tree we're currently loading. - // The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc. - console.assert(ctx.depth === 1); - - return transformedMap; - } - - // Loader will be called to load transformedMap's source file pointers as well. - console.assert(file === 'helloworld.js'); - // `transformed.js`'s sourcemap points into `helloworld.js`. - console.assert(ctx.importer === 'transformed.js'); - // This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`. - console.assert(ctx.depth === 2); - return null; - } -); - -console.log(remapped); -// { -// file: 'transpiled.min.js', -// mappings: 'AAEE', -// sources: ['helloworld.js'], -// version: 3, -// }; -``` - -In this example, `loader` will be called twice: - -1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the - associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can - be traced through it into the source files it represents. -2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so - we return `null`. - -The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If -you were to read the `mappings`, it says "0th column of the first line output line points to the 1st -column of the 2nd line of the file `helloworld.js`". - -### Multiple transformations of a file - -As a convenience, if you have multiple single-source transformations of a file, you may pass an -array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this -changes the `importer` and `depth` of each call to our loader. So our above example could have been -written as: - -```js -const remapped = remapping( - [minifiedTransformedMap, transformedMap], - () => null -); - -console.log(remapped); -// { -// file: 'transpiled.min.js', -// mappings: 'AAEE', -// sources: ['helloworld.js'], -// version: 3, -// }; -``` - -### Advanced control of the loading graph - -#### `source` - -The `source` property can overridden to any value to change the location of the current load. Eg, -for an original source file, it allows us to change the location to the original source regardless -of what the sourcemap source entry says. And for transformed files, it allows us to change the -relative resolving location for child sources of the loaded sourcemap. - -```js -const remapped = remapping( - minifiedTransformedMap, - (file, ctx) => { - - if (file === 'transformed.js') { - // We pretend the transformed.js file actually exists in the 'src/' directory. When the nested - // source files are loaded, they will now be relative to `src/`. - ctx.source = 'src/transformed.js'; - return transformedMap; - } - - console.assert(file === 'src/helloworld.js'); - // We could futher change the source of this original file, eg, to be inside a nested directory - // itself. This will be reflected in the remapped sourcemap. - ctx.source = 'src/nested/transformed.js'; - return null; - } -); - -console.log(remapped); -// { -// …, -// sources: ['src/nested/helloworld.js'], -// }; -``` - - -#### `content` - -The `content` property can be overridden when we encounter an original source file. Eg, this allows -you to manually provide the source content of the original file regardless of whether the -`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove -the source content. - -```js -const remapped = remapping( - minifiedTransformedMap, - (file, ctx) => { - - if (file === 'transformed.js') { - // transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap - // would not include any `sourcesContent` values. - return transformedMap; - } - - console.assert(file === 'helloworld.js'); - // We can read the file to provide the source content. - ctx.content = fs.readFileSync(file, 'utf8'); - return null; - } -); - -console.log(remapped); -// { -// …, -// sourcesContent: [ -// 'console.log("Hello world!")', -// ], -// }; -``` - -### Options - -#### excludeContent - -By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the -`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce -the size out the sourcemap. - -#### decodedMappings - -By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the -`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of -encoding into a VLQ string. diff --git a/node_modules/@jridgewell/remapping/dist/remapping.mjs b/node_modules/@jridgewell/remapping/dist/remapping.mjs deleted file mode 100644 index 8b7009c..0000000 --- a/node_modules/@jridgewell/remapping/dist/remapping.mjs +++ /dev/null @@ -1,144 +0,0 @@ -// src/build-source-map-tree.ts -import { TraceMap } from "@jridgewell/trace-mapping"; - -// src/source-map-tree.ts -import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from "@jridgewell/gen-mapping"; -import { traceSegment, decodedMappings } from "@jridgewell/trace-mapping"; -var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false); -var EMPTY_SOURCES = []; -function SegmentObject(source, line, column, name, content, ignore) { - return { source, line, column, name, content, ignore }; -} -function Source(map, sources, source, content, ignore) { - return { - map, - sources, - source, - content, - ignore - }; -} -function MapSource(map, sources) { - return Source(map, sources, "", null, false); -} -function OriginalSource(source, content, ignore) { - return Source(null, EMPTY_SOURCES, source, content, ignore); -} -function traceMappings(tree) { - const gen = new GenMapping({ file: tree.map.file }); - const { sources: rootSources, map } = tree; - const rootNames = map.names; - const rootMappings = decodedMappings(map); - for (let i = 0; i < rootMappings.length; i++) { - const segments = rootMappings[i]; - for (let j = 0; j < segments.length; j++) { - const segment = segments[j]; - const genCol = segment[0]; - let traced = SOURCELESS_MAPPING; - if (segment.length !== 1) { - const source2 = rootSources[segment[1]]; - traced = originalPositionFor( - source2, - segment[2], - segment[3], - segment.length === 5 ? rootNames[segment[4]] : "" - ); - if (traced == null) continue; - } - const { column, line, name, content, source, ignore } = traced; - maybeAddSegment(gen, i, genCol, source, line, column, name); - if (source && content != null) setSourceContent(gen, source, content); - if (ignore) setIgnore(gen, source, true); - } - } - return gen; -} -function originalPositionFor(source, line, column, name) { - if (!source.map) { - return SegmentObject(source.source, line, column, name, source.content, source.ignore); - } - const segment = traceSegment(source.map, line, column); - if (segment == null) return null; - if (segment.length === 1) return SOURCELESS_MAPPING; - return originalPositionFor( - source.sources[segment[1]], - segment[2], - segment[3], - segment.length === 5 ? source.map.names[segment[4]] : name - ); -} - -// src/build-source-map-tree.ts -function asArray(value) { - if (Array.isArray(value)) return value; - return [value]; -} -function buildSourceMapTree(input, loader) { - const maps = asArray(input).map((m) => new TraceMap(m, "")); - const map = maps.pop(); - for (let i = 0; i < maps.length; i++) { - if (maps[i].sources.length > 1) { - throw new Error( - `Transformation map ${i} must have exactly one source file. -Did you specify these with the most recent transformation maps first?` - ); - } - } - let tree = build(map, loader, "", 0); - for (let i = maps.length - 1; i >= 0; i--) { - tree = MapSource(maps[i], [tree]); - } - return tree; -} -function build(map, loader, importer, importerDepth) { - const { resolvedSources, sourcesContent, ignoreList } = map; - const depth = importerDepth + 1; - const children = resolvedSources.map((sourceFile, i) => { - const ctx = { - importer, - depth, - source: sourceFile || "", - content: void 0, - ignore: void 0 - }; - const sourceMap = loader(ctx.source, ctx); - const { source, content, ignore } = ctx; - if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth); - const sourceContent = content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null; - const ignored = ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false; - return OriginalSource(source, sourceContent, ignored); - }); - return MapSource(map, children); -} - -// src/source-map.ts -import { toDecodedMap, toEncodedMap } from "@jridgewell/gen-mapping"; -var SourceMap = class { - constructor(map, options) { - const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); - this.version = out.version; - this.file = out.file; - this.mappings = out.mappings; - this.names = out.names; - this.ignoreList = out.ignoreList; - this.sourceRoot = out.sourceRoot; - this.sources = out.sources; - if (!options.excludeContent) { - this.sourcesContent = out.sourcesContent; - } - } - toString() { - return JSON.stringify(this); - } -}; - -// src/remapping.ts -function remapping(input, loader, options) { - const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false }; - const tree = buildSourceMapTree(input, loader); - return new SourceMap(traceMappings(tree), opts); -} -export { - remapping as default -}; -//# sourceMappingURL=remapping.mjs.map diff --git a/node_modules/@jridgewell/remapping/dist/remapping.mjs.map b/node_modules/@jridgewell/remapping/dist/remapping.mjs.map deleted file mode 100644 index 66801e6..0000000 --- a/node_modules/@jridgewell/remapping/dist/remapping.mjs.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/build-source-map-tree.ts", "../src/source-map-tree.ts", "../src/source-map.ts", "../src/remapping.ts"], - "mappings": ";AAAA,SAAS,gBAAgB;;;ACAzB,SAAS,YAAY,iBAAiB,WAAW,wBAAwB;AACzE,SAAS,cAAc,uBAAuB;AA+B9C,IAAM,qBAAqC,8BAAc,IAAI,IAAI,IAAI,IAAI,MAAM,KAAK;AACpF,IAAM,gBAA2B,CAAC;AAElC,SAAS,cACP,QACA,MACA,QACA,MACA,SACA,QACwB;AACxB,SAAO,EAAE,QAAQ,MAAM,QAAQ,MAAM,SAAS,OAAO;AACvD;AAgBA,SAAS,OACP,KACA,SACA,QACA,SACA,QACS;AACT,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAMO,SAAS,UAAU,KAAe,SAA+B;AACtE,SAAO,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK;AAC7C;AAMO,SAAS,eACd,QACA,SACA,QACgB;AAChB,SAAO,OAAO,MAAM,eAAe,QAAQ,SAAS,MAAM;AAC5D;AAMO,SAAS,cAAc,MAA6B;AAGzD,QAAM,MAAM,IAAI,WAAW,EAAE,MAAM,KAAK,IAAI,KAAK,CAAC;AAClD,QAAM,EAAE,SAAS,aAAa,IAAI,IAAI;AACtC,QAAM,YAAY,IAAI;AACtB,QAAM,eAAe,gBAAgB,GAAG;AAExC,WAAS,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;AAC5C,UAAM,WAAW,aAAa,CAAC;AAE/B,aAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,YAAM,UAAU,SAAS,C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,GAAG,IAAI,aAAa,GAAG;AAC1E,SAAK,UAAU,IAAI;AACnB,SAAK,OAAO,IAAI;AAChB,SAAK,WAAW,IAAI;AACpB,SAAK,QAAQ,IAAI;AACjB,SAAK,aAAa,IAAI;AACtB,SAAK,aAAa,IAAI;AAEtB,SAAK,UAAU,IAAI;AACnB,QAAI,CAAC,QAAQ,gBAAgB;AAC3B,WAAK,iBAAiB,IAAI;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,WAAmB;AACjB,WAAO,KAAK,UAAU,IAAI;AAAA,EAC5B;AACF;;;ACLe,SAAR,UACL,OACA,QACA,SACW;AACX,QAAM,OACJ,OAAO,YAAY,WAAW,UAAU,EAAE,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,MAAM;AAC9F,QAAM,OAAO,mBAAmB,OAAO,MAAM;AAC7C,SAAO,IAAI,UAAU,cAAc,IAAI,GAAG,IAAI;AAChD;", - "names": ["source"] -} diff --git a/node_modules/@jridgewell/remapping/dist/remapping.umd.js b/node_modules/@jridgewell/remapping/dist/remapping.umd.js deleted file mode 100644 index 077eb4d..0000000 --- a/node_modules/@jridgewell/remapping/dist/remapping.umd.js +++ /dev/null @@ -1,212 +0,0 @@ -(function (global, factory) { - if (typeof exports === 'object' && typeof module !== 'undefined') { - factory(module, require('@jridgewell/gen-mapping'), require('@jridgewell/trace-mapping')); - module.exports = def(module); - } else if (typeof define === 'function' && define.amd) { - define(['module', '@jridgewell/gen-mapping', '@jridgewell/trace-mapping'], function(mod) { - factory.apply(this, arguments); - mod.exports = def(mod); - }); - } else { - const mod = { exports: {} }; - factory(mod, global.genMapping, global.traceMapping); - global = typeof globalThis !== 'undefined' ? globalThis : global || self; - global.remapping = def(mod); - } - function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } -})(this, (function (module, require_genMapping, require_traceMapping) { -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// umd:@jridgewell/trace-mapping -var require_trace_mapping = __commonJS({ - "umd:@jridgewell/trace-mapping"(exports, module2) { - module2.exports = require_traceMapping; - } -}); - -// umd:@jridgewell/gen-mapping -var require_gen_mapping = __commonJS({ - "umd:@jridgewell/gen-mapping"(exports, module2) { - module2.exports = require_genMapping; - } -}); - -// src/remapping.ts -var remapping_exports = {}; -__export(remapping_exports, { - default: () => remapping -}); -module.exports = __toCommonJS(remapping_exports); - -// src/build-source-map-tree.ts -var import_trace_mapping2 = __toESM(require_trace_mapping()); - -// src/source-map-tree.ts -var import_gen_mapping = __toESM(require_gen_mapping()); -var import_trace_mapping = __toESM(require_trace_mapping()); -var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false); -var EMPTY_SOURCES = []; -function SegmentObject(source, line, column, name, content, ignore) { - return { source, line, column, name, content, ignore }; -} -function Source(map, sources, source, content, ignore) { - return { - map, - sources, - source, - content, - ignore - }; -} -function MapSource(map, sources) { - return Source(map, sources, "", null, false); -} -function OriginalSource(source, content, ignore) { - return Source(null, EMPTY_SOURCES, source, content, ignore); -} -function traceMappings(tree) { - const gen = new import_gen_mapping.GenMapping({ file: tree.map.file }); - const { sources: rootSources, map } = tree; - const rootNames = map.names; - const rootMappings = (0, import_trace_mapping.decodedMappings)(map); - for (let i = 0; i < rootMappings.length; i++) { - const segments = rootMappings[i]; - for (let j = 0; j < segments.length; j++) { - const segment = segments[j]; - const genCol = segment[0]; - let traced = SOURCELESS_MAPPING; - if (segment.length !== 1) { - const source2 = rootSources[segment[1]]; - traced = originalPositionFor( - source2, - segment[2], - segment[3], - segment.length === 5 ? rootNames[segment[4]] : "" - ); - if (traced == null) continue; - } - const { column, line, name, content, source, ignore } = traced; - (0, import_gen_mapping.maybeAddSegment)(gen, i, genCol, source, line, column, name); - if (source && content != null) (0, import_gen_mapping.setSourceContent)(gen, source, content); - if (ignore) (0, import_gen_mapping.setIgnore)(gen, source, true); - } - } - return gen; -} -function originalPositionFor(source, line, column, name) { - if (!source.map) { - return SegmentObject(source.source, line, column, name, source.content, source.ignore); - } - const segment = (0, import_trace_mapping.traceSegment)(source.map, line, column); - if (segment == null) return null; - if (segment.length === 1) return SOURCELESS_MAPPING; - return originalPositionFor( - source.sources[segment[1]], - segment[2], - segment[3], - segment.length === 5 ? source.map.names[segment[4]] : name - ); -} - -// src/build-source-map-tree.ts -function asArray(value) { - if (Array.isArray(value)) return value; - return [value]; -} -function buildSourceMapTree(input, loader) { - const maps = asArray(input).map((m) => new import_trace_mapping2.TraceMap(m, "")); - const map = maps.pop(); - for (let i = 0; i < maps.length; i++) { - if (maps[i].sources.length > 1) { - throw new Error( - `Transformation map ${i} must have exactly one source file. -Did you specify these with the most recent transformation maps first?` - ); - } - } - let tree = build(map, loader, "", 0); - for (let i = maps.length - 1; i >= 0; i--) { - tree = MapSource(maps[i], [tree]); - } - return tree; -} -function build(map, loader, importer, importerDepth) { - const { resolvedSources, sourcesContent, ignoreList } = map; - const depth = importerDepth + 1; - const children = resolvedSources.map((sourceFile, i) => { - const ctx = { - importer, - depth, - source: sourceFile || "", - content: void 0, - ignore: void 0 - }; - const sourceMap = loader(ctx.source, ctx); - const { source, content, ignore } = ctx; - if (sourceMap) return build(new import_trace_mapping2.TraceMap(sourceMap, source), loader, source, depth); - const sourceContent = content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null; - const ignored = ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false; - return OriginalSource(source, sourceContent, ignored); - }); - return MapSource(map, children); -} - -// src/source-map.ts -var import_gen_mapping2 = __toESM(require_gen_mapping()); -var SourceMap = class { - constructor(map, options) { - const out = options.decodedMappings ? (0, import_gen_mapping2.toDecodedMap)(map) : (0, import_gen_mapping2.toEncodedMap)(map); - this.version = out.version; - this.file = out.file; - this.mappings = out.mappings; - this.names = out.names; - this.ignoreList = out.ignoreList; - this.sourceRoot = out.sourceRoot; - this.sources = out.sources; - if (!options.excludeContent) { - this.sourcesContent = out.sourcesContent; - } - } - toString() { - return JSON.stringify(this); - } -}; - -// src/remapping.ts -function remapping(input, loader, options) { - const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false }; - const tree = buildSourceMapTree(input, loader); - return new SourceMap(traceMappings(tree), opts); -} -})); -//# sourceMappingURL=remapping.umd.js.map diff --git a/node_modules/@jridgewell/remapping/dist/remapping.umd.js.map b/node_modules/@jridgewell/remapping/dist/remapping.umd.js.map deleted file mode 100644 index d5e0786..0000000 --- a/node_modules/@jridgewell/remapping/dist/remapping.umd.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["umd:@jridgewell/trace-mapping", "umd:@jridgewell/gen-mapping", "../src/remapping.ts", "../src/build-source-map-tree.ts", "../src/source-map-tree.ts", "../src/source-map.ts"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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K,aAAa,IAAI;AACtB,SAAK,aAAa,IAAI;AAEtB,SAAK,UAAU,IAAI;AACnB,QAAI,CAAC,QAAQ,gBAAgB;AAC3B,WAAK,iBAAiB,IAAI;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,WAAmB;AACjB,WAAO,KAAK,UAAU,IAAI;AAAA,EAC5B;AACF;;;AHLe,SAAR,UACL,OACA,QACA,SACW;AACX,QAAM,OACJ,OAAO,YAAY,WAAW,UAAU,EAAE,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,MAAM;AAC9F,QAAM,OAAO,mBAAmB,OAAO,MAAM;AAC7C,SAAO,IAAI,UAAU,cAAc,IAAI,GAAG,IAAI;AAChD;", - "names": ["module", "module", "import_trace_mapping", "source", "import_gen_mapping"] -} diff --git a/node_modules/@jridgewell/remapping/package.json b/node_modules/@jridgewell/remapping/package.json deleted file mode 100644 index ed00441..0000000 --- a/node_modules/@jridgewell/remapping/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "@jridgewell/remapping", - "version": "2.3.5", - "description": "Remap sequential sourcemaps through transformations to point at the original source code", - "keywords": [ - "source", - "map", - "remap" - ], - "main": "dist/remapping.umd.js", - "module": "dist/remapping.mjs", - "types": "types/remapping.d.cts", - "files": [ - "dist", - "src", - "types" - ], - "exports": { - ".": [ - { - "import": { - "types": "./types/remapping.d.mts", - "default": "./dist/remapping.mjs" - }, - "default": { - "types": "./types/remapping.d.cts", - "default": "./dist/remapping.umd.js" - } - }, - "./dist/remapping.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:code benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:code build:types", - "build:code": "node ../../esbuild.mjs remapping.ts", - "build:types": "run-s build:types:force build:types:emit build:types:mts", - "build:types:force": "rimraf tsconfig.build.tsbuildinfo", - "build:types:emit": "tsc --project tsconfig.build.json", - "build:types:mts": "node ../../mts-types.mjs", - "clean": "run-s -n clean:code clean:types", - "clean:code": "tsc --build --clean tsconfig.build.json", - "clean:types": "rimraf dist types", - "test": "run-s -n test:types test:only test:format", - "test:format": "prettier --check '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:types": "eslint '{src,test}/**/*.ts'", - "lint": "run-s -n lint:types lint:format", - "lint:format": "npm run test:format -- --write", - "lint:types": "npm run test:types -- --fix", - "prepublishOnly": "npm run-s -n build test" - }, - "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/remapping", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemaps.git", - "directory": "packages/remapping" - }, - "author": "Justin Ridgewell ", - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "devDependencies": { - "source-map": "0.6.1" - } -} diff --git a/node_modules/@jridgewell/remapping/src/build-source-map-tree.ts b/node_modules/@jridgewell/remapping/src/build-source-map-tree.ts deleted file mode 100644 index 3e0262b..0000000 --- a/node_modules/@jridgewell/remapping/src/build-source-map-tree.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { TraceMap } from '@jridgewell/trace-mapping'; - -import { OriginalSource, MapSource } from './source-map-tree'; - -import type { Sources, MapSource as MapSourceType } from './source-map-tree'; -import type { SourceMapInput, SourceMapLoader, LoaderContext } from './types'; - -function asArray(value: T | T[]): T[] { - if (Array.isArray(value)) return value; - return [value]; -} - -/** - * Recursively builds a tree structure out of sourcemap files, with each node - * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of - * `OriginalSource`s and `SourceMapTree`s. - * - * Every sourcemap is composed of a collection of source files and mappings - * into locations of those source files. When we generate a `SourceMapTree` for - * the sourcemap, we attempt to load each source file's own sourcemap. If it - * does not have an associated sourcemap, it is considered an original, - * unmodified source file. - */ -export default function buildSourceMapTree( - input: SourceMapInput | SourceMapInput[], - loader: SourceMapLoader, -): MapSourceType { - const maps = asArray(input).map((m) => new TraceMap(m, '')); - const map = maps.pop()!; - - for (let i = 0; i < maps.length; i++) { - if (maps[i].sources.length > 1) { - throw new Error( - `Transformation map ${i} must have exactly one source file.\n` + - 'Did you specify these with the most recent transformation maps first?', - ); - } - } - - let tree = build(map, loader, '', 0); - for (let i = maps.length - 1; i >= 0; i--) { - tree = MapSource(maps[i], [tree]); - } - return tree; -} - -function build( - map: TraceMap, - loader: SourceMapLoader, - importer: string, - importerDepth: number, -): MapSourceType { - const { resolvedSources, sourcesContent, ignoreList } = map; - - const depth = importerDepth + 1; - const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => { - // The loading context gives the loader more information about why this file is being loaded - // (eg, from which importer). It also allows the loader to override the location of the loaded - // sourcemap/original source, or to override the content in the sourcesContent field if it's - // an unmodified source file. - const ctx: LoaderContext = { - importer, - depth, - source: sourceFile || '', - content: undefined, - ignore: undefined, - }; - - // Use the provided loader callback to retrieve the file's sourcemap. - // TODO: We should eventually support async loading of sourcemap files. - const sourceMap = loader(ctx.source, ctx); - - const { source, content, ignore } = ctx; - - // If there is a sourcemap, then we need to recurse into it to load its source files. - if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth); - - // Else, it's an unmodified source file. - // The contents of this unmodified source file can be overridden via the loader context, - // allowing it to be explicitly null or a string. If it remains undefined, we fall back to - // the importing sourcemap's `sourcesContent` field. - const sourceContent = - content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; - const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; - return OriginalSource(source, sourceContent, ignored); - }); - - return MapSource(map, children); -} diff --git a/node_modules/@jridgewell/remapping/src/remapping.ts b/node_modules/@jridgewell/remapping/src/remapping.ts deleted file mode 100644 index c0f8b0d..0000000 --- a/node_modules/@jridgewell/remapping/src/remapping.ts +++ /dev/null @@ -1,42 +0,0 @@ -import buildSourceMapTree from './build-source-map-tree'; -import { traceMappings } from './source-map-tree'; -import SourceMap from './source-map'; - -import type { SourceMapInput, SourceMapLoader, Options } from './types'; -export type { - SourceMapSegment, - EncodedSourceMap, - EncodedSourceMap as RawSourceMap, - DecodedSourceMap, - SourceMapInput, - SourceMapLoader, - LoaderContext, - Options, -} from './types'; -export type { SourceMap }; - -/** - * Traces through all the mappings in the root sourcemap, through the sources - * (and their sourcemaps), all the way back to the original source location. - * - * `loader` will be called every time we encounter a source file. If it returns - * a sourcemap, we will recurse into that sourcemap to continue the trace. If - * it returns a falsey value, that source file is treated as an original, - * unmodified source file. - * - * Pass `excludeContent` to exclude any self-containing source file content - * from the output sourcemap. - * - * Pass `decodedMappings` to receive a SourceMap with decoded (instead of - * VLQ encoded) mappings. - */ -export default function remapping( - input: SourceMapInput | SourceMapInput[], - loader: SourceMapLoader, - options?: boolean | Options, -): SourceMap { - const opts = - typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; - const tree = buildSourceMapTree(input, loader); - return new SourceMap(traceMappings(tree), opts); -} diff --git a/node_modules/@jridgewell/remapping/src/source-map-tree.ts b/node_modules/@jridgewell/remapping/src/source-map-tree.ts deleted file mode 100644 index 935240f..0000000 --- a/node_modules/@jridgewell/remapping/src/source-map-tree.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from '@jridgewell/gen-mapping'; -import { traceSegment, decodedMappings } from '@jridgewell/trace-mapping'; - -import type { TraceMap } from '@jridgewell/trace-mapping'; - -export type SourceMapSegmentObject = { - column: number; - line: number; - name: string; - source: string; - content: string | null; - ignore: boolean; -}; - -export type OriginalSource = { - map: null; - sources: Sources[]; - source: string; - content: string | null; - ignore: boolean; -}; - -export type MapSource = { - map: TraceMap; - sources: Sources[]; - source: string; - content: null; - ignore: false; -}; - -export type Sources = OriginalSource | MapSource; - -const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); -const EMPTY_SOURCES: Sources[] = []; - -function SegmentObject( - source: string, - line: number, - column: number, - name: string, - content: string | null, - ignore: boolean, -): SourceMapSegmentObject { - return { source, line, column, name, content, ignore }; -} - -function Source( - map: TraceMap, - sources: Sources[], - source: '', - content: null, - ignore: false, -): MapSource; -function Source( - map: null, - sources: Sources[], - source: string, - content: string | null, - ignore: boolean, -): OriginalSource; -function Source( - map: TraceMap | null, - sources: Sources[], - source: string | '', - content: string | null, - ignore: boolean, -): Sources { - return { - map, - sources, - source, - content, - ignore, - } as any; -} - -/** - * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes - * (which may themselves be SourceMapTrees). - */ -export function MapSource(map: TraceMap, sources: Sources[]): MapSource { - return Source(map, sources, '', null, false); -} - -/** - * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive - * segment tracing ends at the `OriginalSource`. - */ -export function OriginalSource( - source: string, - content: string | null, - ignore: boolean, -): OriginalSource { - return Source(null, EMPTY_SOURCES, source, content, ignore); -} - -/** - * traceMappings is only called on the root level SourceMapTree, and begins the process of - * resolving each mapping in terms of the original source files. - */ -export function traceMappings(tree: MapSource): GenMapping { - // TODO: Eventually support sourceRoot, which has to be removed because the sources are already - // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. - const gen = new GenMapping({ file: tree.map.file }); - const { sources: rootSources, map } = tree; - const rootNames = map.names; - const rootMappings = decodedMappings(map); - - for (let i = 0; i < rootMappings.length; i++) { - const segments = rootMappings[i]; - - for (let j = 0; j < segments.length; j++) { - const segment = segments[j]; - const genCol = segment[0]; - let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING; - - // 1-length segments only move the current generated column, there's no source information - // to gather from it. - if (segment.length !== 1) { - const source = rootSources[segment[1]]; - traced = originalPositionFor( - source, - segment[2], - segment[3], - segment.length === 5 ? rootNames[segment[4]] : '', - ); - - // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a - // respective segment into an original source. - if (traced == null) continue; - } - - const { column, line, name, content, source, ignore } = traced; - - maybeAddSegment(gen, i, genCol, source, line, column, name); - if (source && content != null) setSourceContent(gen, source, content); - if (ignore) setIgnore(gen, source, true); - } - } - - return gen; -} - -/** - * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own - * child SourceMapTrees, until we find the original source map. - */ -export function originalPositionFor( - source: Sources, - line: number, - column: number, - name: string, -): SourceMapSegmentObject | null { - if (!source.map) { - return SegmentObject(source.source, line, column, name, source.content, source.ignore); - } - - const segment = traceSegment(source.map, line, column); - - // If we couldn't find a segment, then this doesn't exist in the sourcemap. - if (segment == null) return null; - // 1-length segments only move the current generated column, there's no source information - // to gather from it. - if (segment.length === 1) return SOURCELESS_MAPPING; - - return originalPositionFor( - source.sources[segment[1]], - segment[2], - segment[3], - segment.length === 5 ? source.map.names[segment[4]] : name, - ); -} diff --git a/node_modules/@jridgewell/remapping/src/source-map.ts b/node_modules/@jridgewell/remapping/src/source-map.ts deleted file mode 100644 index 5156086..0000000 --- a/node_modules/@jridgewell/remapping/src/source-map.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; - -import type { GenMapping } from '@jridgewell/gen-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Options } from './types'; - -/** - * A SourceMap v3 compatible sourcemap, which only includes fields that were - * provided to it. - */ -export default class SourceMap { - declare file?: string | null; - declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; - declare sourceRoot?: string; - declare names: string[]; - declare sources: (string | null)[]; - declare sourcesContent?: (string | null)[]; - declare version: 3; - declare ignoreList: number[] | undefined; - - constructor(map: GenMapping, options: Options) { - const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); - this.version = out.version; // SourceMap spec says this should be first. - this.file = out.file; - this.mappings = out.mappings as SourceMap['mappings']; - this.names = out.names as SourceMap['names']; - this.ignoreList = out.ignoreList as SourceMap['ignoreList']; - this.sourceRoot = out.sourceRoot; - - this.sources = out.sources as SourceMap['sources']; - if (!options.excludeContent) { - this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent']; - } - } - - toString(): string { - return JSON.stringify(this); - } -} diff --git a/node_modules/@jridgewell/remapping/src/types.ts b/node_modules/@jridgewell/remapping/src/types.ts deleted file mode 100644 index 384961d..0000000 --- a/node_modules/@jridgewell/remapping/src/types.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; - -export type { - SourceMapSegment, - DecodedSourceMap, - EncodedSourceMap, -} from '@jridgewell/trace-mapping'; - -export type { SourceMapInput }; - -export type LoaderContext = { - readonly importer: string; - readonly depth: number; - source: string; - content: string | null | undefined; - ignore: boolean | undefined; -}; - -export type SourceMapLoader = ( - file: string, - ctx: LoaderContext, -) => SourceMapInput | null | undefined | void; - -export type Options = { - excludeContent?: boolean; - decodedMappings?: boolean; -}; diff --git a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts b/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts deleted file mode 100644 index e089aea..0000000 --- a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts +++ /dev/null @@ -1,15 +0,0 @@ -import type { MapSource as MapSourceType } from './source-map-tree.cts'; -import type { SourceMapInput, SourceMapLoader } from './types.cts'; -/** - * Recursively builds a tree structure out of sourcemap files, with each node - * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of - * `OriginalSource`s and `SourceMapTree`s. - * - * Every sourcemap is composed of a collection of source files and mappings - * into locations of those source files. When we generate a `SourceMapTree` for - * the sourcemap, we attempt to load each source file's own sourcemap. If it - * does not have an associated sourcemap, it is considered an original, - * unmodified source file. - */ -export = function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType; -//# sourceMappingURL=build-source-map-tree.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts.map b/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts.map deleted file mode 100644 index 38e4290..0000000 --- a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-source-map-tree.d.ts","sourceRoot":"","sources":["../src/build-source-map-tree.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,SAAS,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAO9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,EACxC,MAAM,EAAE,eAAe,GACtB,aAAa,CAkBf"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts b/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts deleted file mode 100644 index 746ac5f..0000000 --- a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts +++ /dev/null @@ -1,15 +0,0 @@ -import type { MapSource as MapSourceType } from './source-map-tree.mts'; -import type { SourceMapInput, SourceMapLoader } from './types.mts'; -/** - * Recursively builds a tree structure out of sourcemap files, with each node - * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of - * `OriginalSource`s and `SourceMapTree`s. - * - * Every sourcemap is composed of a collection of source files and mappings - * into locations of those source files. When we generate a `SourceMapTree` for - * the sourcemap, we attempt to load each source file's own sourcemap. If it - * does not have an associated sourcemap, it is considered an original, - * unmodified source file. - */ -export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType; -//# sourceMappingURL=build-source-map-tree.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts.map b/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts.map deleted file mode 100644 index 38e4290..0000000 --- a/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build-source-map-tree.d.ts","sourceRoot":"","sources":["../src/build-source-map-tree.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,SAAS,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAO9E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,EACxC,MAAM,EAAE,eAAe,GACtB,aAAa,CAkBf"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/remapping.d.cts b/node_modules/@jridgewell/remapping/types/remapping.d.cts deleted file mode 100644 index 2022784..0000000 --- a/node_modules/@jridgewell/remapping/types/remapping.d.cts +++ /dev/null @@ -1,21 +0,0 @@ -import SourceMap from './source-map.cts'; -import type { SourceMapInput, SourceMapLoader, Options } from './types.cts'; -export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types.cts'; -export type { SourceMap }; -/** - * Traces through all the mappings in the root sourcemap, through the sources - * (and their sourcemaps), all the way back to the original source location. - * - * `loader` will be called every time we encounter a source file. If it returns - * a sourcemap, we will recurse into that sourcemap to continue the trace. If - * it returns a falsey value, that source file is treated as an original, - * unmodified source file. - * - * Pass `excludeContent` to exclude any self-containing source file content - * from the output sourcemap. - * - * Pass `decodedMappings` to receive a SourceMap with decoded (instead of - * VLQ encoded) mappings. - */ -export = function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; -//# sourceMappingURL=remapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/remapping.d.cts.map b/node_modules/@jridgewell/remapping/types/remapping.d.cts.map deleted file mode 100644 index 9f2fd0e..0000000 --- a/node_modules/@jridgewell/remapping/types/remapping.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"remapping.d.ts","sourceRoot":"","sources":["../src/remapping.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACxE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,IAAI,YAAY,EAChC,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,GACR,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,EACxC,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAC1B,SAAS,CAKX"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/remapping.d.mts b/node_modules/@jridgewell/remapping/types/remapping.d.mts deleted file mode 100644 index 95c4066..0000000 --- a/node_modules/@jridgewell/remapping/types/remapping.d.mts +++ /dev/null @@ -1,21 +0,0 @@ -import SourceMap from './source-map.mts'; -import type { SourceMapInput, SourceMapLoader, Options } from './types.mts'; -export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types.mts'; -export type { SourceMap }; -/** - * Traces through all the mappings in the root sourcemap, through the sources - * (and their sourcemaps), all the way back to the original source location. - * - * `loader` will be called every time we encounter a source file. If it returns - * a sourcemap, we will recurse into that sourcemap to continue the trace. If - * it returns a falsey value, that source file is treated as an original, - * unmodified source file. - * - * Pass `excludeContent` to exclude any self-containing source file content - * from the output sourcemap. - * - * Pass `decodedMappings` to receive a SourceMap with decoded (instead of - * VLQ encoded) mappings. - */ -export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; -//# sourceMappingURL=remapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/remapping.d.mts.map b/node_modules/@jridgewell/remapping/types/remapping.d.mts.map deleted file mode 100644 index 9f2fd0e..0000000 --- a/node_modules/@jridgewell/remapping/types/remapping.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"remapping.d.ts","sourceRoot":"","sources":["../src/remapping.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACxE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,IAAI,YAAY,EAChC,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,GACR,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,EACxC,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAC1B,SAAS,CAKX"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts b/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts deleted file mode 100644 index 440f65b..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts +++ /dev/null @@ -1,46 +0,0 @@ -import { GenMapping } from '@jridgewell/gen-mapping'; -import type { TraceMap } from '@jridgewell/trace-mapping'; -export type SourceMapSegmentObject = { - column: number; - line: number; - name: string; - source: string; - content: string | null; - ignore: boolean; -}; -export type OriginalSource = { - map: null; - sources: Sources[]; - source: string; - content: string | null; - ignore: boolean; -}; -export type MapSource = { - map: TraceMap; - sources: Sources[]; - source: string; - content: null; - ignore: false; -}; -export type Sources = OriginalSource | MapSource; -/** - * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes - * (which may themselves be SourceMapTrees). - */ -export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource; -/** - * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive - * segment tracing ends at the `OriginalSource`. - */ -export declare function OriginalSource(source: string, content: string | null, ignore: boolean): OriginalSource; -/** - * traceMappings is only called on the root level SourceMapTree, and begins the process of - * resolving each mapping in terms of the original source files. - */ -export declare function traceMappings(tree: MapSource): GenMapping; -/** - * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own - * child SourceMapTrees, until we find the original source map. - */ -export declare function originalPositionFor(source: Sources, line: number, column: number, name: string): SourceMapSegmentObject | null; -//# sourceMappingURL=source-map-tree.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts.map b/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts.map deleted file mode 100644 index e7cbfb9..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map-tree.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map-tree.d.ts","sourceRoot":"","sources":["../src/source-map-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgD,MAAM,yBAAyB,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,IAAI,CAAC;IACV,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AA8CjD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,SAAS,CAEtE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,MAAM,EAAE,OAAO,GACd,cAAc,CAEhB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAyCzD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,sBAAsB,GAAG,IAAI,CAmB/B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts b/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts deleted file mode 100644 index 440f65b..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts +++ /dev/null @@ -1,46 +0,0 @@ -import { GenMapping } from '@jridgewell/gen-mapping'; -import type { TraceMap } from '@jridgewell/trace-mapping'; -export type SourceMapSegmentObject = { - column: number; - line: number; - name: string; - source: string; - content: string | null; - ignore: boolean; -}; -export type OriginalSource = { - map: null; - sources: Sources[]; - source: string; - content: string | null; - ignore: boolean; -}; -export type MapSource = { - map: TraceMap; - sources: Sources[]; - source: string; - content: null; - ignore: false; -}; -export type Sources = OriginalSource | MapSource; -/** - * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes - * (which may themselves be SourceMapTrees). - */ -export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource; -/** - * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive - * segment tracing ends at the `OriginalSource`. - */ -export declare function OriginalSource(source: string, content: string | null, ignore: boolean): OriginalSource; -/** - * traceMappings is only called on the root level SourceMapTree, and begins the process of - * resolving each mapping in terms of the original source files. - */ -export declare function traceMappings(tree: MapSource): GenMapping; -/** - * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own - * child SourceMapTrees, until we find the original source map. - */ -export declare function originalPositionFor(source: Sources, line: number, column: number, name: string): SourceMapSegmentObject | null; -//# sourceMappingURL=source-map-tree.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts.map b/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts.map deleted file mode 100644 index e7cbfb9..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map-tree.d.ts","sourceRoot":"","sources":["../src/source-map-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgD,MAAM,yBAAyB,CAAC;AAGnG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,IAAI,CAAC;IACV,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AA8CjD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,SAAS,CAEtE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,MAAM,EAAE,OAAO,GACd,cAAc,CAEhB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,UAAU,CAyCzD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,sBAAsB,GAAG,IAAI,CAmB/B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map.d.cts b/node_modules/@jridgewell/remapping/types/source-map.d.cts deleted file mode 100644 index fdb7eed..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map.d.cts +++ /dev/null @@ -1,19 +0,0 @@ -import type { GenMapping } from '@jridgewell/gen-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Options } from './types.cts'; -/** - * A SourceMap v3 compatible sourcemap, which only includes fields that were - * provided to it. - */ -export = class SourceMap { - file?: string | null; - mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; - sourceRoot?: string; - names: string[]; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList: number[] | undefined; - constructor(map: GenMapping, options: Options); - toString(): string; -} -//# sourceMappingURL=source-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map.d.cts.map b/node_modules/@jridgewell/remapping/types/source-map.d.cts.map deleted file mode 100644 index 593daf8..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map.d.ts","sourceRoot":"","sources":["../src/source-map.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAE7B,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO;IAe7C,QAAQ,IAAI,MAAM;CAGnB"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map.d.mts b/node_modules/@jridgewell/remapping/types/source-map.d.mts deleted file mode 100644 index 52ebba2..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map.d.mts +++ /dev/null @@ -1,19 +0,0 @@ -import type { GenMapping } from '@jridgewell/gen-mapping'; -import type { DecodedSourceMap, EncodedSourceMap, Options } from './types.mts'; -/** - * A SourceMap v3 compatible sourcemap, which only includes fields that were - * provided to it. - */ -export default class SourceMap { - file?: string | null; - mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; - sourceRoot?: string; - names: string[]; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList: number[] | undefined; - constructor(map: GenMapping, options: Options); - toString(): string; -} -//# sourceMappingURL=source-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/source-map.d.mts.map b/node_modules/@jridgewell/remapping/types/source-map.d.mts.map deleted file mode 100644 index 593daf8..0000000 --- a/node_modules/@jridgewell/remapping/types/source-map.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"source-map.d.ts","sourceRoot":"","sources":["../src/source-map.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAE7B,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO;IAe7C,QAAQ,IAAI,MAAM;CAGnB"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/types.d.cts b/node_modules/@jridgewell/remapping/types/types.d.cts deleted file mode 100644 index eeb320f..0000000 --- a/node_modules/@jridgewell/remapping/types/types.d.cts +++ /dev/null @@ -1,16 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping'; -export type { SourceMapInput }; -export type LoaderContext = { - readonly importer: string; - readonly depth: number; - source: string; - content: string | null | undefined; - ignore: boolean | undefined; -}; -export type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void; -export type Options = { - excludeContent?: boolean; - decodedMappings?: boolean; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/types.d.cts.map b/node_modules/@jridgewell/remapping/types/types.d.cts.map deleted file mode 100644 index 4f8647e..0000000 --- a/node_modules/@jridgewell/remapping/types/types.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAC5B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,aAAa,KACf,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,OAAO,GAAG;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/types.d.mts b/node_modules/@jridgewell/remapping/types/types.d.mts deleted file mode 100644 index eeb320f..0000000 --- a/node_modules/@jridgewell/remapping/types/types.d.mts +++ /dev/null @@ -1,16 +0,0 @@ -import type { SourceMapInput } from '@jridgewell/trace-mapping'; -export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping'; -export type { SourceMapInput }; -export type LoaderContext = { - readonly importer: string; - readonly depth: number; - source: string; - content: string | null | undefined; - ignore: boolean | undefined; -}; -export type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void; -export type Options = { - excludeContent?: boolean; - decodedMappings?: boolean; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/remapping/types/types.d.mts.map b/node_modules/@jridgewell/remapping/types/types.d.mts.map deleted file mode 100644 index 4f8647e..0000000 --- a/node_modules/@jridgewell/remapping/types/types.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAC5B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,aAAa,KACf,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAE9C,MAAM,MAAM,OAAO,GAAG;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE deleted file mode 100644 index 0a81b2a..0000000 --- a/node_modules/@jridgewell/resolve-uri/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2019 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md deleted file mode 100644 index 2fe70df..0000000 --- a/node_modules/@jridgewell/resolve-uri/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# @jridgewell/resolve-uri - -> Resolve a URI relative to an optional base URI - -Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. - -## Installation - -```sh -npm install @jridgewell/resolve-uri -``` - -## Usage - -```typescript -function resolve(input: string, base?: string): string; -``` - -```js -import resolve from '@jridgewell/resolve-uri'; - -resolve('foo', 'https://example.com'); // => 'https://example.com/foo' -``` - -| Input | Base | Resolution | Explanation | -|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| -| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | -| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | -| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | -| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | -| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | -| `/example` | _rest_ | `/example` | Input is normalized only | -| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | -| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | -| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | -| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | -| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | -| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | -| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | -| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs deleted file mode 100644 index e958e88..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +++ /dev/null @@ -1,232 +0,0 @@ -// Matches the scheme of a URL, eg "http://" -const schemeRegex = /^[\w+.-]+:\/\//; -/** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ -const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; -/** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ -const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; -function isAbsoluteUrl(input) { - return schemeRegex.test(input); -} -function isSchemeRelativeUrl(input) { - return input.startsWith('//'); -} -function isAbsolutePath(input) { - return input.startsWith('/'); -} -function isFileUrl(input) { - return input.startsWith('file:'); -} -function isRelative(input) { - return /^[.?#]/.test(input); -} -function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); -} -function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); -} -function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; -} -function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; -} -function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} -function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } -} -/** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ -function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; -} -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } -} - -export { resolve as default }; -//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map deleted file mode 100644 index 1de97d0..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC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CAAC,MAAM,CAAC;SAC/B;QACD,IAAI,QAAQ,GAAG,SAAS;YAAE,SAAS,GAAG,QAAQ,CAAC;KAChD;IAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IACvC,QAAQ,SAAS;;;QAIf,kBAAkB;QAClB;YACE,OAAO,SAAS,CAAC;QAEnB,2BAA2B;;YAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI;gBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js deleted file mode 100644 index a783049..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +++ /dev/null @@ -1,240 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); -})(this, (function () { 'use strict'; - - // Matches the scheme of a URL, eg "http://" - const schemeRegex = /^[\w+.-]+:\/\//; - /** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ - const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; - /** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ - const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; - function isAbsoluteUrl(input) { - return schemeRegex.test(input); - } - function isSchemeRelativeUrl(input) { - return input.startsWith('//'); - } - function isAbsolutePath(input) { - return input.startsWith('/'); - } - function isFileUrl(input) { - return input.startsWith('file:'); - } - function isRelative(input) { - return /^[.?#]/.test(input); - } - function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); - } - function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); - } - function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; - } - function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; - } - function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } - } - /** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ - function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; - } - /** - * Attempts to resolve `input` URL/path relative to `base`. - */ - function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } - } - - return resolve; - -})); -//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map deleted file mode 100644 index 70a37f2..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,I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ri/dist/types/resolve-uri.d.ts deleted file mode 100644 index b7f0b3b..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json deleted file mode 100644 index 02a4c51..0000000 --- a/node_modules/@jridgewell/resolve-uri/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@jridgewell/resolve-uri", - "version": "3.1.2", - "description": "Resolve a URI relative to an optional base URI", - "keywords": [ - "resolve", - "uri", - "url", - "path" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/resolve-uri", - "main": "dist/resolve-uri.umd.js", - "module": "dist/resolve-uri.mjs", - "types": "dist/types/resolve-uri.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/resolve-uri.d.ts", - "browser": "./dist/resolve-uri.umd.js", - "require": "./dist/resolve-uri.umd.js", - "import": "./dist/resolve-uri.mjs" - }, - "./dist/resolve-uri.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "pretest": "run-s build:rollup", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "typescript": "4.5.5" - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE deleted file mode 100644 index 1f6ce94..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2024 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md deleted file mode 100644 index b3e0708..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# @jridgewell/sourcemap-codec - -Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). - - -## Why? - -Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. - -This package makes the process slightly easier. - - -## Installation - -```bash -npm install @jridgewell/sourcemap-codec -``` - - -## Usage - -```js -import { encode, decode } from '@jridgewell/sourcemap-codec'; - -var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); - -assert.deepEqual( decoded, [ - // the first line (of the generated code) has no mappings, - // as shown by the starting semi-colon (which separates lines) - [], - - // the second line contains four (comma-separated) segments - [ - // segments are encoded as you'd expect: - // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] - - // i.e. the first segment begins at column 2, and maps back to the second column - // of the second line (both zero-based) of the 0th source, and uses the 0th - // name in the `map.names` array - [ 2, 0, 2, 2, 0 ], - - // the remaining segments are 4-length rather than 5-length, - // because they don't map a name - [ 4, 0, 2, 4 ], - [ 6, 0, 2, 5 ], - [ 7, 0, 2, 7 ] - ], - - // the final line contains two segments - [ - [ 2, 1, 10, 19 ], - [ 12, 1, 11, 20 ] - ] -]); - -var encoded = encode( decoded ); -assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); -``` - -## Benchmarks - -``` -node v20.10.0 - -amp.js.map - 45120 segments - -Decode Memory Usage: -local code 5815135 bytes -@jridgewell/sourcemap-codec 1.4.15 5868160 bytes -sourcemap-codec 5492584 bytes -source-map-0.6.1 13569984 bytes -source-map-0.8.0 6390584 bytes -chrome dev tools 8011136 bytes -Smallest memory usage is sourcemap-codec - -Decode speed: -decode: local code x 492 ops/sec ±1.22% (90 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) -decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) -decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) -decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) -chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 444248 bytes -@jridgewell/sourcemap-codec 1.4.15 623024 bytes -sourcemap-codec 8696280 bytes -source-map-0.6.1 8745176 bytes -source-map-0.8.0 8736624 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 796 ops/sec ±0.11% (97 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) -encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) -encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) -encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) -Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -babel.min.js.map - 347793 segments - -Decode Memory Usage: -local code 35424960 bytes -@jridgewell/sourcemap-codec 1.4.15 35424696 bytes -sourcemap-codec 36033464 bytes -source-map-0.6.1 62253704 bytes -source-map-0.8.0 43843920 bytes -chrome dev tools 45111400 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Decode speed: -decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) -decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) -decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) -decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) -chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 2606016 bytes -@jridgewell/sourcemap-codec 1.4.15 2626440 bytes -sourcemap-codec 21152576 bytes -source-map-0.6.1 25023928 bytes -source-map-0.8.0 25256448 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 127 ops/sec ±0.18% (83 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) -encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) -encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) -encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -preact.js.map - 1992 segments - -Decode Memory Usage: -local code 261696 bytes -@jridgewell/sourcemap-codec 1.4.15 244296 bytes -sourcemap-codec 302816 bytes -source-map-0.6.1 939176 bytes -source-map-0.8.0 336 bytes -chrome dev tools 587368 bytes -Smallest memory usage is source-map-0.8.0 - -Decode speed: -decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) -decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) -decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) -decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) -chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 262944 bytes -@jridgewell/sourcemap-codec 1.4.15 25544 bytes -sourcemap-codec 323048 bytes -source-map-0.6.1 507808 bytes -source-map-0.8.0 507480 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Encode speed: -encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) -encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) -encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code - - -*** - - -react.js.map - 5726 segments - -Decode Memory Usage: -local code 678816 bytes -@jridgewell/sourcemap-codec 1.4.15 678816 bytes -sourcemap-codec 816400 bytes -source-map-0.6.1 2288864 bytes -source-map-0.8.0 721360 bytes -chrome dev tools 1012512 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) -decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) -decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) -decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) -chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 140960 bytes -@jridgewell/sourcemap-codec 1.4.15 159808 bytes -sourcemap-codec 969304 bytes -source-map-0.6.1 930520 bytes -source-map-0.8.0 930248 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) -encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) -encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) -Fastest is encode: local code - - -*** - - -vscode.map - 2141001 segments - -Decode Memory Usage: -local code 198955264 bytes -@jridgewell/sourcemap-codec 1.4.15 199175352 bytes -sourcemap-codec 199102688 bytes -source-map-0.6.1 386323432 bytes -source-map-0.8.0 244116432 bytes -chrome dev tools 293734280 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) -decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) -decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) -decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) -chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 13509880 bytes -@jridgewell/sourcemap-codec 1.4.15 13537648 bytes -sourcemap-codec 32540104 bytes -source-map-0.6.1 127531040 bytes -source-map-0.8.0 127535312 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) -encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) -encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) -encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 -``` - -# License - -MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs deleted file mode 100644 index 532bab3..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +++ /dev/null @@ -1,423 +0,0 @@ -// src/vlq.ts -var comma = ",".charCodeAt(0); -var semicolon = ";".charCodeAt(0); -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var intToChar = new Uint8Array(64); -var charToInt = new Uint8Array(128); -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -2147483648 | -value; - } - return relative + value; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? -delta << 1 | 1 : delta << 1; - do { - let clamped = delta & 31; - delta >>>= 5; - if (delta > 0) clamped |= 32; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} - -// src/strings.ts -var bufLength = 1024 * 16; -var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - } -} : { - decode(buf) { - let out = ""; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - } -}; -var StringWriter = class { - constructor() { - this.pos = 0; - this.out = ""; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -}; -var StringReader = class { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -}; - -// src/scopes.ts -var EMPTY = []; -function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 1; - const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; -} -function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); -} -function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 1 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; -} -function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(";"); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 1; - const hasCallsite = fields & 2; - const hasScope = fields & 4; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 - ); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0 - ); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; -} -function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) return ""; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); -} -function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings - } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; -} -function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} - -// src/sourcemap-codec.ts -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(";"); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} -export { - decode, - decodeGeneratedRanges, - decodeOriginalScopes, - encode, - encodeGeneratedRanges, - encodeOriginalScopes -}; -//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map deleted file mode 100644 index c276844..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/sourcemap-codec.ts"], - "mappings": ";AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAAsB,UAA0B;AAC5E,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,QAAM,eAAe,QAAQ;AAC7B,aAAW;AAEX,MAAI,cAAc;AAChB,YAAQ,cAAc,CAAC;AAAA,EACzB;AAEA,SAAO,WAAW;AACpB;AAEO,SAAS,cAAc,SAAuB,KAAa,UAA0B;AAC1F,MAAI,QAAQ,MAAM;AAElB,UAAQ,QAAQ,IAAK,CAAC,SAAS,IAAK,IAAI,SAAS;AACjD,KAAG;AACD,QAAI,UAAU,QAAQ;AAC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AAO,MAAM,SAAS;AACjC,QAAI,KAAK,WAAW,EAAG;AAEvB,QAAI,YAAY;AAEhB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,UAAU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", - "names": [] -} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js deleted file mode 100644 index 2d8e459..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +++ /dev/null @@ -1,464 +0,0 @@ -(function (global, factory) { - if (typeof exports === 'object' && typeof module !== 'undefined') { - factory(module); - module.exports = def(module); - } else if (typeof define === 'function' && define.amd) { - define(['module'], function(mod) { - factory.apply(this, arguments); - mod.exports = def(mod); - }); - } else { - const mod = { exports: {} }; - factory(mod); - global = typeof globalThis !== 'undefined' ? globalThis : global || self; - global.sourcemapCodec = def(mod); - } - function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } -})(this, (function (module) { -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/sourcemap-codec.ts -var sourcemap_codec_exports = {}; -__export(sourcemap_codec_exports, { - decode: () => decode, - decodeGeneratedRanges: () => decodeGeneratedRanges, - decodeOriginalScopes: () => decodeOriginalScopes, - encode: () => encode, - encodeGeneratedRanges: () => encodeGeneratedRanges, - encodeOriginalScopes: () => encodeOriginalScopes -}); -module.exports = __toCommonJS(sourcemap_codec_exports); - -// src/vlq.ts -var comma = ",".charCodeAt(0); -var semicolon = ";".charCodeAt(0); -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var intToChar = new Uint8Array(64); -var charToInt = new Uint8Array(128); -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -2147483648 | -value; - } - return relative + value; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? -delta << 1 | 1 : delta << 1; - do { - let clamped = delta & 31; - delta >>>= 5; - if (delta > 0) clamped |= 32; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} - -// src/strings.ts -var bufLength = 1024 * 16; -var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - } -} : { - decode(buf) { - let out = ""; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - } -}; -var StringWriter = class { - constructor() { - this.pos = 0; - this.out = ""; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -}; -var StringReader = class { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -}; - -// src/scopes.ts -var EMPTY = []; -function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 1; - const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; -} -function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); -} -function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 1 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; -} -function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(";"); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 1; - const hasCallsite = fields & 2; - const hasScope = fields & 4; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 - ); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0 - ); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; -} -function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) return ""; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); -} -function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings - } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; -} -function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} - -// src/sourcemap-codec.ts -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(";"); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} -})); -//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map deleted file mode 100644 index abc18d2..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/sourcemap-codec.ts", "../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", - "names": [] -} diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json deleted file mode 100644 index da55137..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@jridgewell/sourcemap-codec", - "version": "1.5.5", - "description": "Encode/decode sourcemap mappings", - "keywords": [ - "sourcemap", - "vlq" - ], - "main": "dist/sourcemap-codec.umd.js", - "module": "dist/sourcemap-codec.mjs", - "types": "types/sourcemap-codec.d.cts", - "files": [ - "dist", - "src", - "types" - ], - "exports": { - ".": [ - { - "import": { - "types": "./types/sourcemap-codec.d.mts", - "default": "./dist/sourcemap-codec.mjs" - }, - "default": { - "types": "./types/sourcemap-codec.d.cts", - "default": "./dist/sourcemap-codec.umd.js" - } - }, - "./dist/sourcemap-codec.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:code benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:code build:types", - "build:code": "node ../../esbuild.mjs sourcemap-codec.ts", - "build:types": "run-s build:types:force build:types:emit build:types:mts", - "build:types:force": "rimraf tsconfig.build.tsbuildinfo", - "build:types:emit": "tsc --project tsconfig.build.json", - "build:types:mts": "node ../../mts-types.mjs", - "clean": "run-s -n clean:code clean:types", - "clean:code": "tsc --build --clean tsconfig.build.json", - "clean:types": "rimraf dist types", - "test": "run-s -n test:types test:only test:format", - "test:format": "prettier --check '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:types": "eslint '{src,test}/**/*.ts'", - "lint": "run-s -n lint:types lint:format", - "lint:format": "npm run test:format -- --write", - "lint:types": "npm run test:types -- --fix", - "prepublishOnly": "npm run-s -n build test" - }, - "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemaps.git", - "directory": "packages/sourcemap-codec" - }, - "author": "Justin Ridgewell ", - "license": "MIT" -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts deleted file mode 100644 index d194c2f..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +++ /dev/null @@ -1,345 +0,0 @@ -import { StringReader, StringWriter } from './strings'; -import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; - -const EMPTY: any[] = []; - -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; - -type Mix = (A & O) | (B & O); - -export type OriginalScope = Mix< - [Line, Column, Line, Column, Kind], - [Line, Column, Line, Column, Kind, Name], - { vars: Var[] } ->; - -export type GeneratedRange = Mix< - [Line, Column, Line, Column], - [Line, Column, Line, Column, SourcesIndex, ScopesIndex], - { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; - } ->; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; - -export function decodeOriginalScopes(input: string): OriginalScope[] { - const { length } = input; - const reader = new StringReader(input); - const scopes: OriginalScope[] = []; - const stack: OriginalScope[] = []; - let line = 0; - - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - - if (!hasMoreVlq(reader, length)) { - const last = stack.pop()!; - last[2] = line; - last[3] = column; - continue; - } - - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 0b0001; - - const scope: OriginalScope = ( - hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind] - ) as OriginalScope; - - let vars: Var[] = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - - scopes.push(scope); - stack.push(scope); - } - - return scopes; -} - -export function encodeOriginalScopes(scopes: OriginalScope[]): string { - const writer = new StringWriter(); - - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - - return writer.flush(); -} - -function _encodeOriginalScopes( - scopes: OriginalScope[], - index: number, - writer: StringWriter, - state: [ - number, // GenColumn - ], -): number { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - - if (index > 0) writer.write(comma); - - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - - const fields = scope.length === 6 ? 0b0001 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - - for (const v of vars) { - encodeInteger(writer, v, 0); - } - - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - - return index; -} - -export function decodeGeneratedRanges(input: string): GeneratedRange[] { - const { length } = input; - const reader = new StringReader(input); - const ranges: GeneratedRange[] = []; - const stack: GeneratedRange[] = []; - - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - - do { - const semi = reader.indexOf(';'); - let genColumn = 0; - - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop()!; - last[2] = genLine; - last[3] = genColumn; - continue; - } - - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 0b0001; - const hasCallsite = fields & 0b0010; - const hasScope = fields & 0b0100; - - let callsite: CallSite | null = null; - let bindings: Binding[] = EMPTY; - let range: GeneratedRange; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0, - ); - - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange; - } else { - range = [genLine, genColumn, 0, 0] as GeneratedRange; - } - - range.isScope = !!hasScope; - - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0, - ); - - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges: BindingExpressionRange[]; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - - ranges.push(range); - stack.push(range); - } - - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - - return ranges; -} - -export function encodeGeneratedRanges(ranges: GeneratedRange[]): string { - if (ranges.length === 0) return ''; - - const writer = new StringWriter(); - - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - - return writer.flush(); -} - -function _encodeGeneratedRanges( - ranges: GeneratedRange[], - index: number, - writer: StringWriter, - state: [ - number, // GenLine - number, // GenColumn - number, // DefSourcesIndex - number, // DefScopesIndex - number, // CallSourcesIndex - number, // CallLine - number, // CallColumn - ], -): number { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings, - } = range; - - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - - state[1] = encodeInteger(writer, range[1], state[1]); - - const fields = - (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); - encodeInteger(writer, fields, 0); - - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn); - encodeInteger(writer, expRange[0]!, 0); - } - } - } - - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - - return index; -} - -function catchupLine(writer: StringWriter, lastLine: number, line: number) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts deleted file mode 100644 index a81f894..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; -import { StringWriter, StringReader } from './strings'; - -export { - decodeOriginalScopes, - encodeOriginalScopes, - decodeGeneratedRanges, - encodeGeneratedRanges, -} from './scopes'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; - -export type SourceMapSegment = - | [number] - | [number, number, number, number] - | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; - -export function decode(mappings: string): SourceMapMappings { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded: SourceMapMappings = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - - do { - const semi = reader.indexOf(';'); - const line: SourceMapLine = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - - while (reader.pos < semi) { - let seg: SourceMapSegment; - - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - - line.push(seg); - reader.pos++; - } - - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - - return decoded; -} - -function sort(line: SourceMapSegment[]) { - line.sort(sortComparator); -} - -function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { - return a[0] - b[0]; -} - -export function encode(decoded: SourceMapMappings): string; -export function encode(decoded: Readonly): string; -export function encode(decoded: Readonly): string { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - - let genColumn = 0; - - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - - genColumn = encodeInteger(writer, segment[0], genColumn); - - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - - return writer.flush(); -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts deleted file mode 100644 index d161965..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +++ /dev/null @@ -1,65 +0,0 @@ -const bufLength = 1024 * 16; - -// Provide a fallback for older environments. -const td = - typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf: Uint8Array): string { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf: Uint8Array): string { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - -export class StringWriter { - pos = 0; - private out = ''; - private buffer = new Uint8Array(bufLength); - - write(v: number): void { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - - flush(): string { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -} - -export class StringReader { - pos = 0; - declare private buffer: string; - - constructor(buffer: string) { - this.buffer = buffer; - } - - next(): number { - return this.buffer.charCodeAt(this.pos++); - } - - peek(): number { - return this.buffer.charCodeAt(this.pos); - } - - indexOf(char: string): number { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts deleted file mode 100644 index a42c681..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { StringReader, StringWriter } from './strings'; - -export const comma = ','.charCodeAt(0); -export const semicolon = ';'.charCodeAt(0); - -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII - -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} - -export function decodeInteger(reader: StringReader, relative: number): number { - let value = 0; - let shift = 0; - let integer = 0; - - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - - const shouldNegate = value & 1; - value >>>= 1; - - if (shouldNegate) { - value = -0x80000000 | -value; - } - - return relative + value; -} - -export function encodeInteger(builder: StringWriter, num: number, relative: number): number { - let delta = num - relative; - - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - - return num; -} - -export function hasMoreVlq(reader: StringReader, max: number) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts deleted file mode 100644 index c583c75..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +++ /dev/null @@ -1,50 +0,0 @@ -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; -type Mix = (A & O) | (B & O); -export type OriginalScope = Mix<[ - Line, - Column, - Line, - Column, - Kind -], [ - Line, - Column, - Line, - Column, - Kind, - Name -], { - vars: Var[]; -}>; -export type GeneratedRange = Mix<[ - Line, - Column, - Line, - Column -], [ - Line, - Column, - Line, - Column, - SourcesIndex, - ScopesIndex -], { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; -}>; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; -export declare function decodeOriginalScopes(input: string): OriginalScope[]; -export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; -export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; -export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; -export {}; -//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map deleted file mode 100644 index 630e647..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scopes.d.ts","sourceRoot":"","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B,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts deleted file mode 100644 index c583c75..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +++ /dev/null @@ -1,50 +0,0 @@ -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; -type Mix = (A & O) | (B & O); -export type OriginalScope = Mix<[ - Line, - Column, - Line, - Column, - Kind -], [ - Line, - Column, - Line, - Column, - Kind, - Name -], { - vars: Var[]; -}>; -export type GeneratedRange = Mix<[ - Line, - Column, - Line, - Column -], [ - Line, - Column, - Line, - Column, - SourcesIndex, - ScopesIndex -], { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; -}>; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; -export declare function decodeOriginalScopes(input: string): OriginalScope[]; -export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; -export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; -export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; -export {}; -//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map deleted file mode 100644 index 630e647..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +++ /dev/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AI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts deleted file mode 100644 index 5f35e22..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +++ /dev/null @@ -1,9 +0,0 @@ -export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts'; -export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; -//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map deleted file mode 100644 index 7123d52..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts deleted file mode 100644 index 199fb9f..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts'; -export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; -//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map deleted file mode 100644 index 7123d52..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts deleted file mode 100644 index 62faceb..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +++ /dev/null @@ -1,16 +0,0 @@ -export declare class StringWriter { - pos: number; - private out; - private buffer; - write(v: number): void; - flush(): string; -} -export declare class StringReader { - pos: number; - private buffer; - constructor(buffer: string); - next(): number; - peek(): number; - indexOf(char: string): number; -} -//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map deleted file mode 100644 index d3602da..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts deleted file mode 100644 index 62faceb..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +++ /dev/null @@ -1,16 +0,0 @@ -export declare class StringWriter { - pos: number; - private out; - private buffer; - write(v: number): void; - flush(): string; -} -export declare class StringReader { - pos: number; - private buffer; - constructor(buffer: string); - next(): number; - peek(): number; - indexOf(char: string): number; -} -//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map deleted file mode 100644 index d3602da..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts deleted file mode 100644 index dbd6602..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +++ /dev/null @@ -1,7 +0,0 @@ -import type { StringReader, StringWriter } from './strings.cts'; -export declare const comma: number; -export declare const semicolon: number; -export declare function decodeInteger(reader: StringReader, relative: number): number; -export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; -export declare function hasMoreVlq(reader: StringReader, max: number): boolean; -//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map deleted file mode 100644 index 6fdc356..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts deleted file mode 100644 index 2c739bc..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +++ /dev/null @@ -1,7 +0,0 @@ -import type { StringReader, StringWriter } from './strings.mts'; -export declare const comma: number; -export declare const semicolon: number; -export declare function decodeInteger(reader: StringReader, relative: number): number; -export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; -export declare function hasMoreVlq(reader: StringReader, max: number): boolean; -//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map deleted file mode 100644 index 6fdc356..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE deleted file mode 100644 index 1f6ce94..0000000 --- a/node_modules/@jridgewell/trace-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2024 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md deleted file mode 100644 index 9fc0ed0..0000000 --- a/node_modules/@jridgewell/trace-mapping/README.md +++ /dev/null @@ -1,348 +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 v20.10.0 - -amp.js.map - 45120 segments - -Memory Usage: -trace-mapping decoded 414164 bytes -trace-mapping encoded 6274352 bytes -source-map-js 10968904 bytes -source-map-0.6.1 17587160 bytes -source-map-0.8.0 8812155 bytes -Chrome dev tools 8672912 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 205 ops/sec ±0.19% (88 runs sampled) -trace-mapping: encoded JSON input x 405 ops/sec ±1.47% (88 runs sampled) -trace-mapping: decoded Object input x 4,645 ops/sec ±0.15% (98 runs sampled) -trace-mapping: encoded Object input x 458 ops/sec ±1.63% (91 runs sampled) -source-map-js: encoded Object input x 75.48 ops/sec ±1.64% (67 runs sampled) -source-map-0.6.1: encoded Object input x 39.37 ops/sec ±1.44% (53 runs sampled) -Chrome dev tools: encoded Object input x 150 ops/sec ±1.76% (79 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed (random): -trace-mapping: decoded originalPositionFor x 44,946 ops/sec ±0.16% (99 runs sampled) -trace-mapping: encoded originalPositionFor x 37,995 ops/sec ±1.81% (89 runs sampled) -source-map-js: encoded originalPositionFor x 9,230 ops/sec ±1.36% (93 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 8,057 ops/sec ±0.84% (96 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 28,198 ops/sec ±1.12% (91 runs sampled) -Chrome dev tools: encoded originalPositionFor x 46,276 ops/sec ±1.35% (95 runs sampled) -Fastest is Chrome dev tools: encoded originalPositionFor - -Trace speed (ascending): -trace-mapping: decoded originalPositionFor x 204,406 ops/sec ±0.19% (97 runs sampled) -trace-mapping: encoded originalPositionFor x 196,695 ops/sec ±0.24% (99 runs sampled) -source-map-js: encoded originalPositionFor x 11,948 ops/sec ±0.94% (99 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 10,730 ops/sec ±0.36% (100 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 51,427 ops/sec ±0.21% (98 runs sampled) -Chrome dev tools: encoded originalPositionFor x 162,615 ops/sec ±0.18% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -babel.min.js.map - 347793 segments - -Memory Usage: -trace-mapping decoded 18504 bytes -trace-mapping encoded 35428008 bytes -source-map-js 51676808 bytes -source-map-0.6.1 63367136 bytes -source-map-0.8.0 43158400 bytes -Chrome dev tools 50721552 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 17.82 ops/sec ±6.35% (35 runs sampled) -trace-mapping: encoded JSON input x 31.57 ops/sec ±7.50% (43 runs sampled) -trace-mapping: decoded Object input x 867 ops/sec ±0.74% (94 runs sampled) -trace-mapping: encoded Object input x 33.83 ops/sec ±7.66% (46 runs sampled) -source-map-js: encoded Object input x 6.58 ops/sec ±3.31% (20 runs sampled) -source-map-0.6.1: encoded Object input x 4.23 ops/sec ±3.43% (15 runs sampled) -Chrome dev tools: encoded Object input x 22.14 ops/sec ±3.79% (41 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed (random): -trace-mapping: decoded originalPositionFor x 78,234 ops/sec ±1.48% (29 runs sampled) -trace-mapping: encoded originalPositionFor x 60,761 ops/sec ±1.35% (21 runs sampled) -source-map-js: encoded originalPositionFor x 51,448 ops/sec ±2.17% (89 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 47,221 ops/sec ±1.99% (15 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 84,002 ops/sec ±1.45% (27 runs sampled) -Chrome dev tools: encoded originalPositionFor x 106,457 ops/sec ±1.38% (37 runs sampled) -Fastest is Chrome dev tools: encoded originalPositionFor - -Trace speed (ascending): -trace-mapping: decoded originalPositionFor x 930,943 ops/sec ±0.25% (99 runs sampled) -trace-mapping: encoded originalPositionFor x 843,545 ops/sec ±0.34% (97 runs sampled) -source-map-js: encoded originalPositionFor x 114,510 ops/sec ±1.37% (36 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 87,412 ops/sec ±0.72% (92 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 197,709 ops/sec ±0.89% (59 runs sampled) -Chrome dev tools: encoded originalPositionFor x 688,983 ops/sec ±0.33% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -preact.js.map - 1992 segments - -Memory Usage: -trace-mapping decoded 33136 bytes -trace-mapping encoded 254240 bytes -source-map-js 837488 bytes -source-map-0.6.1 961928 bytes -source-map-0.8.0 54384 bytes -Chrome dev tools 709680 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 3,709 ops/sec ±0.13% (99 runs sampled) -trace-mapping: encoded JSON input x 6,447 ops/sec ±0.22% (101 runs sampled) -trace-mapping: decoded Object input x 83,062 ops/sec ±0.23% (100 runs sampled) -trace-mapping: encoded Object input x 14,980 ops/sec ±0.28% (100 runs sampled) -source-map-js: encoded Object input x 2,544 ops/sec ±0.16% (99 runs sampled) -source-map-0.6.1: encoded Object input x 1,221 ops/sec ±0.37% (97 runs sampled) -Chrome dev tools: encoded Object input x 4,241 ops/sec ±0.39% (93 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed (random): -trace-mapping: decoded originalPositionFor x 91,028 ops/sec ±0.14% (94 runs sampled) -trace-mapping: encoded originalPositionFor x 84,348 ops/sec ±0.26% (98 runs sampled) -source-map-js: encoded originalPositionFor x 26,998 ops/sec ±0.23% (98 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 18,049 ops/sec ±0.26% (100 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 41,916 ops/sec ±0.28% (98 runs sampled) -Chrome dev tools: encoded originalPositionFor x 88,616 ops/sec ±0.14% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -Trace speed (ascending): -trace-mapping: decoded originalPositionFor x 319,960 ops/sec ±0.16% (100 runs sampled) -trace-mapping: encoded originalPositionFor x 302,153 ops/sec ±0.18% (100 runs sampled) -source-map-js: encoded originalPositionFor x 35,574 ops/sec ±0.19% (100 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 19,943 ops/sec ±0.12% (101 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 54,648 ops/sec ±0.20% (99 runs sampled) -Chrome dev tools: encoded originalPositionFor x 278,319 ops/sec ±0.17% (102 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -react.js.map - 5726 segments - -Memory Usage: -trace-mapping decoded 10872 bytes -trace-mapping encoded 681512 bytes -source-map-js 2563944 bytes -source-map-0.6.1 2150864 bytes -source-map-0.8.0 88680 bytes -Chrome dev tools 1149576 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 1,887 ops/sec ±0.28% (99 runs sampled) -trace-mapping: encoded JSON input x 4,749 ops/sec ±0.48% (97 runs sampled) -trace-mapping: decoded Object input x 74,236 ops/sec ±0.11% (99 runs sampled) -trace-mapping: encoded Object input x 5,752 ops/sec ±0.38% (100 runs sampled) -source-map-js: encoded Object input x 806 ops/sec ±0.19% (97 runs sampled) -source-map-0.6.1: encoded Object input x 418 ops/sec ±0.33% (94 runs sampled) -Chrome dev tools: encoded Object input x 1,524 ops/sec ±0.57% (92 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed (random): -trace-mapping: decoded originalPositionFor x 620,201 ops/sec ±0.33% (96 runs sampled) -trace-mapping: encoded originalPositionFor x 579,548 ops/sec ±0.35% (97 runs sampled) -source-map-js: encoded originalPositionFor x 230,983 ops/sec ±0.62% (54 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 158,145 ops/sec ±0.80% (46 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 343,801 ops/sec ±0.55% (96 runs sampled) -Chrome dev tools: encoded originalPositionFor x 659,649 ops/sec ±0.49% (98 runs sampled) -Fastest is Chrome dev tools: encoded originalPositionFor - -Trace speed (ascending): -trace-mapping: decoded originalPositionFor x 2,368,079 ops/sec ±0.32% (98 runs sampled) -trace-mapping: encoded originalPositionFor x 2,134,039 ops/sec ±2.72% (87 runs sampled) -source-map-js: encoded originalPositionFor x 290,120 ops/sec ±2.49% (82 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 187,613 ops/sec ±0.86% (49 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 479,569 ops/sec ±0.65% (96 runs sampled) -Chrome dev tools: encoded originalPositionFor x 2,048,414 ops/sec ±0.24% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - - -*** - - -vscode.map - 2141001 segments - -Memory Usage: -trace-mapping decoded 5206584 bytes -trace-mapping encoded 208370336 bytes -source-map-js 278493008 bytes -source-map-0.6.1 391564048 bytes -source-map-0.8.0 257508787 bytes -Chrome dev tools 291053000 bytes -Smallest memory usage is trace-mapping decoded - -Init speed: -trace-mapping: decoded JSON input x 1.63 ops/sec ±33.88% (9 runs sampled) -trace-mapping: encoded JSON input x 3.29 ops/sec ±36.13% (13 runs sampled) -trace-mapping: decoded Object input x 103 ops/sec ±0.93% (77 runs sampled) -trace-mapping: encoded Object input x 5.42 ops/sec ±28.54% (19 runs sampled) -source-map-js: encoded Object input x 1.07 ops/sec ±13.84% (7 runs sampled) -source-map-0.6.1: encoded Object input x 0.60 ops/sec ±2.43% (6 runs sampled) -Chrome dev tools: encoded Object input x 2.61 ops/sec ±22.00% (11 runs sampled) -Fastest is trace-mapping: decoded Object input - -Trace speed (random): -trace-mapping: decoded originalPositionFor x 257,019 ops/sec ±0.97% (93 runs sampled) -trace-mapping: encoded originalPositionFor x 179,163 ops/sec ±0.83% (92 runs sampled) -source-map-js: encoded originalPositionFor x 73,337 ops/sec ±1.35% (87 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 38,797 ops/sec ±1.66% (88 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 107,758 ops/sec ±1.94% (45 runs sampled) -Chrome dev tools: encoded originalPositionFor x 188,550 ops/sec ±1.85% (79 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -Trace speed (ascending): -trace-mapping: decoded originalPositionFor x 447,621 ops/sec ±3.64% (94 runs sampled) -trace-mapping: encoded originalPositionFor x 323,698 ops/sec ±5.20% (88 runs sampled) -source-map-js: encoded originalPositionFor x 78,387 ops/sec ±1.69% (89 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 41,016 ops/sec ±3.01% (25 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 124,204 ops/sec ±0.90% (92 runs sampled) -Chrome dev tools: encoded originalPositionFor x 230,087 ops/sec ±2.61% (93 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor -``` - -[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs deleted file mode 100644 index 73a95c7..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +++ /dev/null @@ -1,493 +0,0 @@ -// src/trace-mapping.ts -import { encode, decode } from "@jridgewell/sourcemap-codec"; - -// src/resolve.ts -import resolveUri from "@jridgewell/resolve-uri"; - -// src/strip-filename.ts -function stripFilename(path) { - if (!path) return ""; - const index = path.lastIndexOf("/"); - return path.slice(0, index + 1); -} - -// src/resolve.ts -function resolver(mapUrl, sourceRoot) { - const from = stripFilename(mapUrl); - const prefix = sourceRoot ? sourceRoot + "/" : ""; - return (source) => resolveUri(prefix + (source || ""), from); -} - -// src/sourcemap-segment.ts -var COLUMN = 0; -var SOURCES_INDEX = 1; -var SOURCE_LINE = 2; -var SOURCE_COLUMN = 3; -var NAMES_INDEX = 4; -var REV_GENERATED_LINE = 1; -var REV_GENERATED_COLUMN = 2; - -// src/sort.ts -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) return mappings; - if (!owned) mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) return i; - } - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} -function sortSegments(line, owned) { - if (!owned) line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; -} - -// src/by-source.ts -function buildBySources(decoded, memos) { - const sources = memos.map(() => []); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) continue; - const sourceIndex2 = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const source = sources[sourceIndex2]; - const segs = source[sourceLine] || (source[sourceLine] = []); - segs.push([sourceColumn, i, seg[COLUMN]]); - } - } - for (let i = 0; i < sources.length; i++) { - const source = sources[i]; - for (let j = 0; j < source.length; j++) { - const line = source[j]; - if (line) line.sort(sortComparator); - } - } - return sources; -} - -// src/binary-search.ts -var found = false; -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + (high - low >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } else { - high = mid - 1; - } - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} -function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1 - }; -} -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - low = lastIndex === -1 ? 0 : lastIndex; - } else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return state.lastIndex = binarySearch(haystack, needle, low, high); -} - -// src/types.ts -function parse(map) { - return typeof map === "string" ? JSON.parse(map) : map; -} - -// src/flatten-map.ts -var FlattenMap = function(map, mapUrl) { - const parsed = parse(map); - if (!("sections" in parsed)) { - return new TraceMap(parsed, mapUrl); - } - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const ignoreList = []; - recurse( - parsed, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - 0, - 0, - Infinity, - Infinity - ); - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList - }; - return presortedDecodedMap(joined); -}; -function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - addSection( - map, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - lineOffset + offset.line, - columnOffset + offset.column, - sl, - sc - ); - } -} -function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const parsed = parse(input); - if ("sections" in parsed) return recurse(...arguments); - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - append(sources, resolvedSources); - append(names, map.names); - if (contents) append(sourcesContent, contents); - else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); - if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - if (lineI > stopLine) return; - const out = getLine(mappings, lineI); - const cOffset = i === 0 ? columnOffset : 0; - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - if (lineI === stopLine && column >= stopColumn) return; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - out.push( - seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] - ); - } - } -} -function append(arr, other) { - for (let i = 0; i < other.length; i++) arr.push(other[i]); -} -function getLine(arr, index) { - for (let i = arr.length; i <= index; i++) arr[i] = []; - return arr[index]; -} - -// src/trace-mapping.ts -var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; -var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; -var LEAST_UPPER_BOUND = -1; -var GREATEST_LOWER_BOUND = 1; -var TraceMap = class { - constructor(map, mapUrl) { - const isString = typeof map === "string"; - if (!isString && map._decodedMemo) return map; - const parsed = parse(map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; - const resolve = resolver(mapUrl, sourceRoot); - this.resolvedSources = sources.map(resolve); - const { mappings } = parsed; - if (typeof mappings === "string") { - this._encoded = mappings; - this._decoded = void 0; - } else if (Array.isArray(mappings)) { - this._encoded = void 0; - this._decoded = maybeSort(mappings, isString); - } else if (parsed.sections) { - throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); - } else { - throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); - } - this._decodedMemo = memoizedState(); - this._bySources = void 0; - this._bySourceMemos = void 0; - } -}; -function cast(map) { - return map; -} -function encodedMappings(map) { - var _a, _b; - return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded); -} -function decodedMappings(map) { - var _a; - return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded)); -} -function traceSegment(map, line, column) { - const decoded = decodedMappings(map); - if (line >= decoded.length) return null; - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - GREATEST_LOWER_BOUND - ); - return index === -1 ? null : segments[index]; -} -function originalPositionFor(map, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - if (line >= decoded.length) return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - bias || GREATEST_LOWER_BOUND - ); - if (index === -1) return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) return OMapping(null, null, null, null); - const { names, resolvedSources } = map; - return OMapping( - resolvedSources[segment[SOURCES_INDEX]], - segment[SOURCE_LINE] + 1, - segment[SOURCE_COLUMN], - segment.length === 5 ? names[segment[NAMES_INDEX]] : null - ); -} -function generatedPositionFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); -} -function allGeneratedPositionsFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); -} -function eachMapping(map, cb) { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name - }); - } - } -} -function sourceIndex(map, source) { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) index = resolvedSources.indexOf(source); - return index; -} -function sourceContentFor(map, source) { - const { sourcesContent } = map; - if (sourcesContent == null) return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; -} -function isIgnored(map, source) { - const { ignoreList } = map; - if (ignoreList == null) return false; - const index = sourceIndex(map, source); - return index === -1 ? false : ignoreList.includes(index); -} -function presortedDecodedMap(map, mapUrl) { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast(tracer)._decoded = map.mappings; - return tracer; -} -function decodedMap(map) { - return clone(map, decodedMappings(map)); -} -function encodedMap(map) { - return clone(map, encodedMappings(map)); -} -function clone(map, mappings) { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || map.x_google_ignoreList - }; -} -function OMapping(source, line, column, name) { - return { source, line, column, name }; -} -function GMapping(line, column) { - return { line, column }; -} -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } else if (bias === LEAST_UPPER_BOUND) index++; - if (index === -1 || index === segments.length) return -1; - return index; -} -function sliceGeneratedPositions(segments, memo, line, column, bias) { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - if (!found && bias === LEAST_UPPER_BOUND) min++; - if (min === -1 || min === segments.length) return []; - const matchedColumn = found ? column : segments[min][COLUMN]; - if (!found) min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; -} -function generatedPosition(map, source, line, column, bias, all) { - var _a, _b; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex2 = sources.indexOf(source); - if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); - if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); - const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState)); - const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos)); - const segments = generated[sourceIndex2][line]; - if (segments == null) return all ? [] : GMapping(null, null); - const memo = bySourceMemos[sourceIndex2]; - if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) return GMapping(null, null); - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); -} -export { - FlattenMap as AnyMap, - FlattenMap, - GREATEST_LOWER_BOUND, - LEAST_UPPER_BOUND, - TraceMap, - allGeneratedPositionsFor, - decodedMap, - decodedMappings, - eachMapping, - encodedMap, - encodedMappings, - generatedPositionFor, - isIgnored, - originalPositionFor, - presortedDecodedMap, - sourceContentFor, - traceSegment -}; -//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map deleted file mode 100644 index a789581..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/by-source.ts", "../src/binary-search.ts", "../src/types.ts", "../src/flatten-map.ts"], - "mappings": ";AAAA,SAAS,QAAQ,cAAc;;;ACA/B,OAAO,gBAAgB;;;ACGR,SAAR,cAA+B,MAAyC;AAC7E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,QAAQ,KAAK,YAAY,GAAG;AAClC,SAAO,KAAK,MAAM,GAAG,QAAQ,CAAC;AAChC;;;ADHe,SAAR,SACL,QACA,YACS;AACT,QAAM,OAAO,cAAc,MAAM;AAIjC,QAAM,SAAS,aAAa,aAAa,MAAM;AAE/C,SAAO,CAAC,WAAW,WAAW,UAAU,UAAU,KAAK,IAAI;AAC7D;;;AEAO,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;;;AClBrB,SAAR,UACL,UACA,OACsB;AACtB,QAAM,gBAAgB,wBAAwB,UAAU,CAAC;AACzD,MAAI,kBAAkB,SAAS,OAAQ,QAAO;AAI9C,MAAI,CAAC,MAAO,YAAW,SAAS,MAAM;AAEtC,WAAS,IAAI,eAAe,IAAI,SAAS,QAAQ,IAAI,wBAAwB,UAAU,IAAI,CAAC,GAAG;AAC7F,aAAS,CAAC,IAAI,aAAa,SAAS,CAAC,GAAG,KAAK;AAAA,EAC/C;AACA,SAAO;AACT;AAEA,SAAS,wBAAwB,UAAgC,OAAuB;AACtF,WAAS,IAAI,OAAO,IAAI,SAAS,QAAQ,KAAK;AAC5C,QAAI,CAAC,SAAS,SAAS,CAAC,CAAC,EAAG,QAAO;AAAA,EACrC;AACA,SAAO,SAAS;AAClB;AAEA,SAAS,SAAS,MAAmC;AACnD,WAAS,IAA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gB,GAAI,CAAAA,eAAc,gBAAgB,QAAQ,MAAM;AACpE,MAAIA,iBAAgB,GAAI,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE7D,QAAM,iBAAiB,UAAK,GAAG,GAAE,mBAAV,GAAU,iBAAmB,QAAQ,IAAI,aAAa;AAC7E,QAAM,aAAa,UAAK,GAAG,GAAE,eAAV,GAAU,aAAe,eAAe,gBAAgB,GAAG,GAAG,aAAa;AAE9F,QAAM,WAAW,UAAUA,YAAW,EAAE,IAAI;AAC5C,MAAI,YAAY,KAAM,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE3D,QAAM,OAAO,cAAcA,YAAW;AAEtC,MAAI,IAAK,QAAO,wBAAwB,UAAU,MAAM,MAAM,QAAQ,IAAI;AAE1E,QAAM,QAAQ,qBAAqB,UAAU,MAAM,MAAM,QAAQ,IAAI;AACrE,MAAI,UAAU,GAAI,QAAO,SAAS,MAAM,IAAI;AAE5C,QAAM,UAAU,SAAS,KAAK;AAC9B,SAAO,SAAS,QAAQ,kBAAkB,IAAI,GAAG,QAAQ,oBAAoB,CAAC;AAChF;", - "names": ["sourceIndex", "sourceIndex"] -} diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js deleted file mode 100644 index 0387ae3..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +++ /dev/null @@ -1,559 +0,0 @@ -(function (global, factory) { - if (typeof exports === 'object' && typeof module !== 'undefined') { - factory(module, require('@jridgewell/resolve-uri'), require('@jridgewell/sourcemap-codec')); - module.exports = def(module); - } else if (typeof define === 'function' && define.amd) { - define(['module', '@jridgewell/resolve-uri', '@jridgewell/sourcemap-codec'], function(mod) { - factory.apply(this, arguments); - mod.exports = def(mod); - }); - } else { - const mod = { exports: {} }; - factory(mod, global.resolveURI, global.sourcemapCodec); - global = typeof globalThis !== 'undefined' ? globalThis : global || self; - global.traceMapping = def(mod); - } - function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } -})(this, (function (module, require_resolveURI, require_sourcemapCodec) { -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// umd:@jridgewell/sourcemap-codec -var require_sourcemap_codec = __commonJS({ - "umd:@jridgewell/sourcemap-codec"(exports, module2) { - module2.exports = require_sourcemapCodec; - } -}); - -// umd:@jridgewell/resolve-uri -var require_resolve_uri = __commonJS({ - "umd:@jridgewell/resolve-uri"(exports, module2) { - module2.exports = require_resolveURI; - } -}); - -// src/trace-mapping.ts -var trace_mapping_exports = {}; -__export(trace_mapping_exports, { - AnyMap: () => FlattenMap, - FlattenMap: () => FlattenMap, - GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND, - LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND, - TraceMap: () => TraceMap, - allGeneratedPositionsFor: () => allGeneratedPositionsFor, - decodedMap: () => decodedMap, - decodedMappings: () => decodedMappings, - eachMapping: () => eachMapping, - encodedMap: () => encodedMap, - encodedMappings: () => encodedMappings, - generatedPositionFor: () => generatedPositionFor, - isIgnored: () => isIgnored, - originalPositionFor: () => originalPositionFor, - presortedDecodedMap: () => presortedDecodedMap, - sourceContentFor: () => sourceContentFor, - traceSegment: () => traceSegment -}); -module.exports = __toCommonJS(trace_mapping_exports); -var import_sourcemap_codec = __toESM(require_sourcemap_codec()); - -// src/resolve.ts -var import_resolve_uri = __toESM(require_resolve_uri()); - -// src/strip-filename.ts -function stripFilename(path) { - if (!path) return ""; - const index = path.lastIndexOf("/"); - return path.slice(0, index + 1); -} - -// src/resolve.ts -function resolver(mapUrl, sourceRoot) { - const from = stripFilename(mapUrl); - const prefix = sourceRoot ? sourceRoot + "/" : ""; - return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from); -} - -// src/sourcemap-segment.ts -var COLUMN = 0; -var SOURCES_INDEX = 1; -var SOURCE_LINE = 2; -var SOURCE_COLUMN = 3; -var NAMES_INDEX = 4; -var REV_GENERATED_LINE = 1; -var REV_GENERATED_COLUMN = 2; - -// src/sort.ts -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) return mappings; - if (!owned) mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) return i; - } - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} -function sortSegments(line, owned) { - if (!owned) line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; -} - -// src/by-source.ts -function buildBySources(decoded, memos) { - const sources = memos.map(() => []); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) continue; - const sourceIndex2 = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const source = sources[sourceIndex2]; - const segs = source[sourceLine] || (source[sourceLine] = []); - segs.push([sourceColumn, i, seg[COLUMN]]); - } - } - for (let i = 0; i < sources.length; i++) { - const source = sources[i]; - for (let j = 0; j < source.length; j++) { - const line = source[j]; - if (line) line.sort(sortComparator); - } - } - return sources; -} - -// src/binary-search.ts -var found = false; -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + (high - low >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } else { - high = mid - 1; - } - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} -function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1 - }; -} -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - low = lastIndex === -1 ? 0 : lastIndex; - } else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return state.lastIndex = binarySearch(haystack, needle, low, high); -} - -// src/types.ts -function parse(map) { - return typeof map === "string" ? JSON.parse(map) : map; -} - -// src/flatten-map.ts -var FlattenMap = function(map, mapUrl) { - const parsed = parse(map); - if (!("sections" in parsed)) { - return new TraceMap(parsed, mapUrl); - } - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const ignoreList = []; - recurse( - parsed, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - 0, - 0, - Infinity, - Infinity - ); - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList - }; - return presortedDecodedMap(joined); -}; -function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - addSection( - map, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - lineOffset + offset.line, - columnOffset + offset.column, - sl, - sc - ); - } -} -function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { - const parsed = parse(input); - if ("sections" in parsed) return recurse(...arguments); - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - append(sources, resolvedSources); - append(names, map.names); - if (contents) append(sourcesContent, contents); - else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); - if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - if (lineI > stopLine) return; - const out = getLine(mappings, lineI); - const cOffset = i === 0 ? columnOffset : 0; - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - if (lineI === stopLine && column >= stopColumn) return; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - out.push( - seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] - ); - } - } -} -function append(arr, other) { - for (let i = 0; i < other.length; i++) arr.push(other[i]); -} -function getLine(arr, index) { - for (let i = arr.length; i <= index; i++) arr[i] = []; - return arr[index]; -} - -// src/trace-mapping.ts -var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; -var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; -var LEAST_UPPER_BOUND = -1; -var GREATEST_LOWER_BOUND = 1; -var TraceMap = class { - constructor(map, mapUrl) { - const isString = typeof map === "string"; - if (!isString && map._decodedMemo) return map; - const parsed = parse(map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; - const resolve = resolver(mapUrl, sourceRoot); - this.resolvedSources = sources.map(resolve); - const { mappings } = parsed; - if (typeof mappings === "string") { - this._encoded = mappings; - this._decoded = void 0; - } else if (Array.isArray(mappings)) { - this._encoded = void 0; - this._decoded = maybeSort(mappings, isString); - } else if (parsed.sections) { - throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); - } else { - throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); - } - this._decodedMemo = memoizedState(); - this._bySources = void 0; - this._bySourceMemos = void 0; - } -}; -function cast(map) { - return map; -} -function encodedMappings(map) { - var _a, _b; - return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded); -} -function decodedMappings(map) { - var _a; - return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded)); -} -function traceSegment(map, line, column) { - const decoded = decodedMappings(map); - if (line >= decoded.length) return null; - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - GREATEST_LOWER_BOUND - ); - return index === -1 ? null : segments[index]; -} -function originalPositionFor(map, needle) { - let { line, column, bias } = needle; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - if (line >= decoded.length) return OMapping(null, null, null, null); - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - bias || GREATEST_LOWER_BOUND - ); - if (index === -1) return OMapping(null, null, null, null); - const segment = segments[index]; - if (segment.length === 1) return OMapping(null, null, null, null); - const { names, resolvedSources } = map; - return OMapping( - resolvedSources[segment[SOURCES_INDEX]], - segment[SOURCE_LINE] + 1, - segment[SOURCE_COLUMN], - segment.length === 5 ? names[segment[NAMES_INDEX]] : null - ); -} -function generatedPositionFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); -} -function allGeneratedPositionsFor(map, needle) { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); -} -function eachMapping(map, cb) { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name - }); - } - } -} -function sourceIndex(map, source) { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) index = resolvedSources.indexOf(source); - return index; -} -function sourceContentFor(map, source) { - const { sourcesContent } = map; - if (sourcesContent == null) return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; -} -function isIgnored(map, source) { - const { ignoreList } = map; - if (ignoreList == null) return false; - const index = sourceIndex(map, source); - return index === -1 ? false : ignoreList.includes(index); -} -function presortedDecodedMap(map, mapUrl) { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast(tracer)._decoded = map.mappings; - return tracer; -} -function decodedMap(map) { - return clone(map, decodedMappings(map)); -} -function encodedMap(map) { - return clone(map, encodedMappings(map)); -} -function clone(map, mappings) { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || map.x_google_ignoreList - }; -} -function OMapping(source, line, column, name) { - return { source, line, column, name }; -} -function GMapping(line, column) { - return { line, column }; -} -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } else if (bias === LEAST_UPPER_BOUND) index++; - if (index === -1 || index === segments.length) return -1; - return index; -} -function sliceGeneratedPositions(segments, memo, line, column, bias) { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - if (!found && bias === LEAST_UPPER_BOUND) min++; - if (min === -1 || min === segments.length) return []; - const matchedColumn = found ? column : segments[min][COLUMN]; - if (!found) min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; -} -function generatedPosition(map, source, line, column, bias, all) { - var _a, _b; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex2 = sources.indexOf(source); - if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); - if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); - const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState)); - const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos)); - const segments = generated[sourceIndex2][line]; - if (segments == null) return all ? [] : GMapping(null, null); - const memo = bySourceMemos[sourceIndex2]; - if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) return GMapping(null, null); - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); -} -})); -//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map deleted file mode 100644 index 68b0c77..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/resolve-uri", "../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/by-source.ts", "../src/binary-search.ts", "../src/types.ts", "../src/flatten-map.ts"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,yCAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;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AM,IAAI;AAE7D,QAAM,iBAAiB,UAAK,GAAG,GAAE,mBAAV,GAAU,iBAAmB,QAAQ,IAAI,aAAa;AAC7E,QAAM,aAAa,UAAK,GAAG,GAAE,eAAV,GAAU,aAAe,eAAe,gBAAgB,GAAG,GAAG,aAAa;AAE9F,QAAM,WAAW,UAAUA,YAAW,EAAE,IAAI;AAC5C,MAAI,YAAY,KAAM,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE3D,QAAM,OAAO,cAAcA,YAAW;AAEtC,MAAI,IAAK,QAAO,wBAAwB,UAAU,MAAM,MAAM,QAAQ,IAAI;AAE1E,QAAM,QAAQ,qBAAqB,UAAU,MAAM,MAAM,QAAQ,IAAI;AACrE,MAAI,UAAU,GAAI,QAAO,SAAS,MAAM,IAAI;AAE5C,QAAM,UAAU,SAAS,KAAK;AAC9B,SAAO,SAAS,QAAQ,kBAAkB,IAAI,GAAG,QAAQ,oBAAoB,CAAC;AAChF;", - "names": ["module", "module", "resolveUri", "sourceIndex", "sourceIndex"] -} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json deleted file mode 100644 index 9d3a1c0..0000000 --- a/node_modules/@jridgewell/trace-mapping/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@jridgewell/trace-mapping", - "version": "0.3.31", - "description": "Trace the original position through a source map", - "keywords": [ - "source", - "map" - ], - "main": "dist/trace-mapping.umd.js", - "module": "dist/trace-mapping.mjs", - "types": "types/trace-mapping.d.cts", - "files": [ - "dist", - "src", - "types" - ], - "exports": { - ".": [ - { - "import": { - "types": "./types/trace-mapping.d.mts", - "default": "./dist/trace-mapping.mjs" - }, - "default": { - "types": "./types/trace-mapping.d.cts", - "default": "./dist/trace-mapping.umd.js" - } - }, - "./dist/trace-mapping.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:code benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.mjs", - "build": "run-s -n build:code build:types", - "build:code": "node ../../esbuild.mjs trace-mapping.ts", - "build:types": "run-s build:types:force build:types:emit build:types:mts", - "build:types:force": "rimraf tsconfig.build.tsbuildinfo", - "build:types:emit": "tsc --project tsconfig.build.json", - "build:types:mts": "node ../../mts-types.mjs", - "clean": "run-s -n clean:code clean:types", - "clean:code": "tsc --build --clean tsconfig.build.json", - "clean:types": "rimraf dist types", - "test": "run-s -n test:types test:only test:format", - "test:format": "prettier --check '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:types": "eslint '{src,test}/**/*.ts'", - "lint": "run-s -n lint:types lint:format", - "lint:format": "npm run test:format -- --write", - "lint:types": "npm run test:types -- --fix", - "prepublishOnly": "npm run-s -n build test" - }, - "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemaps.git", - "directory": "packages/trace-mapping" - }, - "author": "Justin Ridgewell ", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } -} diff --git a/node_modules/@jridgewell/trace-mapping/src/binary-search.ts b/node_modules/@jridgewell/trace-mapping/src/binary-search.ts deleted file mode 100644 index c1144ad..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/binary-search.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; -import { COLUMN } from './sourcemap-segment'; - -export type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; - -export let found = false; - -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export function binarySearch( - haystack: SourceMapSegment[] | ReverseSegment[], - needle: number, - low: number, - high: number, -): number { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - - if (cmp === 0) { - found = true; - return mid; - } - - if (cmp < 0) { - low = mid + 1; - } else { - high = mid - 1; - } - } - - found = false; - return low - 1; -} - -export function upperBound( - haystack: SourceMapSegment[] | ReverseSegment[], - needle: number, - index: number, -): number { - for (let i = index + 1; i < haystack.length; index = i++) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} - -export function lowerBound( - haystack: SourceMapSegment[] | ReverseSegment[], - needle: number, - index: number, -): number { - for (let i = index - 1; i >= 0; index = i--) { - if (haystack[i][COLUMN] !== needle) break; - } - return index; -} - -export function memoizedState(): MemoState { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; -} - -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export function memoizedBinarySearch( - haystack: SourceMapSegment[] | ReverseSegment[], - needle: number, - state: MemoState, - key: number, -): number { - const { lastKey, lastNeedle, lastIndex } = state; - - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - - return (state.lastIndex = binarySearch(haystack, needle, low, high)); -} diff --git a/node_modules/@jridgewell/trace-mapping/src/by-source.ts b/node_modules/@jridgewell/trace-mapping/src/by-source.ts deleted file mode 100644 index 1da6af0..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/by-source.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment'; -import { sortComparator } from './sort'; - -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; - -export type Source = ReverseSegment[][]; - -// Rebuilds the original source files, with mappings that are ordered by source line/column instead -// of generated line/column. -export default function buildBySources( - decoded: readonly SourceMapSegment[][], - memos: unknown[], -): Source[] { - const sources: Source[] = memos.map(() => []); - - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) continue; - - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - - const source = sources[sourceIndex]; - const segs = (source[sourceLine] ||= []); - segs.push([sourceColumn, i, seg[COLUMN]]); - } - } - - for (let i = 0; i < sources.length; i++) { - const source = sources[i]; - for (let j = 0; j < source.length; j++) { - const line = source[j]; - if (line) line.sort(sortComparator); - } - } - - return sources; -} diff --git a/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts b/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts deleted file mode 100644 index 61ac40c..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping'; -import { - COLUMN, - SOURCES_INDEX, - SOURCE_LINE, - SOURCE_COLUMN, - NAMES_INDEX, -} from './sourcemap-segment'; -import { parse } from './types'; - -import type { - DecodedSourceMap, - DecodedSourceMapXInput, - EncodedSourceMapXInput, - SectionedSourceMapXInput, - SectionedSourceMapInput, - SectionXInput, - Ro, -} from './types'; -import type { SourceMapSegment } from './sourcemap-segment'; - -type FlattenMap = { - new (map: Ro, mapUrl?: string | null): TraceMap; - (map: Ro, mapUrl?: string | null): TraceMap; -}; - -export const FlattenMap: FlattenMap = function (map, mapUrl) { - const parsed = parse(map as SectionedSourceMapInput); - - if (!('sections' in parsed)) { - return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl); - } - - const mappings: SourceMapSegment[][] = []; - const sources: string[] = []; - const sourcesContent: (string | null)[] = []; - const names: string[] = []; - const ignoreList: number[] = []; - - recurse( - parsed, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - 0, - 0, - Infinity, - Infinity, - ); - - const joined: DecodedSourceMap = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - ignoreList, - }; - - return presortedDecodedMap(joined); -} as FlattenMap; - -function recurse( - input: SectionedSourceMapXInput, - mapUrl: string | null | undefined, - mappings: SourceMapSegment[][], - sources: string[], - sourcesContent: (string | null)[], - names: string[], - ignoreList: number[], - lineOffset: number, - columnOffset: number, - stopLine: number, - stopColumn: number, -) { - const { sections } = input; - for (let i = 0; i < sections.length; i++) { - const { map, offset } = sections[i]; - - let sl = stopLine; - let sc = stopColumn; - if (i + 1 < sections.length) { - const nextOffset = sections[i + 1].offset; - sl = Math.min(stopLine, lineOffset + nextOffset.line); - - if (sl === stopLine) { - sc = Math.min(stopColumn, columnOffset + nextOffset.column); - } else if (sl < stopLine) { - sc = columnOffset + nextOffset.column; - } - } - - addSection( - map, - mapUrl, - mappings, - sources, - sourcesContent, - names, - ignoreList, - lineOffset + offset.line, - columnOffset + offset.column, - sl, - sc, - ); - } -} - -function addSection( - input: SectionXInput['map'], - mapUrl: string | null | undefined, - mappings: SourceMapSegment[][], - sources: string[], - sourcesContent: (string | null)[], - names: string[], - ignoreList: number[], - lineOffset: number, - columnOffset: number, - stopLine: number, - stopColumn: number, -) { - const parsed = parse(input); - if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters)); - - const map = new TraceMap(parsed, mapUrl); - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; - - append(sources, resolvedSources); - append(names, map.names); - - if (contents) append(sourcesContent, contents); - else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); - - if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); - - for (let i = 0; i < decoded.length; i++) { - const lineI = lineOffset + i; - - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. But it may not have any columns that overstep, so we - // still need to check that we don't overstep lines, too. - if (lineI > stopLine) return; - - // The out line may already exist in mappings (if we're continuing the line started by a - // previous section). Or, we may have jumped ahead several lines to start this section. - const out = getLine(mappings, lineI); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (lineI === stopLine && column >= stopColumn) return; - - if (seg.length === 1) { - out.push([column]); - continue; - } - - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - out.push( - seg.length === 4 - ? [column, sourcesIndex, sourceLine, sourceColumn] - : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]], - ); - } - } -} - -function append(arr: T[], other: T[]) { - for (let i = 0; i < other.length; i++) arr.push(other[i]); -} - -function getLine(arr: T[][], index: number): T[] { - for (let i = arr.length; i <= index; i++) arr[i] = []; - return arr[index]; -} diff --git a/node_modules/@jridgewell/trace-mapping/src/resolve.ts b/node_modules/@jridgewell/trace-mapping/src/resolve.ts deleted file mode 100644 index 30bfa3b..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/resolve.ts +++ /dev/null @@ -1,16 +0,0 @@ -import resolveUri from '@jridgewell/resolve-uri'; -import stripFilename from './strip-filename'; - -type Resolve = (source: string | null) => string; -export default function resolver( - mapUrl: string | null | undefined, - sourceRoot: string | undefined, -): Resolve { - const from = stripFilename(mapUrl); - // The sourceRoot is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - const prefix = sourceRoot ? sourceRoot + '/' : ''; - - return (source) => resolveUri(prefix + (source || ''), from); -} diff --git a/node_modules/@jridgewell/trace-mapping/src/sort.ts b/node_modules/@jridgewell/trace-mapping/src/sort.ts deleted file mode 100644 index 5d016cb..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/sort.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { COLUMN } from './sourcemap-segment'; - -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; - -export default function maybeSort( - mappings: SourceMapSegment[][], - owned: boolean, -): SourceMapSegment[][] { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) return mappings; - - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) mappings = mappings.slice(); - - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} - -function nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) return i; - } - return mappings.length; -} - -function isSorted(line: SourceMapSegment[]): boolean { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} - -function sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] { - if (!owned) line = line.slice(); - return line.sort(sortComparator); -} - -export function sortComparator(a: T, b: T): number { - return a[COLUMN] - b[COLUMN]; -} diff --git a/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts deleted file mode 100644 index 94f1b6a..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts +++ /dev/null @@ -1,23 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; - -type GeneratedLine = number; - -export type SourceMapSegment = - | [GeneratedColumn] - | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] - | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; - -export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; - -export const COLUMN = 0; -export const SOURCES_INDEX = 1; -export const SOURCE_LINE = 2; -export const SOURCE_COLUMN = 3; -export const NAMES_INDEX = 4; - -export const REV_GENERATED_LINE = 1; -export const REV_GENERATED_COLUMN = 2; diff --git a/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts b/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts deleted file mode 100644 index 2c88980..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export default function stripFilename(path: string | undefined | null): string { - if (!path) return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} diff --git a/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts b/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts deleted file mode 100644 index 0b793d5..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts +++ /dev/null @@ -1,502 +0,0 @@ -import { encode, decode } from '@jridgewell/sourcemap-codec'; - -import resolver from './resolve'; -import maybeSort from './sort'; -import buildBySources from './by-source'; -import { - memoizedState, - memoizedBinarySearch, - upperBound, - lowerBound, - found as bsFound, -} from './binary-search'; -import { - COLUMN, - SOURCES_INDEX, - SOURCE_LINE, - SOURCE_COLUMN, - NAMES_INDEX, - REV_GENERATED_LINE, - REV_GENERATED_COLUMN, -} from './sourcemap-segment'; -import { parse } from './types'; - -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; -import type { - SourceMapV3, - DecodedSourceMap, - EncodedSourceMap, - InvalidOriginalMapping, - OriginalMapping, - InvalidGeneratedMapping, - GeneratedMapping, - SourceMapInput, - Needle, - SourceNeedle, - SourceMap, - EachMapping, - Bias, - XInput, - SectionedSourceMap, - Ro, -} from './types'; -import type { Source } from './by-source'; -import type { MemoState } from './binary-search'; - -export type { SourceMapSegment } from './sourcemap-segment'; -export type { - SourceMap, - DecodedSourceMap, - EncodedSourceMap, - Section, - SectionedSourceMap, - SourceMapV3, - Bias, - EachMapping, - GeneratedMapping, - InvalidGeneratedMapping, - InvalidOriginalMapping, - Needle, - OriginalMapping, - OriginalMapping as Mapping, - SectionedSourceMapInput, - SourceMapInput, - SourceNeedle, - XInput, - EncodedSourceMapXInput, - DecodedSourceMapXInput, - SectionedSourceMapXInput, - SectionXInput, -} from './types'; - -interface PublicMap { - _encoded: TraceMap['_encoded']; - _decoded: TraceMap['_decoded']; - _decodedMemo: TraceMap['_decodedMemo']; - _bySources: TraceMap['_bySources']; - _bySourceMemos: TraceMap['_bySourceMemos']; -} - -const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; -const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; - -export const LEAST_UPPER_BOUND = -1; -export const GREATEST_LOWER_BOUND = 1; - -export { FlattenMap, FlattenMap as AnyMap } from './flatten-map'; - -export class TraceMap implements SourceMap { - declare version: SourceMapV3['version']; - declare file: SourceMapV3['file']; - declare names: SourceMapV3['names']; - declare sourceRoot: SourceMapV3['sourceRoot']; - declare sources: SourceMapV3['sources']; - declare sourcesContent: SourceMapV3['sourcesContent']; - declare ignoreList: SourceMapV3['ignoreList']; - - declare resolvedSources: string[]; - declare private _encoded: string | undefined; - - declare private _decoded: SourceMapSegment[][] | undefined; - declare private _decodedMemo: MemoState; - - declare private _bySources: Source[] | undefined; - declare private _bySourceMemos: MemoState[] | undefined; - - constructor(map: Ro, mapUrl?: string | null) { - const isString = typeof map === 'string'; - if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap; - - const parsed = parse(map as Exclude); - - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names || []; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined; - - const resolve = resolver(mapUrl, sourceRoot); - this.resolvedSources = sources.map(resolve); - - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } else if (Array.isArray(mappings)) { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } else if ((parsed as unknown as SectionedSourceMap).sections) { - throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); - } else { - throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); - } - - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - } -} - -/** - * Typescript doesn't allow friend access to private fields, so this just casts the map into a type - * with public access modifiers. - */ -function cast(map: unknown): PublicMap { - return map as any; -} - -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] { - return (cast(map)._encoded ??= encode(cast(map)._decoded!)); -} - -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export function decodedMappings(map: TraceMap): Readonly { - return (cast(map)._decoded ||= decode(cast(map)._encoded!)); -} - -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export function traceSegment( - map: TraceMap, - line: number, - column: number, -): Readonly | null { - const decoded = decodedMappings(map); - - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) return null; - - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - GREATEST_LOWER_BOUND, - ); - - return index === -1 ? null : segments[index]; -} - -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export function originalPositionFor( - map: TraceMap, - needle: Needle, -): OriginalMapping | InvalidOriginalMapping { - let { line, column, bias } = needle; - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - - const decoded = decodedMappings(map); - - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) return OMapping(null, null, null, null); - - const segments = decoded[line]; - const index = traceSegmentInternal( - segments, - cast(map)._decodedMemo, - line, - column, - bias || GREATEST_LOWER_BOUND, - ); - - if (index === -1) return OMapping(null, null, null, null); - - const segment = segments[index]; - if (segment.length === 1) return OMapping(null, null, null, null); - - const { names, resolvedSources } = map; - return OMapping( - resolvedSources[segment[SOURCES_INDEX]], - segment[SOURCE_LINE] + 1, - segment[SOURCE_COLUMN], - segment.length === 5 ? names[segment[NAMES_INDEX]] : null, - ); -} - -/** - * Finds the generated line/column position of the provided source/line/column source position. - */ -export function generatedPositionFor( - map: TraceMap, - needle: SourceNeedle, -): GeneratedMapping | InvalidGeneratedMapping { - const { source, line, column, bias } = needle; - return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); -} - -/** - * Finds all generated line/column positions of the provided source/line/column source position. - */ -export function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] { - const { source, line, column, bias } = needle; - // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. - return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); -} - -/** - * Iterates each mapping in generated position order. - */ -export function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) name = names[seg[4]]; - - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - } as EachMapping); - } - } -} - -function sourceIndex(map: TraceMap, source: string): number { - const { sources, resolvedSources } = map; - let index = sources.indexOf(source); - if (index === -1) index = resolvedSources.indexOf(source); - return index; -} - -/** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ -export function sourceContentFor(map: TraceMap, source: string): string | null { - const { sourcesContent } = map; - if (sourcesContent == null) return null; - const index = sourceIndex(map, source); - return index === -1 ? null : sourcesContent[index]; -} - -/** - * Determines if the source is marked to ignore by the source map. - */ -export function isIgnored(map: TraceMap, source: string): boolean { - const { ignoreList } = map; - if (ignoreList == null) return false; - const index = sourceIndex(map, source); - return index === -1 ? false : ignoreList.includes(index); -} - -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap { - const tracer = new TraceMap(clone(map, []), mapUrl); - cast(tracer)._decoded = map.mappings; - return tracer; -} - -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export function decodedMap( - map: TraceMap, -): Omit & { mappings: readonly SourceMapSegment[][] } { - return clone(map, decodedMappings(map)); -} - -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export function encodedMap(map: TraceMap): EncodedSourceMap { - return clone(map, encodedMappings(map)); -} - -function clone( - map: TraceMap | DecodedSourceMap, - mappings: T, -): T extends string ? EncodedSourceMap : DecodedSourceMap { - return { - version: map.version, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings, - ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList, - } as any; -} - -function OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping; -function OMapping( - source: string, - line: number, - column: number, - name: string | null, -): OriginalMapping; -function OMapping( - source: string | null, - line: number | null, - column: number | null, - name: string | null, -): OriginalMapping | InvalidOriginalMapping { - return { source, line, column, name } as any; -} - -function GMapping(line: null, column: null): InvalidGeneratedMapping; -function GMapping(line: number, column: number): GeneratedMapping; -function GMapping( - line: number | null, - column: number | null, -): GeneratedMapping | InvalidGeneratedMapping { - return { line, column } as any; -} - -function traceSegmentInternal( - segments: SourceMapSegment[], - memo: MemoState, - line: number, - column: number, - bias: Bias, -): number; -function traceSegmentInternal( - segments: ReverseSegment[], - memo: MemoState, - line: number, - column: number, - bias: Bias, -): number; -function traceSegmentInternal( - segments: SourceMapSegment[] | ReverseSegment[], - memo: MemoState, - line: number, - column: number, - bias: Bias, -): number { - let index = memoizedBinarySearch(segments, column, memo, line); - if (bsFound) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } else if (bias === LEAST_UPPER_BOUND) index++; - - if (index === -1 || index === segments.length) return -1; - return index; -} - -function sliceGeneratedPositions( - segments: ReverseSegment[], - memo: MemoState, - line: number, - column: number, - bias: Bias, -): GeneratedMapping[] { - let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); - - // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in - // insertion order) segment that matched. Even if we did respect the bias when tracing, we would - // still need to call `lowerBound()` to find the first segment, which is slower than just looking - // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the - // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to - // match LEAST_UPPER_BOUND. - if (!bsFound && bias === LEAST_UPPER_BOUND) min++; - - if (min === -1 || min === segments.length) return []; - - // We may have found the segment that started at an earlier column. If this is the case, then we - // need to slice all generated segments that match _that_ column, because all such segments span - // to our desired column. - const matchedColumn = bsFound ? column : segments[min][COLUMN]; - - // The binary search is not guaranteed to find the lower bound when a match wasn't found. - if (!bsFound) min = lowerBound(segments, matchedColumn, min); - const max = upperBound(segments, matchedColumn, min); - - const result = []; - for (; min <= max; min++) { - const segment = segments[min]; - result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); - } - return result; -} - -function generatedPosition( - map: TraceMap, - source: string, - line: number, - column: number, - bias: Bias, - all: false, -): GeneratedMapping | InvalidGeneratedMapping; -function generatedPosition( - map: TraceMap, - source: string, - line: number, - column: number, - bias: Bias, - all: true, -): GeneratedMapping[]; -function generatedPosition( - map: TraceMap, - source: string, - line: number, - column: number, - bias: Bias, - all: boolean, -): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] { - line--; - if (line < 0) throw new Error(LINE_GTR_ZERO); - if (column < 0) throw new Error(COL_GTR_EQ_ZERO); - - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) return all ? [] : GMapping(null, null); - - const bySourceMemos = (cast(map)._bySourceMemos ||= sources.map(memoizedState)); - const generated = (cast(map)._bySources ||= buildBySources(decodedMappings(map), bySourceMemos)); - - const segments = generated[sourceIndex][line]; - if (segments == null) return all ? [] : GMapping(null, null); - - const memo = bySourceMemos[sourceIndex]; - - if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); - - const index = traceSegmentInternal(segments, memo, line, column, bias); - if (index === -1) return GMapping(null, null); - - const segment = segments[index]; - return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); -} diff --git a/node_modules/@jridgewell/trace-mapping/src/types.ts b/node_modules/@jridgewell/trace-mapping/src/types.ts deleted file mode 100644 index 730a61f..0000000 --- a/node_modules/@jridgewell/trace-mapping/src/types.ts +++ /dev/null @@ -1,114 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping'; - -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList?: number[]; -} - -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} - -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} - -export interface Section { - offset: { line: number; column: number }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} - -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} - -export type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; - -export type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; - -export type GeneratedMapping = { - line: number; - column: number; -}; -export type InvalidGeneratedMapping = { - line: null; - column: null; -}; - -export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; - -export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] }; -export type EncodedSourceMapXInput = EncodedSourceMap & XInput; -export type DecodedSourceMapXInput = DecodedSourceMap & XInput; -export type SectionedSourceMapXInput = Omit & { - sections: SectionXInput[]; -}; -export type SectionXInput = Omit & { - map: SectionedSourceMapInput; -}; - -export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; -export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; - -export type Needle = { line: number; column: number; bias?: Bias }; -export type SourceNeedle = { source: string; line: number; column: number; bias?: Bias }; - -export type EachMapping = - | { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; - } - | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; - }; - -export abstract class SourceMap { - declare version: SourceMapV3['version']; - declare file: SourceMapV3['file']; - declare names: SourceMapV3['names']; - declare sourceRoot: SourceMapV3['sourceRoot']; - declare sources: SourceMapV3['sources']; - declare sourcesContent: SourceMapV3['sourcesContent']; - declare resolvedSources: SourceMapV3['sources']; - declare ignoreList: SourceMapV3['ignoreList']; -} - -export type Ro = - T extends Array - ? V[] | Readonly | RoArray | Readonly> - : T extends object - ? T | Readonly | RoObject | Readonly> - : T; -type RoArray = Ro[]; -type RoObject = { [K in keyof T]: T[K] | Ro }; - -export function parse(map: T): Exclude { - return typeof map === 'string' ? JSON.parse(map) : (map as Exclude); -} diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts deleted file mode 100644 index b7bb85c..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts +++ /dev/null @@ -1,33 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.cts'; -export type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; -export declare let found: boolean; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; -export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function memoizedState(): MemoState; -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; -//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map deleted file mode 100644 index 648e84c..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts deleted file mode 100644 index 19e1e6b..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +++ /dev/null @@ -1,33 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.mts'; -export type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; -export declare let found: boolean; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; -export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function memoizedState(): MemoState; -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; -//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map deleted file mode 100644 index 648e84c..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts deleted file mode 100644 index da49693..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts'; -export type Source = ReverseSegment[][]; -export = function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[]; -//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map deleted file mode 100644 index 32d2a7a..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts deleted file mode 100644 index f361049..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts'; -export type Source = ReverseSegment[][]; -export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[]; -//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map deleted file mode 100644 index 32d2a7a..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,MAAM,MAAM,GAAG,cAAc,EAAE,EAAE,CAAC;AAIxC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,OAAO,EAAE,GACf,MAAM,EAAE,CA4BV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts deleted file mode 100644 index 433d849..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts +++ /dev/null @@ -1,9 +0,0 @@ -import { TraceMap } from './trace-mapping.cts'; -import type { SectionedSourceMapInput, Ro } from './types.cts'; -type FlattenMap = { - new (map: Ro, mapUrl?: string | null): TraceMap; - (map: Ro, mapUrl?: string | null): TraceMap; -}; -export declare const FlattenMap: FlattenMap; -export {}; -//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map deleted file mode 100644 index 994b208..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts deleted file mode 100644 index 444a1be..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -import { TraceMap } from './trace-mapping.mts'; -import type { SectionedSourceMapInput, Ro } from './types.mts'; -type FlattenMap = { - new (map: Ro, mapUrl?: string | null): TraceMap; - (map: Ro, mapUrl?: string | null): TraceMap; -}; -export declare const FlattenMap: FlattenMap; -export {}; -//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map deleted file mode 100644 index 994b208..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts deleted file mode 100644 index 62aeedb..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts +++ /dev/null @@ -1,4 +0,0 @@ -type Resolve = (source: string | null) => string; -export = function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; -export {}; -//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map deleted file mode 100644 index 9f155ac..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts deleted file mode 100644 index e2798a1..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +++ /dev/null @@ -1,4 +0,0 @@ -type Resolve = (source: string | null) => string; -export default function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; -export {}; -//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map deleted file mode 100644 index 9f155ac..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts deleted file mode 100644 index aa14c12..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts'; -export = function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; -export declare function sortComparator(a: T, b: T): number; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map deleted file mode 100644 index 48b8e67..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts deleted file mode 100644 index c5b94e6..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts'; -export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; -export declare function sortComparator(a: T, b: T): number; -//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map deleted file mode 100644 index 48b8e67..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB;AAuBD,wBAAgB,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,CAE9F"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts deleted file mode 100644 index 8d3cabc..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts +++ /dev/null @@ -1,17 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -type GeneratedLine = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export declare const REV_GENERATED_LINE = 1; -export declare const REV_GENERATED_COLUMN = 2; -export {}; -//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map deleted file mode 100644 index 0c94a46..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts deleted file mode 100644 index 8d3cabc..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +++ /dev/null @@ -1,17 +0,0 @@ -type GeneratedColumn = number; -type SourcesIndex = number; -type SourceLine = number; -type SourceColumn = number; -type NamesIndex = number; -type GeneratedLine = number; -export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export declare const REV_GENERATED_LINE = 1; -export declare const REV_GENERATED_COLUMN = 2; -export {}; -//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map deleted file mode 100644 index 0c94a46..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts deleted file mode 100644 index 8b3c0e9..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export = function stripFilename(path: string | undefined | null): string; -//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map deleted file mode 100644 index 17a25da..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts deleted file mode 100644 index cbbaee0..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export default function stripFilename(path: string | undefined | null): string; -//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map deleted file mode 100644 index 17a25da..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts deleted file mode 100644 index a40f305..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts +++ /dev/null @@ -1,80 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.cts'; -import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.cts'; -export type { SourceMapSegment } from './sourcemap-segment.cts'; -export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.cts'; -export declare const LEAST_UPPER_BOUND = -1; -export declare const GREATEST_LOWER_BOUND = 1; -export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.cts'; -export declare class TraceMap implements SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - ignoreList: SourceMapV3['ignoreList']; - resolvedSources: string[]; - private _encoded; - private _decoded; - private _decodedMemo; - private _bySources; - private _bySourceMemos; - constructor(map: Ro, mapUrl?: string | null); -} -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export declare function decodedMappings(map: TraceMap): Readonly; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; -/** - * Finds the generated line/column position of the provided source/line/column source position. - */ -export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; -/** - * Finds all generated line/column positions of the provided source/line/column source position. - */ -export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; -/** - * Iterates each mapping in generated position order. - */ -export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; -/** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ -export declare function sourceContentFor(map: TraceMap, source: string): string | null; -/** - * Determines if the source is marked to ignore by the source map. - */ -export declare function isIgnored(map: TraceMap, source: string): boolean; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function decodedMap(map: TraceMap): Omit & { - mappings: readonly SourceMapSegment[][]; -}; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function encodedMap(map: TraceMap): EncodedSourceMap; -//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map deleted file mode 100644 index b5a874c..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,YAAY,EACZ,SAAS,EACT,WAAW,EAIX,EAAE,EACH,MAAM,SAAS,CAAC;AAIjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,MAAM,EACN,eAAe,EACf,eAAe,IAAI,OAAO,EAC1B,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,aAAa,GACd,MAAM,SAAS,CAAC;AAajB,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAEjE,qBAAa,QAAS,YAAW,SAAS;IAChC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B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,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAgCnF;AASD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAIpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GACZ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAA;CAAE,CAElF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts deleted file mode 100644 index bc2ff0f..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +++ /dev/null @@ -1,80 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.mts'; -import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts'; -export type { SourceMapSegment } from './sourcemap-segment.mts'; -export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts'; -export declare const LEAST_UPPER_BOUND = -1; -export declare const GREATEST_LOWER_BOUND = 1; -export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts'; -export declare class TraceMap implements SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - ignoreList: SourceMapV3['ignoreList']; - resolvedSources: string[]; - private _encoded; - private _decoded; - private _decodedMemo; - private _bySources; - private _bySourceMemos; - constructor(map: Ro, mapUrl?: string | null); -} -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export declare function decodedMappings(map: TraceMap): Readonly; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; -/** - * Finds the generated line/column position of the provided source/line/column source position. - */ -export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; -/** - * Finds all generated line/column positions of the provided source/line/column source position. - */ -export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; -/** - * Iterates each mapping in generated position order. - */ -export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; -/** - * Retrieves the source content for a particular source, if its found. Returns null if not. - */ -export declare function sourceContentFor(map: TraceMap, source: string): string | null; -/** - * Determines if the source is marked to ignore by the source map. - */ -export declare function isIgnored(map: TraceMap, source: string): boolean; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function decodedMap(map: TraceMap): Omit & { - mappings: readonly SourceMapSegment[][]; -}; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare function encodedMap(map: TraceMap): EncodedSourceMap; -//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map deleted file mode 100644 index b5a874c..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,YAAY,EACZ,SAAS,EACT,WAAW,EAIX,EAAE,EACH,MAAM,SAAS,CAAC;AAIjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,MAAM,EACN,eAAe,EACf,eAAe,IAAI,OAAO,EAC1B,uBAAuB,EACvB,cAAc,E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AgB,CAAC,GAAG,IAAI,CAiBnC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,GACb,eAAe,GAAG,sBAAsB,CAiC1C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,YAAY,GACnB,gBAAgB,GAAG,uBAAuB,CAG5C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,GAAG,gBAAgB,EAAE,CAIhG;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAgCnF;AASD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK7E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAIpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GACZ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAA;CAAE,CAElF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts b/node_modules/@jridgewell/trace-mapping/types/types.d.cts deleted file mode 100644 index 729c2c3..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/types.d.cts +++ /dev/null @@ -1,107 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.cts'; -import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.cts'; -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList?: number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} -export interface Section { - offset: { - line: number; - column: number; - }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} -export type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; -export type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; -export type GeneratedMapping = { - line: number; - column: number; -}; -export type InvalidGeneratedMapping = { - line: null; - column: null; -}; -export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; -export type XInput = { - x_google_ignoreList?: SourceMapV3['ignoreList']; -}; -export type EncodedSourceMapXInput = EncodedSourceMap & XInput; -export type DecodedSourceMapXInput = DecodedSourceMap & XInput; -export type SectionedSourceMapXInput = Omit & { - sections: SectionXInput[]; -}; -export type SectionXInput = Omit & { - map: SectionedSourceMapInput; -}; -export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; -export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; -export type Needle = { - line: number; - column: number; - bias?: Bias; -}; -export type SourceNeedle = { - source: string; - line: number; - column: number; - bias?: Bias; -}; -export type EachMapping = { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; -} | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; -}; -export declare abstract class SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: SourceMapV3['sources']; - ignoreList: SourceMapV3['ignoreList']; -} -export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; -type RoArray = Ro[]; -type RoObject = { - [K in keyof T]: T[K] | Ro; -}; -export declare function parse(map: T): Exclude; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map deleted file mode 100644 index 9224783..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,gBAAgB,EAAE,EAAE,CAAC;CAChC;AAED,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IAC5B,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACtC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAC9C,eAAe,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CAC/C;AAED,MAAM,MAAM,EAAE,CAAC,CAAC,IACd,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACpB,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GACvD,CAAC,SAAS,MAAM,GACd,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GACrD,CAAC,CAAC;AACV,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1B,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvD,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts b/node_modules/@jridgewell/trace-mapping/types/types.d.mts deleted file mode 100644 index a26d186..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/types.d.mts +++ /dev/null @@ -1,107 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment.mts'; -import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.mts'; -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; - ignoreList?: number[]; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} -export interface Section { - offset: { - line: number; - column: number; - }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} -export type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; -export type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; -export type GeneratedMapping = { - line: number; - column: number; -}; -export type InvalidGeneratedMapping = { - line: null; - column: null; -}; -export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; -export type XInput = { - x_google_ignoreList?: SourceMapV3['ignoreList']; -}; -export type EncodedSourceMapXInput = EncodedSourceMap & XInput; -export type DecodedSourceMapXInput = DecodedSourceMap & XInput; -export type SectionedSourceMapXInput = Omit & { - sections: SectionXInput[]; -}; -export type SectionXInput = Omit & { - map: SectionedSourceMapInput; -}; -export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; -export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; -export type Needle = { - line: number; - column: number; - bias?: Bias; -}; -export type SourceNeedle = { - source: string; - line: number; - column: number; - bias?: Bias; -}; -export type EachMapping = { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; -} | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; -}; -export declare abstract class SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: SourceMapV3['sources']; - ignoreList: SourceMapV3['ignoreList']; -} -export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; -type RoArray = Ro[]; -type RoObject = { - [K in keyof T]: T[K] | Ro; -}; -export declare function parse(map: T): Exclude; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map deleted file mode 100644 index 9224783..0000000 --- a/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,gBAAgB,EAAE,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,GA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AAW,CAAC,gBAAgB,CAAC,CAAC;IAC9C,eAAe,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACxC,UAAU,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CAC/C;AAED,MAAM,MAAM,EAAE,CAAC,CAAC,IACd,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACpB,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GACvD,CAAC,SAAS,MAAM,GACd,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GACrD,CAAC,CAAC;AACV,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1B,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvD,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@oxc-project/types/LICENSE b/node_modules/@oxc-project/types/LICENSE deleted file mode 100644 index 444bffc..0000000 --- a/node_modules/@oxc-project/types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2024-present VoidZero Inc. & Contributors -Copyright (c) 2023 Boshen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@oxc-project/types/README.md b/node_modules/@oxc-project/types/README.md deleted file mode 100644 index d5b248a..0000000 --- a/node_modules/@oxc-project/types/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Oxc Types - -Typescript definitions for Oxc AST nodes. diff --git a/node_modules/@oxc-project/types/package.json b/node_modules/@oxc-project/types/package.json deleted file mode 100644 index f181226..0000000 --- a/node_modules/@oxc-project/types/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@oxc-project/types", - "version": "0.127.0", - "description": "Types for Oxc AST nodes", - "keywords": [ - "AST", - "Parser" - ], - "homepage": "https://oxc.rs", - "bugs": "https://github.com/oxc-project/oxc/issues", - "license": "MIT", - "author": "Boshen and oxc contributors", - "repository": { - "type": "git", - "url": "git+https://github.com/oxc-project/oxc.git", - "directory": "npm/oxc-types" - }, - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "files": [ - "types.d.ts" - ], - "type": "module", - "types": "types.d.ts" -} \ No newline at end of file diff --git a/node_modules/@oxc-project/types/types.d.ts b/node_modules/@oxc-project/types/types.d.ts deleted file mode 100644 index c94c115..0000000 --- a/node_modules/@oxc-project/types/types.d.ts +++ /dev/null @@ -1,1912 +0,0 @@ -// Auto-generated code, DO NOT EDIT DIRECTLY! -// To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`. - -export interface Program extends Span { - type: "Program"; - body: Array; - sourceType: ModuleKind; - hashbang: Hashbang | null; - parent?: null; -} - -export type Expression = - | BooleanLiteral - | NullLiteral - | NumericLiteral - | BigIntLiteral - | RegExpLiteral - | StringLiteral - | TemplateLiteral - | IdentifierReference - | MetaProperty - | Super - | ArrayExpression - | ArrowFunctionExpression - | AssignmentExpression - | AwaitExpression - | BinaryExpression - | CallExpression - | ChainExpression - | Class - | ConditionalExpression - | Function - | ImportExpression - | LogicalExpression - | NewExpression - | ObjectExpression - | ParenthesizedExpression - | SequenceExpression - | TaggedTemplateExpression - | ThisExpression - | UnaryExpression - | UpdateExpression - | YieldExpression - | PrivateInExpression - | JSXElement - | JSXFragment - | TSAsExpression - | TSSatisfiesExpression - | TSTypeAssertion - | TSNonNullExpression - | TSInstantiationExpression - | V8IntrinsicExpression - | MemberExpression; - -export interface IdentifierName extends Span { - type: "Identifier"; - decorators?: []; - name: string; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface IdentifierReference extends Span { - type: "Identifier"; - decorators?: []; - name: string; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface BindingIdentifier extends Span { - type: "Identifier"; - decorators?: []; - name: string; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface LabelIdentifier extends Span { - type: "Identifier"; - decorators?: []; - name: string; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface ThisExpression extends Span { - type: "ThisExpression"; - parent?: Node; -} - -export interface ArrayExpression extends Span { - type: "ArrayExpression"; - elements: Array; - parent?: Node; -} - -export type ArrayExpressionElement = SpreadElement | null | Expression; - -export interface ObjectExpression extends Span { - type: "ObjectExpression"; - properties: Array; - parent?: Node; -} - -export type ObjectPropertyKind = ObjectProperty | SpreadElement; - -export interface ObjectProperty extends Span { - type: "Property"; - kind: PropertyKind; - key: PropertyKey; - value: Expression; - method: boolean; - shorthand: boolean; - computed: boolean; - optional?: false; - parent?: Node; -} - -export type PropertyKey = IdentifierName | PrivateIdentifier | Expression; - -export type PropertyKind = "init" | "get" | "set"; - -export interface TemplateLiteral extends Span { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; - parent?: Node; -} - -export interface TaggedTemplateExpression extends Span { - type: "TaggedTemplateExpression"; - tag: Expression; - typeArguments?: TSTypeParameterInstantiation | null; - quasi: TemplateLiteral; - parent?: Node; -} - -export interface TemplateElement extends Span { - type: "TemplateElement"; - value: TemplateElementValue; - tail: boolean; - parent?: Node; -} - -export interface TemplateElementValue { - raw: string; - cooked: string | null; -} - -export type MemberExpression = - | ComputedMemberExpression - | StaticMemberExpression - | PrivateFieldExpression; - -export interface ComputedMemberExpression extends Span { - type: "MemberExpression"; - object: Expression; - property: Expression; - optional: boolean; - computed: true; - parent?: Node; -} - -export interface StaticMemberExpression extends Span { - type: "MemberExpression"; - object: Expression; - property: IdentifierName; - optional: boolean; - computed: false; - parent?: Node; -} - -export interface PrivateFieldExpression extends Span { - type: "MemberExpression"; - object: Expression; - property: PrivateIdentifier; - optional: boolean; - computed: false; - parent?: Node; -} - -export interface CallExpression extends Span { - type: "CallExpression"; - callee: Expression; - typeArguments?: TSTypeParameterInstantiation | null; - arguments: Array; - optional: boolean; - parent?: Node; -} - -export interface NewExpression extends Span { - type: "NewExpression"; - callee: Expression; - typeArguments?: TSTypeParameterInstantiation | null; - arguments: Array; - parent?: Node; -} - -export interface MetaProperty extends Span { - type: "MetaProperty"; - meta: IdentifierName; - property: IdentifierName; - parent?: Node; -} - -export interface SpreadElement extends Span { - type: "SpreadElement"; - argument: Expression; - parent?: Node; -} - -export type Argument = SpreadElement | Expression; - -export interface UpdateExpression extends Span { - type: "UpdateExpression"; - operator: UpdateOperator; - prefix: boolean; - argument: SimpleAssignmentTarget; - parent?: Node; -} - -export interface UnaryExpression extends Span { - type: "UnaryExpression"; - operator: UnaryOperator; - argument: Expression; - prefix: true; - parent?: Node; -} - -export interface BinaryExpression extends Span { - type: "BinaryExpression"; - left: Expression; - operator: BinaryOperator; - right: Expression; - parent?: Node; -} - -export interface PrivateInExpression extends Span { - type: "BinaryExpression"; - left: PrivateIdentifier; - operator: "in"; - right: Expression; - parent?: Node; -} - -export interface LogicalExpression extends Span { - type: "LogicalExpression"; - left: Expression; - operator: LogicalOperator; - right: Expression; - parent?: Node; -} - -export interface ConditionalExpression extends Span { - type: "ConditionalExpression"; - test: Expression; - consequent: Expression; - alternate: Expression; - parent?: Node; -} - -export interface AssignmentExpression extends Span { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: AssignmentTarget; - right: Expression; - parent?: Node; -} - -export type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern; - -export type SimpleAssignmentTarget = - | IdentifierReference - | TSAsExpression - | TSSatisfiesExpression - | TSNonNullExpression - | TSTypeAssertion - | MemberExpression; - -export type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTarget; - -export interface ArrayAssignmentTarget extends Span { - type: "ArrayPattern"; - decorators?: []; - elements: Array; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface ObjectAssignmentTarget extends Span { - type: "ObjectPattern"; - decorators?: []; - properties: Array; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface AssignmentTargetRest extends Span { - type: "RestElement"; - decorators?: []; - argument: AssignmentTarget; - optional?: false; - typeAnnotation?: null; - value?: null; - parent?: Node; -} - -export type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget; - -export interface AssignmentTargetWithDefault extends Span { - type: "AssignmentPattern"; - decorators?: []; - left: AssignmentTarget; - right: Expression; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export type AssignmentTargetProperty = - | AssignmentTargetPropertyIdentifier - | AssignmentTargetPropertyProperty; - -export interface AssignmentTargetPropertyIdentifier extends Span { - type: "Property"; - kind: "init"; - key: IdentifierReference; - value: IdentifierReference | AssignmentTargetWithDefault; - method: false; - shorthand: true; - computed: false; - optional?: false; - parent?: Node; -} - -export interface AssignmentTargetPropertyProperty extends Span { - type: "Property"; - kind: "init"; - key: PropertyKey; - value: AssignmentTargetMaybeDefault; - method: false; - shorthand: false; - computed: boolean; - optional?: false; - parent?: Node; -} - -export interface SequenceExpression extends Span { - type: "SequenceExpression"; - expressions: Array; - parent?: Node; -} - -export interface Super extends Span { - type: "Super"; - parent?: Node; -} - -export interface AwaitExpression extends Span { - type: "AwaitExpression"; - argument: Expression; - parent?: Node; -} - -export interface ChainExpression extends Span { - type: "ChainExpression"; - expression: ChainElement; - parent?: Node; -} - -export type ChainElement = CallExpression | TSNonNullExpression | MemberExpression; - -export interface ParenthesizedExpression extends Span { - type: "ParenthesizedExpression"; - expression: Expression; - parent?: Node; -} - -export type Statement = - | BlockStatement - | BreakStatement - | ContinueStatement - | DebuggerStatement - | DoWhileStatement - | EmptyStatement - | ExpressionStatement - | ForInStatement - | ForOfStatement - | ForStatement - | IfStatement - | LabeledStatement - | ReturnStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | WhileStatement - | WithStatement - | Declaration - | ModuleDeclaration; - -export interface Directive extends Span { - type: "ExpressionStatement"; - expression: StringLiteral; - directive: string; - parent?: Node; -} - -export interface Hashbang extends Span { - type: "Hashbang"; - value: string; - parent?: Node; -} - -export interface BlockStatement extends Span { - type: "BlockStatement"; - body: Array; - parent?: Node; -} - -export type Declaration = - | VariableDeclaration - | Function - | Class - | TSTypeAliasDeclaration - | TSInterfaceDeclaration - | TSEnumDeclaration - | TSModuleDeclaration - | TSGlobalDeclaration - | TSImportEqualsDeclaration; - -export interface VariableDeclaration extends Span { - type: "VariableDeclaration"; - kind: VariableDeclarationKind; - declarations: Array; - declare?: boolean; - parent?: Node; -} - -export type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using"; - -export interface VariableDeclarator extends Span { - type: "VariableDeclarator"; - id: BindingPattern; - init: Expression | null; - definite?: boolean; - parent?: Node; -} - -export interface EmptyStatement extends Span { - type: "EmptyStatement"; - parent?: Node; -} - -export interface ExpressionStatement extends Span { - type: "ExpressionStatement"; - expression: Expression; - directive?: string | null; - parent?: Node; -} - -export interface IfStatement extends Span { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate: Statement | null; - parent?: Node; -} - -export interface DoWhileStatement extends Span { - type: "DoWhileStatement"; - body: Statement; - test: Expression; - parent?: Node; -} - -export interface WhileStatement extends Span { - type: "WhileStatement"; - test: Expression; - body: Statement; - parent?: Node; -} - -export interface ForStatement extends Span { - type: "ForStatement"; - init: ForStatementInit | null; - test: Expression | null; - update: Expression | null; - body: Statement; - parent?: Node; -} - -export type ForStatementInit = VariableDeclaration | Expression; - -export interface ForInStatement extends Span { - type: "ForInStatement"; - left: ForStatementLeft; - right: Expression; - body: Statement; - parent?: Node; -} - -export type ForStatementLeft = VariableDeclaration | AssignmentTarget; - -export interface ForOfStatement extends Span { - type: "ForOfStatement"; - await: boolean; - left: ForStatementLeft; - right: Expression; - body: Statement; - parent?: Node; -} - -export interface ContinueStatement extends Span { - type: "ContinueStatement"; - label: LabelIdentifier | null; - parent?: Node; -} - -export interface BreakStatement extends Span { - type: "BreakStatement"; - label: LabelIdentifier | null; - parent?: Node; -} - -export interface ReturnStatement extends Span { - type: "ReturnStatement"; - argument: Expression | null; - parent?: Node; -} - -export interface WithStatement extends Span { - type: "WithStatement"; - object: Expression; - body: Statement; - parent?: Node; -} - -export interface SwitchStatement extends Span { - type: "SwitchStatement"; - discriminant: Expression; - cases: Array; - parent?: Node; -} - -export interface SwitchCase extends Span { - type: "SwitchCase"; - test: Expression | null; - consequent: Array; - parent?: Node; -} - -export interface LabeledStatement extends Span { - type: "LabeledStatement"; - label: LabelIdentifier; - body: Statement; - parent?: Node; -} - -export interface ThrowStatement extends Span { - type: "ThrowStatement"; - argument: Expression; - parent?: Node; -} - -export interface TryStatement extends Span { - type: "TryStatement"; - block: BlockStatement; - handler: CatchClause | null; - finalizer: BlockStatement | null; - parent?: Node; -} - -export interface CatchClause extends Span { - type: "CatchClause"; - param: BindingPattern | null; - body: BlockStatement; - parent?: Node; -} - -export interface DebuggerStatement extends Span { - type: "DebuggerStatement"; - parent?: Node; -} - -export type BindingPattern = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern; - -export interface AssignmentPattern extends Span { - type: "AssignmentPattern"; - decorators?: []; - left: BindingPattern; - right: Expression; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface ObjectPattern extends Span { - type: "ObjectPattern"; - decorators?: []; - properties: Array; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface BindingProperty extends Span { - type: "Property"; - kind: "init"; - key: PropertyKey; - value: BindingPattern; - method: false; - shorthand: boolean; - computed: boolean; - optional?: false; - parent?: Node; -} - -export interface ArrayPattern extends Span { - type: "ArrayPattern"; - decorators?: []; - elements: Array; - optional?: false; - typeAnnotation?: null; - parent?: Node; -} - -export interface BindingRestElement extends Span { - type: "RestElement"; - decorators?: []; - argument: BindingPattern; - optional?: false; - typeAnnotation?: null; - value?: null; - parent?: Node; -} - -export interface Function extends Span { - type: FunctionType; - id: BindingIdentifier | null; - generator: boolean; - async: boolean; - declare?: boolean; - typeParameters?: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType?: TSTypeAnnotation | null; - body: FunctionBody | null; - expression: false; - parent?: Node; -} - -export type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest; - -export type FunctionType = - | "FunctionDeclaration" - | "FunctionExpression" - | "TSDeclareFunction" - | "TSEmptyBodyFunctionExpression"; - -export interface FormalParameterRest extends Span { - type: "RestElement"; - argument: BindingPattern; - decorators?: []; - optional?: boolean; - typeAnnotation?: TSTypeAnnotation | null; - value?: null; - parent?: Node; -} - -export type FormalParameter = { - decorators?: Array; -} & BindingPattern; - -export interface TSParameterProperty extends Span { - type: "TSParameterProperty"; - accessibility: TSAccessibility | null; - decorators: Array; - override: boolean; - parameter: FormalParameter; - readonly: boolean; - static: boolean; - parent?: Node; -} - -export interface FunctionBody extends Span { - type: "BlockStatement"; - body: Array; - parent?: Node; -} - -export interface ArrowFunctionExpression extends Span { - type: "ArrowFunctionExpression"; - expression: boolean; - async: boolean; - typeParameters?: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType?: TSTypeAnnotation | null; - body: FunctionBody | Expression; - id: null; - generator: false; - parent?: Node; -} - -export interface YieldExpression extends Span { - type: "YieldExpression"; - delegate: boolean; - argument: Expression | null; - parent?: Node; -} - -export interface Class extends Span { - type: ClassType; - decorators: Array; - id: BindingIdentifier | null; - typeParameters?: TSTypeParameterDeclaration | null; - superClass: Expression | null; - superTypeArguments?: TSTypeParameterInstantiation | null; - implements?: Array; - body: ClassBody; - abstract?: boolean; - declare?: boolean; - parent?: Node; -} - -export type ClassType = "ClassDeclaration" | "ClassExpression"; - -export interface ClassBody extends Span { - type: "ClassBody"; - body: Array; - parent?: Node; -} - -export type ClassElement = - | StaticBlock - | MethodDefinition - | PropertyDefinition - | AccessorProperty - | TSIndexSignature; - -export interface MethodDefinition extends Span { - type: MethodDefinitionType; - decorators: Array; - key: PropertyKey; - value: Function; - kind: MethodDefinitionKind; - computed: boolean; - static: boolean; - override?: boolean; - optional?: boolean; - accessibility?: TSAccessibility | null; - parent?: Node; -} - -export type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition"; - -export interface PropertyDefinition extends Span { - type: PropertyDefinitionType; - decorators: Array; - key: PropertyKey; - typeAnnotation?: TSTypeAnnotation | null; - value: Expression | null; - computed: boolean; - static: boolean; - declare?: boolean; - override?: boolean; - optional?: boolean; - definite?: boolean; - readonly?: boolean; - accessibility?: TSAccessibility | null; - parent?: Node; -} - -export type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition"; - -export type MethodDefinitionKind = "constructor" | "method" | "get" | "set"; - -export interface PrivateIdentifier extends Span { - type: "PrivateIdentifier"; - name: string; - parent?: Node; -} - -export interface StaticBlock extends Span { - type: "StaticBlock"; - body: Array; - parent?: Node; -} - -export type ModuleDeclaration = - | ImportDeclaration - | ExportAllDeclaration - | ExportDefaultDeclaration - | ExportNamedDeclaration - | TSExportAssignment - | TSNamespaceExportDeclaration; - -export type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty"; - -export interface AccessorProperty extends Span { - type: AccessorPropertyType; - decorators: Array; - key: PropertyKey; - typeAnnotation?: TSTypeAnnotation | null; - value: Expression | null; - computed: boolean; - static: boolean; - override?: boolean; - definite?: boolean; - accessibility?: TSAccessibility | null; - declare?: false; - optional?: false; - readonly?: false; - parent?: Node; -} - -export interface ImportExpression extends Span { - type: "ImportExpression"; - source: Expression; - options: Expression | null; - phase: ImportPhase | null; - parent?: Node; -} - -export interface ImportDeclaration extends Span { - type: "ImportDeclaration"; - specifiers: Array; - source: StringLiteral; - phase: ImportPhase | null; - attributes: Array; - importKind?: ImportOrExportKind; - parent?: Node; -} - -export type ImportPhase = "source" | "defer"; - -export type ImportDeclarationSpecifier = - | ImportSpecifier - | ImportDefaultSpecifier - | ImportNamespaceSpecifier; - -export interface ImportSpecifier extends Span { - type: "ImportSpecifier"; - imported: ModuleExportName; - local: BindingIdentifier; - importKind?: ImportOrExportKind; - parent?: Node; -} - -export interface ImportDefaultSpecifier extends Span { - type: "ImportDefaultSpecifier"; - local: BindingIdentifier; - parent?: Node; -} - -export interface ImportNamespaceSpecifier extends Span { - type: "ImportNamespaceSpecifier"; - local: BindingIdentifier; - parent?: Node; -} - -export interface ImportAttribute extends Span { - type: "ImportAttribute"; - key: ImportAttributeKey; - value: StringLiteral; - parent?: Node; -} - -export type ImportAttributeKey = IdentifierName | StringLiteral; - -export interface ExportNamedDeclaration extends Span { - type: "ExportNamedDeclaration"; - declaration: Declaration | null; - specifiers: Array; - source: StringLiteral | null; - exportKind?: ImportOrExportKind; - attributes: Array; - parent?: Node; -} - -export interface ExportDefaultDeclaration extends Span { - type: "ExportDefaultDeclaration"; - declaration: ExportDefaultDeclarationKind; - exportKind?: "value"; - parent?: Node; -} - -export interface ExportAllDeclaration extends Span { - type: "ExportAllDeclaration"; - exported: ModuleExportName | null; - source: StringLiteral; - attributes: Array; - exportKind?: ImportOrExportKind; - parent?: Node; -} - -export interface ExportSpecifier extends Span { - type: "ExportSpecifier"; - local: ModuleExportName; - exported: ModuleExportName; - exportKind?: ImportOrExportKind; - parent?: Node; -} - -export type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclaration | Expression; - -export type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral; - -export interface V8IntrinsicExpression extends Span { - type: "V8IntrinsicExpression"; - name: IdentifierName; - arguments: Array; - parent?: Node; -} - -export interface BooleanLiteral extends Span { - type: "Literal"; - value: boolean; - raw: string | null; - parent?: Node; -} - -export interface NullLiteral extends Span { - type: "Literal"; - value: null; - raw: "null" | null; - parent?: Node; -} - -export interface NumericLiteral extends Span { - type: "Literal"; - value: number; - raw: string | null; - parent?: Node; -} - -export interface StringLiteral extends Span { - type: "Literal"; - value: string; - raw: string | null; - parent?: Node; -} - -export interface BigIntLiteral extends Span { - type: "Literal"; - value: bigint; - raw: string | null; - bigint: string; - parent?: Node; -} - -export interface RegExpLiteral extends Span { - type: "Literal"; - value: RegExp | null; - raw: string | null; - regex: { pattern: string; flags: string }; - parent?: Node; -} - -export interface JSXElement extends Span { - type: "JSXElement"; - openingElement: JSXOpeningElement; - children: Array; - closingElement: JSXClosingElement | null; - parent?: Node; -} - -export interface JSXOpeningElement extends Span { - type: "JSXOpeningElement"; - name: JSXElementName; - typeArguments?: TSTypeParameterInstantiation | null; - attributes: Array; - selfClosing: boolean; - parent?: Node; -} - -export interface JSXClosingElement extends Span { - type: "JSXClosingElement"; - name: JSXElementName; - parent?: Node; -} - -export interface JSXFragment extends Span { - type: "JSXFragment"; - openingFragment: JSXOpeningFragment; - children: Array; - closingFragment: JSXClosingFragment; - parent?: Node; -} - -export interface JSXOpeningFragment extends Span { - type: "JSXOpeningFragment"; - attributes?: []; - selfClosing?: false; - parent?: Node; -} - -export interface JSXClosingFragment extends Span { - type: "JSXClosingFragment"; - parent?: Node; -} - -export type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression; - -export interface JSXNamespacedName extends Span { - type: "JSXNamespacedName"; - namespace: JSXIdentifier; - name: JSXIdentifier; - parent?: Node; -} - -export interface JSXMemberExpression extends Span { - type: "JSXMemberExpression"; - object: JSXMemberExpressionObject; - property: JSXIdentifier; - parent?: Node; -} - -export type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression; - -export interface JSXExpressionContainer extends Span { - type: "JSXExpressionContainer"; - expression: JSXExpression; - parent?: Node; -} - -export type JSXExpression = JSXEmptyExpression | Expression; - -export interface JSXEmptyExpression extends Span { - type: "JSXEmptyExpression"; - parent?: Node; -} - -export type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute; - -export interface JSXAttribute extends Span { - type: "JSXAttribute"; - name: JSXAttributeName; - value: JSXAttributeValue | null; - parent?: Node; -} - -export interface JSXSpreadAttribute extends Span { - type: "JSXSpreadAttribute"; - argument: Expression; - parent?: Node; -} - -export type JSXAttributeName = JSXIdentifier | JSXNamespacedName; - -export type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment; - -export interface JSXIdentifier extends Span { - type: "JSXIdentifier"; - name: string; - parent?: Node; -} - -export type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild; - -export interface JSXSpreadChild extends Span { - type: "JSXSpreadChild"; - expression: Expression; - parent?: Node; -} - -export interface JSXText extends Span { - type: "JSXText"; - value: string; - raw: string | null; - parent?: Node; -} - -export interface TSThisParameter extends Span { - type: "Identifier"; - decorators: []; - name: "this"; - optional: false; - typeAnnotation: TSTypeAnnotation | null; - parent?: Node; -} - -export interface TSEnumDeclaration extends Span { - type: "TSEnumDeclaration"; - id: BindingIdentifier; - body: TSEnumBody; - const: boolean; - declare: boolean; - parent?: Node; -} - -export interface TSEnumBody extends Span { - type: "TSEnumBody"; - members: Array; - parent?: Node; -} - -export interface TSEnumMember extends Span { - type: "TSEnumMember"; - id: TSEnumMemberName; - initializer: Expression | null; - computed: boolean; - parent?: Node; -} - -export type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral; - -export interface TSTypeAnnotation extends Span { - type: "TSTypeAnnotation"; - typeAnnotation: TSType; - parent?: Node; -} - -export interface TSLiteralType extends Span { - type: "TSLiteralType"; - literal: TSLiteral; - parent?: Node; -} - -export type TSLiteral = - | BooleanLiteral - | NumericLiteral - | BigIntLiteral - | StringLiteral - | TemplateLiteral - | UnaryExpression; - -export type TSType = - | TSAnyKeyword - | TSBigIntKeyword - | TSBooleanKeyword - | TSIntrinsicKeyword - | TSNeverKeyword - | TSNullKeyword - | TSNumberKeyword - | TSObjectKeyword - | TSStringKeyword - | TSSymbolKeyword - | TSUndefinedKeyword - | TSUnknownKeyword - | TSVoidKeyword - | TSArrayType - | TSConditionalType - | TSConstructorType - | TSFunctionType - | TSImportType - | TSIndexedAccessType - | TSInferType - | TSIntersectionType - | TSLiteralType - | TSMappedType - | TSNamedTupleMember - | TSTemplateLiteralType - | TSThisType - | TSTupleType - | TSTypeLiteral - | TSTypeOperator - | TSTypePredicate - | TSTypeQuery - | TSTypeReference - | TSUnionType - | TSParenthesizedType - | JSDocNullableType - | JSDocNonNullableType - | JSDocUnknownType; - -export interface TSConditionalType extends Span { - type: "TSConditionalType"; - checkType: TSType; - extendsType: TSType; - trueType: TSType; - falseType: TSType; - parent?: Node; -} - -export interface TSUnionType extends Span { - type: "TSUnionType"; - types: Array; - parent?: Node; -} - -export interface TSIntersectionType extends Span { - type: "TSIntersectionType"; - types: Array; - parent?: Node; -} - -export interface TSParenthesizedType extends Span { - type: "TSParenthesizedType"; - typeAnnotation: TSType; - parent?: Node; -} - -export interface TSTypeOperator extends Span { - type: "TSTypeOperator"; - operator: TSTypeOperatorOperator; - typeAnnotation: TSType; - parent?: Node; -} - -export type TSTypeOperatorOperator = "keyof" | "unique" | "readonly"; - -export interface TSArrayType extends Span { - type: "TSArrayType"; - elementType: TSType; - parent?: Node; -} - -export interface TSIndexedAccessType extends Span { - type: "TSIndexedAccessType"; - objectType: TSType; - indexType: TSType; - parent?: Node; -} - -export interface TSTupleType extends Span { - type: "TSTupleType"; - elementTypes: Array; - parent?: Node; -} - -export interface TSNamedTupleMember extends Span { - type: "TSNamedTupleMember"; - label: IdentifierName; - elementType: TSTupleElement; - optional: boolean; - parent?: Node; -} - -export interface TSOptionalType extends Span { - type: "TSOptionalType"; - typeAnnotation: TSType; - parent?: Node; -} - -export interface TSRestType extends Span { - type: "TSRestType"; - typeAnnotation: TSType; - parent?: Node; -} - -export type TSTupleElement = TSOptionalType | TSRestType | TSType; - -export interface TSAnyKeyword extends Span { - type: "TSAnyKeyword"; - parent?: Node; -} - -export interface TSStringKeyword extends Span { - type: "TSStringKeyword"; - parent?: Node; -} - -export interface TSBooleanKeyword extends Span { - type: "TSBooleanKeyword"; - parent?: Node; -} - -export interface TSNumberKeyword extends Span { - type: "TSNumberKeyword"; - parent?: Node; -} - -export interface TSNeverKeyword extends Span { - type: "TSNeverKeyword"; - parent?: Node; -} - -export interface TSIntrinsicKeyword extends Span { - type: "TSIntrinsicKeyword"; - parent?: Node; -} - -export interface TSUnknownKeyword extends Span { - type: "TSUnknownKeyword"; - parent?: Node; -} - -export interface TSNullKeyword extends Span { - type: "TSNullKeyword"; - parent?: Node; -} - -export interface TSUndefinedKeyword extends Span { - type: "TSUndefinedKeyword"; - parent?: Node; -} - -export interface TSVoidKeyword extends Span { - type: "TSVoidKeyword"; - parent?: Node; -} - -export interface TSSymbolKeyword extends Span { - type: "TSSymbolKeyword"; - parent?: Node; -} - -export interface TSThisType extends Span { - type: "TSThisType"; - parent?: Node; -} - -export interface TSObjectKeyword extends Span { - type: "TSObjectKeyword"; - parent?: Node; -} - -export interface TSBigIntKeyword extends Span { - type: "TSBigIntKeyword"; - parent?: Node; -} - -export interface TSTypeReference extends Span { - type: "TSTypeReference"; - typeName: TSTypeName; - typeArguments: TSTypeParameterInstantiation | null; - parent?: Node; -} - -export type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression; - -export interface TSQualifiedName extends Span { - type: "TSQualifiedName"; - left: TSTypeName; - right: IdentifierName; - parent?: Node; -} - -export interface TSTypeParameterInstantiation extends Span { - type: "TSTypeParameterInstantiation"; - params: Array; - parent?: Node; -} - -export interface TSTypeParameter extends Span { - type: "TSTypeParameter"; - name: BindingIdentifier; - constraint: TSType | null; - default: TSType | null; - in: boolean; - out: boolean; - const: boolean; - parent?: Node; -} - -export interface TSTypeParameterDeclaration extends Span { - type: "TSTypeParameterDeclaration"; - params: Array; - parent?: Node; -} - -export interface TSTypeAliasDeclaration extends Span { - type: "TSTypeAliasDeclaration"; - id: BindingIdentifier; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSType; - declare: boolean; - parent?: Node; -} - -export type TSAccessibility = "private" | "protected" | "public"; - -export interface TSClassImplements extends Span { - type: "TSClassImplements"; - expression: IdentifierReference | ThisExpression | MemberExpression; - typeArguments: TSTypeParameterInstantiation | null; - parent?: Node; -} - -export interface TSInterfaceDeclaration extends Span { - type: "TSInterfaceDeclaration"; - id: BindingIdentifier; - typeParameters: TSTypeParameterDeclaration | null; - extends: Array; - body: TSInterfaceBody; - declare: boolean; - parent?: Node; -} - -export interface TSInterfaceBody extends Span { - type: "TSInterfaceBody"; - body: Array; - parent?: Node; -} - -export interface TSPropertySignature extends Span { - type: "TSPropertySignature"; - computed: boolean; - optional: boolean; - readonly: boolean; - key: PropertyKey; - typeAnnotation: TSTypeAnnotation | null; - accessibility: null; - static: false; - parent?: Node; -} - -export type TSSignature = - | TSIndexSignature - | TSPropertySignature - | TSCallSignatureDeclaration - | TSConstructSignatureDeclaration - | TSMethodSignature; - -export interface TSIndexSignature extends Span { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation: TSTypeAnnotation; - readonly: boolean; - static: boolean; - accessibility: null; - parent?: Node; -} - -export interface TSCallSignatureDeclaration extends Span { - type: "TSCallSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType: TSTypeAnnotation | null; - parent?: Node; -} - -export type TSMethodSignatureKind = "method" | "get" | "set"; - -export interface TSMethodSignature extends Span { - type: "TSMethodSignature"; - key: PropertyKey; - computed: boolean; - optional: boolean; - kind: TSMethodSignatureKind; - typeParameters: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType: TSTypeAnnotation | null; - accessibility: null; - readonly: false; - static: false; - parent?: Node; -} - -export interface TSConstructSignatureDeclaration extends Span { - type: "TSConstructSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType: TSTypeAnnotation | null; - parent?: Node; -} - -export interface TSIndexSignatureName extends Span { - type: "Identifier"; - decorators: []; - name: string; - optional: false; - typeAnnotation: TSTypeAnnotation; - parent?: Node; -} - -export interface TSInterfaceHeritage extends Span { - type: "TSInterfaceHeritage"; - expression: Expression; - typeArguments: TSTypeParameterInstantiation | null; - parent?: Node; -} - -export interface TSTypePredicate extends Span { - type: "TSTypePredicate"; - parameterName: TSTypePredicateName; - asserts: boolean; - typeAnnotation: TSTypeAnnotation | null; - parent?: Node; -} - -export type TSTypePredicateName = IdentifierName | TSThisType; - -export interface TSModuleDeclaration extends Span { - type: "TSModuleDeclaration"; - id: BindingIdentifier | StringLiteral | TSQualifiedName; - body: TSModuleBlock | null; - kind: TSModuleDeclarationKind; - declare: boolean; - global: false; - parent?: Node; -} - -export type TSModuleDeclarationKind = "module" | "namespace"; - -export interface TSGlobalDeclaration extends Span { - type: "TSModuleDeclaration"; - id: IdentifierName; - body: TSModuleBlock; - kind: "global"; - declare: boolean; - global: true; - parent?: Node; -} - -export interface TSModuleBlock extends Span { - type: "TSModuleBlock"; - body: Array; - parent?: Node; -} - -export interface TSTypeLiteral extends Span { - type: "TSTypeLiteral"; - members: Array; - parent?: Node; -} - -export interface TSInferType extends Span { - type: "TSInferType"; - typeParameter: TSTypeParameter; - parent?: Node; -} - -export interface TSTypeQuery extends Span { - type: "TSTypeQuery"; - exprName: TSTypeQueryExprName; - typeArguments: TSTypeParameterInstantiation | null; - parent?: Node; -} - -export type TSTypeQueryExprName = TSImportType | TSTypeName; - -export interface TSImportType extends Span { - type: "TSImportType"; - source: StringLiteral; - options: ObjectExpression | null; - qualifier: TSImportTypeQualifier | null; - typeArguments: TSTypeParameterInstantiation | null; - parent?: Node; -} - -export type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName; - -export interface TSImportTypeQualifiedName extends Span { - type: "TSQualifiedName"; - left: TSImportTypeQualifier; - right: IdentifierName; - parent?: Node; -} - -export interface TSFunctionType extends Span { - type: "TSFunctionType"; - typeParameters: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType: TSTypeAnnotation; - parent?: Node; -} - -export interface TSConstructorType extends Span { - type: "TSConstructorType"; - abstract: boolean; - typeParameters: TSTypeParameterDeclaration | null; - params: ParamPattern[]; - returnType: TSTypeAnnotation; - parent?: Node; -} - -export interface TSMappedType extends Span { - type: "TSMappedType"; - key: BindingIdentifier; - constraint: TSType; - nameType: TSType | null; - typeAnnotation: TSType | null; - optional: TSMappedTypeModifierOperator | false; - readonly: TSMappedTypeModifierOperator | null; - parent?: Node; -} - -export type TSMappedTypeModifierOperator = true | "+" | "-"; - -export interface TSTemplateLiteralType extends Span { - type: "TSTemplateLiteralType"; - quasis: Array; - types: Array; - parent?: Node; -} - -export interface TSAsExpression extends Span { - type: "TSAsExpression"; - expression: Expression; - typeAnnotation: TSType; - parent?: Node; -} - -export interface TSSatisfiesExpression extends Span { - type: "TSSatisfiesExpression"; - expression: Expression; - typeAnnotation: TSType; - parent?: Node; -} - -export interface TSTypeAssertion extends Span { - type: "TSTypeAssertion"; - typeAnnotation: TSType; - expression: Expression; - parent?: Node; -} - -export interface TSImportEqualsDeclaration extends Span { - type: "TSImportEqualsDeclaration"; - id: BindingIdentifier; - moduleReference: TSModuleReference; - importKind: ImportOrExportKind; - parent?: Node; -} - -export type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName; - -export interface TSExternalModuleReference extends Span { - type: "TSExternalModuleReference"; - expression: StringLiteral; - parent?: Node; -} - -export interface TSNonNullExpression extends Span { - type: "TSNonNullExpression"; - expression: Expression; - parent?: Node; -} - -export interface Decorator extends Span { - type: "Decorator"; - expression: Expression; - parent?: Node; -} - -export interface TSExportAssignment extends Span { - type: "TSExportAssignment"; - expression: Expression; - parent?: Node; -} - -export interface TSNamespaceExportDeclaration extends Span { - type: "TSNamespaceExportDeclaration"; - id: IdentifierName; - parent?: Node; -} - -export interface TSInstantiationExpression extends Span { - type: "TSInstantiationExpression"; - expression: Expression; - typeArguments: TSTypeParameterInstantiation; - parent?: Node; -} - -export type ImportOrExportKind = "value" | "type"; - -export interface JSDocNullableType extends Span { - type: "TSJSDocNullableType"; - typeAnnotation: TSType; - postfix: boolean; - parent?: Node; -} - -export interface JSDocNonNullableType extends Span { - type: "TSJSDocNonNullableType"; - typeAnnotation: TSType; - postfix: boolean; - parent?: Node; -} - -export interface JSDocUnknownType extends Span { - type: "TSJSDocUnknownType"; - parent?: Node; -} - -export type ModuleKind = "script" | "module" | "commonjs"; - -export interface Span { - start: number; - end: number; - range?: [number, number]; -} - -export type AssignmentOperator = - | "=" - | "+=" - | "-=" - | "*=" - | "/=" - | "%=" - | "**=" - | "<<=" - | ">>=" - | ">>>=" - | "|=" - | "^=" - | "&=" - | "||=" - | "&&=" - | "??="; - -export type BinaryOperator = - | "==" - | "!=" - | "===" - | "!==" - | "<" - | "<=" - | ">" - | ">=" - | "+" - | "-" - | "*" - | "/" - | "%" - | "**" - | "<<" - | ">>" - | ">>>" - | "|" - | "^" - | "&" - | "in" - | "instanceof"; - -export type LogicalOperator = "||" | "&&" | "??"; - -export type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete"; - -export type UpdateOperator = "++" | "--"; - -export type Node = - | Program - | IdentifierName - | IdentifierReference - | BindingIdentifier - | LabelIdentifier - | ThisExpression - | ArrayExpression - | ObjectExpression - | ObjectProperty - | TemplateLiteral - | TaggedTemplateExpression - | TemplateElement - | ComputedMemberExpression - | StaticMemberExpression - | PrivateFieldExpression - | CallExpression - | NewExpression - | MetaProperty - | SpreadElement - | UpdateExpression - | UnaryExpression - | BinaryExpression - | PrivateInExpression - | LogicalExpression - | ConditionalExpression - | AssignmentExpression - | ArrayAssignmentTarget - | ObjectAssignmentTarget - | AssignmentTargetRest - | AssignmentTargetWithDefault - | AssignmentTargetPropertyIdentifier - | AssignmentTargetPropertyProperty - | SequenceExpression - | Super - | AwaitExpression - | ChainExpression - | ParenthesizedExpression - | Directive - | Hashbang - | BlockStatement - | VariableDeclaration - | VariableDeclarator - | EmptyStatement - | ExpressionStatement - | IfStatement - | DoWhileStatement - | WhileStatement - | ForStatement - | ForInStatement - | ForOfStatement - | ContinueStatement - | BreakStatement - | ReturnStatement - | WithStatement - | SwitchStatement - | SwitchCase - | LabeledStatement - | ThrowStatement - | TryStatement - | CatchClause - | DebuggerStatement - | AssignmentPattern - | ObjectPattern - | BindingProperty - | ArrayPattern - | BindingRestElement - | Function - | FunctionBody - | ArrowFunctionExpression - | YieldExpression - | Class - | ClassBody - | MethodDefinition - | PropertyDefinition - | PrivateIdentifier - | StaticBlock - | AccessorProperty - | ImportExpression - | ImportDeclaration - | ImportSpecifier - | ImportDefaultSpecifier - | ImportNamespaceSpecifier - | ImportAttribute - | ExportNamedDeclaration - | ExportDefaultDeclaration - | ExportAllDeclaration - | ExportSpecifier - | V8IntrinsicExpression - | BooleanLiteral - | NullLiteral - | NumericLiteral - | StringLiteral - | BigIntLiteral - | RegExpLiteral - | JSXElement - | JSXOpeningElement - | JSXClosingElement - | JSXFragment - | JSXOpeningFragment - | JSXClosingFragment - | JSXNamespacedName - | JSXMemberExpression - | JSXExpressionContainer - | JSXEmptyExpression - | JSXAttribute - | JSXSpreadAttribute - | JSXIdentifier - | JSXSpreadChild - | JSXText - | TSThisParameter - | TSEnumDeclaration - | TSEnumBody - | TSEnumMember - | TSTypeAnnotation - | TSLiteralType - | TSConditionalType - | TSUnionType - | TSIntersectionType - | TSParenthesizedType - | TSTypeOperator - | TSArrayType - | TSIndexedAccessType - | TSTupleType - | TSNamedTupleMember - | TSOptionalType - | TSRestType - | TSAnyKeyword - | TSStringKeyword - | TSBooleanKeyword - | TSNumberKeyword - | TSNeverKeyword - | TSIntrinsicKeyword - | TSUnknownKeyword - | TSNullKeyword - | TSUndefinedKeyword - | TSVoidKeyword - | TSSymbolKeyword - | TSThisType - | TSObjectKeyword - | TSBigIntKeyword - | TSTypeReference - | TSQualifiedName - | TSTypeParameterInstantiation - | TSTypeParameter - | TSTypeParameterDeclaration - | TSTypeAliasDeclaration - | TSClassImplements - | TSInterfaceDeclaration - | TSInterfaceBody - | TSPropertySignature - | TSIndexSignature - | TSCallSignatureDeclaration - | TSMethodSignature - | TSConstructSignatureDeclaration - | TSIndexSignatureName - | TSInterfaceHeritage - | TSTypePredicate - | TSModuleDeclaration - | TSGlobalDeclaration - | TSModuleBlock - | TSTypeLiteral - | TSInferType - | TSTypeQuery - | TSImportType - | TSImportTypeQualifiedName - | TSFunctionType - | TSConstructorType - | TSMappedType - | TSTemplateLiteralType - | TSAsExpression - | TSSatisfiesExpression - | TSTypeAssertion - | TSImportEqualsDeclaration - | TSExternalModuleReference - | TSNonNullExpression - | Decorator - | TSExportAssignment - | TSNamespaceExportDeclaration - | TSInstantiationExpression - | JSDocNullableType - | JSDocNonNullableType - | JSDocUnknownType - | ParamPattern; diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/README.md b/node_modules/@rolldown/binding-win32-x64-msvc/README.md deleted file mode 100644 index ce38f8e..0000000 --- a/node_modules/@rolldown/binding-win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `@rolldown/binding-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `@rolldown/binding` diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/package.json b/node_modules/@rolldown/binding-win32-x64-msvc/package.json deleted file mode 100644 index dcd9224..0000000 --- a/node_modules/@rolldown/binding-win32-x64-msvc/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@rolldown/binding-win32-x64-msvc", - "version": "1.0.0-rc.17", - "cpu": [ - "x64" - ], - "main": "rolldown-binding.win32-x64-msvc.node", - "files": [ - "rolldown-binding.win32-x64-msvc.node" - ], - "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", - "keywords": [ - "bundler", - "esbuild", - "parcel", - "rolldown", - "rollup", - "webpack" - ], - "homepage": "https://rolldown.rs/", - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/rolldown/rolldown.git", - "directory": "packages/rolldown" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/", - "access": "public" - }, - "os": [ - "win32" - ] -} \ No newline at end of file diff --git a/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node b/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node deleted file mode 100644 index 1334fae..0000000 Binary files a/node_modules/@rolldown/binding-win32-x64-msvc/rolldown-binding.win32-x64-msvc.node and /dev/null differ diff --git a/node_modules/@rolldown/pluginutils/LICENSE b/node_modules/@rolldown/pluginutils/LICENSE deleted file mode 100644 index afc0cdb..0000000 --- a/node_modules/@rolldown/pluginutils/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -MIT License - -Copyright (c) 2024-present VoidZero Inc. & Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -end of terms and conditions - -The licenses of externally maintained libraries from which parts of the Software is derived are listed [here](https://github.com/rolldown/rolldown/blob/main/THIRD-PARTY-LICENSE). diff --git a/node_modules/@rolldown/pluginutils/README.md b/node_modules/@rolldown/pluginutils/README.md deleted file mode 100644 index 2a57c88..0000000 --- a/node_modules/@rolldown/pluginutils/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# @rolldown/pluginutils - -A utility library for building flexible, composable filter expressions that can be used in plugin hook filters of Rolldown/Vite/Rollup/Unplugin plugins. - -## Installation - -```sh -pnpm add @rolldown/pluginutils -``` - -## Usage - -### Simple Filters - -```ts -import { exactRegex, makeIdFiltersToMatchWithQuery, prefixRegex } from '@rolldown/pluginutils'; - -// Match exactly 'foo.js' -const filter = exactRegex('foo.js'); - -// Match any id starting with 'lib/' -const prefix = prefixRegex('lib/'); - -// Match ids with query params (e.g. 'foo.js?bar') -const idFilters = makeIdFiltersToMatchWithQuery(['**/*.js', /\.ts$/]); - -// Usage in a plugin to define a hook filter -const myPlugin = { - resolveId: { - filter: { - id: [exactRegex('MY_ID_TO_CHECK'), /some-other-regex/], - }, - handler(id) { - // Your code here - }, - }, -}; -``` - -### Composable Filters - -> [!WARNING] -> Composable filters are not yet supported in legacy Vite or unplugin. They can be used in Rolldown/Rolldown-Vite/Vite Beta plugins only. - -```ts -import { and, id, include, moduleType, query } from '@rolldown/pluginutils'; - -// Build a filter expression -const filterExpr = and(id(/\.ts$/), moduleType('ts'), query('foo', true)); - -// Usage in a plugin to define a hook filter -const myPlugin = { - transform: { - filter: [include(filterExpr)], - handler(code, id, options) { - // Your code here - }, - }, -}; -``` - -## API Reference - -### Simple Filters - -- `exactRegex(str: string, flags?: string): RegExp` — Matches the exact string. -- `prefixRegex(str: string, flags?: string): RegExp` — Matches values with the given prefix. -- `makeIdFiltersToMatchWithQuery(input: string | RegExp | (string | RegExp)[]): string | RegExp | (string | RegExp)[]` — Adapts filters to match ids with query params. - -### Composable Filters - -- `and(...exprs)` / `or(...exprs)` / `not(expr)` — Logical composition of filter expressions. -- `id(pattern, params?)` — Filter by id. A `string` pattern is matched by exact equality (not glob); a `RegExp` is tested against the id. -- `importerId(pattern, params?)` — Filter by importer id. A `string` pattern is matched by exact equality; a `RegExp` is tested against the importer id. Only usable with the `resolveId` hook. -- `moduleType(type)` — Filter by module type (e.g. 'js', 'tsx', or 'json'). -- `code(pattern)` — Filter by code content. -- `query(key, pattern)` — Filter by query parameter. -- `include(expr)` / `exclude(expr)` — Top-level include/exclude wrappers. -- `queries(obj)` — Compose multiple query filters. - -### Utilities - -- `filterVitePlugins(plugins)` — Filters out Vite plugins with `apply: 'serve'`. diff --git a/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts b/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts deleted file mode 100644 index 9e622a1..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -type StringOrRegExp = string | RegExp; -type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {}); -export type FilterExpressionKind = FilterExpression['kind']; -export type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType | Code | Query; -export type TopLevelFilterExpression = Include | Exclude; -declare class And { - kind: 'and'; - args: FilterExpression[]; - constructor(...args: FilterExpression[]); -} -declare class Or { - kind: 'or'; - args: FilterExpression[]; - constructor(...args: FilterExpression[]); -} -declare class Not { - kind: 'not'; - expr: FilterExpression; - constructor(expr: FilterExpression); -} -export interface QueryFilterObject { - [key: string]: StringOrRegExp | boolean; -} -interface IdParams { - cleanUrl?: boolean; -} -declare class Id { - kind: 'id'; - pattern: StringOrRegExp; - params: IdParams; - constructor(pattern: StringOrRegExp, params?: IdParams); -} -declare class ImporterId { - kind: 'importerId'; - pattern: StringOrRegExp; - params: IdParams; - constructor(pattern: StringOrRegExp, params?: IdParams); -} -declare class ModuleType { - kind: 'moduleType'; - pattern: PluginModuleType; - constructor(pattern: PluginModuleType); -} -declare class Code { - kind: 'code'; - pattern: StringOrRegExp; - constructor(expr: StringOrRegExp); -} -declare class Query { - kind: 'query'; - key: string; - pattern: StringOrRegExp | boolean; - constructor(key: string, pattern: StringOrRegExp | boolean); -} -declare class Include { - kind: 'include'; - expr: FilterExpression; - constructor(expr: FilterExpression); -} -declare class Exclude { - kind: 'exclude'; - expr: FilterExpression; - constructor(expr: FilterExpression); -} -export declare function and(...args: FilterExpression[]): And; -export declare function or(...args: FilterExpression[]): Or; -export declare function not(expr: FilterExpression): Not; -export declare function id(pattern: StringOrRegExp, params?: IdParams): Id; -export declare function importerId(pattern: StringOrRegExp, params?: IdParams): ImporterId; -export declare function moduleType(pattern: PluginModuleType): ModuleType; -export declare function code(pattern: StringOrRegExp): Code; -export declare function query(key: string, pattern: StringOrRegExp | boolean): Query; -export declare function include(expr: FilterExpression): Include; -export declare function exclude(expr: FilterExpression): Exclude; -/** - * convert a queryObject to FilterExpression like - * ```js - * and(query(k1, v1), query(k2, v2)) - * ``` - * @param queryFilterObject The query filter object needs to be matched. - * @returns a `And` FilterExpression - */ -export declare function queries(queryFilter: QueryFilterObject): And; -export declare function interpreter(exprs: TopLevelFilterExpression | TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string): boolean; -interface InterpreterCtx { - urlSearchParamsCache?: URLSearchParams; -} -export declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean; -export declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean; -export {}; diff --git a/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js b/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js deleted file mode 100644 index 1863562..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +++ /dev/null @@ -1,256 +0,0 @@ -import { cleanUrl, extractQueryWithoutFragment } from "../utils.js"; -class And { - kind; - args; - constructor(...args) { - if (args.length === 0) { - throw new Error('`And` expects at least one operand'); - } - this.args = args; - this.kind = 'and'; - } -} -class Or { - kind; - args; - constructor(...args) { - if (args.length === 0) { - throw new Error('`Or` expects at least one operand'); - } - this.args = args; - this.kind = 'or'; - } -} -class Not { - kind; - expr; - constructor(expr) { - this.expr = expr; - this.kind = 'not'; - } -} -class Id { - kind; - pattern; - params; - constructor(pattern, params) { - this.pattern = pattern; - this.kind = 'id'; - this.params = params ?? { - cleanUrl: false, - }; - } -} -class ImporterId { - kind; - pattern; - params; - constructor(pattern, params) { - this.pattern = pattern; - this.kind = 'importerId'; - this.params = params ?? { - cleanUrl: false, - }; - } -} -class ModuleType { - kind; - pattern; - constructor(pattern) { - this.pattern = pattern; - this.kind = 'moduleType'; - } -} -class Code { - kind; - pattern; - constructor(expr) { - this.pattern = expr; - this.kind = 'code'; - } -} -class Query { - kind; - key; - pattern; - constructor(key, pattern) { - this.pattern = pattern; - this.key = key; - this.kind = 'query'; - } -} -class Include { - kind; - expr; - constructor(expr) { - this.expr = expr; - this.kind = 'include'; - } -} -class Exclude { - kind; - expr; - constructor(expr) { - this.expr = expr; - this.kind = 'exclude'; - } -} -export function and(...args) { - return new And(...args); -} -export function or(...args) { - return new Or(...args); -} -export function not(expr) { - return new Not(expr); -} -export function id(pattern, params) { - return new Id(pattern, params); -} -export function importerId(pattern, params) { - return new ImporterId(pattern, params); -} -export function moduleType(pattern) { - return new ModuleType(pattern); -} -export function code(pattern) { - return new Code(pattern); -} -/* - * There are three kinds of conditions are supported: - * 1. `boolean`: if the value is `true`, the key must exist and be truthy. if the value is `false`, the key must not exist or be falsy. - * 2. `string`: the key must exist and be equal to the value. - * 3. `RegExp`: the key must exist and match the value. - */ -export function query(key, pattern) { - return new Query(key, pattern); -} -export function include(expr) { - return new Include(expr); -} -export function exclude(expr) { - return new Exclude(expr); -} -/** - * convert a queryObject to FilterExpression like - * ```js - * and(query(k1, v1), query(k2, v2)) - * ``` - * @param queryFilterObject The query filter object needs to be matched. - * @returns a `And` FilterExpression - */ -export function queries(queryFilter) { - let arr = Object.entries(queryFilter).map(([key, value]) => { - return new Query(key, value); - }); - return and(...arr); -} -export function interpreter(exprs, code, id, moduleType, importerId) { - let arr = []; - if (Array.isArray(exprs)) { - arr = exprs; - } - else { - arr = [exprs]; - } - return interpreterImpl(arr, code, id, moduleType, importerId); -} -export function interpreterImpl(expr, code, id, moduleType, importerId, ctx = {}) { - let hasInclude = false; - for (const e of expr) { - switch (e.kind) { - case 'include': { - hasInclude = true; - if (exprInterpreter(e.expr, code, id, moduleType, importerId, ctx)) { - return true; - } - break; - } - case 'exclude': { - if (exprInterpreter(e.expr, code, id, moduleType, importerId, ctx)) { - return false; - } - break; - } - } - } - return !hasInclude; -} -export function exprInterpreter(expr, code, id, moduleType, importerId, ctx = {}) { - switch (expr.kind) { - case 'and': { - return expr.args.every((e) => exprInterpreter(e, code, id, moduleType, importerId, ctx)); - } - case 'or': { - return expr.args.some((e) => exprInterpreter(e, code, id, moduleType, importerId, ctx)); - } - case 'not': { - return !exprInterpreter(expr.expr, code, id, moduleType, importerId, ctx); - } - case 'id': { - if (id === undefined) { - throw new Error('`id` is required for `id` expression'); - } - let idToMatch = id; - if (expr.params.cleanUrl) { - idToMatch = cleanUrl(idToMatch); - } - return typeof expr.pattern === 'string' - ? idToMatch === expr.pattern - : expr.pattern.test(idToMatch); - } - case 'importerId': { - if (importerId === undefined) { - return false; // Entry files have no importer, so no match - } - let importerIdToMatch = importerId; - if (expr.params.cleanUrl) { - importerIdToMatch = cleanUrl(importerIdToMatch); - } - return typeof expr.pattern === 'string' - ? importerIdToMatch === expr.pattern - : expr.pattern.test(importerIdToMatch); - } - case 'moduleType': { - if (moduleType === undefined) { - throw new Error('`moduleType` is required for `moduleType` expression'); - } - return moduleType === expr.pattern; - } - case 'code': { - if (code === undefined) { - throw new Error('`code` is required for `code` expression'); - } - return typeof expr.pattern === 'string' - ? code.includes(expr.pattern) - : expr.pattern.test(code); - } - case 'query': { - if (id === undefined) { - throw new Error('`id` is required for `Query` expression'); - } - if (!ctx.urlSearchParamsCache) { - let queryString = extractQueryWithoutFragment(id); - ctx.urlSearchParamsCache = new URLSearchParams(queryString); - } - let urlParams = ctx.urlSearchParamsCache; - if (typeof expr.pattern === 'boolean') { - if (expr.pattern) { - return urlParams.has(expr.key); - } - else { - return !urlParams.has(expr.key); - } - } - else if (typeof expr.pattern === 'string') { - return urlParams.get(expr.key) === expr.pattern; - } - else { - return expr.pattern.test(urlParams.get(expr.key) ?? ''); - } - } - default: { - throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`); - } - } -} diff --git a/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts b/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts deleted file mode 100644 index 256d8fc..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Filters out Vite plugins that have `apply: 'serve'` set. - * - * Since Rolldown operates in build mode, plugins marked with `apply: 'serve'` - * are intended only for Vite's dev server and should be excluded from the build process. - * - * @param plugins - Array of plugins (can include nested arrays) - * @returns Filtered array with serve-only plugins removed - * - * @example - * ```ts - * import { defineConfig } from 'rolldown'; - * import { filterVitePlugins } from '@rolldown/pluginutils'; - * import viteReact from '@vitejs/plugin-react'; - * - * export default defineConfig({ - * plugins: filterVitePlugins([ - * viteReact(), - * { - * name: 'dev-only', - * apply: 'serve', // This will be filtered out - * // ... - * } - * ]) - * }); - * ``` - */ -export declare function filterVitePlugins(plugins: T | T[] | null | undefined | false): T[]; diff --git a/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js b/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js deleted file mode 100644 index dea79ca..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Filters out Vite plugins that have `apply: 'serve'` set. - * - * Since Rolldown operates in build mode, plugins marked with `apply: 'serve'` - * are intended only for Vite's dev server and should be excluded from the build process. - * - * @param plugins - Array of plugins (can include nested arrays) - * @returns Filtered array with serve-only plugins removed - * - * @example - * ```ts - * import { defineConfig } from 'rolldown'; - * import { filterVitePlugins } from '@rolldown/pluginutils'; - * import viteReact from '@vitejs/plugin-react'; - * - * export default defineConfig({ - * plugins: filterVitePlugins([ - * viteReact(), - * { - * name: 'dev-only', - * apply: 'serve', // This will be filtered out - * // ... - * } - * ]) - * }); - * ``` - */ -export function filterVitePlugins(plugins) { - if (!plugins) { - return []; - } - const pluginArray = Array.isArray(plugins) ? plugins : [plugins]; - const result = []; - for (const plugin of pluginArray) { - // Skip falsy values - if (!plugin) { - continue; - } - // Handle nested arrays recursively - if (Array.isArray(plugin)) { - result.push(...filterVitePlugins(plugin)); - continue; - } - // Check if plugin has apply property - const pluginWithApply = plugin; - if ('apply' in pluginWithApply) { - const applyValue = pluginWithApply.apply; - // If apply is a function, call it with build mode - if (typeof applyValue === 'function') { - try { - const shouldApply = applyValue({}, // config object - { command: 'build', mode: 'production' }); - if (shouldApply) { - result.push(plugin); - } - } - catch { - // If function throws, include the plugin to be safe - result.push(plugin); - } - } // If apply is 'serve', skip this plugin - else if (applyValue === 'serve') { - continue; - } // If apply is 'build' or anything else, include it - else { - result.push(plugin); - } - } - else { - // No apply property, include the plugin - result.push(plugin); - } - } - return result; -} diff --git a/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts b/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts deleted file mode 100644 index a7a1ea2..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './composable-filters.ts'; -export * from './filter-vite-plugins.ts'; -export * from './simple-filters.ts'; diff --git a/node_modules/@rolldown/pluginutils/dist/filter/index.js b/node_modules/@rolldown/pluginutils/dist/filter/index.js deleted file mode 100644 index 6f5bb4f..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from "./composable-filters.js"; -export * from "./filter-vite-plugins.js"; -export * from "./simple-filters.js"; diff --git a/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts b/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts deleted file mode 100644 index 1f03361..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Constructs a RegExp that matches the exact string specified. - * - * This is useful for plugin hook filters. - * - * @param str the string to match. - * @param flags flags for the RegExp. - * - * @example - * ```ts - * import { exactRegex } from '@rolldown/pluginutils'; - * const plugin = { - * name: 'plugin', - * resolveId: { - * filter: { id: exactRegex('foo') }, - * handler(id) {} // will only be called for `foo` - * } - * } - * ``` - */ -export declare function exactRegex(str: string, flags?: string): RegExp; -/** - * Constructs a RegExp that matches a value that has the specified prefix. - * - * This is useful for plugin hook filters. - * - * @param str the string to match. - * @param flags flags for the RegExp. - * - * @example - * ```ts - * import { prefixRegex } from '@rolldown/pluginutils'; - * const plugin = { - * name: 'plugin', - * resolveId: { - * filter: { id: prefixRegex('foo') }, - * handler(id) {} // will only be called for IDs starting with `foo` - * } - * } - * ``` - */ -export declare function prefixRegex(str: string, flags?: string): RegExp; -type WidenString = T extends string ? string : T; -/** - * Converts a id filter to match with an id with a query. - * - * @param input the id filters to convert. - * - * @example - * ```ts - * import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils'; - * const plugin = { - * name: 'plugin', - * transform: { - * filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) }, - * // The handler will be called for IDs like: - * // - foo.js - * // - foo.js?foo - * // - foo.txt?foo.js - * // - foo.ts - * // - foo.ts?foo - * // - foo.txt?foo.ts - * handler(code, id) {} - * } - * } - * ``` - */ -export declare function makeIdFiltersToMatchWithQuery(input: T): WidenString; -export declare function makeIdFiltersToMatchWithQuery(input: readonly T[]): WidenString[]; -export declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[]; -export {}; diff --git a/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js b/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js deleted file mode 100644 index 241380c..0000000 --- a/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Constructs a RegExp that matches the exact string specified. - * - * This is useful for plugin hook filters. - * - * @param str the string to match. - * @param flags flags for the RegExp. - * - * @example - * ```ts - * import { exactRegex } from '@rolldown/pluginutils'; - * const plugin = { - * name: 'plugin', - * resolveId: { - * filter: { id: exactRegex('foo') }, - * handler(id) {} // will only be called for `foo` - * } - * } - * ``` - */ -export function exactRegex(str, flags) { - return new RegExp(`^${escapeRegex(str)}$`, flags); -} -/** - * Constructs a RegExp that matches a value that has the specified prefix. - * - * This is useful for plugin hook filters. - * - * @param str the string to match. - * @param flags flags for the RegExp. - * - * @example - * ```ts - * import { prefixRegex } from '@rolldown/pluginutils'; - * const plugin = { - * name: 'plugin', - * resolveId: { - * filter: { id: prefixRegex('foo') }, - * handler(id) {} // will only be called for IDs starting with `foo` - * } - * } - * ``` - */ -export function prefixRegex(str, flags) { - return new RegExp(`^${escapeRegex(str)}`, flags); -} -const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g; -function escapeRegex(str) { - return str.replace(escapeRegexRE, '\\$&'); -} -export function makeIdFiltersToMatchWithQuery(input) { - if (!Array.isArray(input)) { - return makeIdFilterToMatchWithQuery( - // Array.isArray cannot narrow the type - // https://github.com/microsoft/TypeScript/issues/17002 - input); - } - return input.map((i) => makeIdFilterToMatchWithQuery(i)); -} -function makeIdFilterToMatchWithQuery(input) { - if (typeof input === 'string') { - return `${input}{?*,}`; - } - return makeRegexIdFilterToMatchWithQuery(input); -} -function makeRegexIdFilterToMatchWithQuery(input) { - return new RegExp( - // replace `$` with `(?:\?.*)?$` (ignore `\$`) - input.source.replace(/(? `npm install --save @types/esrecurse` - -# Summary -This package contains type definitions for esrecurse (https://github.com/estools/esrecurse). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/esrecurse. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/esrecurse/index.d.ts) -````ts -/** - * Options for the Visitor constructor and visit function. - */ -interface VisitorOptions { - /** - * Fallback strategy for unknown node types. - * @default 'iteration' - */ - fallback?: "iteration" | ((node: any) => string[]); - - /** - * Custom keys for child nodes by node type. - * @default {} - */ - childVisitorKeys?: Record; -} - -/** - * A visitor class for recursively traversing ECMAScript AST. - */ -declare class Visitor { - /** - * Creates a new Visitor instance. - * @param options Configuration options for the visitor. - */ - constructor(visitor?: Visitor | null, options?: VisitorOptions | null); - - /** - * Visits a node, invoking the appropriate handler. - * @param node The AST node to visit. - */ - visit(node: any): void; - - /** - * Visits the children of a node based on childVisitorKeys. - * @param node The AST node whose children to visit. - */ - visitChildren(node: any): void; -} - -/** - * Visits an AST node with the specified visitor. - * @param ast The AST node to traverse. - * @param visitor A visitor instance or visitor object. - * @param options Configuration options for the traversal. - */ -declare function visit( - ast: any, - visitor?: Visitor | Record void> | null, - options?: VisitorOptions, -): void; - -export { visit, Visitor, type VisitorOptions }; - -```` - -### Additional Details - * Last updated: Sat, 19 Jul 2025 03:47:05 GMT - * Dependencies: none - -# Credits -These definitions were written by [Jimmy Leung](https://github.com/hkleungai). diff --git a/node_modules/@types/esrecurse/index.d.ts b/node_modules/@types/esrecurse/index.d.ts deleted file mode 100644 index 3f23605..0000000 --- a/node_modules/@types/esrecurse/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Options for the Visitor constructor and visit function. - */ -interface VisitorOptions { - /** - * Fallback strategy for unknown node types. - * @default 'iteration' - */ - fallback?: "iteration" | ((node: any) => string[]); - - /** - * Custom keys for child nodes by node type. - * @default {} - */ - childVisitorKeys?: Record; -} - -/** - * A visitor class for recursively traversing ECMAScript AST. - */ -declare class Visitor { - /** - * Creates a new Visitor instance. - * @param options Configuration options for the visitor. - */ - constructor(visitor?: Visitor | null, options?: VisitorOptions | null); - - /** - * Visits a node, invoking the appropriate handler. - * @param node The AST node to visit. - */ - visit(node: any): void; - - /** - * Visits the children of a node based on childVisitorKeys. - * @param node The AST node whose children to visit. - */ - visitChildren(node: any): void; -} - -/** - * Visits an AST node with the specified visitor. - * @param ast The AST node to traverse. - * @param visitor A visitor instance or visitor object. - * @param options Configuration options for the traversal. - */ -declare function visit( - ast: any, - visitor?: Visitor | Record void> | null, - options?: VisitorOptions, -): void; - -export { visit, Visitor, type VisitorOptions }; diff --git a/node_modules/@types/esrecurse/package.json b/node_modules/@types/esrecurse/package.json deleted file mode 100644 index 0e5bc85..0000000 --- a/node_modules/@types/esrecurse/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@types/esrecurse", - "version": "4.3.1", - "description": "TypeScript definitions for esrecurse", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/esrecurse", - "license": "MIT", - "contributors": [ - { - "name": "Jimmy Leung", - "githubUsername": "hkleungai", - "url": "https://github.com/hkleungai" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/esrecurse" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "0e4ed7e0fe84b6879532ce29fdfe397c1fc205d0c9dbc17172b64f3016ae0065", - "typeScriptVersion": "5.1" -} \ No newline at end of file diff --git a/node_modules/@types/estree/LICENSE b/node_modules/@types/estree/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/estree/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md deleted file mode 100644 index 3a8c041..0000000 --- a/node_modules/@types/estree/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/estree` - -# Summary -This package contains type definitions for estree (https://github.com/estree/estree). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. - -### Additional Details - * Last updated: Fri, 06 Jun 2025 00:04:33 GMT - * Dependencies: none - -# Credits -These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/node_modules/@types/estree/flow.d.ts b/node_modules/@types/estree/flow.d.ts deleted file mode 100644 index 9d001a9..0000000 --- a/node_modules/@types/estree/flow.d.ts +++ /dev/null @@ -1,167 +0,0 @@ -declare namespace ESTree { - interface FlowTypeAnnotation extends Node {} - - interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} - - interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} - - interface FlowDeclaration extends Declaration {} - - interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ArrayTypeAnnotation extends FlowTypeAnnotation { - elementType: FlowTypeAnnotation; - } - - interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface ClassImplements extends Node { - id: Identifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface ClassProperty { - key: Expression; - value?: Expression | null; - typeAnnotation?: TypeAnnotation | null; - computed: boolean; - static: boolean; - } - - interface DeclareClass extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - body: ObjectTypeAnnotation; - extends: InterfaceExtends[]; - } - - interface DeclareFunction extends FlowDeclaration { - id: Identifier; - } - - interface DeclareModule extends FlowDeclaration { - id: Literal | Identifier; - body: BlockStatement; - } - - interface DeclareVariable extends FlowDeclaration { - id: Identifier; - } - - interface FunctionTypeAnnotation extends FlowTypeAnnotation { - params: FunctionTypeParam[]; - returnType: FlowTypeAnnotation; - rest?: FunctionTypeParam | null; - typeParameters?: TypeParameterDeclaration | null; - } - - interface FunctionTypeParam { - name: Identifier; - typeAnnotation: FlowTypeAnnotation; - optional: boolean; - } - - interface GenericTypeAnnotation extends FlowTypeAnnotation { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceExtends extends Node { - id: Identifier | QualifiedTypeIdentifier; - typeParameters?: TypeParameterInstantiation | null; - } - - interface InterfaceDeclaration extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; - } - - interface IntersectionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface NullableTypeAnnotation extends FlowTypeAnnotation { - typeAnnotation: TypeAnnotation; - } - - interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} - - interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} - - interface TupleTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface TypeofTypeAnnotation extends FlowTypeAnnotation { - argument: FlowTypeAnnotation; - } - - interface TypeAlias extends FlowDeclaration { - id: Identifier; - typeParameters?: TypeParameterDeclaration | null; - right: FlowTypeAnnotation; - } - - interface TypeAnnotation extends Node { - typeAnnotation: FlowTypeAnnotation; - } - - interface TypeCastExpression extends Expression { - expression: Expression; - typeAnnotation: TypeAnnotation; - } - - interface TypeParameterDeclaration extends Node { - params: Identifier[]; - } - - interface TypeParameterInstantiation extends Node { - params: FlowTypeAnnotation[]; - } - - interface ObjectTypeAnnotation extends FlowTypeAnnotation { - properties: ObjectTypeProperty[]; - indexers: ObjectTypeIndexer[]; - callProperties: ObjectTypeCallProperty[]; - } - - interface ObjectTypeCallProperty extends Node { - value: FunctionTypeAnnotation; - static: boolean; - } - - interface ObjectTypeIndexer extends Node { - id: Identifier; - key: FlowTypeAnnotation; - value: FlowTypeAnnotation; - static: boolean; - } - - interface ObjectTypeProperty extends Node { - key: Expression; - value: FlowTypeAnnotation; - optional: boolean; - static: boolean; - } - - interface QualifiedTypeIdentifier extends Node { - qualification: Identifier | QualifiedTypeIdentifier; - id: Identifier; - } - - interface UnionTypeAnnotation extends FlowTypeAnnotation { - types: FlowTypeAnnotation[]; - } - - interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} -} diff --git a/node_modules/@types/estree/index.d.ts b/node_modules/@types/estree/index.d.ts deleted file mode 100644 index 2bc66fb..0000000 --- a/node_modules/@types/estree/index.d.ts +++ /dev/null @@ -1,694 +0,0 @@ -// This definition file follows a somewhat unusual format. ESTree allows -// runtime type checks based on the `type` parameter. In order to explain this -// to typescript we want to use discriminated union types: -// https://github.com/Microsoft/TypeScript/pull/9163 -// -// For ESTree this is a bit tricky because the high level interfaces like -// Node or Function are pulling double duty. We want to pass common fields down -// to the interfaces that extend them (like Identifier or -// ArrowFunctionExpression), but you can't extend a type union or enforce -// common fields on them. So we've split the high level interfaces into two -// types, a base type which passes down inherited fields, and a type union of -// all types which extend the base type. Only the type union is exported, and -// the union is how other types refer to the collection of inheriting types. -// -// This makes the definitions file here somewhat more difficult to maintain, -// but it has the notable advantage of making ESTree much easier to use as -// an end user. - -export interface BaseNodeWithoutComments { - // Every leaf interface that extends BaseNode must specify a type property. - // The type property should be a string literal. For example, Identifier - // has: `type: "Identifier"` - type: string; - loc?: SourceLocation | null | undefined; - range?: [number, number] | undefined; -} - -export interface BaseNode extends BaseNodeWithoutComments { - leadingComments?: Comment[] | undefined; - trailingComments?: Comment[] | undefined; -} - -export interface NodeMap { - AssignmentProperty: AssignmentProperty; - CatchClause: CatchClause; - Class: Class; - ClassBody: ClassBody; - Expression: Expression; - Function: Function; - Identifier: Identifier; - Literal: Literal; - MethodDefinition: MethodDefinition; - ModuleDeclaration: ModuleDeclaration; - ModuleSpecifier: ModuleSpecifier; - Pattern: Pattern; - PrivateIdentifier: PrivateIdentifier; - Program: Program; - Property: Property; - PropertyDefinition: PropertyDefinition; - SpreadElement: SpreadElement; - Statement: Statement; - Super: Super; - SwitchCase: SwitchCase; - TemplateElement: TemplateElement; - VariableDeclarator: VariableDeclarator; -} - -export type Node = NodeMap[keyof NodeMap]; - -export interface Comment extends BaseNodeWithoutComments { - type: "Line" | "Block"; - value: string; -} - -export interface SourceLocation { - source?: string | null | undefined; - start: Position; - end: Position; -} - -export interface Position { - /** >= 1 */ - line: number; - /** >= 0 */ - column: number; -} - -export interface Program extends BaseNode { - type: "Program"; - sourceType: "script" | "module"; - body: Array; - comments?: Comment[] | undefined; -} - -export interface Directive extends BaseNode { - type: "ExpressionStatement"; - expression: Literal; - directive: string; -} - -export interface BaseFunction extends BaseNode { - params: Pattern[]; - generator?: boolean | undefined; - async?: boolean | undefined; - // The body is either BlockStatement or Expression because arrow functions - // can have a body that's either. FunctionDeclarations and - // FunctionExpressions have only BlockStatement bodies. - body: BlockStatement | Expression; -} - -export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; - -export type Statement = - | ExpressionStatement - | BlockStatement - | StaticBlock - | EmptyStatement - | DebuggerStatement - | WithStatement - | ReturnStatement - | LabeledStatement - | BreakStatement - | ContinueStatement - | IfStatement - | SwitchStatement - | ThrowStatement - | TryStatement - | WhileStatement - | DoWhileStatement - | ForStatement - | ForInStatement - | ForOfStatement - | Declaration; - -export interface BaseStatement extends BaseNode {} - -export interface EmptyStatement extends BaseStatement { - type: "EmptyStatement"; -} - -export interface BlockStatement extends BaseStatement { - type: "BlockStatement"; - body: Statement[]; - innerComments?: Comment[] | undefined; -} - -export interface StaticBlock extends Omit { - type: "StaticBlock"; -} - -export interface ExpressionStatement extends BaseStatement { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface IfStatement extends BaseStatement { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate?: Statement | null | undefined; -} - -export interface LabeledStatement extends BaseStatement { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface BreakStatement extends BaseStatement { - type: "BreakStatement"; - label?: Identifier | null | undefined; -} - -export interface ContinueStatement extends BaseStatement { - type: "ContinueStatement"; - label?: Identifier | null | undefined; -} - -export interface WithStatement extends BaseStatement { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface SwitchStatement extends BaseStatement { - type: "SwitchStatement"; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface ReturnStatement extends BaseStatement { - type: "ReturnStatement"; - argument?: Expression | null | undefined; -} - -export interface ThrowStatement extends BaseStatement { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseStatement { - type: "TryStatement"; - block: BlockStatement; - handler?: CatchClause | null | undefined; - finalizer?: BlockStatement | null | undefined; -} - -export interface WhileStatement extends BaseStatement { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface DoWhileStatement extends BaseStatement { - type: "DoWhileStatement"; - body: Statement; - test: Expression; -} - -export interface ForStatement extends BaseStatement { - type: "ForStatement"; - init?: VariableDeclaration | Expression | null | undefined; - test?: Expression | null | undefined; - update?: Expression | null | undefined; - body: Statement; -} - -export interface BaseForXStatement extends BaseStatement { - left: VariableDeclaration | Pattern; - right: Expression; - body: Statement; -} - -export interface ForInStatement extends BaseForXStatement { - type: "ForInStatement"; -} - -export interface DebuggerStatement extends BaseStatement { - type: "DebuggerStatement"; -} - -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; - -export interface BaseDeclaration extends BaseStatement {} - -export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { - type: "FunctionDeclaration"; - /** It is null when a function declaration is a part of the `export default function` statement */ - id: Identifier | null; - body: BlockStatement; -} - -export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { - id: Identifier; -} - -export interface VariableDeclaration extends BaseDeclaration { - type: "VariableDeclaration"; - declarations: VariableDeclarator[]; - kind: "var" | "let" | "const" | "using" | "await using"; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: Pattern; - init?: Expression | null | undefined; -} - -export interface ExpressionMap { - ArrayExpression: ArrayExpression; - ArrowFunctionExpression: ArrowFunctionExpression; - AssignmentExpression: AssignmentExpression; - AwaitExpression: AwaitExpression; - BinaryExpression: BinaryExpression; - CallExpression: CallExpression; - ChainExpression: ChainExpression; - ClassExpression: ClassExpression; - ConditionalExpression: ConditionalExpression; - FunctionExpression: FunctionExpression; - Identifier: Identifier; - ImportExpression: ImportExpression; - Literal: Literal; - LogicalExpression: LogicalExpression; - MemberExpression: MemberExpression; - MetaProperty: MetaProperty; - NewExpression: NewExpression; - ObjectExpression: ObjectExpression; - SequenceExpression: SequenceExpression; - TaggedTemplateExpression: TaggedTemplateExpression; - TemplateLiteral: TemplateLiteral; - ThisExpression: ThisExpression; - UnaryExpression: UnaryExpression; - UpdateExpression: UpdateExpression; - YieldExpression: YieldExpression; -} - -export type Expression = ExpressionMap[keyof ExpressionMap]; - -export interface BaseExpression extends BaseNode {} - -export type ChainElement = SimpleCallExpression | MemberExpression; - -export interface ChainExpression extends BaseExpression { - type: "ChainExpression"; - expression: ChainElement; -} - -export interface ThisExpression extends BaseExpression { - type: "ThisExpression"; -} - -export interface ArrayExpression extends BaseExpression { - type: "ArrayExpression"; - elements: Array; -} - -export interface ObjectExpression extends BaseExpression { - type: "ObjectExpression"; - properties: Array; -} - -export interface PrivateIdentifier extends BaseNode { - type: "PrivateIdentifier"; - name: string; -} - -export interface Property extends BaseNode { - type: "Property"; - key: Expression | PrivateIdentifier; - value: Expression | Pattern; // Could be an AssignmentProperty - kind: "init" | "get" | "set"; - method: boolean; - shorthand: boolean; - computed: boolean; -} - -export interface PropertyDefinition extends BaseNode { - type: "PropertyDefinition"; - key: Expression | PrivateIdentifier; - value?: Expression | null | undefined; - computed: boolean; - static: boolean; -} - -export interface FunctionExpression extends BaseFunction, BaseExpression { - id?: Identifier | null | undefined; - type: "FunctionExpression"; - body: BlockStatement; -} - -export interface SequenceExpression extends BaseExpression { - type: "SequenceExpression"; - expressions: Expression[]; -} - -export interface UnaryExpression extends BaseExpression { - type: "UnaryExpression"; - operator: UnaryOperator; - prefix: true; - argument: Expression; -} - -export interface BinaryExpression extends BaseExpression { - type: "BinaryExpression"; - operator: BinaryOperator; - left: Expression | PrivateIdentifier; - right: Expression; -} - -export interface AssignmentExpression extends BaseExpression { - type: "AssignmentExpression"; - operator: AssignmentOperator; - left: Pattern | MemberExpression; - right: Expression; -} - -export interface UpdateExpression extends BaseExpression { - type: "UpdateExpression"; - operator: UpdateOperator; - argument: Expression; - prefix: boolean; -} - -export interface LogicalExpression extends BaseExpression { - type: "LogicalExpression"; - operator: LogicalOperator; - left: Expression; - right: Expression; -} - -export interface ConditionalExpression extends BaseExpression { - type: "ConditionalExpression"; - test: Expression; - alternate: Expression; - consequent: Expression; -} - -export interface BaseCallExpression extends BaseExpression { - callee: Expression | Super; - arguments: Array; -} -export type CallExpression = SimpleCallExpression | NewExpression; - -export interface SimpleCallExpression extends BaseCallExpression { - type: "CallExpression"; - optional: boolean; -} - -export interface NewExpression extends BaseCallExpression { - type: "NewExpression"; -} - -export interface MemberExpression extends BaseExpression, BasePattern { - type: "MemberExpression"; - object: Expression | Super; - property: Expression | PrivateIdentifier; - computed: boolean; - optional: boolean; -} - -export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; - -export interface BasePattern extends BaseNode {} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test?: Expression | null | undefined; - consequent: Statement[]; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Pattern | null; - body: BlockStatement; -} - -export interface Identifier extends BaseNode, BaseExpression, BasePattern { - type: "Identifier"; - name: string; -} - -export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; - -export interface SimpleLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value: string | boolean | number | null; - raw?: string | undefined; -} - -export interface RegExpLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: RegExp | null | undefined; - regex: { - pattern: string; - flags: string; - }; - raw?: string | undefined; -} - -export interface BigIntLiteral extends BaseNode, BaseExpression { - type: "Literal"; - value?: bigint | null | undefined; - bigint: string; - raw?: string | undefined; -} - -export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - -export type BinaryOperator = - | "==" - | "!=" - | "===" - | "!==" - | "<" - | "<=" - | ">" - | ">=" - | "<<" - | ">>" - | ">>>" - | "+" - | "-" - | "*" - | "/" - | "%" - | "**" - | "|" - | "^" - | "&" - | "in" - | "instanceof"; - -export type LogicalOperator = "||" | "&&" | "??"; - -export type AssignmentOperator = - | "=" - | "+=" - | "-=" - | "*=" - | "/=" - | "%=" - | "**=" - | "<<=" - | ">>=" - | ">>>=" - | "|=" - | "^=" - | "&=" - | "||=" - | "&&=" - | "??="; - -export type UpdateOperator = "++" | "--"; - -export interface ForOfStatement extends BaseForXStatement { - type: "ForOfStatement"; - await: boolean; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { - type: "ArrowFunctionExpression"; - expression: boolean; - body: BlockStatement | Expression; -} - -export interface YieldExpression extends BaseExpression { - type: "YieldExpression"; - argument?: Expression | null | undefined; - delegate: boolean; -} - -export interface TemplateLiteral extends BaseExpression { - type: "TemplateLiteral"; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface TaggedTemplateExpression extends BaseExpression { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - tail: boolean; - value: { - /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ - cooked?: string | null | undefined; - raw: string; - }; -} - -export interface AssignmentProperty extends Property { - value: Pattern; - kind: "init"; - method: boolean; // false -} - -export interface ObjectPattern extends BasePattern { - type: "ObjectPattern"; - properties: Array; -} - -export interface ArrayPattern extends BasePattern { - type: "ArrayPattern"; - elements: Array; -} - -export interface RestElement extends BasePattern { - type: "RestElement"; - argument: Pattern; -} - -export interface AssignmentPattern extends BasePattern { - type: "AssignmentPattern"; - left: Pattern; - right: Expression; -} - -export type Class = ClassDeclaration | ClassExpression; -export interface BaseClass extends BaseNode { - superClass?: Expression | null | undefined; - body: ClassBody; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface MethodDefinition extends BaseNode { - type: "MethodDefinition"; - key: Expression | PrivateIdentifier; - value: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; -} - -export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { - type: "ClassDeclaration"; - /** It is null when a class declaration is a part of the `export default class` statement */ - id: Identifier | null; -} - -export interface ClassDeclaration extends MaybeNamedClassDeclaration { - id: Identifier; -} - -export interface ClassExpression extends BaseClass, BaseExpression { - type: "ClassExpression"; - id?: Identifier | null | undefined; -} - -export interface MetaProperty extends BaseExpression { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export type ModuleDeclaration = - | ImportDeclaration - | ExportNamedDeclaration - | ExportDefaultDeclaration - | ExportAllDeclaration; -export interface BaseModuleDeclaration extends BaseNode {} - -export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; -export interface BaseModuleSpecifier extends BaseNode { - local: Identifier; -} - -export interface ImportDeclaration extends BaseModuleDeclaration { - type: "ImportDeclaration"; - specifiers: Array; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface ImportSpecifier extends BaseModuleSpecifier { - type: "ImportSpecifier"; - imported: Identifier | Literal; -} - -export interface ImportAttribute extends BaseNode { - type: "ImportAttribute"; - key: Identifier | Literal; - value: Literal; -} - -export interface ImportExpression extends BaseExpression { - type: "ImportExpression"; - source: Expression; - options?: Expression | null | undefined; -} - -export interface ImportDefaultSpecifier extends BaseModuleSpecifier { - type: "ImportDefaultSpecifier"; -} - -export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { - type: "ImportNamespaceSpecifier"; -} - -export interface ExportNamedDeclaration extends BaseModuleDeclaration { - type: "ExportNamedDeclaration"; - declaration?: Declaration | null | undefined; - specifiers: ExportSpecifier[]; - attributes: ImportAttribute[]; - source?: Literal | null | undefined; -} - -export interface ExportSpecifier extends Omit { - type: "ExportSpecifier"; - local: Identifier | Literal; - exported: Identifier | Literal; -} - -export interface ExportDefaultDeclaration extends BaseModuleDeclaration { - type: "ExportDefaultDeclaration"; - declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; -} - -export interface ExportAllDeclaration extends BaseModuleDeclaration { - type: "ExportAllDeclaration"; - exported: Identifier | Literal | null; - attributes: ImportAttribute[]; - source: Literal; -} - -export interface AwaitExpression extends BaseExpression { - type: "AwaitExpression"; - argument: Expression; -} diff --git a/node_modules/@types/estree/package.json b/node_modules/@types/estree/package.json deleted file mode 100644 index 68c0782..0000000 --- a/node_modules/@types/estree/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@types/estree", - "version": "1.0.8", - "description": "TypeScript definitions for estree", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", - "license": "MIT", - "contributors": [ - { - "name": "RReverser", - "githubUsername": "RReverser", - "url": "https://github.com/RReverser" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/estree" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd", - "typeScriptVersion": "5.1", - "nonNpm": true -} \ No newline at end of file diff --git a/node_modules/@types/json-schema/LICENSE b/node_modules/@types/json-schema/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/json-schema/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/json-schema/README.md b/node_modules/@types/json-schema/README.md deleted file mode 100644 index 42d55d3..0000000 --- a/node_modules/@types/json-schema/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/json-schema` - -# Summary -This package contains type definitions for json-schema (https://github.com/kriszyp/json-schema). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 03:09:37 GMT - * Dependencies: none - -# Credits -These definitions were written by [Boris Cherny](https://github.com/bcherny), [Lucian Buzzo](https://github.com/lucianbuzzo), [Roland Groza](https://github.com/rolandjitsu), and [Jason Kwok](https://github.com/JasonHK). diff --git a/node_modules/@types/json-schema/index.d.ts b/node_modules/@types/json-schema/index.d.ts deleted file mode 100644 index 9381e99..0000000 --- a/node_modules/@types/json-schema/index.d.ts +++ /dev/null @@ -1,749 +0,0 @@ -// ================================================================================================== -// JSON Schema Draft 04 -// ================================================================================================== - -/** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1 - */ -export type JSONSchema4TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null" - | "any"; - -/** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5 - */ -export type JSONSchema4Type = - | string // - | number - | boolean - | JSONSchema4Object - | JSONSchema4Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema4Object { - [key: string]: JSONSchema4Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema4Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-04/schema#' - * - 'http://json-schema.org/draft-04/hyper-schema#' - * - 'http://json-schema.org/draft-03/schema#' - * - 'http://json-schema.org/draft-03/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema4Version = string; - -/** - * JSON Schema V4 - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04 - */ -export interface JSONSchema4 { - id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema4Version | undefined; - - /** - * This attribute is a string that provides a short description of the - * instance property. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21 - */ - title?: string | undefined; - - /** - * This attribute is a string that provides a full description of the of - * purpose the instance property. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22 - */ - description?: string | undefined; - - default?: JSONSchema4Type | undefined; - multipleOf?: number | undefined; - maximum?: number | undefined; - exclusiveMaximum?: boolean | undefined; - minimum?: number | undefined; - exclusiveMinimum?: boolean | undefined; - maxLength?: number | undefined; - minLength?: number | undefined; - pattern?: string | undefined; - - /** - * May only be defined when "items" is defined, and is a tuple of JSONSchemas. - * - * This provides a definition for additional items in an array instance - * when tuple definitions of the items is provided. This can be false - * to indicate additional items in the array are not allowed, or it can - * be a schema that defines the schema of the additional items. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6 - */ - additionalItems?: boolean | JSONSchema4 | undefined; - - /** - * This attribute defines the allowed items in an instance array, and - * MUST be a schema or an array of schemas. The default value is an - * empty schema which allows any value for items in the instance array. - * - * When this attribute value is a schema and the instance value is an - * array, then all the items in the array MUST be valid according to the - * schema. - * - * When this attribute value is an array of schemas and the instance - * value is an array, each position in the instance array MUST conform - * to the schema in the corresponding position for this array. This - * called tuple typing. When tuple typing is used, additional items are - * allowed, disallowed, or constrained by the "additionalItems" - * (Section 5.6) attribute using the same rules as - * "additionalProperties" (Section 5.4) for objects. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5 - */ - items?: JSONSchema4 | JSONSchema4[] | undefined; - - maxItems?: number | undefined; - minItems?: number | undefined; - uniqueItems?: boolean | undefined; - maxProperties?: number | undefined; - minProperties?: number | undefined; - - /** - * This attribute indicates if the instance must have a value, and not - * be undefined. This is false by default, making the instance - * optional. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7 - */ - required?: boolean | string[] | undefined; - - /** - * This attribute defines a schema for all properties that are not - * explicitly defined in an object type definition. If specified, the - * value MUST be a schema or a boolean. If false is provided, no - * additional properties are allowed beyond the properties defined in - * the schema. The default value is an empty schema which allows any - * value for additional properties. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4 - */ - additionalProperties?: boolean | JSONSchema4 | undefined; - - definitions?: { - [k: string]: JSONSchema4; - } | undefined; - - /** - * This attribute is an object with property definitions that define the - * valid values of instance object property values. When the instance - * value is an object, the property values of the instance object MUST - * conform to the property definitions in this object. In this object, - * each property definition's value MUST be a schema, and the property's - * name MUST be the name of the instance property that it defines. The - * instance property value MUST be valid according to the schema from - * the property definition. Properties are considered unordered, the - * order of the instance properties MAY be in any order. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2 - */ - properties?: { - [k: string]: JSONSchema4; - } | undefined; - - /** - * This attribute is an object that defines the schema for a set of - * property names of an object instance. The name of each property of - * this attribute's object is a regular expression pattern in the ECMA - * 262/Perl 5 format, while the value is a schema. If the pattern - * matches the name of a property on the instance object, the value of - * the instance's property MUST be valid against the pattern name's - * schema value. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3 - */ - patternProperties?: { - [k: string]: JSONSchema4; - } | undefined; - dependencies?: { - [k: string]: JSONSchema4 | string[]; - } | undefined; - - /** - * This provides an enumeration of all possible values that are valid - * for the instance property. This MUST be an array, and each item in - * the array represents a possible value for the instance value. If - * this attribute is defined, the instance value MUST be one of the - * values in the array in order for the schema to be valid. - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19 - */ - enum?: JSONSchema4Type[] | undefined; - - /** - * A single type, or a union of simple types - */ - type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined; - - allOf?: JSONSchema4[] | undefined; - anyOf?: JSONSchema4[] | undefined; - oneOf?: JSONSchema4[] | undefined; - not?: JSONSchema4 | undefined; - - /** - * The value of this property MUST be another schema which will provide - * a base schema which the current schema will inherit from. The - * inheritance rules are such that any instance that is valid according - * to the current schema MUST be valid according to the referenced - * schema. This MAY also be an array, in which case, the instance MUST - * be valid for all the schemas in the array. A schema that extends - * another schema MAY define additional attributes, constrain existing - * attributes, or add other constraints. - * - * Conceptually, the behavior of extends can be seen as validating an - * instance against all constraints in the extending schema as well as - * the extended schema(s). - * - * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26 - */ - extends?: string | string[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6 - */ - [k: string]: any; - - format?: string | undefined; -} - -// ================================================================================================== -// JSON Schema Draft 06 -// ================================================================================================== - -export type JSONSchema6TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null" - | "any"; - -export type JSONSchema6Type = - | string // - | number - | boolean - | JSONSchema6Object - | JSONSchema6Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema6Object { - [key: string]: JSONSchema6Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema6Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-06/schema#' - * - 'http://json-schema.org/draft-06/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema6Version = string; - -/** - * JSON Schema V6 - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01 - */ -export type JSONSchema6Definition = JSONSchema6 | boolean; -export interface JSONSchema6 { - $id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema6Version | undefined; - - /** - * Must be strictly greater than 0. - * A numeric instance is valid only if division by this keyword's value results in an integer. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1 - */ - multipleOf?: number | undefined; - - /** - * Representing an inclusive upper limit for a numeric instance. - * This keyword validates only if the instance is less than or exactly equal to "maximum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2 - */ - maximum?: number | undefined; - - /** - * Representing an exclusive upper limit for a numeric instance. - * This keyword validates only if the instance is strictly less than (not equal to) to "exclusiveMaximum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3 - */ - exclusiveMaximum?: number | undefined; - - /** - * Representing an inclusive lower limit for a numeric instance. - * This keyword validates only if the instance is greater than or exactly equal to "minimum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4 - */ - minimum?: number | undefined; - - /** - * Representing an exclusive lower limit for a numeric instance. - * This keyword validates only if the instance is strictly greater than (not equal to) to "exclusiveMinimum". - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5 - */ - exclusiveMinimum?: number | undefined; - - /** - * Must be a non-negative integer. - * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6 - */ - maxLength?: number | undefined; - - /** - * Must be a non-negative integer. - * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7 - */ - minLength?: number | undefined; - - /** - * Should be a valid regular expression, according to the ECMA 262 regular expression dialect. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8 - */ - pattern?: string | undefined; - - /** - * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9 - */ - items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined; - - /** - * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself. - * If "items" is an array of schemas, validation succeeds if every instance element - * at a position greater than the size of "items" validates against "additionalItems". - * Otherwise, "additionalItems" MUST be ignored, as the "items" schema - * (possibly the default value of an empty schema) is applied to all elements. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10 - */ - additionalItems?: JSONSchema6Definition | undefined; - - /** - * Must be a non-negative integer. - * An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11 - */ - maxItems?: number | undefined; - - /** - * Must be a non-negative integer. - * An array instance is valid against "maxItems" if its size is greater than, or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12 - */ - minItems?: number | undefined; - - /** - * If this keyword has boolean value false, the instance validates successfully. - * If it has boolean value true, the instance validates successfully if all of its elements are unique. - * Omitting this keyword has the same behavior as a value of false. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13 - */ - uniqueItems?: boolean | undefined; - - /** - * An array instance is valid against "contains" if at least one of its elements is valid against the given schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14 - */ - contains?: JSONSchema6Definition | undefined; - - /** - * Must be a non-negative integer. - * An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15 - */ - maxProperties?: number | undefined; - - /** - * Must be a non-negative integer. - * An object instance is valid against "maxProperties" if its number of properties is greater than, - * or equal to, the value of this keyword. - * Omitting this keyword has the same behavior as a value of 0. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16 - */ - minProperties?: number | undefined; - - /** - * Elements of this array must be unique. - * An object instance is valid against this keyword if every item in the array is the name of a property in the instance. - * Omitting this keyword has the same behavior as an empty array. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17 - */ - required?: string[] | undefined; - - /** - * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself. - * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value, - * the child instance for that name successfully validates against the corresponding schema. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18 - */ - properties?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute is an object that defines the schema for a set of property names of an object instance. - * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema. - * If the pattern matches the name of a property on the instance object, the value of the instance's property - * MUST be valid against the pattern name's schema value. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19 - */ - patternProperties?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute defines a schema for all properties that are not explicitly defined in an object type definition. - * If specified, the value MUST be a schema or a boolean. - * If false is provided, no additional properties are allowed beyond the properties defined in the schema. - * The default value is an empty schema which allows any value for additional properties. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20 - */ - additionalProperties?: JSONSchema6Definition | undefined; - - /** - * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property. - * Each property specifies a dependency. - * If the dependency value is an array, each element in the array must be unique. - * Omitting this keyword has the same behavior as an empty object. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21 - */ - dependencies?: { - [k: string]: JSONSchema6Definition | string[]; - } | undefined; - - /** - * Takes a schema which validates the names of all properties rather than their values. - * Note the property name that the schema is testing will always be a string. - * Omitting this keyword has the same behavior as an empty schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22 - */ - propertyNames?: JSONSchema6Definition | undefined; - - /** - * This provides an enumeration of all possible values that are valid - * for the instance property. This MUST be an array, and each item in - * the array represents a possible value for the instance value. If - * this attribute is defined, the instance value MUST be one of the - * values in the array in order for the schema to be valid. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23 - */ - enum?: JSONSchema6Type[] | undefined; - - /** - * More readable form of a one-element "enum" - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24 - */ - const?: JSONSchema6Type | undefined; - - /** - * A single type, or a union of simple types - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25 - */ - type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26 - */ - allOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27 - */ - anyOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28 - */ - oneOf?: JSONSchema6Definition[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29 - */ - not?: JSONSchema6Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1 - */ - definitions?: { - [k: string]: JSONSchema6Definition; - } | undefined; - - /** - * This attribute is a string that provides a short description of the instance property. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 - */ - title?: string | undefined; - - /** - * This attribute is a string that provides a full description of the of purpose the instance property. - * - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2 - */ - description?: string | undefined; - - /** - * This keyword can be used to supply a default JSON value associated with a particular schema. - * It is RECOMMENDED that a default value be valid against the associated schema. - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3 - */ - default?: JSONSchema6Type | undefined; - - /** - * Array of examples with no validation effect the value of "default" is usable as an example without repeating it under this keyword - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4 - */ - examples?: JSONSchema6Type[] | undefined; - - /** - * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8 - */ - format?: string | undefined; -} - -// ================================================================================================== -// JSON Schema Draft 07 -// ================================================================================================== -// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 -// -------------------------------------------------------------------------------------------------- - -/** - * Primitive type - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 - */ -export type JSONSchema7TypeName = - | "string" // - | "number" - | "integer" - | "boolean" - | "object" - | "array" - | "null"; - -/** - * Primitive type - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1 - */ -export type JSONSchema7Type = - | string // - | number - | boolean - | JSONSchema7Object - | JSONSchema7Array - | null; - -// Workaround for infinite type recursion -export interface JSONSchema7Object { - [key: string]: JSONSchema7Type; -} - -// Workaround for infinite type recursion -// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540 -export interface JSONSchema7Array extends Array {} - -/** - * Meta schema - * - * Recommended values: - * - 'http://json-schema.org/schema#' - * - 'http://json-schema.org/hyper-schema#' - * - 'http://json-schema.org/draft-07/schema#' - * - 'http://json-schema.org/draft-07/hyper-schema#' - * - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5 - */ -export type JSONSchema7Version = string; - -/** - * JSON Schema v7 - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01 - */ -export type JSONSchema7Definition = JSONSchema7 | boolean; -export interface JSONSchema7 { - $id?: string | undefined; - $ref?: string | undefined; - $schema?: JSONSchema7Version | undefined; - $comment?: string | undefined; - - /** - * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4 - * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A - */ - $defs?: { - [key: string]: JSONSchema7Definition; - } | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1 - */ - type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined; - enum?: JSONSchema7Type[] | undefined; - const?: JSONSchema7Type | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2 - */ - multipleOf?: number | undefined; - maximum?: number | undefined; - exclusiveMaximum?: number | undefined; - minimum?: number | undefined; - exclusiveMinimum?: number | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3 - */ - maxLength?: number | undefined; - minLength?: number | undefined; - pattern?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4 - */ - items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined; - additionalItems?: JSONSchema7Definition | undefined; - maxItems?: number | undefined; - minItems?: number | undefined; - uniqueItems?: boolean | undefined; - contains?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5 - */ - maxProperties?: number | undefined; - minProperties?: number | undefined; - required?: string[] | undefined; - properties?: { - [key: string]: JSONSchema7Definition; - } | undefined; - patternProperties?: { - [key: string]: JSONSchema7Definition; - } | undefined; - additionalProperties?: JSONSchema7Definition | undefined; - dependencies?: { - [key: string]: JSONSchema7Definition | string[]; - } | undefined; - propertyNames?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6 - */ - if?: JSONSchema7Definition | undefined; - then?: JSONSchema7Definition | undefined; - else?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7 - */ - allOf?: JSONSchema7Definition[] | undefined; - anyOf?: JSONSchema7Definition[] | undefined; - oneOf?: JSONSchema7Definition[] | undefined; - not?: JSONSchema7Definition | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7 - */ - format?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8 - */ - contentMediaType?: string | undefined; - contentEncoding?: string | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9 - */ - definitions?: { - [key: string]: JSONSchema7Definition; - } | undefined; - - /** - * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10 - */ - title?: string | undefined; - description?: string | undefined; - default?: JSONSchema7Type | undefined; - readOnly?: boolean | undefined; - writeOnly?: boolean | undefined; - examples?: JSONSchema7Type | undefined; -} - -export interface ValidationResult { - valid: boolean; - errors: ValidationError[]; -} - -export interface ValidationError { - property: string; - message: string; -} - -/** - * To use the validator call JSONSchema.validate with an instance object and an optional schema object. - * If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), - * that schema will be used to validate and the schema parameter is not necessary (if both exist, - * both validations will occur). - */ -export function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult; - -/** - * The checkPropertyChange method will check to see if an value can legally be in property with the given schema - * This is slightly different than the validate method in that it will fail if the schema is readonly and it will - * not check for self-validation, it is assumed that the passed in value is already internally valid. - */ -export function checkPropertyChange( - value: any, - schema: JSONSchema4 | JSONSchema6 | JSONSchema7, - property: string, -): ValidationResult; - -/** - * This checks to ensure that the result is valid and will throw an appropriate error message if it is not. - */ -export function mustBeValid(result: ValidationResult): void; diff --git a/node_modules/@types/json-schema/package.json b/node_modules/@types/json-schema/package.json deleted file mode 100644 index 3c41bd7..0000000 --- a/node_modules/@types/json-schema/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "@types/json-schema", - "version": "7.0.15", - "description": "TypeScript definitions for json-schema", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema", - "license": "MIT", - "contributors": [ - { - "name": "Boris Cherny", - "githubUsername": "bcherny", - "url": "https://github.com/bcherny" - }, - { - "name": "Lucian Buzzo", - "githubUsername": "lucianbuzzo", - "url": "https://github.com/lucianbuzzo" - }, - { - "name": "Roland Groza", - "githubUsername": "rolandjitsu", - "url": "https://github.com/rolandjitsu" - }, - { - "name": "Jason Kwok", - "githubUsername": "JasonHK", - "url": "https://github.com/JasonHK" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/json-schema" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "79984fd70cd25c3f7d72b84368778c763c89728ea0073832d745d4691b705257", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/node_modules/@types/react-dom/LICENSE b/node_modules/@types/react-dom/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/react-dom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/react-dom/README.md b/node_modules/@types/react-dom/README.md deleted file mode 100644 index fc49a16..0000000 --- a/node_modules/@types/react-dom/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/react-dom` - -# Summary -This package contains type definitions for react-dom (https://react.dev/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom. - -### Additional Details - * Last updated: Wed, 12 Nov 2025 04:37:38 GMT - * Dependencies: none - * Peer dependencies: [@types/react](https://npmjs.com/package/@types/react) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon). diff --git a/node_modules/@types/react-dom/canary.d.ts b/node_modules/@types/react-dom/canary.d.ts deleted file mode 100644 index 1d65161..0000000 --- a/node_modules/@types/react-dom/canary.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* eslint-disable @definitelytyped/no-self-import -- self-imports in module augmentations aren't self-imports */ -/* eslint-disable @definitelytyped/no-declare-current-package -- The module augmentations are optional */ -/** - * These are types for things that are present in the upcoming React 18 release. - * - * Once React 18 is released they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react-dom/canary"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react-dom/canary' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/index.js to see how the exports are declared, -// but confirm with published source code (e.g. https://unpkg.com/react-dom@canary) that these exports end up in the published code - -import React = require("react"); -import ReactDOM = require("."); - -export {}; - -declare module "react" { - // @enableViewTransition - interface ViewTransitionPseudoElement extends Animatable { - getComputedStyle: () => CSSStyleDeclaration; - } - - interface ViewTransitionInstance { - group: ViewTransitionPseudoElement; - imagePair: ViewTransitionPseudoElement; - old: ViewTransitionPseudoElement; - new: ViewTransitionPseudoElement; - } - - // @enableFragmentRefs - interface FragmentInstance { - blur: () => void; - focus: (focusOptions?: FocusOptions | undefined) => void; - focusLast: (focusOptions?: FocusOptions | undefined) => void; - observeUsing(observer: IntersectionObserver | ResizeObserver): void; - unobserveUsing(observer: IntersectionObserver | ResizeObserver): void; - getClientRects(): Array; - getRootNode(getRootNodeOptions?: GetRootNodeOptions | undefined): Document | ShadowRoot | FragmentInstance; - addEventListener( - type: string, - listener: EventListener, - optionsOrUseCapture?: Parameters[2], - ): void; - removeEventListener( - type: string, - listener: EventListener, - optionsOrUseCapture?: Parameters[2], - ): void; - dispatchEvent(event: Event): boolean; - scrollIntoView(alignToTop?: boolean): void; - } -} diff --git a/node_modules/@types/react-dom/client.d.ts b/node_modules/@types/react-dom/client.d.ts deleted file mode 100644 index 2c7affa..0000000 --- a/node_modules/@types/react-dom/client.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1` - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared, - -import React = require("react"); - -export {}; - -declare const REACT_FORM_STATE_SIGIL: unique symbol; -export interface ReactFormState { - [REACT_FORM_STATE_SIGIL]: never; -} - -export interface HydrationOptions { - formState?: ReactFormState | null; - /** - * Prefix for `useId`. - */ - identifierPrefix?: string; - onUncaughtError?: - | ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void) - | undefined; - onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; - onCaughtError?: - | (( - error: unknown, - errorInfo: { - componentStack?: string | undefined; - errorBoundary?: React.Component | undefined; - }, - ) => void) - | undefined; -} - -export interface RootOptions { - /** - * Prefix for `useId`. - */ - identifierPrefix?: string; - onUncaughtError?: - | ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void) - | undefined; - onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void; - onCaughtError?: - | (( - error: unknown, - errorInfo: { - componentStack?: string | undefined; - errorBoundary?: React.Component | undefined; - }, - ) => void) - | undefined; -} - -export interface ErrorInfo { - componentStack?: string; -} - -export interface Root { - render(children: React.ReactNode): void; - unmount(): void; -} - -/** - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {} - -export type Container = - | Element - | DocumentFragment - | Document - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS - ]; - -/** - * createRoot lets you create a root to display React components inside a browser DOM node. - * - * @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`} - */ -export function createRoot(container: Container, options?: RootOptions): Root; - -/** - * Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer. - * - * React will attempt to attach event listeners to the existing markup. - * - * **Example Usage** - * - * ```jsx - * hydrateRoot(document.querySelector('#root'), ) - * ``` - * - * @see https://react.dev/reference/react-dom/client/hydrateRoot - */ -export function hydrateRoot( - container: Element | Document, - initialChildren: React.ReactNode, - options?: HydrationOptions, -): Root; diff --git a/node_modules/@types/react-dom/experimental.d.ts b/node_modules/@types/react-dom/experimental.d.ts deleted file mode 100644 index 01999d3..0000000 --- a/node_modules/@types/react-dom/experimental.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * These are types for things that are present in the `experimental` builds of React but not yet - * on a stable build. - * - * Once they are promoted to stable they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react-dom/experimental"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react-dom/experimental' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react-dom/index.experimental.js to see how the exports are declared, -// but confirm with published source code (e.g. https://unpkg.com/react-dom@experimental) that these exports end up in the published code - -import React = require("react"); -import ReactDOM = require("./canary"); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -declare module "." { -} - -declare module "react" { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface GestureProvider extends AnimationTimeline {} -} - -declare module "./client" { - type TransitionIndicatorCleanup = () => VoidOrUndefinedOnly; - interface RootOptions { - onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined; - } - interface HydrationOptions { - onDefaultTransitionIndicator?: (() => void | TransitionIndicatorCleanup) | undefined; - } -} diff --git a/node_modules/@types/react-dom/index.d.ts b/node_modules/@types/react-dom/index.d.ts deleted file mode 100644 index efb52b2..0000000 --- a/node_modules/@types/react-dom/index.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -// NOTE: Users of the `experimental` builds of React should add a reference -// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment -// for reference and documentation on how exactly to do it. - -export as namespace ReactDOM; - -import { Key, ReactNode, ReactPortal } from "react"; - -declare module "react" { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface CacheSignal extends AbortSignal {} -} - -export function createPortal( - children: ReactNode, - container: Element | DocumentFragment, - key?: Key | null, -): ReactPortal; - -export const version: string; - -export function flushSync(fn: () => R): R; - -export function unstable_batchedUpdates(callback: (a: A) => R, a: A): R; -export function unstable_batchedUpdates(callback: () => R): R; - -export interface FormStatusNotPending { - pending: false; - data: null; - method: null; - action: null; -} - -export interface FormStatusPending { - pending: true; - data: FormData; - method: string; - action: string | ((formData: FormData) => void | Promise); -} - -export type FormStatus = FormStatusPending | FormStatusNotPending; - -export function useFormStatus(): FormStatus; - -export function useFormState( - action: (state: Awaited) => State | Promise, - initialState: Awaited, - permalink?: string, -): [state: Awaited, dispatch: () => void, isPending: boolean]; -export function useFormState( - action: (state: Awaited, payload: Payload) => State | Promise, - initialState: Awaited, - permalink?: string, -): [state: Awaited, dispatch: (payload: Payload) => void, isPending: boolean]; - -export function prefetchDNS(href: string): void; - -export interface PreconnectOptions { - // Don't create a helper type. - // It would have to be in module scope to be inlined in TS tooltips. - // But then it becomes part of the public API. - // TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref - // since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; -} -export function preconnect(href: string, options?: PreconnectOptions): void; - -export type PreloadAs = - | "audio" - | "document" - | "embed" - | "fetch" - | "font" - | "image" - | "object" - | "track" - | "script" - | "style" - | "video" - | "worker"; -export interface PreloadOptions { - as: PreloadAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - // TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix. - imageSizes?: string | undefined; - imageSrcSet?: string | undefined; - integrity?: string | undefined; - type?: string | undefined; - nonce?: string | undefined; - referrerPolicy?: ReferrerPolicy | undefined; - media?: string | undefined; -} -export function preload(href: string, options?: PreloadOptions): void; - -// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload -export type PreloadModuleAs = RequestDestination; -export interface PreloadModuleOptions { - /** - * @default "script" - */ - as: PreloadModuleAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preloadModule(href: string, options?: PreloadModuleOptions): void; - -export type PreinitAs = "script" | "style"; -export interface PreinitOptions { - as: PreinitAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - precedence?: string | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preinit(href: string, options?: PreinitOptions): void; - -// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes -export type PreinitModuleAs = "script"; -export interface PreinitModuleOptions { - /** - * @default "script" - */ - as?: PreinitModuleAs; - crossOrigin?: "anonymous" | "use-credentials" | "" | undefined; - integrity?: string | undefined; - nonce?: string | undefined; -} -export function preinitModule(href: string, options?: PreinitModuleOptions): void; - -export function requestFormReset(form: HTMLFormElement): void; diff --git a/node_modules/@types/react-dom/package.json b/node_modules/@types/react-dom/package.json deleted file mode 100644 index 62ca60f..0000000 --- a/node_modules/@types/react-dom/package.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "name": "@types/react-dom", - "version": "19.2.3", - "description": "TypeScript definitions for react-dom", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom", - "license": "MIT", - "contributors": [ - { - "name": "Asana", - "url": "https://asana.com" - }, - { - "name": "AssureSign", - "url": "http://www.assuresign.com" - }, - { - "name": "Microsoft", - "url": "https://microsoft.com" - }, - { - "name": "MartynasZilinskas", - "githubUsername": "MartynasZilinskas", - "url": "https://github.com/MartynasZilinskas" - }, - { - "name": "Josh Rutherford", - "githubUsername": "theruther4d", - "url": "https://github.com/theruther4d" - }, - { - "name": "Jessica Franco", - "githubUsername": "Jessidhia", - "url": "https://github.com/Jessidhia" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - } - ], - "main": "", - "types": "index.d.ts", - "exports": { - ".": { - "types": { - "default": "./index.d.ts" - } - }, - "./client": { - "types": { - "default": "./client.d.ts" - } - }, - "./canary": { - "types": { - "default": "./canary.d.ts" - } - }, - "./server": { - "types": { - "default": "./server.d.ts" - } - }, - "./server.browser": { - "types": { - "default": "./server.browser.d.ts" - } - }, - "./server.bun": { - "types": { - "default": "./server.bun.d.ts" - } - }, - "./server.edge": { - "types": { - "default": "./server.edge.d.ts" - } - }, - "./server.node": { - "types": { - "default": "./server.node.d.ts" - } - }, - "./static": { - "types": { - "default": "./static.d.ts" - } - }, - "./static.browser": { - "types": { - "default": "./static.browser.d.ts" - } - }, - "./static.edge": { - "types": { - "default": "./static.edge.d.ts" - } - }, - "./static.node": { - "types": { - "default": "./static.node.d.ts" - } - }, - "./experimental": { - "types": { - "default": "./experimental.d.ts" - } - }, - "./test-utils": { - "types": { - "default": "./test-utils/index.d.ts" - } - }, - "./package.json": "./package.json" - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/react-dom" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": { - "@types/react": "^19.2.0" - }, - "typesPublisherContentHash": "6f16aac4f50b7ebe3201fdac53a58874d2899d6108894538ade2d61fbb99f8c5", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/node_modules/@types/react-dom/server.browser.d.ts b/node_modules/@types/react-dom/server.browser.d.ts deleted file mode 100644 index f2e3bc9..0000000 --- a/node_modules/@types/react-dom/server.browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server"; diff --git a/node_modules/@types/react-dom/server.bun.d.ts b/node_modules/@types/react-dom/server.bun.d.ts deleted file mode 100644 index f2e3bc9..0000000 --- a/node_modules/@types/react-dom/server.bun.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString } from "./server"; diff --git a/node_modules/@types/react-dom/server.d.ts b/node_modules/@types/react-dom/server.d.ts deleted file mode 100644 index 84312f9..0000000 --- a/node_modules/@types/react-dom/server.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -// forward declarations -declare global { - namespace NodeJS { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface WritableStream {} - } - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AbortSignal {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} -} - -import { ReactNode } from "react"; -import { ErrorInfo, ReactFormState } from "./client"; -import { PostponedState, ResumeOptions } from "./static"; - -export interface BootstrapScriptDescriptor { - src: string; - integrity?: string | undefined; - crossOrigin?: string | undefined; -} - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps} - */ -// TODO: Ideally TypeScripts standard library would include this type. -// Until then we keep the prefixed one for future compatibility. -export interface ReactImportMap { - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference} - */ - imports?: { - [specifier: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference} - */ - integrity?: { - [moduleURL: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference} - */ - scopes?: { - [scope: string]: { - [specifier: string]: string; - }; - } | undefined; -} - -export interface RenderToPipeableStreamOptions { - identifierPrefix?: string; - namespaceURI?: string; - nonce?: string; - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - importMap?: ReactImportMap | undefined; - progressiveChunkSize?: number; - onHeaders?: ((headers: Headers) => void) | undefined; - onShellReady?: () => void; - onShellError?: (error: unknown) => void; - onAllReady?: () => void; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - formState?: ReactFormState | null; -} - -export interface PipeableStream { - abort: (reason?: unknown) => void; - pipe: (destination: Writable) => Writable; -} - -export interface ServerOptions { - identifierPrefix?: string; -} - -/** - * Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams). - * - * @see [API](https://react.dev/reference/react-dom/server/renderToPipeableStream) - * - * @param children - * @param options - */ -export function renderToPipeableStream(children: ReactNode, options?: RenderToPipeableStreamOptions): PipeableStream; - -/** - * Render a React element to its initial HTML. This should only be used on the server. - * React will return an HTML string. You can use this method to generate HTML on the server - * and send the markup down on the initial request for faster page loads and to allow search - * engines to crawl your pages for SEO purposes. - * - * If you call `ReactDOMClient.hydrateRoot()` on a node that already has this server-rendered markup, - * React will preserve it and only attach event handlers, allowing you - * to have a very performant first-load experience. - */ -export function renderToString(element: ReactNode, options?: ServerOptions): string; - -/** - * Similar to `renderToString`, except this doesn't create extra DOM attributes - * such as `data-reactid`, that React uses internally. This is useful if you want - * to use React as a simple static page generator, as stripping away the extra - * attributes can save lots of bytes. - */ -export function renderToStaticMarkup(element: ReactNode, options?: ServerOptions): string; - -export interface RenderToReadableStreamOptions { - identifierPrefix?: string; - importMap?: ReactImportMap | undefined; - namespaceURI?: string; - nonce?: string; - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - progressiveChunkSize?: number; - signal?: AbortSignal; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - onHeaders?: ((headers: Headers) => void) | undefined; - formState?: ReactFormState | null; -} - -export interface ReactDOMServerReadableStream extends ReadableStream { - allReady: Promise; -} - -/** - * Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes). - * - * @see [API](https://react.dev/reference/react-dom/server/renderToReadableStream) - */ -export function renderToReadableStream( - children: ReactNode, - options?: RenderToReadableStreamOptions, -): Promise; - -export { ResumeOptions }; - -/** - * @see {@link https://react.dev/reference/react-dom/server/resume `resume`` reference documentation} - * @version 19.2 - */ -export function resume( - children: React.ReactNode, - postponedState: PostponedState, - options?: ResumeOptions, -): Promise; - -/** - * @see {@link https://react.dev/reference/react-dom/server/resumeToPipeableStream `resumeToPipeableStream`` reference documentation} - * @version 19.2 - */ -export function resumeToPipeableStream( - children: React.ReactNode, - postponedState: PostponedState, - options?: ResumeOptions, -): Promise; - -export const version: string; - -export as namespace ReactDOMServer; diff --git a/node_modules/@types/react-dom/server.edge.d.ts b/node_modules/@types/react-dom/server.edge.d.ts deleted file mode 100644 index f21d7d2..0000000 --- a/node_modules/@types/react-dom/server.edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { renderToReadableStream, renderToStaticMarkup, renderToString, resume } from "./server"; diff --git a/node_modules/@types/react-dom/server.node.d.ts b/node_modules/@types/react-dom/server.node.d.ts deleted file mode 100644 index eb777a9..0000000 --- a/node_modules/@types/react-dom/server.node.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export { - renderToPipeableStream, - renderToReadableStream, - renderToStaticMarkup, - renderToString, - resume, - resumeToPipeableStream, -} from "./server"; diff --git a/node_modules/@types/react-dom/static.browser.d.ts b/node_modules/@types/react-dom/static.browser.d.ts deleted file mode 100644 index cd2d05f..0000000 --- a/node_modules/@types/react-dom/static.browser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { prerender, version } from "./static"; diff --git a/node_modules/@types/react-dom/static.d.ts b/node_modules/@types/react-dom/static.d.ts deleted file mode 100644 index c86d5c1..0000000 --- a/node_modules/@types/react-dom/static.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -// forward declarations -declare global { - namespace NodeJS { - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - } - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface AbortSignal {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ReadableStream {} - - /** - * Stub for https://developer.mozilla.org/en-US/docs/Web/API/Uint8Array - */ - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface Uint8Array {} -} - -import { ReactNode } from "react"; -import { ErrorInfo } from "./client"; -export {}; - -declare const POSTPONED_STATE_SIGIL: unique symbol; - -/** - * This is an opaque type i.e. users should not make any assumptions about its structure. - * It is JSON-serializeable to be a able to store it and retrvieve later for use with {@link https://react.dev/reference/react-dom/server/resume `resume`}. - */ -export interface PostponedState { - [POSTPONED_STATE_SIGIL]: never; -} - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap Import maps} - */ -// TODO: Ideally TypeScripts standard library would include this type. -// Until then we keep the prefixed one for future compatibility. -export interface ReactImportMap { - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#imports `imports` reference} - */ - imports?: { - [specifier: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity `integrity` reference} - */ - integrity?: { - [moduleURL: string]: string; - } | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#scopes `scopes` reference} - */ - scopes?: { - [scope: string]: { - [specifier: string]: string; - }; - } | undefined; -} - -export interface BootstrapScriptDescriptor { - src: string; - integrity?: string | undefined; - crossOrigin?: string | undefined; -} - -export interface PrerenderOptions { - bootstrapScriptContent?: string; - bootstrapScripts?: Array; - bootstrapModules?: Array; - /** - * Maximum length of the header content in unicode code units i.e. string.length. - * Must be a positive integer if specified. - * @default 2000 - */ - headersLengthHint?: number | undefined; - identifierPrefix?: string; - importMap?: ReactImportMap | undefined; - namespaceURI?: string; - onError?: (error: unknown, errorInfo: ErrorInfo) => string | void; - onHeaders?: (headers: Headers) => void | undefined; - progressiveChunkSize?: number; - signal?: AbortSignal; -} - -export interface PrerenderResult { - postponed: null | PostponedState; - prelude: ReadableStream; -} - -/** - * Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes). - * - * @see [API](https://react.dev/reference/react-dom/static/prerender) - */ -export function prerender( - reactNode: ReactNode, - options?: PrerenderOptions, -): Promise; - -export interface PrerenderToNodeStreamResult { - prelude: NodeJS.ReadableStream; - postponed: null | PostponedState; -} - -/** - * Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams). - * - * @see [API](https://react.dev/reference/react-dom/static/prerenderToNodeStream) - * - * @param children - * @param options - */ -export function prerenderToNodeStream( - reactNode: ReactNode, - options?: PrerenderOptions, -): Promise; - -export interface ResumeOptions { - nonce?: string; - signal?: AbortSignal; - onError?: (error: unknown) => string | undefined | void; -} - -/** - * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerender `resumeAndPrerender` reference documentation} - * @version 19.2 - */ -export function resumeAndPrerender( - children: React.ReactNode, - postponedState: null | PostponedState, - options?: Omit, -): Promise; - -/** - * @see {@link https://react.dev/reference/react-dom/static/resumeAndPrerenderToNodeStream `resumeAndPrerenderToNodeStream`` reference documentation} - * @version 19.2 - */ -export function resumeAndPrerenderToNodeStream( - children: React.ReactNode, - postponedState: null | PostponedState, - options?: Omit, -): Promise; - -export const version: string; diff --git a/node_modules/@types/react-dom/static.edge.d.ts b/node_modules/@types/react-dom/static.edge.d.ts deleted file mode 100644 index 94c5393..0000000 --- a/node_modules/@types/react-dom/static.edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { prerender, resumeAndPrerender, version } from "./static"; diff --git a/node_modules/@types/react-dom/static.node.d.ts b/node_modules/@types/react-dom/static.node.d.ts deleted file mode 100644 index 59dd5dd..0000000 --- a/node_modules/@types/react-dom/static.node.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { - prerender, - prerenderToNodeStream, - resumeAndPrerender, - resumeAndPrerenderToNodeStream, - version, -} from "./static"; diff --git a/node_modules/@types/react-dom/test-utils/index.d.ts b/node_modules/@types/react-dom/test-utils/index.d.ts deleted file mode 100644 index 7e211ea..0000000 --- a/node_modules/@types/react-dom/test-utils/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export {}; - -export { - /** - * @deprecated Import `act` from `react` instead. - */ act, -} from "react"; diff --git a/node_modules/@types/react/LICENSE b/node_modules/@types/react/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/react/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/react/README.md b/node_modules/@types/react/README.md deleted file mode 100644 index 4f6680b..0000000 --- a/node_modules/@types/react/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/react` - -# Summary -This package contains type definitions for react (https://react.dev/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react. - -### Additional Details - * Last updated: Wed, 11 Feb 2026 11:44:57 GMT - * Dependencies: [csstype](https://npmjs.com/package/csstype) - -# Credits -These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock). diff --git a/node_modules/@types/react/canary.d.ts b/node_modules/@types/react/canary.d.ts deleted file mode 100644 index e9a4312..0000000 --- a/node_modules/@types/react/canary.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * These are types for things that are present in the React `canary` release channel. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react/canary"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react/canary' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared, - -import React = require("."); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -type NativeSubmitEvent = SubmitEvent; - -declare module "." { - export function unstable_useCacheRefresh(): () => void; - - // @enableViewTransition - export interface ViewTransitionInstance { - /** - * The {@link ViewTransitionProps name} that was used in the corresponding {@link ViewTransition} component or `"auto"` if the `name` prop was omitted. - */ - name: string; - } - - export type ViewTransitionClassPerType = Record<"default" | (string & {}), "none" | "auto" | (string & {})>; - export type ViewTransitionClass = ViewTransitionClassPerType | ViewTransitionClassPerType[string]; - - export interface ViewTransitionProps { - children?: ReactNode | undefined; - /** - * Assigns the {@link https://developer.chrome.com/blog/view-transitions-update-io24#view-transition-class `view-transition-class`} class to the underlying DOM node. - */ - default?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if this `` or its parent Component is mounted and there's no other with the same name being deleted. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - enter?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if this `` or its parent Component is unmounted and there's no other with the same name being deleted. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - exit?: ViewTransitionClass | undefined; - /** - * "auto" will automatically assign a view-transition-name to the inner DOM node. - * That way you can add a View Transition to a Component without controlling its DOM nodes styling otherwise. - * - * A difference between this and the browser's built-in view-transition-name: auto is that switching the DOM nodes within the `` component preserves the same name so this example cross-fades between the DOM nodes instead of causing an exit and enter. - * @default "auto" - */ - name?: "auto" | (string & {}) | undefined; - /** - * The `` or its parent Component is mounted and there's no other `` with the same name being deleted. - */ - onEnter?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * The `` or its parent Component is unmounted and there's no other `` with the same name being deleted. - */ - onExit?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * This `` is being mounted and another `` instance with the same name is being unmounted elsewhere. - */ - onShare?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - /** - * The content of `` has changed either due to DOM mutations or because an inner child `` has resized. - */ - onUpdate?: (instance: ViewTransitionInstance, types: Array) => void | (() => void); - ref?: Ref | undefined; - /** - * Combined with {@link className} if this `` is being mounted and another instance with the same name is being unmounted elsewhere. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - share?: ViewTransitionClass | undefined; - /** - * Combined with {@link className} if the content of this `` has changed either due to DOM mutations or because an inner child has resized. - * `"none"` is a special value that deactivates the view transition name under that condition. - */ - update?: ViewTransitionClass | undefined; - } - - /** - * Opt-in for using {@link https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API View Transitions} in React. - * View Transitions only trigger for async updates like {@link startTransition}, {@link useDeferredValue}, Actions or <{@link Suspense}> revealing from fallback to content. - * Synchronous updates provide an opt-out but also guarantee that they commit immediately which View Transitions can't. - * - * @see {@link https://react.dev/reference/react/ViewTransition `` reference documentation} - */ - export const ViewTransition: ExoticComponent; - - /** - * @see {@link https://react.dev/reference/react/addTransitionType `addTransitionType` reference documentation} - */ - export function addTransitionType(type: string): void; - - // @enableFragmentRefs - export interface FragmentInstance {} - - export interface FragmentProps { - ref?: Ref | undefined; - } - - interface SubmitEvent extends SyntheticEvent { - /** - * Only available in react@canary - */ - submitter: HTMLElement | null; - } -} diff --git a/node_modules/@types/react/compiler-runtime.d.ts b/node_modules/@types/react/compiler-runtime.d.ts deleted file mode 100644 index a98a26e..0000000 --- a/node_modules/@types/react/compiler-runtime.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Not meant to be used directly -// Omitting all exports so that they don't appear in IDE autocomplete. - -export {}; diff --git a/node_modules/@types/react/experimental.d.ts b/node_modules/@types/react/experimental.d.ts deleted file mode 100644 index 79ba1e0..0000000 --- a/node_modules/@types/react/experimental.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** - * These are types for things that are present in the `experimental` builds of React but not yet - * on a stable build. - * - * Once they are promoted to stable they can just be moved to the main index file. - * - * To load the types declared here in an actual project, there are three ways. The easiest one, - * if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section, - * is to add `"react/experimental"` to the `"types"` array. - * - * Alternatively, a specific import syntax can to be used from a typescript file. - * This module does not exist in reality, which is why the {} is important: - * - * ```ts - * import {} from 'react/experimental' - * ``` - * - * It is also possible to include it through a triple-slash reference: - * - * ```ts - * /// - * ``` - * - * Either the import or the reference only needs to appear once, anywhere in the project. - */ - -// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared, -// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are -// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`. -// -// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js -// is a good place to start looking for details; it generally calls prop validation functions or delegates -// all tasks done as part of the render phase (the concurrent part of the React update cycle). -// -// Suspense-related handling can be found in ReactFiberThrow.js. - -import React = require("./canary"); - -export {}; - -declare const UNDEFINED_VOID_ONLY: unique symbol; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -declare module "." { - export interface SuspenseProps { - // @enableCPUSuspense - /** - * The presence of this prop indicates that the content is computationally expensive to render. - * In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data). - * @see {@link https://github.com/facebook/react/pull/19936} - */ - defer?: boolean | undefined; - } - - export type SuspenseListRevealOrder = "forwards" | "backwards" | "together" | "independent"; - export type SuspenseListTailMode = "collapsed" | "hidden" | "visible"; - - export interface SuspenseListCommonProps { - } - - interface DirectionalSuspenseListProps extends SuspenseListCommonProps { - /** - * Note that SuspenseList require more than one child; - * it is a runtime warning to provide only a single child. - * - * It does, however, allow those children to be wrapped inside a single - * level of ``. - */ - children: Iterable | AsyncIterable; - /** - * Defines the order in which the `SuspenseList` children should be revealed. - * @default "forwards" - */ - revealOrder?: "forwards" | "backwards" | "unstable_legacy-backwards" | undefined; - /** - * Dictates how unloaded items in a SuspenseList is shown. - * - * - `collapsed` shows only the next fallback in the list. - * - `hidden` doesn't show any unloaded items. - * - `visible` shows all fallbacks in the list. - * - * @default "hidden" - */ - tail?: SuspenseListTailMode | undefined; - } - - interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps { - children: ReactNode; - /** - * Defines the order in which the `SuspenseList` children should be revealed. - */ - revealOrder: Exclude; - /** - * The tail property is invalid when not using the `forwards` or `backwards` reveal orders. - */ - tail?: never; - } - - export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps; - - /** - * `SuspenseList` helps coordinate many components that can suspend by orchestrating the order - * in which these components are revealed to the user. - * - * When multiple components need to fetch data, this data may arrive in an unpredictable order. - * However, if you wrap these items in a `SuspenseList`, React will not show an item in the list - * until previous items have been displayed (this behavior is adjustable). - * - * @see {@link https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist} - * @see {@link https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist} - */ - export const unstable_SuspenseList: ExoticComponent; - - type Reference = object; - type TaintableUniqueValue = string | bigint | ArrayBufferView; - function experimental_taintUniqueValue( - message: string | undefined, - lifetime: Reference, - value: TaintableUniqueValue, - ): void; - function experimental_taintObjectReference(message: string | undefined, object: Reference): void; - - // @enableGestureTransition - // Implemented by the specific renderer e.g. `react-dom`. - // Keep in mind that augmented interfaces merge their JSDoc so if you put - // JSDoc here and in the renderer, the IDE will display both. - export interface GestureProvider {} - export interface GestureOptions { - rangeStart?: number | undefined; - rangeEnd?: number | undefined; - } - export type GestureOptionsRequired = { - [P in keyof GestureOptions]-?: NonNullable; - }; - /** */ - export function unstable_startGestureTransition( - provider: GestureProvider, - scope: () => void, - options?: GestureOptions, - ): () => void; - - interface ViewTransitionProps { - onGestureEnter?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureExit?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureShare?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - onGestureUpdate?: ( - timeline: GestureProvider, - options: GestureOptionsRequired, - instance: ViewTransitionInstance, - types: Array, - ) => void | (() => void); - } - - // @enableSrcObject - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES { - srcObject: Blob; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES { - srcObject: Blob | MediaSource | MediaStream; - } - - // @enableOptimisticKey - export const optimisticKey: unique symbol; - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES { - optimisticKey: typeof optimisticKey; - } -} diff --git a/node_modules/@types/react/global.d.ts b/node_modules/@types/react/global.d.ts deleted file mode 100644 index 61862a3..0000000 --- a/node_modules/@types/react/global.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -/* -React projects that don't include the DOM library need these interfaces to compile. -React Native applications use React, but there is no DOM available. The JavaScript runtime -is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`. - -Warning: all of these interfaces are empty. If you want type definitions for various properties -(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json). -*/ - -interface Event {} -interface AnimationEvent extends Event {} -interface ClipboardEvent extends Event {} -interface CompositionEvent extends Event {} -interface DragEvent extends Event {} -interface FocusEvent extends Event {} -interface InputEvent extends Event {} -interface KeyboardEvent extends Event {} -interface MouseEvent extends Event {} -interface TouchEvent extends Event {} -interface PointerEvent extends Event {} -interface SubmitEvent extends Event {} -interface ToggleEvent extends Event {} -interface TransitionEvent extends Event {} -interface UIEvent extends Event {} -interface WheelEvent extends Event {} - -interface EventTarget {} -interface Document {} -interface DataTransfer {} -interface StyleMedia {} - -interface Element {} -interface DocumentFragment {} - -interface HTMLElement extends Element {} -interface HTMLAnchorElement extends HTMLElement {} -interface HTMLAreaElement extends HTMLElement {} -interface HTMLAudioElement extends HTMLElement {} -interface HTMLBaseElement extends HTMLElement {} -interface HTMLBodyElement extends HTMLElement {} -interface HTMLBRElement extends HTMLElement {} -interface HTMLButtonElement extends HTMLElement {} -interface HTMLCanvasElement extends HTMLElement {} -interface HTMLDataElement extends HTMLElement {} -interface HTMLDataListElement extends HTMLElement {} -interface HTMLDetailsElement extends HTMLElement {} -interface HTMLDialogElement extends HTMLElement {} -interface HTMLDivElement extends HTMLElement {} -interface HTMLDListElement extends HTMLElement {} -interface HTMLEmbedElement extends HTMLElement {} -interface HTMLFieldSetElement extends HTMLElement {} -interface HTMLFormElement extends HTMLElement {} -interface HTMLHeadingElement extends HTMLElement {} -interface HTMLHeadElement extends HTMLElement {} -interface HTMLHRElement extends HTMLElement {} -interface HTMLHtmlElement extends HTMLElement {} -interface HTMLIFrameElement extends HTMLElement {} -interface HTMLImageElement extends HTMLElement {} -interface HTMLInputElement extends HTMLElement {} -interface HTMLModElement extends HTMLElement {} -interface HTMLLabelElement extends HTMLElement {} -interface HTMLLegendElement extends HTMLElement {} -interface HTMLLIElement extends HTMLElement {} -interface HTMLLinkElement extends HTMLElement {} -interface HTMLMapElement extends HTMLElement {} -interface HTMLMetaElement extends HTMLElement {} -interface HTMLMeterElement extends HTMLElement {} -interface HTMLObjectElement extends HTMLElement {} -interface HTMLOListElement extends HTMLElement {} -interface HTMLOptGroupElement extends HTMLElement {} -interface HTMLOptionElement extends HTMLElement {} -interface HTMLOutputElement extends HTMLElement {} -interface HTMLParagraphElement extends HTMLElement {} -interface HTMLParamElement extends HTMLElement {} -interface HTMLPreElement extends HTMLElement {} -interface HTMLProgressElement extends HTMLElement {} -interface HTMLQuoteElement extends HTMLElement {} -interface HTMLSlotElement extends HTMLElement {} -interface HTMLScriptElement extends HTMLElement {} -interface HTMLSelectElement extends HTMLElement {} -interface HTMLSourceElement extends HTMLElement {} -interface HTMLSpanElement extends HTMLElement {} -interface HTMLStyleElement extends HTMLElement {} -interface HTMLTableElement extends HTMLElement {} -interface HTMLTableColElement extends HTMLElement {} -interface HTMLTableDataCellElement extends HTMLElement {} -interface HTMLTableHeaderCellElement extends HTMLElement {} -interface HTMLTableRowElement extends HTMLElement {} -interface HTMLTableSectionElement extends HTMLElement {} -interface HTMLTemplateElement extends HTMLElement {} -interface HTMLTextAreaElement extends HTMLElement {} -interface HTMLTimeElement extends HTMLElement {} -interface HTMLTitleElement extends HTMLElement {} -interface HTMLTrackElement extends HTMLElement {} -interface HTMLUListElement extends HTMLElement {} -interface HTMLVideoElement extends HTMLElement {} -interface HTMLWebViewElement extends HTMLElement {} - -interface SVGElement extends Element {} -interface SVGSVGElement extends SVGElement {} -interface SVGCircleElement extends SVGElement {} -interface SVGClipPathElement extends SVGElement {} -interface SVGDefsElement extends SVGElement {} -interface SVGDescElement extends SVGElement {} -interface SVGEllipseElement extends SVGElement {} -interface SVGFEBlendElement extends SVGElement {} -interface SVGFEColorMatrixElement extends SVGElement {} -interface SVGFEComponentTransferElement extends SVGElement {} -interface SVGFECompositeElement extends SVGElement {} -interface SVGFEConvolveMatrixElement extends SVGElement {} -interface SVGFEDiffuseLightingElement extends SVGElement {} -interface SVGFEDisplacementMapElement extends SVGElement {} -interface SVGFEDistantLightElement extends SVGElement {} -interface SVGFEDropShadowElement extends SVGElement {} -interface SVGFEFloodElement extends SVGElement {} -interface SVGFEFuncAElement extends SVGElement {} -interface SVGFEFuncBElement extends SVGElement {} -interface SVGFEFuncGElement extends SVGElement {} -interface SVGFEFuncRElement extends SVGElement {} -interface SVGFEGaussianBlurElement extends SVGElement {} -interface SVGFEImageElement extends SVGElement {} -interface SVGFEMergeElement extends SVGElement {} -interface SVGFEMergeNodeElement extends SVGElement {} -interface SVGFEMorphologyElement extends SVGElement {} -interface SVGFEOffsetElement extends SVGElement {} -interface SVGFEPointLightElement extends SVGElement {} -interface SVGFESpecularLightingElement extends SVGElement {} -interface SVGFESpotLightElement extends SVGElement {} -interface SVGFETileElement extends SVGElement {} -interface SVGFETurbulenceElement extends SVGElement {} -interface SVGFilterElement extends SVGElement {} -interface SVGForeignObjectElement extends SVGElement {} -interface SVGGElement extends SVGElement {} -interface SVGImageElement extends SVGElement {} -interface SVGLineElement extends SVGElement {} -interface SVGLinearGradientElement extends SVGElement {} -interface SVGMarkerElement extends SVGElement {} -interface SVGMaskElement extends SVGElement {} -interface SVGMetadataElement extends SVGElement {} -interface SVGPathElement extends SVGElement {} -interface SVGPatternElement extends SVGElement {} -interface SVGPolygonElement extends SVGElement {} -interface SVGPolylineElement extends SVGElement {} -interface SVGRadialGradientElement extends SVGElement {} -interface SVGRectElement extends SVGElement {} -interface SVGSetElement extends SVGElement {} -interface SVGStopElement extends SVGElement {} -interface SVGSwitchElement extends SVGElement {} -interface SVGSymbolElement extends SVGElement {} -interface SVGTextElement extends SVGElement {} -interface SVGTextPathElement extends SVGElement {} -interface SVGTSpanElement extends SVGElement {} -interface SVGUseElement extends SVGElement {} -interface SVGViewElement extends SVGElement {} - -interface FormData {} -interface Text {} -interface TouchList {} -interface WebGLRenderingContext {} -interface WebGL2RenderingContext {} - -interface TrustedHTML {} - -interface Blob {} -interface MediaStream {} -interface MediaSource {} diff --git a/node_modules/@types/react/index.d.ts b/node_modules/@types/react/index.d.ts deleted file mode 100644 index 750b493..0000000 --- a/node_modules/@types/react/index.d.ts +++ /dev/null @@ -1,4370 +0,0 @@ -// NOTE: Users of the `experimental` builds of React should add a reference -// to 'react/experimental' in their project. See experimental.d.ts's top comment -// for reference and documentation on how exactly to do it. - -/// - -import * as CSS from "csstype"; - -type NativeAnimationEvent = AnimationEvent; -type NativeClipboardEvent = ClipboardEvent; -type NativeCompositionEvent = CompositionEvent; -type NativeDragEvent = DragEvent; -type NativeFocusEvent = FocusEvent; -type NativeInputEvent = InputEvent; -type NativeKeyboardEvent = KeyboardEvent; -type NativeMouseEvent = MouseEvent; -type NativeTouchEvent = TouchEvent; -type NativePointerEvent = PointerEvent; -type NativeSubmitEvent = SubmitEvent; -type NativeToggleEvent = ToggleEvent; -type NativeTransitionEvent = TransitionEvent; -type NativeUIEvent = UIEvent; -type NativeWheelEvent = WheelEvent; - -/** - * Used to represent DOM API's where users can either pass - * true or false as a boolean or as its equivalent strings. - */ -type Booleanish = boolean | "true" | "false"; - -/** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin MDN} - */ -type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined; - -declare const UNDEFINED_VOID_ONLY: unique symbol; - -/** - * @internal Use `Awaited` instead - */ -// Helper type to enable `Awaited`. -// Must be a copy of the non-thenables of `ReactNode`. -type AwaitedReactNode = - | React.ReactElement - | string - | number - | bigint - | Iterable - | React.ReactPortal - | boolean - | null - | undefined - | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[ - keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES - ]; - -/** - * The function returned from an effect passed to {@link React.useEffect useEffect}, - * which can be used to clean up the effect when the component unmounts. - * - * @see {@link https://react.dev/reference/react/useEffect React Docs} - */ -type Destructor = () => void | { [UNDEFINED_VOID_ONLY]: never }; -type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never }; - -// eslint-disable-next-line @definitelytyped/export-just-namespace -export = React; -export as namespace React; - -declare namespace React { - // - // React Elements - // ---------------------------------------------------------------------- - - /** - * Used to retrieve the possible components which accept a given set of props. - * - * Can be passed no type parameters to get a union of all possible components - * and tags. - * - * Is a superset of {@link ComponentType}. - * - * @template P The props to match against. If not passed, defaults to any. - * @template Tag An optional tag to match against. If not passed, attempts to match against all possible tags. - * - * @example - * - * ```tsx - * // All components and tags (img, embed etc.) - * // which accept `src` - * type SrcComponents = ElementType<{ src: any }>; - * ``` - * - * @example - * - * ```tsx - * // All components - * type AllComponents = ElementType; - * ``` - * - * @example - * - * ```tsx - * // All custom components which match `src`, and tags which - * // match `src`, narrowed down to just `audio` and `embed` - * type SrcComponents = ElementType<{ src: any }, 'audio' | 'embed'>; - * ``` - */ - type ElementType

= - | { [K in Tag]: P extends JSX.IntrinsicElements[K] ? K : never }[Tag] - | ComponentType

; - - /** - * Represents any user-defined component, either as a function or a class. - * - * Similar to {@link JSXElementConstructor}, but with extra properties like - * {@link FunctionComponent.defaultProps defaultProps }. - * - * @template P The props the component accepts. - * - * @see {@link ComponentClass} - * @see {@link FunctionComponent} - */ - type ComponentType

= ComponentClass

| FunctionComponent

; - - /** - * Represents any user-defined component, either as a function or a class. - * - * Similar to {@link ComponentType}, but without extra properties like - * {@link FunctionComponent.defaultProps defaultProps }. - * - * @template P The props the component accepts. - */ - type JSXElementConstructor

= - | (( - props: P, - ) => ReactNode | Promise) - // constructor signature must match React.Component - | (new(props: P, context: any) => Component); - - /** - * Created by {@link createRef}, or {@link useRef} when passed `null`. - * - * @template T The type of the ref's value. - * - * @example - * - * ```tsx - * const ref = createRef(); - * - * ref.current = document.createElement('div'); // Error - * ``` - */ - interface RefObject { - /** - * The current value of the ref. - */ - current: T; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES { - } - /** - * A callback fired whenever the ref's value changes. - * - * @template T The type of the ref's value. - * - * @see {@link https://react.dev/reference/react-dom/components/common#ref-callback React Docs} - * - * @example - * - * ```tsx - *

console.log(node)} /> - * ``` - */ - type RefCallback = { - bivarianceHack( - instance: T | null, - ): - | void - | (() => VoidOrUndefinedOnly) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES - ]; - }["bivarianceHack"]; - - /** - * A union type of all possible shapes for React refs. - * - * @see {@link RefCallback} - * @see {@link RefObject} - */ - - type Ref = RefCallback | RefObject | null; - /** - * @deprecated Use `Ref` instead. String refs are no longer supported. - * If you're typing a library with support for React versions with string refs, use `RefAttributes['ref']` instead. - */ - type LegacyRef = Ref; - /** - * @deprecated Use `ComponentRef` instead - * - * Retrieves the type of the 'ref' prop for a given component type or tag name. - * - * @template C The component type. - * - * @example - * - * ```tsx - * type MyComponentRef = React.ElementRef; - * ``` - * - * @example - * - * ```tsx - * type DivRef = React.ElementRef<'div'>; - * ``` - */ - type ElementRef< - C extends - | ForwardRefExoticComponent - | { new(props: any, context: any): Component } - | ((props: any) => ReactNode) - | keyof JSX.IntrinsicElements, - > = ComponentRef; - - type ComponentState = any; - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES {} - - /** - * A value which uniquely identifies a node among items in an array. - * - * @see {@link https://react.dev/learn/rendering-lists#keeping-list-items-in-order-with-key React Docs} - */ - type Key = - | string - | number - | bigint - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_KEY_TYPES - ]; - - /** - * @internal The props any component can receive. - * You don't have to add this type. All components automatically accept these props. - * ```tsx - * const Component = () =>
; - * - * ``` - * - * WARNING: The implementation of a component will never have access to these attributes. - * The following example would be incorrect usage because {@link Component} would never have access to `key`: - * ```tsx - * const Component = (props: React.Attributes) => props.key; - * ``` - */ - interface Attributes { - key?: Key | null | undefined; - } - /** - * The props any component accepting refs can receive. - * Class components, built-in browser components (e.g. `div`) and forwardRef components can receive refs and automatically accept these props. - * ```tsx - * const Component = forwardRef(() =>
); - * console.log(current)} /> - * ``` - * - * You only need this type if you manually author the types of props that need to be compatible with legacy refs. - * ```tsx - * interface Props extends React.RefAttributes {} - * declare const Component: React.FunctionComponent; - * ``` - * - * Otherwise it's simpler to directly use {@link Ref} since you can safely use the - * props type to describe to props that a consumer can pass to the component - * as well as describing the props the implementation of a component "sees". - * {@link RefAttributes} is generally not safe to describe both consumer and seen props. - * - * ```tsx - * interface Props extends { - * ref?: React.Ref | undefined; - * } - * declare const Component: React.FunctionComponent; - * ``` - * - * WARNING: The implementation of a component will not have access to the same type in versions of React supporting string refs. - * The following example would be incorrect usage because {@link Component} would never have access to a `ref` with type `string` - * ```tsx - * const Component = (props: React.RefAttributes) => props.ref; - * ``` - */ - interface RefAttributes extends Attributes { - /** - * Allows getting a ref to the component instance. - * Once the component unmounts, React will set `ref.current` to `null` - * (or call the ref with `null` if you passed a callback ref). - * - * @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} - */ - ref?: Ref | undefined; - } - - /** - * Represents the built-in attributes available to class components. - */ - interface ClassAttributes extends RefAttributes { - } - - /** - * Represents a JSX element. - * - * Where {@link ReactNode} represents everything that can be rendered, `ReactElement` - * only represents JSX. - * - * @template P The type of the props object - * @template T The type of the component or tag - * - * @example - * - * ```tsx - * const element: ReactElement =
; - * ``` - */ - interface ReactElement< - P = unknown, - T extends string | JSXElementConstructor = string | JSXElementConstructor, - > { - type: T; - props: P; - key: string | null; - } - - /** - * @deprecated - */ - interface ReactComponentElement< - T extends keyof JSX.IntrinsicElements | JSXElementConstructor, - P = Pick, Exclude, "key" | "ref">>, - > extends ReactElement> {} - - /** - * @deprecated Use `ReactElement>` - */ - interface FunctionComponentElement

extends ReactElement> { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref?: ("ref" extends keyof P ? P extends { ref?: infer R | undefined } ? R : never : never) | undefined; - } - - /** - * @deprecated Use `ReactElement>` - */ - type CElement> = ComponentElement; - /** - * @deprecated Use `ReactElement>` - */ - interface ComponentElement> extends ReactElement> { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref?: Ref | undefined; - } - - /** - * @deprecated Use {@link ComponentElement} instead. - */ - type ClassicElement

= CElement>; - - // string fallback for custom web-components - /** - * @deprecated Use `ReactElement` - */ - interface DOMElement

| SVGAttributes, T extends Element> - extends ReactElement - { - /** - * @deprecated Use `element.props.ref` instead. - */ - ref: Ref; - } - - // ReactHTML for ReactHTMLElement - interface ReactHTMLElement extends DetailedReactHTMLElement, T> {} - - interface DetailedReactHTMLElement

, T extends HTMLElement> extends DOMElement { - type: HTMLElementType; - } - - // ReactSVG for ReactSVGElement - interface ReactSVGElement extends DOMElement, SVGElement> { - type: SVGElementType; - } - - interface ReactPortal extends ReactElement { - children: ReactNode; - } - - /** - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {} - - /** - * Represents all of the things React can render. - * - * Where {@link ReactElement} only represents JSX, `ReactNode` represents everything that can be rendered. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/reactnode/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Typing children - * type Props = { children: ReactNode } - * - * const Component = ({ children }: Props) =>

{children}
- * - * hello - * ``` - * - * @example - * - * ```tsx - * // Typing a custom element - * type Props = { customElement: ReactNode } - * - * const Component = ({ customElement }: Props) =>
{customElement}
- * - * hello
} /> - * ``` - */ - // non-thenables need to be kept in sync with AwaitedReactNode - type ReactNode = - | ReactElement - | string - | number - | bigint - | Iterable - | ReactPortal - | boolean - | null - | undefined - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES - ] - | Promise; - - // - // Top Level API - // ---------------------------------------------------------------------- - - // DOM Elements - // TODO: generalize this to everything in `keyof ReactHTML`, not just "input" - function createElement( - type: "input", - props?: InputHTMLAttributes & ClassAttributes | null, - ...children: ReactNode[] - ): DetailedReactHTMLElement, HTMLInputElement>; - function createElement

, T extends HTMLElement>( - type: HTMLElementType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): DetailedReactHTMLElement; - function createElement

, T extends SVGElement>( - type: SVGElementType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): ReactSVGElement; - function createElement

, T extends Element>( - type: string, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): DOMElement; - - // Custom components - - function createElement

( - type: FunctionComponent

, - props?: Attributes & P | null, - ...children: ReactNode[] - ): FunctionComponentElement

; - function createElement

, C extends ComponentClass

>( - type: ClassType, - props?: ClassAttributes & P | null, - ...children: ReactNode[] - ): CElement; - function createElement

( - type: FunctionComponent

| ComponentClass

| string, - props?: Attributes & P | null, - ...children: ReactNode[] - ): ReactElement

; - - // DOM Elements - // ReactHTMLElement - function cloneElement

, T extends HTMLElement>( - element: DetailedReactHTMLElement, - props?: P, - ...children: ReactNode[] - ): DetailedReactHTMLElement; - // ReactHTMLElement, less specific - function cloneElement

, T extends HTMLElement>( - element: ReactHTMLElement, - props?: P, - ...children: ReactNode[] - ): ReactHTMLElement; - // SVGElement - function cloneElement

, T extends SVGElement>( - element: ReactSVGElement, - props?: P, - ...children: ReactNode[] - ): ReactSVGElement; - // DOM Element (has to be the last, because type checking stops at first overload that fits) - function cloneElement

, T extends Element>( - element: DOMElement, - props?: DOMAttributes & P, - ...children: ReactNode[] - ): DOMElement; - - // Custom components - function cloneElement

( - element: FunctionComponentElement

, - props?: Partial

& Attributes, - ...children: ReactNode[] - ): FunctionComponentElement

; - function cloneElement>( - element: CElement, - props?: Partial

& ClassAttributes, - ...children: ReactNode[] - ): CElement; - function cloneElement

( - element: ReactElement

, - props?: Partial

& Attributes, - ...children: ReactNode[] - ): ReactElement

; - - /** - * Describes the props accepted by a Context {@link Provider}. - * - * @template T The type of the value the context provides. - */ - interface ProviderProps { - value: T; - children?: ReactNode | undefined; - } - - /** - * Describes the props accepted by a Context {@link Consumer}. - * - * @template T The type of the value the context provides. - */ - interface ConsumerProps { - children: (value: T) => ReactNode; - } - - /** - * An object masquerading as a component. These are created by functions - * like {@link forwardRef}, {@link memo}, and {@link createContext}. - * - * In order to make TypeScript work, we pretend that they are normal - * components. - * - * But they are, in fact, not callable - instead, they are objects which - * are treated specially by the renderer. - * - * @template P The props the component accepts. - */ - interface ExoticComponent

{ - (props: P): ReactNode; - readonly $$typeof: symbol; - } - - /** - * An {@link ExoticComponent} with a `displayName` property applied to it. - * - * @template P The props the component accepts. - */ - interface NamedExoticComponent

extends ExoticComponent

{ - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * An {@link ExoticComponent} with a `propTypes` property applied to it. - * - * @template P The props the component accepts. - */ - interface ProviderExoticComponent

extends ExoticComponent

{ - } - - /** - * Used to retrieve the type of a context object from a {@link Context}. - * - * @template C The context object. - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const MyContext = createContext({ foo: 'bar' }); - * - * type ContextType = ContextType; - * // ContextType = { foo: string } - * ``` - */ - type ContextType> = C extends Context ? T : never; - - /** - * Wraps your components to specify the value of this context for all components inside. - * - * @see {@link https://react.dev/reference/react/createContext#provider React Docs} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * - * function App() { - * return ( - * - * - * - * ); - * } - * ``` - */ - type Provider = ProviderExoticComponent>; - - /** - * The old way to read context, before {@link useContext} existed. - * - * @see {@link https://react.dev/reference/react/createContext#consumer React Docs} - * - * @example - * - * ```tsx - * import { UserContext } from './user-context'; - * - * function Avatar() { - * return ( - * - * {user => {user.name}} - * - * ); - * } - * ``` - */ - type Consumer = ExoticComponent>; - - /** - * Context lets components pass information deep down without explicitly - * passing props. - * - * Created from {@link createContext} - * - * @see {@link https://react.dev/learn/passing-data-deeply-with-context React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * ``` - */ - interface Context extends Provider { - Provider: Provider; - Consumer: Consumer; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * Lets you create a {@link Context} that components can provide or read. - * - * @param defaultValue The value you want the context to have when there is no matching - * {@link Provider} in the tree above the component reading the context. This is meant - * as a "last resort" fallback. - * - * @see {@link https://react.dev/reference/react/createContext#reference React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/context/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * import { createContext } from 'react'; - * - * const ThemeContext = createContext('light'); - * function App() { - * return ( - * - * - * - * ); - * } - * ``` - */ - function createContext( - // If you thought this should be optional, see - // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106 - defaultValue: T, - ): Context; - - function isValidElement

(object: {} | null | undefined): object is ReactElement

; - - const Children: { - map( - children: C | readonly C[], - fn: (child: C, index: number) => T, - ): C extends null | undefined ? C : Array>; - forEach(children: C | readonly C[], fn: (child: C, index: number) => void): void; - count(children: any): number; - only(children: C): C extends any[] ? never : C; - toArray(children: ReactNode | ReactNode[]): Array>; - }; - - export interface FragmentProps { - children?: React.ReactNode; - } - /** - * Lets you group elements without a wrapper node. - * - * @see {@link https://react.dev/reference/react/Fragment React Docs} - * - * @example - * - * ```tsx - * import { Fragment } from 'react'; - * - * - * Hello - * World - * - * ``` - * - * @example - * - * ```tsx - * // Using the <> shorthand syntax: - * - * <> - * Hello - * World - * - * ``` - */ - const Fragment: ExoticComponent; - - /** - * Lets you find common bugs in your components early during development. - * - * @see {@link https://react.dev/reference/react/StrictMode React Docs} - * - * @example - * - * ```tsx - * import { StrictMode } from 'react'; - * - * - * - * - * ``` - */ - const StrictMode: ExoticComponent<{ children?: ReactNode | undefined }>; - - /** - * The props accepted by {@link Suspense}. - * - * @see {@link https://react.dev/reference/react/Suspense React Docs} - */ - interface SuspenseProps { - children?: ReactNode | undefined; - - /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */ - fallback?: ReactNode; - - /** - * A name for this Suspense boundary for instrumentation purposes. - * The name will help identify this boundary in React DevTools. - */ - name?: string | undefined; - } - - /** - * Lets you display a fallback until its children have finished loading. - * - * @see {@link https://react.dev/reference/react/Suspense React Docs} - * - * @example - * - * ```tsx - * import { Suspense } from 'react'; - * - * }> - * - * - * ``` - */ - const Suspense: ExoticComponent; - const version: string; - - /** - * The callback passed to {@link ProfilerProps.onRender}. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - type ProfilerOnRenderCallback = ( - /** - * The string id prop of the {@link Profiler} tree that has just committed. This lets - * you identify which part of the tree was committed if you are using multiple - * profilers. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - id: string, - /** - * This lets you know whether the tree has just been mounted for the first time - * or re-rendered due to a change in props, state, or hooks. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - phase: "mount" | "update" | "nested-update", - /** - * The number of milliseconds spent rendering the {@link Profiler} and its descendants - * for the current update. This indicates how well the subtree makes use of - * memoization (e.g. {@link memo} and {@link useMemo}). Ideally this value should decrease - * significantly after the initial mount as many of the descendants will only need to - * re-render if their specific props change. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - actualDuration: number, - /** - * The number of milliseconds estimating how much time it would take to re-render the entire - * {@link Profiler} subtree without any optimizations. It is calculated by summing up the most - * recent render durations of each component in the tree. This value estimates a worst-case - * cost of rendering (e.g. the initial mount or a tree with no memoization). Compare - * {@link actualDuration} against it to see if memoization is working. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - baseDuration: number, - /** - * A numeric timestamp for when React began rendering the current update. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - startTime: number, - /** - * A numeric timestamp for when React committed the current update. This value is shared - * between all profilers in a commit, enabling them to be grouped if desirable. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - */ - commitTime: number, - ) => void; - - /** - * The props accepted by {@link Profiler}. - * - * @see {@link https://react.dev/reference/react/Profiler React Docs} - */ - interface ProfilerProps { - children?: ReactNode | undefined; - id: string; - onRender: ProfilerOnRenderCallback; - } - - /** - * Lets you measure rendering performance of a React tree programmatically. - * - * @see {@link https://react.dev/reference/react/Profiler#onrender-callback React Docs} - * - * @example - * - * ```tsx - * - * - * - * ``` - */ - const Profiler: ExoticComponent; - - // - // Component API - // ---------------------------------------------------------------------- - - type ReactInstance = Component | Element; - - // Base component for plain JS classes - interface Component

extends ComponentLifecycle {} - class Component { - /** - * If set, `this.context` will be set at runtime to the current value of the given Context. - * - * @example - * - * ```ts - * type MyContext = number - * const Ctx = React.createContext(0) - * - * class Foo extends React.Component { - * static contextType = Ctx - * context!: React.ContextType - * render () { - * return <>My context's value: {this.context}; - * } - * } - * ``` - * - * @see {@link https://react.dev/reference/react/Component#static-contexttype} - */ - static contextType?: Context | undefined; - - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - static propTypes?: any; - - /** - * If using React Context, re-declare this in your class to be the - * `React.ContextType` of your `static contextType`. - * Should be used with type annotation or static contextType. - * - * @example - * ```ts - * static contextType = MyContext - * // For TS pre-3.7: - * context!: React.ContextType - * // For TS 3.7 and above: - * declare context: React.ContextType - * ``` - * - * @see {@link https://react.dev/reference/react/Component#context React Docs} - */ - context: unknown; - - // Keep in sync with constructor signature of JSXElementConstructor and ComponentClass. - constructor(props: P); - /** - * @param props - * @param context value of the parent {@link https://react.dev/reference/react/Component#context Context} specified - * in `contextType`. - */ - // TODO: Ideally we'd infer the constructor signatur from `contextType`. - // Might be hard to ship without breaking existing code. - constructor(props: P, context: any); - - // We MUST keep setState() as a unified signature because it allows proper checking of the method return type. - // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257 - // Also, the ` | S` allows intellisense to not be dumbisense - setState( - state: ((prevState: Readonly, props: Readonly

) => Pick | S | null) | (Pick | S | null), - callback?: () => void, - ): void; - - forceUpdate(callback?: () => void): void; - render(): ReactNode; - - readonly props: Readonly

; - state: Readonly; - } - - class PureComponent

extends Component {} - - /** - * @deprecated Use `ClassicComponent` from `create-react-class` - * - * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs} - * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm} - */ - interface ClassicComponent

extends Component { - replaceState(nextState: S, callback?: () => void): void; - isMounted(): boolean; - getInitialState?(): S; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - /** - * Represents the type of a function component. Can optionally - * receive a type argument that represents the props the component - * receives. - * - * @template P The props the component accepts. - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet} - * @alias for {@link FunctionComponent} - * - * @example - * - * ```tsx - * // With props: - * type Props = { name: string } - * - * const MyComponent: FC = (props) => { - * return

{props.name}
- * } - * ``` - * - * @example - * - * ```tsx - * // Without props: - * const MyComponentWithoutProps: FC = () => { - * return
MyComponentWithoutProps
- * } - * ``` - */ - type FC

= FunctionComponent

; - - /** - * Represents the type of a function component. Can optionally - * receive a type argument that represents the props the component - * accepts. - * - * @template P The props the component accepts. - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // With props: - * type Props = { name: string } - * - * const MyComponent: FunctionComponent = (props) => { - * return

{props.name}
- * } - * ``` - * - * @example - * - * ```tsx - * // Without props: - * const MyComponentWithoutProps: FunctionComponent = () => { - * return
MyComponentWithoutProps
- * } - * ``` - */ - interface FunctionComponent

{ - (props: P): ReactNode | Promise; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - * - * @example - * - * ```tsx - * - * const MyComponent: FC = () => { - * return

Hello!
- * } - * - * MyComponent.displayName = 'MyAwesomeComponent' - * ``` - */ - displayName?: string | undefined; - } - - /** - * The type of the ref received by a {@link ForwardRefRenderFunction}. - * - * @see {@link ForwardRefRenderFunction} - */ - // Making T nullable is assuming the refs will be managed by React or the component impl will write it somewhere else. - // But this isn't necessarily true. We haven't heard complains about it yet and hopefully `forwardRef` is removed from React before we do. - type ForwardedRef = ((instance: T | null) => void) | RefObject | null; - - /** - * The type of the function passed to {@link forwardRef}. This is considered different - * to a normal {@link FunctionComponent} because it receives an additional argument, - * - * @param props Props passed to the component, if any. - * @param ref A ref forwarded to the component of type {@link ForwardedRef}. - * - * @template T The type of the forwarded ref. - * @template P The type of the props the component accepts. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet} - * @see {@link forwardRef} - */ - interface ForwardRefRenderFunction { - (props: P, ref: ForwardedRef): ReactNode; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * Will show `ForwardRef(${Component.displayName || Component.name})` - * in devtools by default, but can be given its own specific name. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - } - - /** - * Represents a component class in React. - * - * @template P The props the component accepts. - * @template S The internal state of the component. - */ - interface ComponentClass

extends StaticLifecycle { - // constructor signature must match React.Component - new( - props: P, - /** - * Value of the parent {@link https://react.dev/reference/react/Component#context Context} specified - * in `contextType`. - */ - context?: any, - ): Component; - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - contextType?: Context | undefined; - defaultProps?: Partial

| undefined; - /** - * Used in debugging messages. You might want to set it - * explicitly if you want to display a different name for - * debugging purposes. - * - * @see {@link https://legacy.reactjs.org/docs/react-component.html#displayname Legacy React Docs} - */ - displayName?: string | undefined; - } - - /** - * @deprecated Use `ClassicComponentClass` from `create-react-class` - * - * @see {@link https://legacy.reactjs.org/docs/react-without-es6.html Legacy React Docs} - * @see {@link https://www.npmjs.com/package/create-react-class `create-react-class` on npm} - */ - interface ClassicComponentClass

extends ComponentClass

{ - new(props: P): ClassicComponent; - getDefaultProps?(): P; - } - - /** - * Used in {@link createElement} and {@link createFactory} to represent - * a class. - * - * An intersection type is used to infer multiple type parameters from - * a single argument, which is useful for many top-level API defs. - * See {@link https://github.com/Microsoft/TypeScript/issues/7234 this GitHub issue} - * for more info. - */ - type ClassType, C extends ComponentClass

> = - & C - & (new(props: P, context: any) => T); - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - // This should actually be something like `Lifecycle | DeprecatedLifecycle`, - // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle - // methods are present. - interface ComponentLifecycle extends NewLifecycle, DeprecatedLifecycle { - /** - * Called immediately after a component is mounted. Setting state here will trigger re-rendering. - */ - componentDidMount?(): void; - /** - * Called to determine whether the change in props and state should trigger a re-render. - * - * `Component` always returns true. - * `PureComponent` implements a shallow comparison on props and state and returns true if any - * props or states have changed. - * - * If false is returned, {@link Component.render}, `componentWillUpdate` - * and `componentDidUpdate` will not be called. - */ - shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): boolean; - /** - * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as - * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`. - */ - componentWillUnmount?(): void; - /** - * Catches exceptions generated in descendant components. Unhandled exceptions will cause - * the entire component tree to unmount. - */ - componentDidCatch?(error: Error, errorInfo: ErrorInfo): void; - } - - // Unfortunately, we have no way of declaring that the component constructor must implement this - interface StaticLifecycle { - getDerivedStateFromProps?: GetDerivedStateFromProps | undefined; - getDerivedStateFromError?: GetDerivedStateFromError | undefined; - } - - type GetDerivedStateFromProps = - /** - * Returns an update to a component's state based on its new props and old state. - * - * Note: its presence prevents any of the deprecated lifecycle methods from being invoked - */ - (nextProps: Readonly

, prevState: S) => Partial | null; - - type GetDerivedStateFromError = - /** - * This lifecycle is invoked after an error has been thrown by a descendant component. - * It receives the error that was thrown as a parameter and should return a value to update state. - * - * Note: its presence prevents any of the deprecated lifecycle methods from being invoked - */ - (error: any) => Partial | null; - - // This should be "infer SS" but can't use it yet - interface NewLifecycle { - /** - * Runs before React applies the result of {@link Component.render render} to the document, and - * returns an object to be given to {@link componentDidUpdate}. Useful for saving - * things such as scroll position before {@link Component.render render} causes changes to it. - * - * Note: the presence of this method prevents any of the deprecated - * lifecycle events from running. - */ - getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly): SS | null; - /** - * Called immediately after updating occurs. Not called for the initial render. - * - * The snapshot is only present if {@link getSnapshotBeforeUpdate} is present and returns non-null. - */ - componentDidUpdate?(prevProps: Readonly

, prevState: Readonly, snapshot?: SS): void; - } - - interface DeprecatedLifecycle { - /** - * Called immediately before mounting occurs, and before {@link Component.render}. - * Avoid introducing any side-effects or subscriptions in this method. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use {@link ComponentLifecycle.componentDidMount componentDidMount} or the constructor instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillMount?(): void; - /** - * Called immediately before mounting occurs, and before {@link Component.render}. - * Avoid introducing any side-effects or subscriptions in this method. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use {@link ComponentLifecycle.componentDidMount componentDidMount} or the constructor instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillMount?(): void; - /** - * Called when the component may be receiving new props. - * React may call this even if props have not changed, so be sure to compare new and existing - * props if you only want to handle changes. - * - * Calling {@link Component.setState} generally does not trigger this method. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use static {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; - /** - * Called when the component may be receiving new props. - * React may call this even if props have not changed, so be sure to compare new and existing - * props if you only want to handle changes. - * - * Calling {@link Component.setState} generally does not trigger this method. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use static {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; - /** - * Called immediately before rendering when new props or state is received. Not called for the initial render. - * - * Note: You cannot call {@link Component.setState} here. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17 - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void; - /** - * Called immediately before rendering when new props or state is received. Not called for the initial render. - * - * Note: You cannot call {@link Component.setState} here. - * - * This method will not stop working in React 17. - * - * Note: the presence of {@link NewLifecycle.getSnapshotBeforeUpdate getSnapshotBeforeUpdate} - * or {@link StaticLifecycle.getDerivedStateFromProps getDerivedStateFromProps} prevents - * this from being invoked. - * - * @deprecated 16.3, use getSnapshotBeforeUpdate instead - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update} - * @see {@link https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path} - */ - UNSAFE_componentWillUpdate?(nextProps: Readonly

, nextState: Readonly, nextContext: any): void; - } - - function createRef(): RefObject; - - /** - * The type of the component returned from {@link forwardRef}. - * - * @template P The props the component accepts, if any. - * - * @see {@link ExoticComponent} - */ - interface ForwardRefExoticComponent

extends NamedExoticComponent

{ - /** - * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. - */ - propTypes?: any; - } - - /** - * Lets your component expose a DOM node to a parent component - * using a ref. - * - * @see {@link https://react.dev/reference/react/forwardRef React Docs} - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/forward_and_create_ref/ React TypeScript Cheatsheet} - * - * @param render See the {@link ForwardRefRenderFunction}. - * - * @template T The type of the DOM node. - * @template P The props the component accepts, if any. - * - * @example - * - * ```tsx - * interface Props { - * children?: ReactNode; - * type: "submit" | "button"; - * } - * - * export const FancyButton = forwardRef((props, ref) => ( - * - * )); - * ``` - */ - function forwardRef( - render: ForwardRefRenderFunction>, - ): ForwardRefExoticComponent & RefAttributes>; - - /** - * Omits the 'ref' attribute from the given props object. - * - * @template Props The props object type. - */ - type PropsWithoutRef = - // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions. - // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types - // https://github.com/Microsoft/TypeScript/issues/28339 - Props extends any ? ("ref" extends keyof Props ? Omit : Props) : Props; - /** - * Ensures that the props do not include string ref, which cannot be forwarded - * @deprecated Use `Props` directly. `PropsWithRef` is just an alias for `Props` - */ - type PropsWithRef = Props; - - type PropsWithChildren

= P & { children?: ReactNode | undefined }; - - /** - * Used to retrieve the props a component accepts. Can either be passed a string, - * indicating a DOM element (e.g. 'div', 'span', etc.) or the type of a React - * component. - * - * It's usually better to use {@link ComponentPropsWithRef} or {@link ComponentPropsWithoutRef} - * instead of this type, as they let you be explicit about whether or not to include - * the `ref` prop. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentProps<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>

; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentProps = React.ComponentProps; - * ``` - */ - type ComponentProps> = T extends - JSXElementConstructor ? Props - : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] - : {}; - - /** - * Used to retrieve the props a component accepts with its ref. Can either be - * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the - * type of a React component. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentPropsWithRef<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithRef = React.ComponentPropsWithRef; - * ``` - */ - type ComponentPropsWithRef = T extends JSXElementConstructor - // If it's a class i.e. newable we're dealing with a class component - ? T extends abstract new(args: any) => any ? PropsWithoutRef & RefAttributes> - : Props - : ComponentProps; - /** - * Used to retrieve the props a custom component accepts with its ref. - * - * Unlike {@link ComponentPropsWithRef}, this only works with custom - * components, i.e. components you define yourself. This is to improve - * type-checking performance. - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithRef = React.CustomComponentPropsWithRef; - * ``` - */ - type CustomComponentPropsWithRef = T extends JSXElementConstructor - // If it's a class i.e. newable we're dealing with a class component - ? T extends abstract new(args: any) => any ? PropsWithoutRef & RefAttributes> - : Props - : never; - - /** - * Used to retrieve the props a component accepts without its ref. Can either be - * passed a string, indicating a DOM element (e.g. 'div', 'span', etc.) or the - * type of a React component. - * - * @see {@link https://react-typescript-cheatsheet.netlify.app/docs/react-types/componentprops/ React TypeScript Cheatsheet} - * - * @example - * - * ```tsx - * // Retrieves the props an 'input' element accepts - * type InputProps = React.ComponentPropsWithoutRef<'input'>; - * ``` - * - * @example - * - * ```tsx - * const MyComponent = (props: { foo: number, bar: string }) =>
; - * - * // Retrieves the props 'MyComponent' accepts - * type MyComponentPropsWithoutRef = React.ComponentPropsWithoutRef; - * ``` - */ - type ComponentPropsWithoutRef = PropsWithoutRef>; - - /** - * Retrieves the type of the 'ref' prop for a given component type or tag name. - * - * @template C The component type. - * - * @example - * - * ```tsx - * type MyComponentRef = React.ComponentRef; - * ``` - * - * @example - * - * ```tsx - * type DivRef = React.ComponentRef<'div'>; - * ``` - */ - type ComponentRef = ComponentPropsWithRef extends RefAttributes ? Method - : never; - - // will show `Memo(${Component.displayName || Component.name})` in devtools by default, - // but can be given its own specific name - type MemoExoticComponent> = NamedExoticComponent> & { - readonly type: T; - }; - - /** - * Lets you skip re-rendering a component when its props are unchanged. - * - * @see {@link https://react.dev/reference/react/memo React Docs} - * - * @param Component The component to memoize. - * @param propsAreEqual A function that will be used to determine if the props have changed. - * - * @example - * - * ```tsx - * import { memo } from 'react'; - * - * const SomeComponent = memo(function SomeComponent(props: { foo: string }) { - * // ... - * }); - * ``` - */ - function memo

( - Component: FunctionComponent

, - propsAreEqual?: (prevProps: Readonly

, nextProps: Readonly

) => boolean, - ): NamedExoticComponent

; - function memo>( - Component: T, - propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean, - ): MemoExoticComponent; - - interface LazyExoticComponent> - extends ExoticComponent> - { - readonly _result: T; - } - - /** - * Lets you defer loading a component’s code until it is rendered for the first time. - * - * @see {@link https://react.dev/reference/react/lazy React Docs} - * - * @param load A function that returns a `Promise` or another thenable (a `Promise`-like object with a - * then method). React will not call `load` until the first time you attempt to render the returned - * component. After React first calls load, it will wait for it to resolve, and then render the - * resolved value’s `.default` as a React component. Both the returned `Promise` and the `Promise`’s - * resolved value will be cached, so React will not call load more than once. If the `Promise` rejects, - * React will throw the rejection reason for the nearest Error Boundary to handle. - * - * @example - * - * ```tsx - * import { lazy } from 'react'; - * - * const MarkdownPreview = lazy(() => import('./MarkdownPreview.js')); - * ``` - */ - function lazy>( - load: () => Promise<{ default: T }>, - ): LazyExoticComponent; - - // - // React Hooks - // ---------------------------------------------------------------------- - - /** - * The instruction passed to a {@link Dispatch} function in {@link useState} - * to tell React what the next value of the {@link useState} should be. - * - * Often found wrapped in {@link Dispatch}. - * - * @template S The type of the state. - * - * @example - * - * ```tsx - * // This return type correctly represents the type of - * // `setCount` in the example below. - * const useCustomState = (): Dispatch> => { - * const [count, setCount] = useState(0); - * - * return setCount; - * } - * ``` - */ - type SetStateAction = S | ((prevState: S) => S); - - /** - * A function that can be used to update the state of a {@link useState} - * or {@link useReducer} hook. - */ - type Dispatch = (value: A) => void; - /** - * A {@link Dispatch} function can sometimes be called without any arguments. - */ - type DispatchWithoutAction = () => void; - // Limit the reducer to accept only 0 or 1 action arguments - // eslint-disable-next-line @definitelytyped/no-single-element-tuple-type - type AnyActionArg = [] | [any]; - // Get the dispatch type from the reducer arguments (captures optional action argument correctly) - type ActionDispatch = (...args: ActionArg) => void; - // Unlike redux, the actions _can_ be anything - type Reducer = (prevState: S, action: A) => S; - // If useReducer accepts a reducer without action, dispatch may be called without any parameters. - type ReducerWithoutAction = (prevState: S) => S; - // types used to try and prevent the compiler from reducing S - // to a supertype common with the second argument to useReducer() - type ReducerState> = R extends Reducer ? S : never; - type DependencyList = readonly unknown[]; - - // NOTE: callbacks are _only_ allowed to return either void, or a destructor. - type EffectCallback = () => void | Destructor; - - /** - * @deprecated Use `RefObject` instead. - */ - interface MutableRefObject { - current: T; - } - - // This will technically work if you give a Consumer or Provider but it's deprecated and warns - /** - * Accepts a context object (the value returned from `React.createContext`) and returns the current - * context value, as given by the nearest context provider for the given context. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useContext} - */ - function useContext(context: Context /*, (not public API) observedBits?: number|boolean */): T; - /** - * Returns a stateful value, and a function to update it. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useState} - */ - function useState(initialState: S | (() => S)): [S, Dispatch>]; - // convenience overload when first argument is omitted - /** - * Returns a stateful value, and a function to update it. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useState} - */ - function useState(): [S | undefined, Dispatch>]; - /** - * An alternative to `useState`. - * - * `useReducer` is usually preferable to `useState` when you have complex state logic that involves - * multiple sub-values. It also lets you optimize performance for components that trigger deep - * updates because you can pass `dispatch` down instead of callbacks. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useReducer} - */ - function useReducer( - reducer: (prevState: S, ...args: A) => S, - initialState: S, - ): [S, ActionDispatch]; - /** - * An alternative to `useState`. - * - * `useReducer` is usually preferable to `useState` when you have complex state logic that involves - * multiple sub-values. It also lets you optimize performance for components that trigger deep - * updates because you can pass `dispatch` down instead of callbacks. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useReducer} - */ - function useReducer( - reducer: (prevState: S, ...args: A) => S, - initialArg: I, - init: (i: I) => S, - ): [S, ActionDispatch]; - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T): RefObject; - // convenience overload for refs given as a ref prop as they typically start with a null value - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T | null): RefObject; - // convenience overload for undefined initialValue - /** - * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument - * (`initialValue`). The returned object will persist for the full lifetime of the component. - * - * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable - * value around similar to how you’d use instance fields in classes. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useRef} - */ - function useRef(initialValue: T | undefined): RefObject; - /** - * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations. - * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside - * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint. - * - * Prefer the standard `useEffect` when possible to avoid blocking visual updates. - * - * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as - * `componentDidMount` and `componentDidUpdate`. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useLayoutEffect} - */ - function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void; - /** - * Accepts a function that contains imperative, possibly effectful code. - * - * @param effect Imperative function that can return a cleanup function - * @param deps If present, effect will only activate if the values in the list change. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useEffect} - */ - function useEffect(effect: EffectCallback, deps?: DependencyList): void; - /** - * @see {@link https://react.dev/reference/react/useEffectEvent `useEffectEvent()` documentation} - * @version 19.2.0 - */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - export function useEffectEvent(callback: T): T; - // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref - /** - * `useImperativeHandle` customizes the instance value that is exposed to parent components when using - * `ref`. As always, imperative code using refs should be avoided in most cases. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useImperativeHandle} - */ - function useImperativeHandle(ref: Ref | undefined, init: () => R, deps?: DependencyList): void; - // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key - // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y. - /** - * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs` - * has changed. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useCallback} - */ - // A specific function type would not trigger implicit any. - // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types. - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - function useCallback(callback: T, deps: DependencyList): T; - /** - * `useMemo` will only recompute the memoized value when one of the `deps` has changed. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useMemo} - */ - // allow undefined, but don't make it optional as that is very likely a mistake - function useMemo(factory: () => T, deps: DependencyList): T; - /** - * `useDebugValue` can be used to display a label for custom hooks in React DevTools. - * - * NOTE: We don’t recommend adding debug values to every custom hook. - * It’s most valuable for custom hooks that are part of shared libraries. - * - * @version 16.8.0 - * @see {@link https://react.dev/reference/react/useDebugValue} - */ - // the name of the custom hook is itself derived from the function name at runtime: - // it's just the function name without the "use" prefix. - function useDebugValue(value: T, format?: (value: T) => any): void; - - export type TransitionFunction = () => VoidOrUndefinedOnly | Promise; - // strange definition to allow vscode to show documentation on the invocation - export interface TransitionStartFunction { - /** - * State updates caused inside the callback are allowed to be deferred. - * - * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** - * - * @param callback A function which causes state updates that can be deferred. - */ - (callback: TransitionFunction): void; - } - - /** - * Returns a deferred version of the value that may “lag behind” it. - * - * This is commonly used to keep the interface responsive when you have something that renders immediately - * based on user input and something that needs to wait for a data fetch. - * - * A good example of this is a text input. - * - * @param value The value that is going to be deferred - * @param initialValue A value to use during the initial render of a component. If this option is omitted, `useDeferredValue` will not defer during the initial render, because there’s no previous version of `value` that it can render instead. - * - * @see {@link https://react.dev/reference/react/useDeferredValue} - */ - export function useDeferredValue(value: T, initialValue?: T): T; - - /** - * Allows components to avoid undesirable loading states by waiting for content to load - * before transitioning to the next screen. It also allows components to defer slower, - * data fetching updates until subsequent renders so that more crucial updates can be - * rendered immediately. - * - * The `useTransition` hook returns two values in an array. - * - * The first is a boolean, React’s way of informing us whether we’re waiting for the transition to finish. - * The second is a function that takes a callback. We can use it to tell React which state we want to defer. - * - * **If some state update causes a component to suspend, that state update should be wrapped in a transition.** - * - * @see {@link https://react.dev/reference/react/useTransition} - */ - export function useTransition(): [boolean, TransitionStartFunction]; - - /** - * Similar to `useTransition` but allows uses where hooks are not available. - * - * @param callback A function which causes state updates that can be deferred. - */ - export function startTransition(scope: TransitionFunction): void; - - /** - * Wrap any code rendering and triggering updates to your components into `act()` calls. - * - * Ensures that the behavior in your tests matches what happens in the browser - * more closely by executing pending `useEffect`s before returning. This also - * reduces the amount of re-renders done. - * - * @param callback A synchronous, void callback that will execute as a single, complete React commit. - * - * @see {@link https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks} - */ - // NOTES - // - the order of these signatures matters - typescript will check the signatures in source order. - // If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with - // `strictNullChecks: false`. - // - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true` - // While act does always return Thenable, if a void function is passed, we pretend the return value is also void to not trigger dangling Promise lint rules. - export function act(callback: () => VoidOrUndefinedOnly): void; - export function act(callback: () => T | Promise): Promise; - - export function useId(): string; - - /** - * @param effect Imperative function that can return a cleanup function - * @param deps If present, effect will only activate if the values in the list change. - * - * @see {@link https://github.com/facebook/react/pull/21913} - */ - export function useInsertionEffect(effect: EffectCallback, deps?: DependencyList): void; - - /** - * @param subscribe - * @param getSnapshot - * - * @see {@link https://github.com/reactwg/react-18/discussions/86} - */ - // keep in sync with `useSyncExternalStore` from `use-sync-external-store` - export function useSyncExternalStore( - subscribe: (onStoreChange: () => void) => () => void, - getSnapshot: () => Snapshot, - getServerSnapshot?: () => Snapshot, - ): Snapshot; - - export function useOptimistic( - passthrough: State, - ): [State, (action: State | ((pendingState: State) => State)) => void]; - export function useOptimistic( - passthrough: State, - reducer: (state: State, action: Action) => State, - ): [State, (action: Action) => void]; - - interface UntrackedReactPromise extends PromiseLike { - status?: void; - } - - export interface PendingReactPromise extends PromiseLike { - status: "pending"; - } - - export interface FulfilledReactPromise extends PromiseLike { - status: "fulfilled"; - value: T; - } - - export interface RejectedReactPromise extends PromiseLike { - status: "rejected"; - reason: unknown; - } - - export type ReactPromise = - | UntrackedReactPromise - | PendingReactPromise - | FulfilledReactPromise - | RejectedReactPromise; - - export type Usable = ReactPromise | Context; - - export function use(usable: Usable): T; - - export function useActionState( - action: (state: Awaited) => State | Promise, - initialState: Awaited, - permalink?: string, - ): [state: Awaited, dispatch: () => void, isPending: boolean]; - export function useActionState( - action: (state: Awaited, payload: Payload) => State | Promise, - initialState: Awaited, - permalink?: string, - ): [state: Awaited, dispatch: (payload: Payload) => void, isPending: boolean]; - - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - export function cache(fn: CachedFunction): CachedFunction; - - export interface CacheSignal {} - /** - * @version 19.2.0 - */ - export function cacheSignal(): null | CacheSignal; - - export interface ActivityProps { - /** - * @default "visible" - */ - mode?: - | "hidden" - | "visible" - | undefined; - /** - * A name for this Activity boundary for instrumentation purposes. - * The name will help identify this boundary in React DevTools. - */ - name?: string | undefined; - children: ReactNode; - } - - /** - * @see {@link https://react.dev/reference/react/Activity `` documentation} - * @version 19.2.0 - */ - export const Activity: ExoticComponent; - - /** - * Warning: Only available in development builds. - * - * @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs} - * @version 19.1.0 - */ - function captureOwnerStack(): string | null; - - // - // Event System - // ---------------------------------------------------------------------- - // TODO: change any to unknown when moving to TS v3 - interface BaseSyntheticEvent { - nativeEvent: E; - currentTarget: C; - target: T; - bubbles: boolean; - cancelable: boolean; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - preventDefault(): void; - isDefaultPrevented(): boolean; - stopPropagation(): void; - isPropagationStopped(): boolean; - persist(): void; - timeStamp: number; - type: string; - } - - /** - * currentTarget - a reference to the element on which the event listener is registered. - * - * target - a reference to the element from which the event was originally dispatched. - * This might be a child element to the element on which the event listener is registered. - * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682 - */ - interface SyntheticEvent extends BaseSyntheticEvent {} - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface CompositionEvent extends SyntheticEvent { - data: string; - } - - interface DragEvent extends MouseEvent { - dataTransfer: DataTransfer; - } - - interface PointerEvent extends MouseEvent { - pointerId: number; - pressure: number; - tangentialPressure: number; - tiltX: number; - tiltY: number; - twist: number; - width: number; - height: number; - pointerType: "mouse" | "pen" | "touch"; - isPrimary: boolean; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: (EventTarget & RelatedTarget) | null; - target: EventTarget & Target; - } - - /** - * @deprecated FormEvent doesn't actually exist. - * You probably meant to use {@link ChangeEvent}, {@link InputEvent}, {@link SubmitEvent}, or just {@link SyntheticEvent} instead - * depending on the event type. - */ - interface FormEvent extends SyntheticEvent { - } - - interface InvalidEvent extends SyntheticEvent { - } - - /** - * change events bubble in React so their target is generally unknown. - * Only for form elements we know their target type because form events can't - * be nested. - * This type exists purely to narrow `target` for form elements. It doesn't - * reflect a DOM event. Change events are just fired as standard {@link SyntheticEvent}. - */ - interface ChangeEvent extends SyntheticEvent { - // TODO: This is wrong for change event handlers on arbitrary. Should - // be EventTarget & Target, but kept for backward compatibility until React 20. - target: EventTarget & CurrentTarget; - } - - interface InputEvent extends SyntheticEvent { - data: string; - } - - export type ModifierKey = - | "Alt" - | "AltGraph" - | "CapsLock" - | "Control" - | "Fn" - | "FnLock" - | "Hyper" - | "Meta" - | "NumLock" - | "ScrollLock" - | "Shift" - | "Super" - | "Symbol" - | "SymbolLock"; - - interface KeyboardEvent extends UIEvent { - altKey: boolean; - /** @deprecated */ - charCode: number; - ctrlKey: boolean; - code: string; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - /** - * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values - */ - key: string; - /** @deprecated */ - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - /** @deprecated */ - which: number; - } - - interface MouseEvent extends UIEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - metaKey: boolean; - movementX: number; - movementY: number; - pageX: number; - pageY: number; - relatedTarget: EventTarget | null; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface SubmitEvent extends SyntheticEvent { - // `submitter` is available in react@canary - // submitter: HTMLElement | null; - // SubmitEvents are always targetted at HTMLFormElements. - target: EventTarget & HTMLFormElement; - } - - interface TouchEvent extends UIEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - /** - * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method. - */ - getModifierState(key: ModifierKey): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends MouseEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - interface AnimationEvent extends SyntheticEvent { - animationName: string; - elapsedTime: number; - pseudoElement: string; - } - - interface ToggleEvent extends SyntheticEvent { - oldState: "closed" | "open"; - newState: "closed" | "open"; - } - - interface TransitionEvent extends SyntheticEvent { - elapsedTime: number; - propertyName: string; - pseudoElement: string; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - type EventHandler> = { bivarianceHack(event: E): void }["bivarianceHack"]; - - type ReactEventHandler = EventHandler>; - - type ClipboardEventHandler = EventHandler>; - type CompositionEventHandler = EventHandler>; - type DragEventHandler = EventHandler>; - type FocusEventHandler = EventHandler>; - /** - * @deprecated FormEventHandler doesn't actually exist. - * You probably meant to use {@link ChangeEventHandler}, {@link InputEventHandler}, {@link SubmitEventHandler}, or just {@link EventHandler} instead - * depending on the event type. - */ - type FormEventHandler = EventHandler>; - type ChangeEventHandler = EventHandler< - ChangeEvent - >; - type InputEventHandler = EventHandler>; - type KeyboardEventHandler = EventHandler>; - type MouseEventHandler = EventHandler>; - type SubmitEventHandler = EventHandler>; - type TouchEventHandler = EventHandler>; - type PointerEventHandler = EventHandler>; - type UIEventHandler = EventHandler>; - type WheelEventHandler = EventHandler>; - type AnimationEventHandler = EventHandler>; - type ToggleEventHandler = EventHandler>; - type TransitionEventHandler = EventHandler>; - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface HTMLProps extends AllHTMLAttributes, ClassAttributes { - } - - type DetailedHTMLProps, T> = ClassAttributes & E; - - interface SVGProps extends SVGAttributes, ClassAttributes { - } - - interface SVGLineElementAttributes extends SVGProps {} - interface SVGTextElementAttributes extends SVGProps {} - - interface DOMAttributes { - children?: ReactNode | undefined; - dangerouslySetInnerHTML?: { - // Should be InnerHTML['innerHTML']. - // But unfortunately we're mixing renderer-specific type declarations. - __html: string | TrustedHTML; - } | undefined; - - // Clipboard Events - onCopy?: ClipboardEventHandler | undefined; - onCopyCapture?: ClipboardEventHandler | undefined; - onCut?: ClipboardEventHandler | undefined; - onCutCapture?: ClipboardEventHandler | undefined; - onPaste?: ClipboardEventHandler | undefined; - onPasteCapture?: ClipboardEventHandler | undefined; - - // Composition Events - onCompositionEnd?: CompositionEventHandler | undefined; - onCompositionEndCapture?: CompositionEventHandler | undefined; - onCompositionStart?: CompositionEventHandler | undefined; - onCompositionStartCapture?: CompositionEventHandler | undefined; - onCompositionUpdate?: CompositionEventHandler | undefined; - onCompositionUpdateCapture?: CompositionEventHandler | undefined; - - // Focus Events - onFocus?: FocusEventHandler | undefined; - onFocusCapture?: FocusEventHandler | undefined; - onBlur?: FocusEventHandler | undefined; - onBlurCapture?: FocusEventHandler | undefined; - - // form related Events - onChange?: ChangeEventHandler | undefined; - onChangeCapture?: ChangeEventHandler | undefined; - onBeforeInput?: InputEventHandler | undefined; - onBeforeInputCapture?: InputEventHandler | undefined; - onInput?: InputEventHandler | undefined; - onInputCapture?: InputEventHandler | undefined; - onReset?: ReactEventHandler | undefined; - onResetCapture?: ReactEventHandler | undefined; - onSubmit?: SubmitEventHandler | undefined; - onSubmitCapture?: SubmitEventHandler | undefined; - onInvalid?: ReactEventHandler | undefined; - onInvalidCapture?: ReactEventHandler | undefined; - - // Image Events - onLoad?: ReactEventHandler | undefined; - onLoadCapture?: ReactEventHandler | undefined; - onError?: ReactEventHandler | undefined; // also a Media Event - onErrorCapture?: ReactEventHandler | undefined; // also a Media Event - - // Keyboard Events - onKeyDown?: KeyboardEventHandler | undefined; - onKeyDownCapture?: KeyboardEventHandler | undefined; - /** @deprecated Use `onKeyUp` or `onKeyDown` instead */ - onKeyPress?: KeyboardEventHandler | undefined; - /** @deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead */ - onKeyPressCapture?: KeyboardEventHandler | undefined; - onKeyUp?: KeyboardEventHandler | undefined; - onKeyUpCapture?: KeyboardEventHandler | undefined; - - // Media Events - onAbort?: ReactEventHandler | undefined; - onAbortCapture?: ReactEventHandler | undefined; - onCanPlay?: ReactEventHandler | undefined; - onCanPlayCapture?: ReactEventHandler | undefined; - onCanPlayThrough?: ReactEventHandler | undefined; - onCanPlayThroughCapture?: ReactEventHandler | undefined; - onDurationChange?: ReactEventHandler | undefined; - onDurationChangeCapture?: ReactEventHandler | undefined; - onEmptied?: ReactEventHandler | undefined; - onEmptiedCapture?: ReactEventHandler | undefined; - onEncrypted?: ReactEventHandler | undefined; - onEncryptedCapture?: ReactEventHandler | undefined; - onEnded?: ReactEventHandler | undefined; - onEndedCapture?: ReactEventHandler | undefined; - onLoadedData?: ReactEventHandler | undefined; - onLoadedDataCapture?: ReactEventHandler | undefined; - onLoadedMetadata?: ReactEventHandler | undefined; - onLoadedMetadataCapture?: ReactEventHandler | undefined; - onLoadStart?: ReactEventHandler | undefined; - onLoadStartCapture?: ReactEventHandler | undefined; - onPause?: ReactEventHandler | undefined; - onPauseCapture?: ReactEventHandler | undefined; - onPlay?: ReactEventHandler | undefined; - onPlayCapture?: ReactEventHandler | undefined; - onPlaying?: ReactEventHandler | undefined; - onPlayingCapture?: ReactEventHandler | undefined; - onProgress?: ReactEventHandler | undefined; - onProgressCapture?: ReactEventHandler | undefined; - onRateChange?: ReactEventHandler | undefined; - onRateChangeCapture?: ReactEventHandler | undefined; - onSeeked?: ReactEventHandler | undefined; - onSeekedCapture?: ReactEventHandler | undefined; - onSeeking?: ReactEventHandler | undefined; - onSeekingCapture?: ReactEventHandler | undefined; - onStalled?: ReactEventHandler | undefined; - onStalledCapture?: ReactEventHandler | undefined; - onSuspend?: ReactEventHandler | undefined; - onSuspendCapture?: ReactEventHandler | undefined; - onTimeUpdate?: ReactEventHandler | undefined; - onTimeUpdateCapture?: ReactEventHandler | undefined; - onVolumeChange?: ReactEventHandler | undefined; - onVolumeChangeCapture?: ReactEventHandler | undefined; - onWaiting?: ReactEventHandler | undefined; - onWaitingCapture?: ReactEventHandler | undefined; - - // MouseEvents - onAuxClick?: MouseEventHandler | undefined; - onAuxClickCapture?: MouseEventHandler | undefined; - onClick?: MouseEventHandler | undefined; - onClickCapture?: MouseEventHandler | undefined; - onContextMenu?: MouseEventHandler | undefined; - onContextMenuCapture?: MouseEventHandler | undefined; - onDoubleClick?: MouseEventHandler | undefined; - onDoubleClickCapture?: MouseEventHandler | undefined; - onDrag?: DragEventHandler | undefined; - onDragCapture?: DragEventHandler | undefined; - onDragEnd?: DragEventHandler | undefined; - onDragEndCapture?: DragEventHandler | undefined; - onDragEnter?: DragEventHandler | undefined; - onDragEnterCapture?: DragEventHandler | undefined; - onDragExit?: DragEventHandler | undefined; - onDragExitCapture?: DragEventHandler | undefined; - onDragLeave?: DragEventHandler | undefined; - onDragLeaveCapture?: DragEventHandler | undefined; - onDragOver?: DragEventHandler | undefined; - onDragOverCapture?: DragEventHandler | undefined; - onDragStart?: DragEventHandler | undefined; - onDragStartCapture?: DragEventHandler | undefined; - onDrop?: DragEventHandler | undefined; - onDropCapture?: DragEventHandler | undefined; - onMouseDown?: MouseEventHandler | undefined; - onMouseDownCapture?: MouseEventHandler | undefined; - onMouseEnter?: MouseEventHandler | undefined; - onMouseLeave?: MouseEventHandler | undefined; - onMouseMove?: MouseEventHandler | undefined; - onMouseMoveCapture?: MouseEventHandler | undefined; - onMouseOut?: MouseEventHandler | undefined; - onMouseOutCapture?: MouseEventHandler | undefined; - onMouseOver?: MouseEventHandler | undefined; - onMouseOverCapture?: MouseEventHandler | undefined; - onMouseUp?: MouseEventHandler | undefined; - onMouseUpCapture?: MouseEventHandler | undefined; - - // Selection Events - onSelect?: ReactEventHandler | undefined; - onSelectCapture?: ReactEventHandler | undefined; - - // Touch Events - onTouchCancel?: TouchEventHandler | undefined; - onTouchCancelCapture?: TouchEventHandler | undefined; - onTouchEnd?: TouchEventHandler | undefined; - onTouchEndCapture?: TouchEventHandler | undefined; - onTouchMove?: TouchEventHandler | undefined; - onTouchMoveCapture?: TouchEventHandler | undefined; - onTouchStart?: TouchEventHandler | undefined; - onTouchStartCapture?: TouchEventHandler | undefined; - - // Pointer Events - onPointerDown?: PointerEventHandler | undefined; - onPointerDownCapture?: PointerEventHandler | undefined; - onPointerMove?: PointerEventHandler | undefined; - onPointerMoveCapture?: PointerEventHandler | undefined; - onPointerUp?: PointerEventHandler | undefined; - onPointerUpCapture?: PointerEventHandler | undefined; - onPointerCancel?: PointerEventHandler | undefined; - onPointerCancelCapture?: PointerEventHandler | undefined; - onPointerEnter?: PointerEventHandler | undefined; - onPointerLeave?: PointerEventHandler | undefined; - onPointerOver?: PointerEventHandler | undefined; - onPointerOverCapture?: PointerEventHandler | undefined; - onPointerOut?: PointerEventHandler | undefined; - onPointerOutCapture?: PointerEventHandler | undefined; - onGotPointerCapture?: PointerEventHandler | undefined; - onGotPointerCaptureCapture?: PointerEventHandler | undefined; - onLostPointerCapture?: PointerEventHandler | undefined; - onLostPointerCaptureCapture?: PointerEventHandler | undefined; - - // UI Events - onScroll?: UIEventHandler | undefined; - onScrollCapture?: UIEventHandler | undefined; - onScrollEnd?: UIEventHandler | undefined; - onScrollEndCapture?: UIEventHandler | undefined; - - // Wheel Events - onWheel?: WheelEventHandler | undefined; - onWheelCapture?: WheelEventHandler | undefined; - - // Animation Events - onAnimationStart?: AnimationEventHandler | undefined; - onAnimationStartCapture?: AnimationEventHandler | undefined; - onAnimationEnd?: AnimationEventHandler | undefined; - onAnimationEndCapture?: AnimationEventHandler | undefined; - onAnimationIteration?: AnimationEventHandler | undefined; - onAnimationIterationCapture?: AnimationEventHandler | undefined; - - // Toggle Events - onToggle?: ToggleEventHandler | undefined; - onBeforeToggle?: ToggleEventHandler | undefined; - - // Transition Events - onTransitionCancel?: TransitionEventHandler | undefined; - onTransitionCancelCapture?: TransitionEventHandler | undefined; - onTransitionEnd?: TransitionEventHandler | undefined; - onTransitionEndCapture?: TransitionEventHandler | undefined; - onTransitionRun?: TransitionEventHandler | undefined; - onTransitionRunCapture?: TransitionEventHandler | undefined; - onTransitionStart?: TransitionEventHandler | undefined; - onTransitionStartCapture?: TransitionEventHandler | undefined; - } - - export interface CSSProperties extends CSS.Properties { - /** - * The index signature was removed to enable closed typing for style - * using CSSType. You're able to use type assertion or module augmentation - * to add properties or an index signature of your own. - * - * For examples and more information, visit: - * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors - */ - } - - // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ - interface AriaAttributes { - /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ - "aria-activedescendant"?: string | undefined; - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - "aria-atomic"?: Booleanish | undefined; - /** - * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be - * presented if they are made. - */ - "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined; - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - /** - * Defines a string value that labels the current element, which is intended to be converted into Braille. - * @see aria-label. - */ - "aria-braillelabel"?: string | undefined; - /** - * Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. - * @see aria-roledescription. - */ - "aria-brailleroledescription"?: string | undefined; - "aria-busy"?: Booleanish | undefined; - /** - * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. - */ - "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined; - /** - * Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. - */ - "aria-colcount"?: number | undefined; - /** - * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - * @see aria-colcount @see aria-colspan. - */ - "aria-colindex"?: number | undefined; - /** - * Defines a human readable text alternative of aria-colindex. - * @see aria-rowindextext. - */ - "aria-colindextext"?: string | undefined; - /** - * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. - */ - "aria-colspan"?: number | undefined; - /** - * Identifies the element (or elements) whose contents or presence are controlled by the current element. - * @see aria-owns. - */ - "aria-controls"?: string | undefined; - /** Indicates the element that represents the current item within a container or set of related elements. */ - "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined; - /** - * Identifies the element (or elements) that describes the object. - * @see aria-labelledby - */ - "aria-describedby"?: string | undefined; - /** - * Defines a string value that describes or annotates the current element. - * @see related aria-describedby. - */ - "aria-description"?: string | undefined; - /** - * Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. - */ - "aria-details"?: string | undefined; - /** - * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. - */ - "aria-disabled"?: Booleanish | undefined; - /** - * Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 - */ - "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined; - /** - * Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. - */ - "aria-errormessage"?: string | undefined; - /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - "aria-expanded"?: Booleanish | undefined; - /** - * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. - */ - "aria-flowto"?: string | undefined; - /** - * Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 - */ - "aria-grabbed"?: Booleanish | undefined; - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ - "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined; - /** - * Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. - */ - "aria-hidden"?: Booleanish | undefined; - /** - * Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. - */ - "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined; - /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ - "aria-keyshortcuts"?: string | undefined; - /** - * Defines a string value that labels the current element. - * @see aria-labelledby. - */ - "aria-label"?: string | undefined; - /** - * Identifies the element (or elements) that labels the current element. - * @see aria-describedby. - */ - "aria-labelledby"?: string | undefined; - /** Defines the hierarchical level of an element within a structure. */ - "aria-level"?: number | undefined; - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ - "aria-live"?: "off" | "assertive" | "polite" | undefined; - /** Indicates whether an element is modal when displayed. */ - "aria-modal"?: Booleanish | undefined; - /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - "aria-multiline"?: Booleanish | undefined; - /** Indicates that the user may select more than one item from the current selectable descendants. */ - "aria-multiselectable"?: Booleanish | undefined; - /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - "aria-orientation"?: "horizontal" | "vertical" | undefined; - /** - * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. - */ - "aria-owns"?: string | undefined; - /** - * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. - */ - "aria-placeholder"?: string | undefined; - /** - * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-setsize. - */ - "aria-posinset"?: number | undefined; - /** - * Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. - */ - "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined; - /** - * Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. - */ - "aria-readonly"?: Booleanish | undefined; - /** - * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. - */ - "aria-relevant"?: - | "additions" - | "additions removals" - | "additions text" - | "all" - | "removals" - | "removals additions" - | "removals text" - | "text" - | "text additions" - | "text removals" - | undefined; - /** Indicates that user input is required on the element before a form may be submitted. */ - "aria-required"?: Booleanish | undefined; - /** Defines a human-readable, author-localized description for the role of an element. */ - "aria-roledescription"?: string | undefined; - /** - * Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. - */ - "aria-rowcount"?: number | undefined; - /** - * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. - */ - "aria-rowindex"?: number | undefined; - /** - * Defines a human readable text alternative of aria-rowindex. - * @see aria-colindextext. - */ - "aria-rowindextext"?: string | undefined; - /** - * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. - */ - "aria-rowspan"?: number | undefined; - /** - * Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. - */ - "aria-selected"?: Booleanish | undefined; - /** - * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-posinset. - */ - "aria-setsize"?: number | undefined; - /** Indicates if items in a table or grid are sorted in ascending or descending order. */ - "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined; - /** Defines the maximum allowed value for a range widget. */ - "aria-valuemax"?: number | undefined; - /** Defines the minimum allowed value for a range widget. */ - "aria-valuemin"?: number | undefined; - /** - * Defines the current value for a range widget. - * @see aria-valuetext. - */ - "aria-valuenow"?: number | undefined; - /** Defines the human readable text alternative of aria-valuenow for a range widget. */ - "aria-valuetext"?: string | undefined; - } - - // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions - type AriaRole = - | "alert" - | "alertdialog" - | "application" - | "article" - | "banner" - | "button" - | "cell" - | "checkbox" - | "columnheader" - | "combobox" - | "complementary" - | "contentinfo" - | "definition" - | "dialog" - | "directory" - | "document" - | "feed" - | "figure" - | "form" - | "grid" - | "gridcell" - | "group" - | "heading" - | "img" - | "link" - | "list" - | "listbox" - | "listitem" - | "log" - | "main" - | "marquee" - | "math" - | "menu" - | "menubar" - | "menuitem" - | "menuitemcheckbox" - | "menuitemradio" - | "navigation" - | "none" - | "note" - | "option" - | "presentation" - | "progressbar" - | "radio" - | "radiogroup" - | "region" - | "row" - | "rowgroup" - | "rowheader" - | "scrollbar" - | "search" - | "searchbox" - | "separator" - | "slider" - | "spinbutton" - | "status" - | "switch" - | "tab" - | "table" - | "tablist" - | "tabpanel" - | "term" - | "textbox" - | "timer" - | "toolbar" - | "tooltip" - | "tree" - | "treegrid" - | "treeitem" - | (string & {}); - - interface HTMLAttributes extends AriaAttributes, DOMAttributes { - // React-specific Attributes - defaultChecked?: boolean | undefined; - defaultValue?: string | number | readonly string[] | undefined; - suppressContentEditableWarning?: boolean | undefined; - suppressHydrationWarning?: boolean | undefined; - - // Standard HTML Attributes - accessKey?: string | undefined; - autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}); - autoFocus?: boolean | undefined; - className?: string | undefined; - contentEditable?: Booleanish | "inherit" | "plaintext-only" | undefined; - contextMenu?: string | undefined; - dir?: string | undefined; - draggable?: Booleanish | undefined; - enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined; - hidden?: boolean | undefined; - id?: string | undefined; - lang?: string | undefined; - nonce?: string | undefined; - slot?: string | undefined; - spellCheck?: Booleanish | undefined; - style?: CSSProperties | undefined; - tabIndex?: number | undefined; - title?: string | undefined; - translate?: "yes" | "no" | undefined; - - // Unknown - radioGroup?: string | undefined; // , - - // WAI-ARIA - role?: AriaRole | undefined; - - // RDFa Attributes - about?: string | undefined; - content?: string | undefined; - datatype?: string | undefined; - inlist?: any; - prefix?: string | undefined; - property?: string | undefined; - rel?: string | undefined; - resource?: string | undefined; - rev?: string | undefined; - typeof?: string | undefined; - vocab?: string | undefined; - - // Non-standard Attributes - autoCorrect?: string | undefined; - autoSave?: string | undefined; - color?: string | undefined; - itemProp?: string | undefined; - itemScope?: boolean | undefined; - itemType?: string | undefined; - itemID?: string | undefined; - itemRef?: string | undefined; - results?: number | undefined; - security?: string | undefined; - unselectable?: "on" | "off" | undefined; - - // Popover API - popover?: "" | "auto" | "manual" | "hint" | undefined; - popoverTargetAction?: "toggle" | "show" | "hide" | undefined; - popoverTarget?: string | undefined; - - // Living Standard - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert} - */ - inert?: boolean | undefined; - /** - * Hints at the type of data that might be entered by the user while editing the element or its contents - * @see {@link https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute} - */ - inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined; - /** - * Specify that a standard HTML element should behave like a defined custom built-in element - * @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is} - */ - is?: string | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts} - */ - exportparts?: string | undefined; - /** - * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part} - */ - part?: string | undefined; - } - - /** - * For internal usage only. - * Different release channels declare additional types of ReactNode this particular release channel accepts. - * App or library types should never augment this interface. - */ - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {} - - interface AllHTMLAttributes extends HTMLAttributes { - // Standard HTML Attributes - accept?: string | undefined; - acceptCharset?: string | undefined; - action?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - allowFullScreen?: boolean | undefined; - allowTransparency?: boolean | undefined; - alt?: string | undefined; - as?: string | undefined; - async?: boolean | undefined; - autoComplete?: string | undefined; - autoPlay?: boolean | undefined; - capture?: boolean | "user" | "environment" | undefined; - cellPadding?: number | string | undefined; - cellSpacing?: number | string | undefined; - charSet?: string | undefined; - challenge?: string | undefined; - checked?: boolean | undefined; - cite?: string | undefined; - classID?: string | undefined; - cols?: number | undefined; - colSpan?: number | undefined; - controls?: boolean | undefined; - coords?: string | undefined; - crossOrigin?: CrossOrigin; - data?: string | undefined; - dateTime?: string | undefined; - default?: boolean | undefined; - defer?: boolean | undefined; - disabled?: boolean | undefined; - download?: any; - encType?: string | undefined; - form?: string | undefined; - formAction?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - frameBorder?: number | string | undefined; - headers?: string | undefined; - height?: number | string | undefined; - high?: number | undefined; - href?: string | undefined; - hrefLang?: string | undefined; - htmlFor?: string | undefined; - httpEquiv?: string | undefined; - integrity?: string | undefined; - keyParams?: string | undefined; - keyType?: string | undefined; - kind?: string | undefined; - label?: string | undefined; - list?: string | undefined; - loop?: boolean | undefined; - low?: number | undefined; - manifest?: string | undefined; - marginHeight?: number | undefined; - marginWidth?: number | undefined; - max?: number | string | undefined; - maxLength?: number | undefined; - media?: string | undefined; - mediaGroup?: string | undefined; - method?: string | undefined; - min?: number | string | undefined; - minLength?: number | undefined; - multiple?: boolean | undefined; - muted?: boolean | undefined; - name?: string | undefined; - noValidate?: boolean | undefined; - open?: boolean | undefined; - optimum?: number | undefined; - pattern?: string | undefined; - placeholder?: string | undefined; - playsInline?: boolean | undefined; - poster?: string | undefined; - preload?: string | undefined; - readOnly?: boolean | undefined; - required?: boolean | undefined; - reversed?: boolean | undefined; - rows?: number | undefined; - rowSpan?: number | undefined; - sandbox?: string | undefined; - scope?: string | undefined; - scoped?: boolean | undefined; - scrolling?: string | undefined; - seamless?: boolean | undefined; - selected?: boolean | undefined; - shape?: string | undefined; - size?: number | undefined; - sizes?: string | undefined; - span?: number | undefined; - src?: string | undefined; - srcDoc?: string | undefined; - srcLang?: string | undefined; - srcSet?: string | undefined; - start?: number | undefined; - step?: number | string | undefined; - summary?: string | undefined; - target?: string | undefined; - type?: string | undefined; - useMap?: string | undefined; - value?: string | readonly string[] | number | undefined; - width?: number | string | undefined; - wmode?: string | undefined; - wrap?: string | undefined; - } - - type HTMLAttributeReferrerPolicy = - | "" - | "no-referrer" - | "no-referrer-when-downgrade" - | "origin" - | "origin-when-cross-origin" - | "same-origin" - | "strict-origin" - | "strict-origin-when-cross-origin" - | "unsafe-url"; - - type HTMLAttributeAnchorTarget = - | "_self" - | "_blank" - | "_parent" - | "_top" - | (string & {}); - - interface AnchorHTMLAttributes extends HTMLAttributes { - download?: any; - href?: string | undefined; - hrefLang?: string | undefined; - media?: string | undefined; - ping?: string | undefined; - target?: HTMLAttributeAnchorTarget | undefined; - type?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - } - - interface AudioHTMLAttributes extends MediaHTMLAttributes {} - - interface AreaHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - coords?: string | undefined; - download?: any; - href?: string | undefined; - hrefLang?: string | undefined; - media?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - shape?: string | undefined; - target?: string | undefined; - } - - interface BaseHTMLAttributes extends HTMLAttributes { - href?: string | undefined; - target?: string | undefined; - } - - interface BlockquoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - - interface ButtonHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - formAction?: - | string - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ] - | undefined; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - name?: string | undefined; - type?: "submit" | "reset" | "button" | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface CanvasHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - width?: number | string | undefined; - } - - interface ColHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - width?: number | string | undefined; - } - - interface ColgroupHTMLAttributes extends HTMLAttributes { - span?: number | undefined; - } - - interface DataHTMLAttributes extends HTMLAttributes { - value?: string | readonly string[] | number | undefined; - } - - interface DetailsHTMLAttributes extends HTMLAttributes { - open?: boolean | undefined; - name?: string | undefined; - } - - interface DelHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - dateTime?: string | undefined; - } - - interface DialogHTMLAttributes extends HTMLAttributes { - closedby?: "any" | "closerequest" | "none" | undefined; - onCancel?: ReactEventHandler | undefined; - onClose?: ReactEventHandler | undefined; - open?: boolean | undefined; - } - - interface EmbedHTMLAttributes extends HTMLAttributes { - height?: number | string | undefined; - src?: string | undefined; - type?: string | undefined; - width?: number | string | undefined; - } - - interface FieldsetHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - form?: string | undefined; - name?: string | undefined; - } - - interface FormHTMLAttributes extends HTMLAttributes { - acceptCharset?: string | undefined; - action?: - | string - | undefined - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ]; - autoComplete?: string | undefined; - encType?: string | undefined; - method?: string | undefined; - name?: string | undefined; - noValidate?: boolean | undefined; - target?: string | undefined; - } - - interface HtmlHTMLAttributes extends HTMLAttributes { - manifest?: string | undefined; - } - - interface IframeHTMLAttributes extends HTMLAttributes { - allow?: string | undefined; - allowFullScreen?: boolean | undefined; - allowTransparency?: boolean | undefined; - /** @deprecated */ - frameBorder?: number | string | undefined; - height?: number | string | undefined; - loading?: "eager" | "lazy" | undefined; - /** @deprecated */ - marginHeight?: number | undefined; - /** @deprecated */ - marginWidth?: number | undefined; - name?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sandbox?: string | undefined; - /** @deprecated */ - scrolling?: string | undefined; - seamless?: boolean | undefined; - src?: string | undefined; - srcDoc?: string | undefined; - width?: number | string | undefined; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES {} - - interface ImgHTMLAttributes extends HTMLAttributes { - alt?: string | undefined; - crossOrigin?: CrossOrigin; - decoding?: "async" | "auto" | "sync" | undefined; - fetchPriority?: "high" | "low" | "auto"; - height?: number | string | undefined; - loading?: "eager" | "lazy" | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - src?: - | string - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_IMG_SRC_TYPES - ] - | undefined; - srcSet?: string | undefined; - useMap?: string | undefined; - width?: number | string | undefined; - } - - interface InsHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - dateTime?: string | undefined; - } - - type HTMLInputTypeAttribute = - | "button" - | "checkbox" - | "color" - | "date" - | "datetime-local" - | "email" - | "file" - | "hidden" - | "image" - | "month" - | "number" - | "password" - | "radio" - | "range" - | "reset" - | "search" - | "submit" - | "tel" - | "text" - | "time" - | "url" - | "week" - | (string & {}); - - type AutoFillAddressKind = "billing" | "shipping"; - type AutoFillBase = "" | "off" | "on"; - type AutoFillContactField = - | "email" - | "tel" - | "tel-area-code" - | "tel-country-code" - | "tel-extension" - | "tel-local" - | "tel-local-prefix" - | "tel-local-suffix" - | "tel-national"; - type AutoFillContactKind = "home" | "mobile" | "work"; - type AutoFillCredentialField = "webauthn"; - type AutoFillNormalField = - | "additional-name" - | "address-level1" - | "address-level2" - | "address-level3" - | "address-level4" - | "address-line1" - | "address-line2" - | "address-line3" - | "bday-day" - | "bday-month" - | "bday-year" - | "cc-csc" - | "cc-exp" - | "cc-exp-month" - | "cc-exp-year" - | "cc-family-name" - | "cc-given-name" - | "cc-name" - | "cc-number" - | "cc-type" - | "country" - | "country-name" - | "current-password" - | "family-name" - | "given-name" - | "honorific-prefix" - | "honorific-suffix" - | "name" - | "new-password" - | "one-time-code" - | "organization" - | "postal-code" - | "street-address" - | "transaction-amount" - | "transaction-currency" - | "username"; - type OptionalPrefixToken = `${T} ` | ""; - type OptionalPostfixToken = ` ${T}` | ""; - type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken}${AutoFillContactField}`; - type AutoFillSection = `section-${string}`; - type AutoFill = - | AutoFillBase - | `${OptionalPrefixToken}${OptionalPrefixToken< - AutoFillAddressKind - >}${AutoFillField}${OptionalPostfixToken}`; - type HTMLInputAutoCompleteAttribute = AutoFill | (string & {}); - - interface InputHTMLAttributes extends HTMLAttributes { - accept?: string | undefined; - alt?: string | undefined; - autoComplete?: HTMLInputAutoCompleteAttribute | undefined; - capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute - checked?: boolean | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - formAction?: - | string - | ((formData: FormData) => void | Promise) - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS - ] - | undefined; - formEncType?: string | undefined; - formMethod?: string | undefined; - formNoValidate?: boolean | undefined; - formTarget?: string | undefined; - height?: number | string | undefined; - list?: string | undefined; - max?: number | string | undefined; - maxLength?: number | undefined; - min?: number | string | undefined; - minLength?: number | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - pattern?: string | undefined; - placeholder?: string | undefined; - readOnly?: boolean | undefined; - required?: boolean | undefined; - size?: number | undefined; - src?: string | undefined; - step?: number | string | undefined; - type?: HTMLInputTypeAttribute | undefined; - value?: string | readonly string[] | number | undefined; - width?: number | string | undefined; - - // No other element dispatching change events can be nested in a - // so we know the target will be a HTMLInputElement. - onChange?: ChangeEventHandler | undefined; - } - - interface KeygenHTMLAttributes extends HTMLAttributes { - challenge?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - keyType?: string | undefined; - keyParams?: string | undefined; - name?: string | undefined; - } - - interface LabelHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - } - - interface LiHTMLAttributes extends HTMLAttributes { - value?: string | readonly string[] | number | undefined; - } - - interface LinkHTMLAttributes extends HTMLAttributes { - as?: string | undefined; - blocking?: "render" | (string & {}) | undefined; - crossOrigin?: CrossOrigin; - fetchPriority?: "high" | "low" | "auto"; - href?: string | undefined; - hrefLang?: string | undefined; - integrity?: string | undefined; - media?: string | undefined; - imageSrcSet?: string | undefined; - imageSizes?: string | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - sizes?: string | undefined; - type?: string | undefined; - charSet?: string | undefined; - - // React props - precedence?: string | undefined; - } - - interface MapHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface MenuHTMLAttributes extends HTMLAttributes { - type?: string | undefined; - } - - interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES {} - - interface MediaHTMLAttributes extends HTMLAttributes { - autoPlay?: boolean | undefined; - controls?: boolean | undefined; - controlsList?: string | undefined; - crossOrigin?: CrossOrigin; - loop?: boolean | undefined; - mediaGroup?: string | undefined; - muted?: boolean | undefined; - playsInline?: boolean | undefined; - preload?: string | undefined; - src?: - | string - | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES[ - keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_MEDIA_SRC_TYPES - ] - | undefined; - } - - interface MetaHTMLAttributes extends HTMLAttributes { - charSet?: string | undefined; - content?: string | undefined; - httpEquiv?: string | undefined; - media?: string | undefined; - name?: string | undefined; - } - - interface MeterHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - high?: number | undefined; - low?: number | undefined; - max?: number | string | undefined; - min?: number | string | undefined; - optimum?: number | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string | undefined; - } - - interface ObjectHTMLAttributes extends HTMLAttributes { - classID?: string | undefined; - data?: string | undefined; - form?: string | undefined; - height?: number | string | undefined; - name?: string | undefined; - type?: string | undefined; - useMap?: string | undefined; - width?: number | string | undefined; - wmode?: string | undefined; - } - - interface OlHTMLAttributes extends HTMLAttributes { - reversed?: boolean | undefined; - start?: number | undefined; - type?: "1" | "a" | "A" | "i" | "I" | undefined; - } - - interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - } - - interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: boolean | undefined; - label?: string | undefined; - selected?: boolean | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface OutputHTMLAttributes extends HTMLAttributes { - form?: string | undefined; - htmlFor?: string | undefined; - name?: string | undefined; - } - - interface ParamHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface ProgressHTMLAttributes extends HTMLAttributes { - max?: number | string | undefined; - value?: string | readonly string[] | number | undefined; - } - - interface SlotHTMLAttributes extends HTMLAttributes { - name?: string | undefined; - } - - interface ScriptHTMLAttributes extends HTMLAttributes { - async?: boolean | undefined; - blocking?: "render" | (string & {}) | undefined; - /** @deprecated */ - charSet?: string | undefined; - crossOrigin?: CrossOrigin; - defer?: boolean | undefined; - fetchPriority?: "high" | "low" | "auto" | undefined; - integrity?: string | undefined; - noModule?: boolean | undefined; - referrerPolicy?: HTMLAttributeReferrerPolicy | undefined; - src?: string | undefined; - type?: string | undefined; - } - - interface SelectHTMLAttributes extends HTMLAttributes { - autoComplete?: string | undefined; - disabled?: boolean | undefined; - form?: string | undefined; - multiple?: boolean | undefined; - name?: string | undefined; - required?: boolean | undefined; - size?: number | undefined; - value?: string | readonly string[] | number | undefined; - // No other element dispatching change events can be nested in a

Automattic