codebydante commited on
Commit
2d95a3f
·
verified ·
1 Parent(s): 3045880

Delete folder node_modules with huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/.bin/fxparser +0 -16
  2. node_modules/.bin/fxparser.cmd +0 -17
  3. node_modules/.bin/fxparser.ps1 +0 -28
  4. node_modules/.bin/glob +0 -16
  5. node_modules/.bin/glob.cmd +0 -17
  6. node_modules/.bin/glob.ps1 +0 -28
  7. node_modules/.bin/mime +0 -16
  8. node_modules/.bin/mime.cmd +0 -17
  9. node_modules/.bin/mime.ps1 +0 -28
  10. node_modules/.bin/node-which +0 -16
  11. node_modules/.bin/node-which.cmd +0 -17
  12. node_modules/.bin/node-which.ps1 +0 -28
  13. node_modules/.bin/proto-loader-gen-types +0 -16
  14. node_modules/.bin/proto-loader-gen-types.cmd +0 -17
  15. node_modules/.bin/proto-loader-gen-types.ps1 +0 -28
  16. node_modules/.bin/rimraf +0 -16
  17. node_modules/.bin/rimraf.cmd +0 -17
  18. node_modules/.bin/rimraf.ps1 +0 -28
  19. node_modules/.bin/semver +0 -16
  20. node_modules/.bin/semver.cmd +0 -17
  21. node_modules/.bin/semver.ps1 +0 -28
  22. node_modules/.bin/uuid +0 -16
  23. node_modules/.bin/uuid.cmd +0 -17
  24. node_modules/.bin/uuid.ps1 +0 -28
  25. node_modules/.package-lock.json +0 -0
  26. node_modules/@fastify/busboy/LICENSE +0 -22
  27. node_modules/@fastify/busboy/README.md +0 -266
  28. node_modules/@fastify/busboy/deps/dicer/LICENSE +0 -19
  29. node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +0 -213
  30. node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +0 -149
  31. node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +0 -13
  32. node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts +0 -164
  33. node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +0 -230
  34. node_modules/@fastify/busboy/index.js +0 -85
  35. node_modules/@fastify/busboy/lib/types/multipart.js +0 -317
  36. node_modules/@fastify/busboy/lib/types/urlencoded.js +0 -190
  37. node_modules/@fastify/busboy/lib/utils/Decoder.js +0 -54
  38. node_modules/@fastify/busboy/lib/utils/basename.js +0 -14
  39. node_modules/@fastify/busboy/lib/utils/decodeText.js +0 -122
  40. node_modules/@fastify/busboy/lib/utils/getLimit.js +0 -16
  41. node_modules/@fastify/busboy/lib/utils/parseParams.js +0 -624
  42. node_modules/@fastify/busboy/package.json +0 -79
  43. node_modules/@fastify/busboy/types/dicer.tst.ts +0 -83
  44. node_modules/@fastify/busboy/types/index.d.ts +0 -236
  45. node_modules/@fastify/busboy/types/index.tst.ts +0 -301
  46. node_modules/@firebase/app-check-interop-types/README.md +0 -3
  47. node_modules/@firebase/app-check-interop-types/index.d.ts +0 -51
  48. node_modules/@firebase/app-check-interop-types/package.json +0 -25
  49. node_modules/@firebase/app-types/README.md +0 -3
  50. node_modules/@firebase/app-types/index.d.ts +0 -129
node_modules/.bin/fxparser DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../fast-xml-parser/src/cli/cli.js" "$@"
14
- else
15
- exec node "$basedir/../fast-xml-parser/src/cli/cli.js" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/fxparser.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\fast-xml-parser\src\cli\cli.js" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/fxparser.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../fast-xml-parser/src/cli/cli.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../fast-xml-parser/src/cli/cli.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../fast-xml-parser/src/cli/cli.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../fast-xml-parser/src/cli/cli.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/glob DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../glob/dist/esm/bin.mjs" "$@"
14
- else
15
- exec node "$basedir/../glob/dist/esm/bin.mjs" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/glob.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\glob\dist\esm\bin.mjs" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/glob.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
23
- } else {
24
- & "node$exe" "$basedir/../glob/dist/esm/bin.mjs" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/mime DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
14
- else
15
- exec node "$basedir/../mime/cli.js" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/mime.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/mime.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../mime/cli.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../mime/cli.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/node-which DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../which/bin/node-which" "$@"
14
- else
15
- exec node "$basedir/../which/bin/node-which" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/node-which.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/node-which.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../which/bin/node-which" $args
23
- } else {
24
- & "node$exe" "$basedir/../which/bin/node-which" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/proto-loader-gen-types DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@"
14
- else
15
- exec node "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/proto-loader-gen-types.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@grpc\proto-loader\build\bin\proto-loader-gen-types.js" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/proto-loader-gen-types.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/rimraf DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
14
- else
15
- exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/rimraf.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\dist\esm\bin.mjs" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/rimraf.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../rimraf/dist/esm/bin.mjs" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../rimraf/dist/esm/bin.mjs" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../rimraf/dist/esm/bin.mjs" $args
23
- } else {
24
- & "node$exe" "$basedir/../rimraf/dist/esm/bin.mjs" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/semver DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
14
- else
15
- exec node "$basedir/../semver/bin/semver.js" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/semver.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/semver.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../semver/bin/semver.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/uuid DELETED
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@"
14
- else
15
- exec node "$basedir/../uuid/dist/bin/uuid" "$@"
16
- fi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/uuid.cmd DELETED
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.bin/uuid.ps1 DELETED
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
23
- } else {
24
- & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/.package-lock.json DELETED
The diff for this file is too large to render. See raw diff
 
node_modules/@fastify/busboy/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- MIT License
2
-
3
- Copyright Brian White. All rights reserved.
4
- Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/README.md DELETED
@@ -1,266 +0,0 @@
1
- # busboy
2
-
3
- [![Build Status](https://github.com/fastify/busboy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/busboy/actions)
4
- [![NPM version](https://img.shields.io/npm/v/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy)
5
- [![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)
6
- [![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md)
7
-
8
- Description
9
- ===========
10
-
11
- A Node.js module for parsing incoming HTML form data.
12
-
13
- This is an officially supported fork by [fastify](https://github.com/fastify/) organization of the amazing library [originally created](https://github.com/mscdex/busboy) by Brian White,
14
- aimed at addressing long-standing issues with it.
15
-
16
- Benchmark (Mean time for 500 Kb payload, 2000 cycles, 1000 cycle warmup):
17
-
18
- | Library | Version | Mean time in nanoseconds (less is better) |
19
- |-----------------------|---------|-------------------------------------------|
20
- | busboy | 0.3.1 | `340114` |
21
- | @fastify/busboy | 1.0.0 | `270984` |
22
-
23
- Requirements
24
- ============
25
-
26
- * [Node.js](https://nodejs.org/) 10+
27
-
28
- Install
29
- =======
30
-
31
- ```sh
32
- npm i @fastify/busboy
33
- ```
34
-
35
- Examples
36
- ========
37
-
38
- * Parsing (multipart) with default options:
39
-
40
- ```javascript
41
- const http = require('node:http');
42
- const { inspect } = require('node:util');
43
- const Busboy = require('@fastify/busboy');
44
-
45
- http.createServer((req, res) => {
46
- if (req.method === 'POST') {
47
- const busboy = new Busboy({ headers: req.headers });
48
- busboy.on('file', (fieldname, file, filename, encoding, mimetype) => {
49
- console.log(`File [${fieldname}]: filename: ${filename}, encoding: ${encoding}, mimetype: ${mimetype}`);
50
- file.on('data', data => {
51
- console.log(`File [${fieldname}] got ${data.length} bytes`);
52
- });
53
- file.on('end', () => {
54
- console.log(`File [${fieldname}] Finished`);
55
- });
56
- });
57
- busboy.on('field', (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
58
- console.log(`Field [${fieldname}]: value: ${inspect(val)}`);
59
- });
60
- busboy.on('finish', () => {
61
- console.log('Done parsing form!');
62
- res.writeHead(303, { Connection: 'close', Location: '/' });
63
- res.end();
64
- });
65
- req.pipe(busboy);
66
- } else if (req.method === 'GET') {
67
- res.writeHead(200, { Connection: 'close' });
68
- res.end(`<html><head></head><body>
69
- <form method="POST" enctype="multipart/form-data">
70
- <input type="text" name="textfield"><br>
71
- <input type="file" name="filefield"><br>
72
- <input type="submit">
73
- </form>
74
- </body></html>`);
75
- }
76
- }).listen(8000, () => {
77
- console.log('Listening for requests');
78
- });
79
-
80
- // Example output, using http://nodejs.org/images/ryan-speaker.jpg as the file:
81
- //
82
- // Listening for requests
83
- // File [filefield]: filename: ryan-speaker.jpg, encoding: binary
84
- // File [filefield] got 11971 bytes
85
- // Field [textfield]: value: 'testing! :-)'
86
- // File [filefield] Finished
87
- // Done parsing form!
88
- ```
89
-
90
- * Save all incoming files to disk:
91
-
92
- ```javascript
93
- const http = require('node:http');
94
- const path = require('node:path');
95
- const os = require('node:os');
96
- const fs = require('node:fs');
97
-
98
- const Busboy = require('@fastify/busboy');
99
-
100
- http.createServer(function(req, res) {
101
- if (req.method === 'POST') {
102
- const busboy = new Busboy({ headers: req.headers });
103
- busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
104
- var saveTo = path.join(os.tmpdir(), path.basename(fieldname));
105
- file.pipe(fs.createWriteStream(saveTo));
106
- });
107
- busboy.on('finish', function() {
108
- res.writeHead(200, { 'Connection': 'close' });
109
- res.end("That's all folks!");
110
- });
111
- return req.pipe(busboy);
112
- }
113
- res.writeHead(404);
114
- res.end();
115
- }).listen(8000, function() {
116
- console.log('Listening for requests');
117
- });
118
- ```
119
-
120
- * Parsing (urlencoded) with default options:
121
-
122
- ```javascript
123
- const http = require('node:http');
124
- const { inspect } = require('node:util');
125
-
126
- const Busboy = require('@fastify/busboy');
127
-
128
- http.createServer(function(req, res) {
129
- if (req.method === 'POST') {
130
- const busboy = new Busboy({ headers: req.headers });
131
- busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
132
- console.log('File [' + fieldname + ']: filename: ' + filename);
133
- file.on('data', function(data) {
134
- console.log('File [' + fieldname + '] got ' + data.length + ' bytes');
135
- });
136
- file.on('end', function() {
137
- console.log('File [' + fieldname + '] Finished');
138
- });
139
- });
140
- busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) {
141
- console.log('Field [' + fieldname + ']: value: ' + inspect(val));
142
- });
143
- busboy.on('finish', function() {
144
- console.log('Done parsing form!');
145
- res.writeHead(303, { Connection: 'close', Location: '/' });
146
- res.end();
147
- });
148
- req.pipe(busboy);
149
- } else if (req.method === 'GET') {
150
- res.writeHead(200, { Connection: 'close' });
151
- res.end('<html><head></head><body>\
152
- <form method="POST">\
153
- <input type="text" name="textfield"><br />\
154
- <select name="selectfield">\
155
- <option value="1">1</option>\
156
- <option value="10">10</option>\
157
- <option value="100">100</option>\
158
- <option value="9001">9001</option>\
159
- </select><br />\
160
- <input type="checkbox" name="checkfield">Node.js rules!<br />\
161
- <input type="submit">\
162
- </form>\
163
- </body></html>');
164
- }
165
- }).listen(8000, function() {
166
- console.log('Listening for requests');
167
- });
168
-
169
- // Example output:
170
- //
171
- // Listening for requests
172
- // Field [textfield]: value: 'testing! :-)'
173
- // Field [selectfield]: value: '9001'
174
- // Field [checkfield]: value: 'on'
175
- // Done parsing form!
176
- ```
177
-
178
- API
179
- ===
180
-
181
- _Busboy_ is a _Writable_ stream
182
-
183
- Busboy (special) events
184
- -----------------------
185
-
186
- * **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream.
187
- * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically and safely discarded (these discarded files do still count towards `files` and `parts` limits).
188
- * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens.
189
- * The property `bytesRead` informs about the number of bytes that have been read so far.
190
-
191
- * **limit**() - Emitted when a file exceeds the configured `fileSize` limit. You can listen on the file stream to handle it:
192
-
193
- ```js
194
- busboy.on('file', (fieldname, stream) => {
195
- stream.on('limit', () => {
196
- console.log('File size exceeded')
197
- })
198
- })
199
- ```
200
-
201
- * **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >fieldnameTruncated, < _boolean_ >valueTruncated, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new non-file field found.
202
-
203
- * **partsLimit**() - Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted.
204
-
205
- * **filesLimit**() - Emitted when specified `files` limit has been reached. No more 'file' events will be emitted.
206
-
207
- * **fieldsLimit**() - Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted.
208
-
209
- Busboy methods
210
- --------------
211
-
212
- * **(constructor)**(< _object_ >config) - Creates and returns a new Busboy instance.
213
-
214
- * The constructor takes the following valid `config` settings:
215
-
216
- * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers.
217
-
218
- * **autoDestroy** - _boolean_ - Whether this stream should automatically call .destroy() on itself after ending. (Default: false).
219
-
220
- * **highWaterMark** - _integer_ - highWaterMark to use for this Busboy instance (Default: WritableStream default).
221
-
222
- * **fileHwm** - _integer_ - highWaterMark to use for file streams (Default: ReadableStream default).
223
-
224
- * **defCharset** - _string_ - Default character set to use when one isn't defined (Default: 'utf8').
225
-
226
- * **preservePath** - _boolean_ - If paths in the multipart 'filename' field shall be preserved. (Default: false).
227
-
228
- * **isPartAFile** - **function** - Use this function to override the default file detection functionality. It has following parameters:
229
-
230
- * fieldName - **string** The name of the field.
231
-
232
- * contentType - **string** The content-type of the part, e.g. `text/plain`, `image/jpeg`, `application/octet-stream`
233
-
234
- * fileName - **string** The name of a file supplied by the part.
235
-
236
- (Default: `(fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)`)
237
-
238
- * **limits** - _object_ - Various limits on incoming data. Valid properties are:
239
-
240
- * **fieldNameSize** - _integer_ - Max field name size (in bytes) (Default: 100 bytes).
241
-
242
- * **fieldSize** - _integer_ - Max field value size (in bytes) (Default: 1 MiB, which is 1024 x 1024 bytes).
243
-
244
- * **fields** - _integer_ - Max number of non-file fields (Default: Infinity).
245
-
246
- * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes) (Default: Infinity).
247
-
248
- * **files** - _integer_ - For multipart forms, the max number of file fields (Default: Infinity).
249
-
250
- * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files) (Default: Infinity).
251
-
252
- * **headerPairs** - _integer_ - For multipart forms, the max number of header key=>value pairs to parse **Default:** 2000
253
-
254
- * **headerSize** - _integer_ - For multipart forms, the max size of a multipart header **Default:** 81920.
255
-
256
- * The constructor can throw errors:
257
-
258
- * **Busboy expected an options-Object.** - Busboy expected an Object as first parameters.
259
-
260
- * **Busboy expected an options-Object with headers-attribute.** - The first parameter is lacking of a headers-attribute.
261
-
262
- * **Limit $limit is not a valid number** - Busboy expected the desired limit to be of type number. Busboy throws this Error to prevent a potential security issue by falling silently back to the Busboy-defaults. Potential source for this Error can be the direct use of environment variables without transforming them to the type number.
263
-
264
- * **Unsupported Content-Type.** - The `Content-Type` isn't one Busboy can parse.
265
-
266
- * **Missing Content-Type-header.** - The provided headers don't include `Content-Type` at all.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/dicer/LICENSE DELETED
@@ -1,19 +0,0 @@
1
- Copyright Brian White. All rights reserved.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- IN THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js DELETED
@@ -1,213 +0,0 @@
1
- 'use strict'
2
-
3
- const WritableStream = require('node:stream').Writable
4
- const inherits = require('node:util').inherits
5
-
6
- const StreamSearch = require('../../streamsearch/sbmh')
7
-
8
- const PartStream = require('./PartStream')
9
- const HeaderParser = require('./HeaderParser')
10
-
11
- const DASH = 45
12
- const B_ONEDASH = Buffer.from('-')
13
- const B_CRLF = Buffer.from('\r\n')
14
- const EMPTY_FN = function () {}
15
-
16
- function Dicer (cfg) {
17
- if (!(this instanceof Dicer)) { return new Dicer(cfg) }
18
- WritableStream.call(this, cfg)
19
-
20
- if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') }
21
-
22
- if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined }
23
-
24
- this._headerFirst = cfg.headerFirst
25
-
26
- this._dashes = 0
27
- this._parts = 0
28
- this._finished = false
29
- this._realFinish = false
30
- this._isPreamble = true
31
- this._justMatched = false
32
- this._firstWrite = true
33
- this._inHeader = true
34
- this._part = undefined
35
- this._cb = undefined
36
- this._ignoreData = false
37
- this._partOpts = { highWaterMark: cfg.partHwm }
38
- this._pause = false
39
-
40
- const self = this
41
- this._hparser = new HeaderParser(cfg)
42
- this._hparser.on('header', function (header) {
43
- self._inHeader = false
44
- self._part.emit('header', header)
45
- })
46
- }
47
- inherits(Dicer, WritableStream)
48
-
49
- Dicer.prototype.emit = function (ev) {
50
- if (ev === 'finish' && !this._realFinish) {
51
- if (!this._finished) {
52
- const self = this
53
- process.nextTick(function () {
54
- self.emit('error', new Error('Unexpected end of multipart data'))
55
- if (self._part && !self._ignoreData) {
56
- const type = (self._isPreamble ? 'Preamble' : 'Part')
57
- self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data'))
58
- self._part.push(null)
59
- process.nextTick(function () {
60
- self._realFinish = true
61
- self.emit('finish')
62
- self._realFinish = false
63
- })
64
- return
65
- }
66
- self._realFinish = true
67
- self.emit('finish')
68
- self._realFinish = false
69
- })
70
- }
71
- } else { WritableStream.prototype.emit.apply(this, arguments) }
72
- }
73
-
74
- Dicer.prototype._write = function (data, encoding, cb) {
75
- // ignore unexpected data (e.g. extra trailer data after finished)
76
- if (!this._hparser && !this._bparser) { return cb() }
77
-
78
- if (this._headerFirst && this._isPreamble) {
79
- if (!this._part) {
80
- this._part = new PartStream(this._partOpts)
81
- if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() }
82
- }
83
- const r = this._hparser.push(data)
84
- if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }
85
- }
86
-
87
- // allows for "easier" testing
88
- if (this._firstWrite) {
89
- this._bparser.push(B_CRLF)
90
- this._firstWrite = false
91
- }
92
-
93
- this._bparser.push(data)
94
-
95
- if (this._pause) { this._cb = cb } else { cb() }
96
- }
97
-
98
- Dicer.prototype.reset = function () {
99
- this._part = undefined
100
- this._bparser = undefined
101
- this._hparser = undefined
102
- }
103
-
104
- Dicer.prototype.setBoundary = function (boundary) {
105
- const self = this
106
- this._bparser = new StreamSearch('\r\n--' + boundary)
107
- this._bparser.on('info', function (isMatch, data, start, end) {
108
- self._oninfo(isMatch, data, start, end)
109
- })
110
- }
111
-
112
- Dicer.prototype._ignore = function () {
113
- if (this._part && !this._ignoreData) {
114
- this._ignoreData = true
115
- this._part.on('error', EMPTY_FN)
116
- // we must perform some kind of read on the stream even though we are
117
- // ignoring the data, otherwise node's Readable stream will not emit 'end'
118
- // after pushing null to the stream
119
- this._part.resume()
120
- }
121
- }
122
-
123
- Dicer.prototype._oninfo = function (isMatch, data, start, end) {
124
- let buf; const self = this; let i = 0; let r; let shouldWriteMore = true
125
-
126
- if (!this._part && this._justMatched && data) {
127
- while (this._dashes < 2 && (start + i) < end) {
128
- if (data[start + i] === DASH) {
129
- ++i
130
- ++this._dashes
131
- } else {
132
- if (this._dashes) { buf = B_ONEDASH }
133
- this._dashes = 0
134
- break
135
- }
136
- }
137
- if (this._dashes === 2) {
138
- if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) }
139
- this.reset()
140
- this._finished = true
141
- // no more parts will be added
142
- if (self._parts === 0) {
143
- self._realFinish = true
144
- self.emit('finish')
145
- self._realFinish = false
146
- }
147
- }
148
- if (this._dashes) { return }
149
- }
150
- if (this._justMatched) { this._justMatched = false }
151
- if (!this._part) {
152
- this._part = new PartStream(this._partOpts)
153
- this._part._read = function (n) {
154
- self._unpause()
155
- }
156
- if (this._isPreamble && this.listenerCount('preamble') !== 0) {
157
- this.emit('preamble', this._part)
158
- } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) {
159
- this.emit('part', this._part)
160
- } else {
161
- this._ignore()
162
- }
163
- if (!this._isPreamble) { this._inHeader = true }
164
- }
165
- if (data && start < end && !this._ignoreData) {
166
- if (this._isPreamble || !this._inHeader) {
167
- if (buf) { shouldWriteMore = this._part.push(buf) }
168
- shouldWriteMore = this._part.push(data.slice(start, end))
169
- if (!shouldWriteMore) { this._pause = true }
170
- } else if (!this._isPreamble && this._inHeader) {
171
- if (buf) { this._hparser.push(buf) }
172
- r = this._hparser.push(data.slice(start, end))
173
- if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) }
174
- }
175
- }
176
- if (isMatch) {
177
- this._hparser.reset()
178
- if (this._isPreamble) { this._isPreamble = false } else {
179
- if (start !== end) {
180
- ++this._parts
181
- this._part.on('end', function () {
182
- if (--self._parts === 0) {
183
- if (self._finished) {
184
- self._realFinish = true
185
- self.emit('finish')
186
- self._realFinish = false
187
- } else {
188
- self._unpause()
189
- }
190
- }
191
- })
192
- }
193
- }
194
- this._part.push(null)
195
- this._part = undefined
196
- this._ignoreData = false
197
- this._justMatched = true
198
- this._dashes = 0
199
- }
200
- }
201
-
202
- Dicer.prototype._unpause = function () {
203
- if (!this._pause) { return }
204
-
205
- this._pause = false
206
- if (this._cb) {
207
- const cb = this._cb
208
- this._cb = undefined
209
- cb()
210
- }
211
- }
212
-
213
- module.exports = Dicer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js DELETED
@@ -1,149 +0,0 @@
1
- 'use strict'
2
-
3
- const EventEmitter = require('node:events').EventEmitter
4
- const inherits = require('node:util').inherits
5
- const getLimit = require('../../../lib/utils/getLimit')
6
-
7
- const B_DCRLF = Buffer.from('\r\n\r\n')
8
- const S_DCRLF = '\r\n\r\n'
9
-
10
- function HeaderParser (cfg) {
11
- EventEmitter.call(this)
12
-
13
- cfg = cfg || {}
14
- this.nread = 0
15
- this.maxed = false
16
- this.npairs = 0
17
- this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000)
18
- this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024)
19
- this.buffer = ''
20
- this.header = Object.create(null)
21
- this.finished = false
22
- this.tail = ''
23
- }
24
- inherits(HeaderParser, EventEmitter)
25
-
26
- HeaderParser.prototype.push = function (data) {
27
- if (!Buffer.isBuffer(data)) { data = Buffer.from(data, 'binary') }
28
-
29
- let end = data.length
30
- let appendEnd = data.length
31
- let found = false
32
- const tail = this.tail
33
-
34
- for (let i = tail.length; i > 0; --i) {
35
- if (tail.endsWith(S_DCRLF.slice(0, i))) {
36
- let matched = data.length >= S_DCRLF.length - i
37
- for (let j = i; matched && j < S_DCRLF.length; ++j) {
38
- matched = data[j - i] === S_DCRLF.charCodeAt(j)
39
- }
40
- if (matched) {
41
- end = S_DCRLF.length - i
42
- appendEnd = 0
43
- found = true
44
- break
45
- }
46
- }
47
- }
48
-
49
- if (!found) {
50
- const pos = data.indexOf(B_DCRLF)
51
- if (pos !== -1) {
52
- end = pos + B_DCRLF.length
53
- appendEnd = pos
54
- found = true
55
- }
56
- }
57
-
58
- if (!found) {
59
- this.tail = data.length >= 3
60
- ? data.toString('binary', data.length - 3)
61
- : (tail + data.toString('binary')).slice(-3)
62
- } else { this.tail = '' }
63
-
64
- if (appendEnd !== 0 && !this.maxed) {
65
- const remaining = this.maxHeaderSize - this.nread
66
- if (appendEnd >= remaining) {
67
- this.buffer += data.toString('binary', 0, remaining)
68
- this.nread = this.maxHeaderSize
69
- this.maxed = true
70
- } else {
71
- this.buffer += data.toString('binary', 0, appendEnd)
72
- this.nread += appendEnd
73
- }
74
- }
75
-
76
- if (found) {
77
- this._finish()
78
- return end
79
- }
80
- }
81
-
82
- HeaderParser.prototype.reset = function () {
83
- this.finished = false
84
- this.buffer = ''
85
- this.header = Object.create(null)
86
- this.tail = ''
87
- }
88
-
89
- HeaderParser.prototype._finish = function () {
90
- if (this.buffer) { this._parseHeader() }
91
- const header = this.header
92
- this.header = Object.create(null)
93
- this.buffer = ''
94
- this.tail = ''
95
- this.finished = true
96
- this.nread = this.npairs = 0
97
- this.maxed = false
98
- this.emit('header', header)
99
- }
100
-
101
- HeaderParser.prototype._parseHeader = function () {
102
- if (this.npairs === this.maxHeaderPairs) { return }
103
-
104
- const buffer = this.buffer
105
- let h
106
- let lineStart = 0
107
-
108
- while (lineStart < buffer.length) {
109
- let lineEnd = buffer.indexOf('\r\n', lineStart)
110
- if (lineEnd === -1) { lineEnd = buffer.length }
111
-
112
- if (lineEnd === lineStart) {
113
- lineStart = lineEnd + 2
114
- continue
115
- }
116
-
117
- // Reject bare line breaks instead of exposing them in parsed values
118
- const line = buffer.slice(lineStart, lineEnd)
119
- if (line.includes('\r') || line.includes('\n')) { return }
120
-
121
- if ((buffer[lineStart] === '\t' || buffer[lineStart] === ' ') && h) {
122
- // folded header content
123
- // RFC2822 says to just remove the CRLF and not the whitespace following
124
- // it, so we follow the RFC and include the leading whitespace ...
125
- this.header[h][this.header[h].length - 1] += buffer.slice(lineStart, lineEnd)
126
- lineStart = lineEnd + 2
127
- continue
128
- }
129
-
130
- const posColon = buffer.indexOf(':', lineStart)
131
- if (
132
- posColon === -1 ||
133
- posColon === lineStart ||
134
- posColon > lineEnd
135
- ) {
136
- return
137
- }
138
- h = buffer.slice(lineStart, posColon).toLowerCase()
139
- let valueStart = posColon + 1
140
- if (buffer[valueStart] === ' ' || buffer[valueStart] === '\t') { ++valueStart }
141
- const values = this.header[h] || (this.header[h] = [])
142
- values.push(buffer.slice(valueStart, lineEnd))
143
- if (++this.npairs === this.maxHeaderPairs) { break }
144
-
145
- lineStart = lineEnd + 2
146
- }
147
- }
148
-
149
- module.exports = HeaderParser
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js DELETED
@@ -1,13 +0,0 @@
1
- 'use strict'
2
-
3
- const inherits = require('node:util').inherits
4
- const ReadableStream = require('node:stream').Readable
5
-
6
- function PartStream (opts) {
7
- ReadableStream.call(this, opts)
8
- }
9
- inherits(PartStream, ReadableStream)
10
-
11
- PartStream.prototype._read = function (n) {}
12
-
13
- module.exports = PartStream
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts DELETED
@@ -1,164 +0,0 @@
1
- // Type definitions for dicer 0.2
2
- // Project: https://github.com/mscdex/dicer
3
- // Definitions by: BendingBender <https://github.com/BendingBender>
4
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- // TypeScript Version: 2.2
6
- /// <reference types="node" />
7
-
8
- import stream = require('stream')
9
-
10
- // tslint:disable:unified-signatures
11
-
12
- /**
13
- * A very fast streaming multipart parser for node.js.
14
- * Dicer is a WritableStream
15
- *
16
- * Dicer (special) events:
17
- * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended.
18
- * - on('part', (stream: PartStream)) - Emitted when a new part has been found.
19
- * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored).
20
- * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too).
21
- */
22
- export class Dicer extends stream.Writable {
23
- /**
24
- * Creates and returns a new Dicer instance with the following valid config settings:
25
- *
26
- * @param config The configuration to use
27
- */
28
- constructor (config: Dicer.Config)
29
- /**
30
- * Sets the boundary to use for parsing and performs some initialization needed for parsing.
31
- * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header.
32
- *
33
- * @param boundary The boundary to use
34
- */
35
- setBoundary (boundary: string): void
36
- addListener (event: 'finish', listener: () => void): this
37
- addListener (event: 'part', listener: (stream: Dicer.PartStream) => void): this
38
- addListener (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
39
- addListener (event: 'trailer', listener: (data: Buffer) => void): this
40
- addListener (event: 'close', listener: () => void): this
41
- addListener (event: 'drain', listener: () => void): this
42
- addListener (event: 'error', listener: (err: Error) => void): this
43
- addListener (event: 'pipe', listener: (src: stream.Readable) => void): this
44
- addListener (event: 'unpipe', listener: (src: stream.Readable) => void): this
45
- addListener (event: string, listener: (...args: any[]) => void): this
46
- on (event: 'finish', listener: () => void): this
47
- on (event: 'part', listener: (stream: Dicer.PartStream) => void): this
48
- on (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
49
- on (event: 'trailer', listener: (data: Buffer) => void): this
50
- on (event: 'close', listener: () => void): this
51
- on (event: 'drain', listener: () => void): this
52
- on (event: 'error', listener: (err: Error) => void): this
53
- on (event: 'pipe', listener: (src: stream.Readable) => void): this
54
- on (event: 'unpipe', listener: (src: stream.Readable) => void): this
55
- on (event: string, listener: (...args: any[]) => void): this
56
- once (event: 'finish', listener: () => void): this
57
- once (event: 'part', listener: (stream: Dicer.PartStream) => void): this
58
- once (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
59
- once (event: 'trailer', listener: (data: Buffer) => void): this
60
- once (event: 'close', listener: () => void): this
61
- once (event: 'drain', listener: () => void): this
62
- once (event: 'error', listener: (err: Error) => void): this
63
- once (event: 'pipe', listener: (src: stream.Readable) => void): this
64
- once (event: 'unpipe', listener: (src: stream.Readable) => void): this
65
- once (event: string, listener: (...args: any[]) => void): this
66
- prependListener (event: 'finish', listener: () => void): this
67
- prependListener (event: 'part', listener: (stream: Dicer.PartStream) => void): this
68
- prependListener (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
69
- prependListener (event: 'trailer', listener: (data: Buffer) => void): this
70
- prependListener (event: 'close', listener: () => void): this
71
- prependListener (event: 'drain', listener: () => void): this
72
- prependListener (event: 'error', listener: (err: Error) => void): this
73
- prependListener (event: 'pipe', listener: (src: stream.Readable) => void): this
74
- prependListener (event: 'unpipe', listener: (src: stream.Readable) => void): this
75
- prependListener (event: string, listener: (...args: any[]) => void): this
76
- prependOnceListener (event: 'finish', listener: () => void): this
77
- prependOnceListener (event: 'part', listener: (stream: Dicer.PartStream) => void): this
78
- prependOnceListener (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
79
- prependOnceListener (event: 'trailer', listener: (data: Buffer) => void): this
80
- prependOnceListener (event: 'close', listener: () => void): this
81
- prependOnceListener (event: 'drain', listener: () => void): this
82
- prependOnceListener (event: 'error', listener: (err: Error) => void): this
83
- prependOnceListener (event: 'pipe', listener: (src: stream.Readable) => void): this
84
- prependOnceListener (event: 'unpipe', listener: (src: stream.Readable) => void): this
85
- prependOnceListener (event: string, listener: (...args: any[]) => void): this
86
- removeListener (event: 'finish', listener: () => void): this
87
- removeListener (event: 'part', listener: (stream: Dicer.PartStream) => void): this
88
- removeListener (event: 'preamble', listener: (stream: Dicer.PartStream) => void): this
89
- removeListener (event: 'trailer', listener: (data: Buffer) => void): this
90
- removeListener (event: 'close', listener: () => void): this
91
- removeListener (event: 'drain', listener: () => void): this
92
- removeListener (event: 'error', listener: (err: Error) => void): this
93
- removeListener (event: 'pipe', listener: (src: stream.Readable) => void): this
94
- removeListener (event: 'unpipe', listener: (src: stream.Readable) => void): this
95
- removeListener (event: string, listener: (...args: any[]) => void): this
96
- }
97
-
98
- declare namespace Dicer {
99
- interface Config {
100
- /**
101
- * This is the boundary used to detect the beginning of a new part.
102
- */
103
- boundary?: string | undefined;
104
- /**
105
- * If true, preamble header parsing will be performed first.
106
- */
107
- headerFirst?: boolean | undefined;
108
- /**
109
- * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http).
110
- */
111
- maxHeaderPairs?: number | undefined;
112
- }
113
-
114
- /**
115
- * PartStream is a _ReadableStream_
116
- *
117
- * PartStream (special) events:
118
- * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values.
119
- */
120
- interface PartStream extends stream.Readable {
121
- addListener(event: 'header', listener: (header: object) => void): this;
122
- addListener(event: 'close', listener: () => void): this;
123
- addListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
124
- addListener(event: 'end', listener: () => void): this;
125
- addListener(event: 'readable', listener: () => void): this;
126
- addListener(event: 'error', listener: (err: Error) => void): this;
127
- addListener(event: string, listener: (...args: any[]) => void): this;
128
- on(event: 'header', listener: (header: object) => void): this;
129
- on(event: 'close', listener: () => void): this;
130
- on(event: 'data', listener: (chunk: Buffer | string) => void): this;
131
- on(event: 'end', listener: () => void): this;
132
- on(event: 'readable', listener: () => void): this;
133
- on(event: 'error', listener: (err: Error) => void): this;
134
- on(event: string, listener: (...args: any[]) => void): this;
135
- once(event: 'header', listener: (header: object) => void): this;
136
- once(event: 'close', listener: () => void): this;
137
- once(event: 'data', listener: (chunk: Buffer | string) => void): this;
138
- once(event: 'end', listener: () => void): this;
139
- once(event: 'readable', listener: () => void): this;
140
- once(event: 'error', listener: (err: Error) => void): this;
141
- once(event: string, listener: (...args: any[]) => void): this;
142
- prependListener(event: 'header', listener: (header: object) => void): this;
143
- prependListener(event: 'close', listener: () => void): this;
144
- prependListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
145
- prependListener(event: 'end', listener: () => void): this;
146
- prependListener(event: 'readable', listener: () => void): this;
147
- prependListener(event: 'error', listener: (err: Error) => void): this;
148
- prependListener(event: string, listener: (...args: any[]) => void): this;
149
- prependOnceListener(event: 'header', listener: (header: object) => void): this;
150
- prependOnceListener(event: 'close', listener: () => void): this;
151
- prependOnceListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
152
- prependOnceListener(event: 'end', listener: () => void): this;
153
- prependOnceListener(event: 'readable', listener: () => void): this;
154
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
155
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
156
- removeListener(event: 'header', listener: (header: object) => void): this;
157
- removeListener(event: 'close', listener: () => void): this;
158
- removeListener(event: 'data', listener: (chunk: Buffer | string) => void): this;
159
- removeListener(event: 'end', listener: () => void): this;
160
- removeListener(event: 'readable', listener: () => void): this;
161
- removeListener(event: 'error', listener: (err: Error) => void): this;
162
- removeListener(event: string, listener: (...args: any[]) => void): this;
163
- }
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/deps/streamsearch/sbmh.js DELETED
@@ -1,230 +0,0 @@
1
- 'use strict'
2
-
3
- /**
4
- * Copyright Brian White. All rights reserved.
5
- *
6
- * @see https://github.com/mscdex/streamsearch
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to
10
- * deal in the Software without restriction, including without limitation the
11
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12
- * sell copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in
16
- * all copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24
- * IN THE SOFTWARE.
25
- *
26
- * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
27
- * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
28
- */
29
-
30
- const { EventEmitter } = require('node:events')
31
- const { inherits } = require('node:util')
32
-
33
- function SBMH (needle) {
34
- if (typeof needle === 'string') {
35
- needle = Buffer.from(needle)
36
- }
37
-
38
- if (!Buffer.isBuffer(needle)) {
39
- throw new TypeError('The needle has to be a String or a Buffer.')
40
- }
41
-
42
- const needleLength = needle.length
43
- const needleLastCharIndex = needleLength - 1
44
-
45
- if (needleLength === 0) {
46
- throw new Error('The needle cannot be an empty String/Buffer.')
47
- }
48
-
49
- if (needleLength > 256) {
50
- throw new Error('The needle cannot have a length bigger than 256.')
51
- }
52
-
53
- this.maxMatches = Infinity
54
- this.matches = 0
55
-
56
- this._occ = new Uint16Array(256)
57
- .fill(needleLength) // Initialize occurrence table.
58
- this._lookbehind_size = 0
59
- this._needle = needle
60
- this._bufpos = 0
61
-
62
- this._lookbehind = Buffer.alloc(needleLastCharIndex)
63
-
64
- // Populate occurrence table with analysis of the needle,
65
- // ignoring last letter.
66
- for (var i = 0; i < needleLastCharIndex; ++i) { // eslint-disable-line no-var
67
- this._occ[needle[i]] = needleLastCharIndex - i
68
- }
69
- }
70
- inherits(SBMH, EventEmitter)
71
-
72
- SBMH.prototype.reset = function () {
73
- this._lookbehind_size = 0
74
- this.matches = 0
75
- this._bufpos = 0
76
- }
77
-
78
- SBMH.prototype.push = function (chunk, pos) {
79
- if (!Buffer.isBuffer(chunk)) {
80
- chunk = Buffer.from(chunk, 'binary')
81
- }
82
- const chlen = chunk.length
83
- this._bufpos = pos || 0
84
- let r
85
- while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) }
86
- return r
87
- }
88
-
89
- SBMH.prototype._sbmh_feed = function (data) {
90
- const len = data.length
91
- const needle = this._needle
92
- const needleLength = needle.length
93
- const needleLastCharIndex = needleLength - 1
94
- const needleLastChar = needle[needleLastCharIndex]
95
-
96
- // Positive: points to a position in `data`
97
- // pos == 3 points to data[3]
98
- // Negative: points to a position in the lookbehind buffer
99
- // pos == -2 points to lookbehind[lookbehind_size - 2]
100
- let pos = -this._lookbehind_size
101
- let ch
102
-
103
- if (pos < 0) {
104
- // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool
105
- // search with character lookup code that considers both the
106
- // lookbehind buffer and the current round's haystack data.
107
- //
108
- // Loop until
109
- // there is a match.
110
- // or until
111
- // we've moved past the position that requires the
112
- // lookbehind buffer. In this case we switch to the
113
- // optimized loop.
114
- // or until
115
- // the character to look at lies outside the haystack.
116
- while (pos < 0 && pos <= len - needleLength) {
117
- ch = data[pos + needleLastCharIndex]
118
-
119
- if (
120
- ch === needleLastChar &&
121
- this._sbmh_memcmp(data, pos, needleLastCharIndex)
122
- ) {
123
- this._lookbehind_size = 0
124
- ++this.matches
125
- this.emit('info', true)
126
- return (this._bufpos = pos + needleLength)
127
- }
128
-
129
- pos += this._occ[ch]
130
- }
131
-
132
- // No match.
133
-
134
- while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) {
135
- // There's too few data for Boyer-Moore-Horspool to run,
136
- // so let's use a different algorithm to skip as much as
137
- // we can.
138
- // Forward pos until
139
- // the trailing part of lookbehind + data
140
- // looks like the beginning of the needle
141
- // or until
142
- // pos == 0
143
- ++pos
144
- }
145
-
146
- if (pos >= 0) {
147
- // Discard lookbehind buffer.
148
- this.emit('info', false, this._lookbehind, 0, this._lookbehind_size)
149
- this._lookbehind_size = 0
150
- } else {
151
- // Cut off part of the lookbehind buffer that has
152
- // been processed and append the entire haystack
153
- // into it.
154
- const bytesToCutOff = this._lookbehind_size + pos
155
- if (bytesToCutOff > 0) {
156
- // The cut off data is guaranteed not to contain the needle.
157
- this.emit('info', false, this._lookbehind, 0, bytesToCutOff)
158
- }
159
-
160
- this._lookbehind_size -= bytesToCutOff
161
- this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, this._lookbehind_size)
162
-
163
- data.copy(this._lookbehind, this._lookbehind_size)
164
- this._lookbehind_size += len
165
-
166
- this._bufpos = len
167
- return len
168
- }
169
- }
170
-
171
- // Lookbehind buffer is now empty. We only need to check if the
172
- // needle is in the haystack.
173
- pos = data.indexOf(needle, pos + this._bufpos)
174
-
175
- if (pos !== -1) {
176
- ++this.matches
177
- if (pos === 0) { this.emit('info', true) } else { this.emit('info', true, data, this._bufpos, pos) }
178
- return (this._bufpos = pos + needleLength)
179
- }
180
-
181
- pos = len - needleLastCharIndex
182
- if (pos < 0) {
183
- pos = 0
184
- }
185
-
186
- // There was no match. If there's trailing haystack data that we cannot
187
- // match yet using the Boyer-Moore-Horspool algorithm (because the trailing
188
- // data is less than the needle size) then match using a modified
189
- // algorithm that starts matching from the beginning instead of the end.
190
- // Whatever trailing data is left after running this algorithm is added to
191
- // the lookbehind buffer.
192
- while (
193
- pos !== len &&
194
- (
195
- data[pos] !== needle[0] ||
196
- Buffer.compare(
197
- data.subarray(pos + 1, len),
198
- needle.subarray(1, len - pos)
199
- ) !== 0
200
- )
201
- ) {
202
- ++pos
203
- }
204
-
205
- if (pos !== len) {
206
- data.copy(this._lookbehind, 0, pos, len)
207
- this._lookbehind_size = len - pos
208
- }
209
-
210
- // Everything until pos is guaranteed not to contain needle data.
211
- if (pos !== 0) { this.emit('info', false, data, this._bufpos, pos) }
212
-
213
- this._bufpos = len
214
- return len
215
- }
216
-
217
- SBMH.prototype._sbmh_lookup_char = function (data, pos) {
218
- return pos < 0
219
- ? this._lookbehind[this._lookbehind_size + pos]
220
- : data[pos]
221
- }
222
-
223
- SBMH.prototype._sbmh_memcmp = function (data, pos, len) {
224
- for (var i = 0; i < len; ++i) { // eslint-disable-line no-var
225
- if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false }
226
- }
227
- return true
228
- }
229
-
230
- module.exports = SBMH
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/index.js DELETED
@@ -1,85 +0,0 @@
1
- 'use strict'
2
-
3
- const WritableStream = require('node:stream').Writable
4
- const { inherits } = require('node:util')
5
- const Dicer = require('./deps/dicer/lib/Dicer')
6
-
7
- const MultipartParser = require('./lib/types/multipart')
8
- const UrlencodedParser = require('./lib/types/urlencoded')
9
- const parseParams = require('./lib/utils/parseParams')
10
-
11
- function Busboy (opts) {
12
- if (!(this instanceof Busboy)) { return new Busboy(opts) }
13
-
14
- if (typeof opts !== 'object') {
15
- throw new TypeError('Busboy expected an options-Object.')
16
- }
17
- if (typeof opts.headers !== 'object') {
18
- throw new TypeError('Busboy expected an options-Object with headers-attribute.')
19
- }
20
- if (typeof opts.headers['content-type'] !== 'string') {
21
- throw new TypeError('Missing Content-Type-header.')
22
- }
23
-
24
- const {
25
- headers,
26
- ...streamOptions
27
- } = opts
28
-
29
- this.opts = {
30
- autoDestroy: false,
31
- ...streamOptions
32
- }
33
- WritableStream.call(this, this.opts)
34
-
35
- this._done = false
36
- this._parser = this.getParserByHeaders(headers)
37
- this._finished = false
38
- }
39
- inherits(Busboy, WritableStream)
40
-
41
- Busboy.prototype.emit = function (ev) {
42
- if (ev === 'finish') {
43
- if (!this._done) {
44
- this._parser?.end()
45
- return
46
- } else if (this._finished) {
47
- return
48
- }
49
- this._finished = true
50
- }
51
- WritableStream.prototype.emit.apply(this, arguments)
52
- }
53
-
54
- Busboy.prototype.getParserByHeaders = function (headers) {
55
- const parsed = parseParams(headers['content-type'])
56
-
57
- const cfg = {
58
- defCharset: this.opts.defCharset,
59
- fileHwm: this.opts.fileHwm,
60
- headers,
61
- highWaterMark: this.opts.highWaterMark,
62
- isPartAFile: this.opts.isPartAFile,
63
- limits: this.opts.limits,
64
- parsedConType: parsed,
65
- preservePath: this.opts.preservePath
66
- }
67
-
68
- if (MultipartParser.detect.test(parsed[0])) {
69
- return new MultipartParser(this, cfg)
70
- }
71
- if (UrlencodedParser.detect.test(parsed[0])) {
72
- return new UrlencodedParser(this, cfg)
73
- }
74
- throw new Error('Unsupported Content-Type.')
75
- }
76
-
77
- Busboy.prototype._write = function (chunk, encoding, cb) {
78
- this._parser.write(chunk, cb)
79
- }
80
-
81
- module.exports = Busboy
82
- module.exports.default = Busboy
83
- module.exports.Busboy = Busboy
84
-
85
- module.exports.Dicer = Dicer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/types/multipart.js DELETED
@@ -1,317 +0,0 @@
1
- 'use strict'
2
-
3
- // TODO:
4
- // * support 1 nested multipart level
5
- // (see second multipart example here:
6
- // https://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data)
7
- // * support limits.fieldNameSize
8
- // -- this will require modifications to utils.parseParams
9
-
10
- const { Readable } = require('node:stream')
11
- const { inherits } = require('node:util')
12
-
13
- const Dicer = require('../../deps/dicer/lib/Dicer')
14
-
15
- const parseParams = require('../utils/parseParams')
16
- const decodeText = require('../utils/decodeText')
17
- const basename = require('../utils/basename')
18
- const getLimit = require('../utils/getLimit')
19
-
20
- const RE_BOUNDARY = /^boundary$/i
21
- const RE_FIELD = /^form-data$/i
22
- const RE_CHARSET = /^charset$/i
23
- const RE_FILENAME = /^filename$/i
24
- const RE_NAME = /^name$/i
25
-
26
- Multipart.detect = /^multipart\/form-data/i
27
- function Multipart (boy, cfg) {
28
- let i
29
- let len
30
- const self = this
31
- let boundary
32
- const limits = cfg.limits
33
- const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined))
34
- const parsedConType = cfg.parsedConType || []
35
- const defCharset = cfg.defCharset || 'utf8'
36
- const preservePath = cfg.preservePath
37
- const fileOpts = { highWaterMark: cfg.fileHwm }
38
-
39
- for (i = 0, len = parsedConType.length; i < len; ++i) {
40
- if (Array.isArray(parsedConType[i]) &&
41
- RE_BOUNDARY.test(parsedConType[i][0])) {
42
- boundary = parsedConType[i][1]
43
- break
44
- }
45
- }
46
-
47
- function checkFinished () {
48
- if (nends === 0 && finished && !boy._done) {
49
- finished = false
50
- self.end()
51
- }
52
- }
53
-
54
- if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') }
55
-
56
- const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)
57
- const fileSizeLimit = getLimit(limits, 'fileSize', Infinity)
58
- const filesLimit = getLimit(limits, 'files', Infinity)
59
- const fieldsLimit = getLimit(limits, 'fields', Infinity)
60
- const partsLimit = getLimit(limits, 'parts', Infinity)
61
- const headerPairsLimit = getLimit(limits, 'headerPairs', 2000)
62
- const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024)
63
-
64
- let nfiles = 0
65
- let nfields = 0
66
- let nends = 0
67
- let curFile
68
- let curField
69
- let finished = false
70
-
71
- this._needDrain = false
72
- this._pause = false
73
- this._cb = undefined
74
- this._nparts = 0
75
- this._boy = boy
76
-
77
- const parserCfg = {
78
- boundary,
79
- maxHeaderPairs: headerPairsLimit,
80
- maxHeaderSize: headerSizeLimit,
81
- partHwm: fileOpts.highWaterMark,
82
- highWaterMark: cfg.highWaterMark
83
- }
84
-
85
- this.parser = new Dicer(parserCfg)
86
- this.parser.on('drain', function () {
87
- self._needDrain = false
88
- if (self._cb && !self._pause) {
89
- const cb = self._cb
90
- self._cb = undefined
91
- cb()
92
- }
93
- }).on('part', function onPart (part) {
94
- if (++self._nparts > partsLimit) {
95
- self.parser.removeListener('part', onPart)
96
- self.parser.on('part', skipPart)
97
- boy.hitPartsLimit = true
98
- boy.emit('partsLimit')
99
- return skipPart(part)
100
- }
101
-
102
- // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let
103
- // us emit 'end' early since we know the part has ended if we are already
104
- // seeing the next part
105
- if (curField) {
106
- const field = curField
107
- field.emit('end')
108
- field.removeAllListeners('end')
109
- }
110
-
111
- part.on('header', function (header) {
112
- let contype
113
- let fieldname
114
- let parsed
115
- let charset
116
- let encoding
117
- let filename
118
- let nsize = 0
119
-
120
- if (header['content-type']) {
121
- const contentType = header['content-type'][0]
122
- if (contentType.length !== 0 && contentType.indexOf(';') === -1 && contentType.indexOf(' ') === -1 && contentType.indexOf('\t') === -1) {
123
- contype = contentType.toLowerCase()
124
- } else {
125
- parsed = parseParams(contentType)
126
- if (parsed[0]) {
127
- contype = parsed[0].toLowerCase()
128
- for (i = 0, len = parsed.length; i < len; ++i) {
129
- if (RE_CHARSET.test(parsed[i][0])) {
130
- charset = parsed[i][1].toLowerCase()
131
- break
132
- }
133
- }
134
- }
135
- }
136
- }
137
-
138
- if (contype === undefined) { contype = 'text/plain' }
139
- if (charset === undefined) { charset = defCharset }
140
-
141
- if (header['content-disposition']) {
142
- parsed = parseParams(header['content-disposition'][0])
143
- if (!RE_FIELD.test(parsed[0])) { return skipPart(part) }
144
- for (i = 0, len = parsed.length; i < len; ++i) {
145
- if (RE_NAME.test(parsed[i][0])) {
146
- fieldname = parsed[i][1]
147
- if (hasBareLineBreak(fieldname)) { return skipPart(part) }
148
- } else if (RE_FILENAME.test(parsed[i][0])) {
149
- filename = parsed[i][1]
150
- if (hasBareLineBreak(filename)) { return skipPart(part) }
151
- if (!preservePath) { filename = basename(filename) }
152
- }
153
- }
154
- } else { return skipPart(part) }
155
-
156
- if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' }
157
-
158
- let onData,
159
- onEnd
160
-
161
- if (isPartAFile(fieldname, contype, filename)) {
162
- // file/binary field
163
- if (nfiles === filesLimit) {
164
- if (!boy.hitFilesLimit) {
165
- boy.hitFilesLimit = true
166
- boy.emit('filesLimit')
167
- }
168
- return skipPart(part)
169
- }
170
-
171
- ++nfiles
172
-
173
- if (boy.listenerCount('file') === 0) {
174
- self.parser._ignore()
175
- return
176
- }
177
-
178
- ++nends
179
- const file = new FileStream(fileOpts)
180
- curFile = file
181
- file.on('end', function () {
182
- --nends
183
- self._pause = false
184
- checkFinished()
185
- if (self._cb && !self._needDrain) {
186
- const cb = self._cb
187
- self._cb = undefined
188
- cb()
189
- }
190
- })
191
- file._read = function (n) {
192
- if (!self._pause) { return }
193
- self._pause = false
194
- if (self._cb && !self._needDrain) {
195
- const cb = self._cb
196
- self._cb = undefined
197
- cb()
198
- }
199
- }
200
- boy.emit('file', fieldname, file, filename, encoding, contype)
201
-
202
- onData = function (data) {
203
- if ((nsize += data.length) > fileSizeLimit) {
204
- const extralen = fileSizeLimit - nsize + data.length
205
- if (extralen > 0) { file.push(data.slice(0, extralen)) }
206
- file.truncated = true
207
- file.bytesRead = fileSizeLimit
208
- part.removeAllListeners('data')
209
- file.emit('limit')
210
- return
211
- } else if (!file.push(data)) { self._pause = true }
212
-
213
- file.bytesRead = nsize
214
- }
215
-
216
- onEnd = function () {
217
- curFile = undefined
218
- file.push(null)
219
- }
220
- } else {
221
- // non-file field
222
- if (nfields === fieldsLimit) {
223
- if (!boy.hitFieldsLimit) {
224
- boy.hitFieldsLimit = true
225
- boy.emit('fieldsLimit')
226
- }
227
- return skipPart(part)
228
- }
229
-
230
- ++nfields
231
- ++nends
232
- let buffer = ''
233
- let truncated = false
234
- curField = part
235
-
236
- onData = function (data) {
237
- if ((nsize += data.length) > fieldSizeLimit) {
238
- const extralen = (fieldSizeLimit - (nsize - data.length))
239
- buffer += data.toString('binary', 0, extralen)
240
- truncated = true
241
- part.removeAllListeners('data')
242
- } else { buffer += data.toString('binary') }
243
- }
244
-
245
- onEnd = function () {
246
- curField = undefined
247
- if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) }
248
- boy.emit('field', fieldname, buffer, false, truncated, encoding, contype)
249
- --nends
250
- checkFinished()
251
- }
252
- }
253
-
254
- /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become
255
- broken. Streams2/streams3 is a huge black box of confusion, but
256
- somehow overriding the sync state seems to fix things again (and still
257
- seems to work for previous node versions).
258
- */
259
- part._readableState.sync = false
260
-
261
- part.on('data', onData)
262
- part.on('end', onEnd)
263
- }).on('error', function (err) {
264
- if (curFile) { curFile.emit('error', err) }
265
- })
266
- }).on('error', function (err) {
267
- boy.emit('error', err)
268
- }).on('finish', function () {
269
- finished = true
270
- checkFinished()
271
- })
272
- }
273
-
274
- Multipart.prototype.write = function (chunk, cb) {
275
- const r = this.parser.write(chunk)
276
- if (r && !this._pause) {
277
- cb()
278
- } else {
279
- this._needDrain = !r
280
- this._cb = cb
281
- }
282
- }
283
-
284
- Multipart.prototype.end = function () {
285
- const self = this
286
-
287
- if (self.parser.writable) {
288
- self.parser.end()
289
- } else if (!self._boy._done) {
290
- process.nextTick(function () {
291
- self._boy._done = true
292
- self._boy.emit('finish')
293
- })
294
- }
295
- }
296
-
297
- function skipPart (part) {
298
- part.resume()
299
- }
300
-
301
- function hasBareLineBreak (value) {
302
- return typeof value === 'string' && (value.includes('\r') || value.includes('\n'))
303
- }
304
-
305
- function FileStream (opts) {
306
- Readable.call(this, opts)
307
-
308
- this.bytesRead = 0
309
-
310
- this.truncated = false
311
- }
312
-
313
- inherits(FileStream, Readable)
314
-
315
- FileStream.prototype._read = function (n) {}
316
-
317
- module.exports = Multipart
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/types/urlencoded.js DELETED
@@ -1,190 +0,0 @@
1
- 'use strict'
2
-
3
- const Decoder = require('../utils/Decoder')
4
- const decodeText = require('../utils/decodeText')
5
- const getLimit = require('../utils/getLimit')
6
-
7
- const RE_CHARSET = /^charset$/i
8
-
9
- UrlEncoded.detect = /^application\/x-www-form-urlencoded/i
10
- function UrlEncoded (boy, cfg) {
11
- const limits = cfg.limits
12
- const parsedConType = cfg.parsedConType
13
- this.boy = boy
14
-
15
- this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024)
16
- this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100)
17
- this.fieldsLimit = getLimit(limits, 'fields', Infinity)
18
-
19
- let charset
20
- for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var
21
- if (Array.isArray(parsedConType[i]) &&
22
- RE_CHARSET.test(parsedConType[i][0])) {
23
- charset = parsedConType[i][1].toLowerCase()
24
- break
25
- }
26
- }
27
-
28
- if (charset === undefined) { charset = cfg.defCharset || 'utf8' }
29
-
30
- this.decoder = new Decoder()
31
- this.charset = charset
32
- this._fields = 0
33
- this._state = 'key'
34
- this._checkingBytes = true
35
- this._bytesKey = 0
36
- this._bytesVal = 0
37
- this._key = ''
38
- this._val = ''
39
- this._keyTrunc = false
40
- this._valTrunc = false
41
- this._hitLimit = false
42
- }
43
-
44
- UrlEncoded.prototype.write = function (data, cb) {
45
- if (this._fields === this.fieldsLimit) {
46
- if (!this.boy.hitFieldsLimit) {
47
- this.boy.hitFieldsLimit = true
48
- this.boy.emit('fieldsLimit')
49
- }
50
- return cb()
51
- }
52
-
53
- let idxeq; let idxamp; let i; let p = 0; const len = data.length
54
-
55
- while (p < len) {
56
- if (this._state === 'key') {
57
- idxeq = idxamp = undefined
58
- for (i = p; i < len; ++i) {
59
- if (!this._checkingBytes) { ++p }
60
- if (data[i] === 0x3D/* = */) {
61
- idxeq = i
62
- break
63
- } else if (data[i] === 0x26/* & */) {
64
- idxamp = i
65
- break
66
- }
67
- if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) {
68
- this._hitLimit = true
69
- break
70
- } else if (this._checkingBytes) { ++this._bytesKey }
71
- }
72
-
73
- if (idxeq !== undefined) {
74
- // key with assignment
75
- if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) }
76
- this._state = 'val'
77
-
78
- this._hitLimit = false
79
- this._checkingBytes = true
80
- this._val = ''
81
- this._bytesVal = 0
82
- this._valTrunc = false
83
- this.decoder.reset()
84
-
85
- p = idxeq + 1
86
- } else if (idxamp !== undefined) {
87
- // key with no assignment
88
- ++this._fields
89
- let key; const keyTrunc = this._keyTrunc
90
- if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key }
91
-
92
- this._hitLimit = false
93
- this._checkingBytes = true
94
- this._key = ''
95
- this._bytesKey = 0
96
- this._keyTrunc = false
97
- this.decoder.reset()
98
-
99
- if (key.length) {
100
- this.boy.emit('field', decodeText(key, 'binary', this.charset),
101
- '',
102
- keyTrunc,
103
- false)
104
- }
105
-
106
- p = idxamp + 1
107
- if (this._fields === this.fieldsLimit) { return cb() }
108
- } else if (this._hitLimit) {
109
- // we may not have hit the actual limit if there are encoded bytes...
110
- if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) }
111
- p = i
112
- if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) {
113
- // yep, we actually did hit the limit
114
- this._checkingBytes = false
115
- this._keyTrunc = true
116
- }
117
- } else {
118
- if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) }
119
- p = len
120
- }
121
- } else {
122
- idxamp = undefined
123
- for (i = p; i < len; ++i) {
124
- if (!this._checkingBytes) { ++p }
125
- if (data[i] === 0x26/* & */) {
126
- idxamp = i
127
- break
128
- }
129
- if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) {
130
- this._hitLimit = true
131
- break
132
- } else if (this._checkingBytes) { ++this._bytesVal }
133
- }
134
-
135
- if (idxamp !== undefined) {
136
- ++this._fields
137
- if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) }
138
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
139
- decodeText(this._val, 'binary', this.charset),
140
- this._keyTrunc,
141
- this._valTrunc)
142
- this._state = 'key'
143
-
144
- this._hitLimit = false
145
- this._checkingBytes = true
146
- this._key = ''
147
- this._bytesKey = 0
148
- this._keyTrunc = false
149
- this.decoder.reset()
150
-
151
- p = idxamp + 1
152
- if (this._fields === this.fieldsLimit) { return cb() }
153
- } else if (this._hitLimit) {
154
- // we may not have hit the actual limit if there are encoded bytes...
155
- if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) }
156
- p = i
157
- if ((this._val === '' && this.fieldSizeLimit === 0) ||
158
- (this._bytesVal = this._val.length) === this.fieldSizeLimit) {
159
- // yep, we actually did hit the limit
160
- this._checkingBytes = false
161
- this._valTrunc = true
162
- }
163
- } else {
164
- if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) }
165
- p = len
166
- }
167
- }
168
- }
169
- cb()
170
- }
171
-
172
- UrlEncoded.prototype.end = function () {
173
- if (this.boy._done) { return }
174
-
175
- if (this._state === 'key' && this._key.length > 0) {
176
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
177
- '',
178
- this._keyTrunc,
179
- false)
180
- } else if (this._state === 'val') {
181
- this.boy.emit('field', decodeText(this._key, 'binary', this.charset),
182
- decodeText(this._val, 'binary', this.charset),
183
- this._keyTrunc,
184
- this._valTrunc)
185
- }
186
- this.boy._done = true
187
- this.boy.emit('finish')
188
- }
189
-
190
- module.exports = UrlEncoded
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/utils/Decoder.js DELETED
@@ -1,54 +0,0 @@
1
- 'use strict'
2
-
3
- const RE_PLUS = /\+/g
4
-
5
- const HEX = [
6
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
7
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
8
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
10
- 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
12
- 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
13
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
14
- ]
15
-
16
- function Decoder () {
17
- this.buffer = undefined
18
- }
19
- Decoder.prototype.write = function (str) {
20
- // Replace '+' with ' ' before decoding
21
- str = str.replace(RE_PLUS, ' ')
22
- let res = ''
23
- let i = 0; let p = 0; const len = str.length
24
- for (; i < len; ++i) {
25
- if (this.buffer !== undefined) {
26
- if (!HEX[str.charCodeAt(i)]) {
27
- res += '%' + this.buffer
28
- this.buffer = undefined
29
- --i // retry character
30
- } else {
31
- this.buffer += str[i]
32
- ++p
33
- if (this.buffer.length === 2) {
34
- res += String.fromCharCode(parseInt(this.buffer, 16))
35
- this.buffer = undefined
36
- }
37
- }
38
- } else if (str[i] === '%') {
39
- if (i > p) {
40
- res += str.substring(p, i)
41
- p = i
42
- }
43
- this.buffer = ''
44
- ++p
45
- }
46
- }
47
- if (p < len && this.buffer === undefined) { res += str.substring(p) }
48
- return res
49
- }
50
- Decoder.prototype.reset = function () {
51
- this.buffer = undefined
52
- }
53
-
54
- module.exports = Decoder
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/utils/basename.js DELETED
@@ -1,14 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function basename (path) {
4
- if (typeof path !== 'string') { return '' }
5
- for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var
6
- switch (path.charCodeAt(i)) {
7
- case 0x2F: // '/'
8
- case 0x5C: // '\'
9
- path = path.slice(i + 1)
10
- return (path === '..' || path === '.' ? '' : path)
11
- }
12
- }
13
- return (path === '..' || path === '.' ? '' : path)
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/utils/decodeText.js DELETED
@@ -1,122 +0,0 @@
1
- 'use strict'
2
-
3
- // Node has always utf-8
4
- const utf8Decoder = new TextDecoder('utf-8')
5
- const textDecoders = new Map([
6
- ['utf-8', utf8Decoder],
7
- ['utf8', utf8Decoder]
8
- ])
9
-
10
- function getDecoder (charset) {
11
- let lc
12
- while (true) {
13
- switch (charset) {
14
- case 'utf-8':
15
- case 'utf8':
16
- return decoders.utf8
17
- case 'latin1':
18
- case 'ascii': // TODO: Make these a separate, strict decoder?
19
- case 'us-ascii':
20
- case 'iso-8859-1':
21
- case 'iso8859-1':
22
- case 'iso88591':
23
- case 'iso_8859-1':
24
- case 'windows-1252':
25
- case 'iso_8859-1:1987':
26
- case 'cp1252':
27
- case 'x-cp1252':
28
- return decoders.latin1
29
- case 'utf16le':
30
- case 'utf-16le':
31
- case 'ucs2':
32
- case 'ucs-2':
33
- return decoders.utf16le
34
- case 'base64':
35
- return decoders.base64
36
- default:
37
- if (lc === undefined) {
38
- lc = true
39
- charset = charset.toLowerCase()
40
- continue
41
- }
42
- return decoders.other.bind(charset)
43
- }
44
- }
45
- }
46
-
47
- function isAscii (data) {
48
- for (var i = 0, len = data.length; i < len; ++i) { // eslint-disable-line no-var
49
- if (data.charCodeAt(i) > 0x7F) { return false }
50
- }
51
- return true
52
- }
53
-
54
- const decoders = {
55
- utf8: (data, sourceEncoding) => {
56
- if (data.length === 0) {
57
- return ''
58
- }
59
- if (typeof data === 'string') {
60
- if (isAscii(data)) { return data }
61
- data = Buffer.from(data, sourceEncoding)
62
- }
63
- return data.utf8Slice(0, data.length)
64
- },
65
-
66
- latin1: (data, sourceEncoding) => {
67
- if (data.length === 0) {
68
- return ''
69
- }
70
- if (typeof data === 'string') {
71
- return data
72
- }
73
- return data.latin1Slice(0, data.length)
74
- },
75
-
76
- utf16le: (data, sourceEncoding) => {
77
- if (data.length === 0) {
78
- return ''
79
- }
80
- if (typeof data === 'string') {
81
- data = Buffer.from(data, sourceEncoding)
82
- }
83
- return data.ucs2Slice(0, data.length)
84
- },
85
-
86
- base64: (data, sourceEncoding) => {
87
- if (data.length === 0) {
88
- return ''
89
- }
90
- if (typeof data === 'string') {
91
- data = Buffer.from(data, sourceEncoding)
92
- }
93
- return data.base64Slice(0, data.length)
94
- },
95
-
96
- other: (data, sourceEncoding) => {
97
- if (data.length === 0) {
98
- return ''
99
- }
100
- if (typeof data === 'string') {
101
- data = Buffer.from(data, sourceEncoding)
102
- }
103
-
104
- if (textDecoders.has(this.toString())) {
105
- try {
106
- return textDecoders.get(this).decode(data)
107
- } catch {}
108
- }
109
- return typeof data === 'string'
110
- ? data
111
- : data.toString()
112
- }
113
- }
114
-
115
- function decodeText (text, sourceEncoding, destEncoding) {
116
- if (text) {
117
- return getDecoder(destEncoding)(text, sourceEncoding)
118
- }
119
- return text
120
- }
121
-
122
- module.exports = decodeText
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/utils/getLimit.js DELETED
@@ -1,16 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = function getLimit (limits, name, defaultLimit) {
4
- if (
5
- !limits ||
6
- limits[name] === undefined ||
7
- limits[name] === null
8
- ) { return defaultLimit }
9
-
10
- if (
11
- typeof limits[name] !== 'number' ||
12
- isNaN(limits[name])
13
- ) { throw new TypeError('Limit ' + name + ' is not a valid number') }
14
-
15
- return limits[name]
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/lib/utils/parseParams.js DELETED
@@ -1,624 +0,0 @@
1
- 'use strict'
2
-
3
- const decodeText = require('./decodeText')
4
-
5
- const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g
6
-
7
- const EncodedLookup = {
8
- '%00': '\x00',
9
- '%01': '\x01',
10
- '%02': '\x02',
11
- '%03': '\x03',
12
- '%04': '\x04',
13
- '%05': '\x05',
14
- '%06': '\x06',
15
- '%07': '\x07',
16
- '%08': '\x08',
17
- '%09': '\x09',
18
- '%0a': '\x0a',
19
- '%0A': '\x0a',
20
- '%0b': '\x0b',
21
- '%0B': '\x0b',
22
- '%0c': '\x0c',
23
- '%0C': '\x0c',
24
- '%0d': '\x0d',
25
- '%0D': '\x0d',
26
- '%0e': '\x0e',
27
- '%0E': '\x0e',
28
- '%0f': '\x0f',
29
- '%0F': '\x0f',
30
- '%10': '\x10',
31
- '%11': '\x11',
32
- '%12': '\x12',
33
- '%13': '\x13',
34
- '%14': '\x14',
35
- '%15': '\x15',
36
- '%16': '\x16',
37
- '%17': '\x17',
38
- '%18': '\x18',
39
- '%19': '\x19',
40
- '%1a': '\x1a',
41
- '%1A': '\x1a',
42
- '%1b': '\x1b',
43
- '%1B': '\x1b',
44
- '%1c': '\x1c',
45
- '%1C': '\x1c',
46
- '%1d': '\x1d',
47
- '%1D': '\x1d',
48
- '%1e': '\x1e',
49
- '%1E': '\x1e',
50
- '%1f': '\x1f',
51
- '%1F': '\x1f',
52
- '%20': '\x20',
53
- '%21': '\x21',
54
- '%22': '\x22',
55
- '%23': '\x23',
56
- '%24': '\x24',
57
- '%25': '\x25',
58
- '%26': '\x26',
59
- '%27': '\x27',
60
- '%28': '\x28',
61
- '%29': '\x29',
62
- '%2a': '\x2a',
63
- '%2A': '\x2a',
64
- '%2b': '\x2b',
65
- '%2B': '\x2b',
66
- '%2c': '\x2c',
67
- '%2C': '\x2c',
68
- '%2d': '\x2d',
69
- '%2D': '\x2d',
70
- '%2e': '\x2e',
71
- '%2E': '\x2e',
72
- '%2f': '\x2f',
73
- '%2F': '\x2f',
74
- '%30': '\x30',
75
- '%31': '\x31',
76
- '%32': '\x32',
77
- '%33': '\x33',
78
- '%34': '\x34',
79
- '%35': '\x35',
80
- '%36': '\x36',
81
- '%37': '\x37',
82
- '%38': '\x38',
83
- '%39': '\x39',
84
- '%3a': '\x3a',
85
- '%3A': '\x3a',
86
- '%3b': '\x3b',
87
- '%3B': '\x3b',
88
- '%3c': '\x3c',
89
- '%3C': '\x3c',
90
- '%3d': '\x3d',
91
- '%3D': '\x3d',
92
- '%3e': '\x3e',
93
- '%3E': '\x3e',
94
- '%3f': '\x3f',
95
- '%3F': '\x3f',
96
- '%40': '\x40',
97
- '%41': '\x41',
98
- '%42': '\x42',
99
- '%43': '\x43',
100
- '%44': '\x44',
101
- '%45': '\x45',
102
- '%46': '\x46',
103
- '%47': '\x47',
104
- '%48': '\x48',
105
- '%49': '\x49',
106
- '%4a': '\x4a',
107
- '%4A': '\x4a',
108
- '%4b': '\x4b',
109
- '%4B': '\x4b',
110
- '%4c': '\x4c',
111
- '%4C': '\x4c',
112
- '%4d': '\x4d',
113
- '%4D': '\x4d',
114
- '%4e': '\x4e',
115
- '%4E': '\x4e',
116
- '%4f': '\x4f',
117
- '%4F': '\x4f',
118
- '%50': '\x50',
119
- '%51': '\x51',
120
- '%52': '\x52',
121
- '%53': '\x53',
122
- '%54': '\x54',
123
- '%55': '\x55',
124
- '%56': '\x56',
125
- '%57': '\x57',
126
- '%58': '\x58',
127
- '%59': '\x59',
128
- '%5a': '\x5a',
129
- '%5A': '\x5a',
130
- '%5b': '\x5b',
131
- '%5B': '\x5b',
132
- '%5c': '\x5c',
133
- '%5C': '\x5c',
134
- '%5d': '\x5d',
135
- '%5D': '\x5d',
136
- '%5e': '\x5e',
137
- '%5E': '\x5e',
138
- '%5f': '\x5f',
139
- '%5F': '\x5f',
140
- '%60': '\x60',
141
- '%61': '\x61',
142
- '%62': '\x62',
143
- '%63': '\x63',
144
- '%64': '\x64',
145
- '%65': '\x65',
146
- '%66': '\x66',
147
- '%67': '\x67',
148
- '%68': '\x68',
149
- '%69': '\x69',
150
- '%6a': '\x6a',
151
- '%6A': '\x6a',
152
- '%6b': '\x6b',
153
- '%6B': '\x6b',
154
- '%6c': '\x6c',
155
- '%6C': '\x6c',
156
- '%6d': '\x6d',
157
- '%6D': '\x6d',
158
- '%6e': '\x6e',
159
- '%6E': '\x6e',
160
- '%6f': '\x6f',
161
- '%6F': '\x6f',
162
- '%70': '\x70',
163
- '%71': '\x71',
164
- '%72': '\x72',
165
- '%73': '\x73',
166
- '%74': '\x74',
167
- '%75': '\x75',
168
- '%76': '\x76',
169
- '%77': '\x77',
170
- '%78': '\x78',
171
- '%79': '\x79',
172
- '%7a': '\x7a',
173
- '%7A': '\x7a',
174
- '%7b': '\x7b',
175
- '%7B': '\x7b',
176
- '%7c': '\x7c',
177
- '%7C': '\x7c',
178
- '%7d': '\x7d',
179
- '%7D': '\x7d',
180
- '%7e': '\x7e',
181
- '%7E': '\x7e',
182
- '%7f': '\x7f',
183
- '%7F': '\x7f',
184
- '%80': '\x80',
185
- '%81': '\x81',
186
- '%82': '\x82',
187
- '%83': '\x83',
188
- '%84': '\x84',
189
- '%85': '\x85',
190
- '%86': '\x86',
191
- '%87': '\x87',
192
- '%88': '\x88',
193
- '%89': '\x89',
194
- '%8a': '\x8a',
195
- '%8A': '\x8a',
196
- '%8b': '\x8b',
197
- '%8B': '\x8b',
198
- '%8c': '\x8c',
199
- '%8C': '\x8c',
200
- '%8d': '\x8d',
201
- '%8D': '\x8d',
202
- '%8e': '\x8e',
203
- '%8E': '\x8e',
204
- '%8f': '\x8f',
205
- '%8F': '\x8f',
206
- '%90': '\x90',
207
- '%91': '\x91',
208
- '%92': '\x92',
209
- '%93': '\x93',
210
- '%94': '\x94',
211
- '%95': '\x95',
212
- '%96': '\x96',
213
- '%97': '\x97',
214
- '%98': '\x98',
215
- '%99': '\x99',
216
- '%9a': '\x9a',
217
- '%9A': '\x9a',
218
- '%9b': '\x9b',
219
- '%9B': '\x9b',
220
- '%9c': '\x9c',
221
- '%9C': '\x9c',
222
- '%9d': '\x9d',
223
- '%9D': '\x9d',
224
- '%9e': '\x9e',
225
- '%9E': '\x9e',
226
- '%9f': '\x9f',
227
- '%9F': '\x9f',
228
- '%a0': '\xa0',
229
- '%A0': '\xa0',
230
- '%a1': '\xa1',
231
- '%A1': '\xa1',
232
- '%a2': '\xa2',
233
- '%A2': '\xa2',
234
- '%a3': '\xa3',
235
- '%A3': '\xa3',
236
- '%a4': '\xa4',
237
- '%A4': '\xa4',
238
- '%a5': '\xa5',
239
- '%A5': '\xa5',
240
- '%a6': '\xa6',
241
- '%A6': '\xa6',
242
- '%a7': '\xa7',
243
- '%A7': '\xa7',
244
- '%a8': '\xa8',
245
- '%A8': '\xa8',
246
- '%a9': '\xa9',
247
- '%A9': '\xa9',
248
- '%aa': '\xaa',
249
- '%Aa': '\xaa',
250
- '%aA': '\xaa',
251
- '%AA': '\xaa',
252
- '%ab': '\xab',
253
- '%Ab': '\xab',
254
- '%aB': '\xab',
255
- '%AB': '\xab',
256
- '%ac': '\xac',
257
- '%Ac': '\xac',
258
- '%aC': '\xac',
259
- '%AC': '\xac',
260
- '%ad': '\xad',
261
- '%Ad': '\xad',
262
- '%aD': '\xad',
263
- '%AD': '\xad',
264
- '%ae': '\xae',
265
- '%Ae': '\xae',
266
- '%aE': '\xae',
267
- '%AE': '\xae',
268
- '%af': '\xaf',
269
- '%Af': '\xaf',
270
- '%aF': '\xaf',
271
- '%AF': '\xaf',
272
- '%b0': '\xb0',
273
- '%B0': '\xb0',
274
- '%b1': '\xb1',
275
- '%B1': '\xb1',
276
- '%b2': '\xb2',
277
- '%B2': '\xb2',
278
- '%b3': '\xb3',
279
- '%B3': '\xb3',
280
- '%b4': '\xb4',
281
- '%B4': '\xb4',
282
- '%b5': '\xb5',
283
- '%B5': '\xb5',
284
- '%b6': '\xb6',
285
- '%B6': '\xb6',
286
- '%b7': '\xb7',
287
- '%B7': '\xb7',
288
- '%b8': '\xb8',
289
- '%B8': '\xb8',
290
- '%b9': '\xb9',
291
- '%B9': '\xb9',
292
- '%ba': '\xba',
293
- '%Ba': '\xba',
294
- '%bA': '\xba',
295
- '%BA': '\xba',
296
- '%bb': '\xbb',
297
- '%Bb': '\xbb',
298
- '%bB': '\xbb',
299
- '%BB': '\xbb',
300
- '%bc': '\xbc',
301
- '%Bc': '\xbc',
302
- '%bC': '\xbc',
303
- '%BC': '\xbc',
304
- '%bd': '\xbd',
305
- '%Bd': '\xbd',
306
- '%bD': '\xbd',
307
- '%BD': '\xbd',
308
- '%be': '\xbe',
309
- '%Be': '\xbe',
310
- '%bE': '\xbe',
311
- '%BE': '\xbe',
312
- '%bf': '\xbf',
313
- '%Bf': '\xbf',
314
- '%bF': '\xbf',
315
- '%BF': '\xbf',
316
- '%c0': '\xc0',
317
- '%C0': '\xc0',
318
- '%c1': '\xc1',
319
- '%C1': '\xc1',
320
- '%c2': '\xc2',
321
- '%C2': '\xc2',
322
- '%c3': '\xc3',
323
- '%C3': '\xc3',
324
- '%c4': '\xc4',
325
- '%C4': '\xc4',
326
- '%c5': '\xc5',
327
- '%C5': '\xc5',
328
- '%c6': '\xc6',
329
- '%C6': '\xc6',
330
- '%c7': '\xc7',
331
- '%C7': '\xc7',
332
- '%c8': '\xc8',
333
- '%C8': '\xc8',
334
- '%c9': '\xc9',
335
- '%C9': '\xc9',
336
- '%ca': '\xca',
337
- '%Ca': '\xca',
338
- '%cA': '\xca',
339
- '%CA': '\xca',
340
- '%cb': '\xcb',
341
- '%Cb': '\xcb',
342
- '%cB': '\xcb',
343
- '%CB': '\xcb',
344
- '%cc': '\xcc',
345
- '%Cc': '\xcc',
346
- '%cC': '\xcc',
347
- '%CC': '\xcc',
348
- '%cd': '\xcd',
349
- '%Cd': '\xcd',
350
- '%cD': '\xcd',
351
- '%CD': '\xcd',
352
- '%ce': '\xce',
353
- '%Ce': '\xce',
354
- '%cE': '\xce',
355
- '%CE': '\xce',
356
- '%cf': '\xcf',
357
- '%Cf': '\xcf',
358
- '%cF': '\xcf',
359
- '%CF': '\xcf',
360
- '%d0': '\xd0',
361
- '%D0': '\xd0',
362
- '%d1': '\xd1',
363
- '%D1': '\xd1',
364
- '%d2': '\xd2',
365
- '%D2': '\xd2',
366
- '%d3': '\xd3',
367
- '%D3': '\xd3',
368
- '%d4': '\xd4',
369
- '%D4': '\xd4',
370
- '%d5': '\xd5',
371
- '%D5': '\xd5',
372
- '%d6': '\xd6',
373
- '%D6': '\xd6',
374
- '%d7': '\xd7',
375
- '%D7': '\xd7',
376
- '%d8': '\xd8',
377
- '%D8': '\xd8',
378
- '%d9': '\xd9',
379
- '%D9': '\xd9',
380
- '%da': '\xda',
381
- '%Da': '\xda',
382
- '%dA': '\xda',
383
- '%DA': '\xda',
384
- '%db': '\xdb',
385
- '%Db': '\xdb',
386
- '%dB': '\xdb',
387
- '%DB': '\xdb',
388
- '%dc': '\xdc',
389
- '%Dc': '\xdc',
390
- '%dC': '\xdc',
391
- '%DC': '\xdc',
392
- '%dd': '\xdd',
393
- '%Dd': '\xdd',
394
- '%dD': '\xdd',
395
- '%DD': '\xdd',
396
- '%de': '\xde',
397
- '%De': '\xde',
398
- '%dE': '\xde',
399
- '%DE': '\xde',
400
- '%df': '\xdf',
401
- '%Df': '\xdf',
402
- '%dF': '\xdf',
403
- '%DF': '\xdf',
404
- '%e0': '\xe0',
405
- '%E0': '\xe0',
406
- '%e1': '\xe1',
407
- '%E1': '\xe1',
408
- '%e2': '\xe2',
409
- '%E2': '\xe2',
410
- '%e3': '\xe3',
411
- '%E3': '\xe3',
412
- '%e4': '\xe4',
413
- '%E4': '\xe4',
414
- '%e5': '\xe5',
415
- '%E5': '\xe5',
416
- '%e6': '\xe6',
417
- '%E6': '\xe6',
418
- '%e7': '\xe7',
419
- '%E7': '\xe7',
420
- '%e8': '\xe8',
421
- '%E8': '\xe8',
422
- '%e9': '\xe9',
423
- '%E9': '\xe9',
424
- '%ea': '\xea',
425
- '%Ea': '\xea',
426
- '%eA': '\xea',
427
- '%EA': '\xea',
428
- '%eb': '\xeb',
429
- '%Eb': '\xeb',
430
- '%eB': '\xeb',
431
- '%EB': '\xeb',
432
- '%ec': '\xec',
433
- '%Ec': '\xec',
434
- '%eC': '\xec',
435
- '%EC': '\xec',
436
- '%ed': '\xed',
437
- '%Ed': '\xed',
438
- '%eD': '\xed',
439
- '%ED': '\xed',
440
- '%ee': '\xee',
441
- '%Ee': '\xee',
442
- '%eE': '\xee',
443
- '%EE': '\xee',
444
- '%ef': '\xef',
445
- '%Ef': '\xef',
446
- '%eF': '\xef',
447
- '%EF': '\xef',
448
- '%f0': '\xf0',
449
- '%F0': '\xf0',
450
- '%f1': '\xf1',
451
- '%F1': '\xf1',
452
- '%f2': '\xf2',
453
- '%F2': '\xf2',
454
- '%f3': '\xf3',
455
- '%F3': '\xf3',
456
- '%f4': '\xf4',
457
- '%F4': '\xf4',
458
- '%f5': '\xf5',
459
- '%F5': '\xf5',
460
- '%f6': '\xf6',
461
- '%F6': '\xf6',
462
- '%f7': '\xf7',
463
- '%F7': '\xf7',
464
- '%f8': '\xf8',
465
- '%F8': '\xf8',
466
- '%f9': '\xf9',
467
- '%F9': '\xf9',
468
- '%fa': '\xfa',
469
- '%Fa': '\xfa',
470
- '%fA': '\xfa',
471
- '%FA': '\xfa',
472
- '%fb': '\xfb',
473
- '%Fb': '\xfb',
474
- '%fB': '\xfb',
475
- '%FB': '\xfb',
476
- '%fc': '\xfc',
477
- '%Fc': '\xfc',
478
- '%fC': '\xfc',
479
- '%FC': '\xfc',
480
- '%fd': '\xfd',
481
- '%Fd': '\xfd',
482
- '%fD': '\xfd',
483
- '%FD': '\xfd',
484
- '%fe': '\xfe',
485
- '%Fe': '\xfe',
486
- '%fE': '\xfe',
487
- '%FE': '\xfe',
488
- '%ff': '\xff',
489
- '%Ff': '\xff',
490
- '%fF': '\xff',
491
- '%FF': '\xff'
492
- }
493
-
494
- function encodedReplacer (match) {
495
- return EncodedLookup[match]
496
- }
497
-
498
- function decodeUtf8Text (text) {
499
- for (var i = 0, len = text.length; i < len; ++i) { // eslint-disable-line no-var
500
- if (text.charCodeAt(i) > 0x7F) { return decodeText(text, 'binary', 'utf8') }
501
- }
502
- return text
503
- }
504
-
505
- const STATE_KEY = 0
506
- const STATE_VALUE = 1
507
- const STATE_CHARSET = 2
508
- const STATE_LANG = 3
509
-
510
- function parseFormDataDisposition (str) {
511
- if (!str.startsWith('form-data; name="')) { return }
512
-
513
- let valueStart = 17
514
- let valueEnd = str.indexOf('"', valueStart)
515
- if (valueEnd === -1 || str.indexOf('\\', valueStart) !== -1) { return }
516
-
517
- const res = ['form-data', ['name', decodeUtf8Text(str.slice(valueStart, valueEnd))]]
518
- let pos = valueEnd + 1
519
-
520
- while (pos < str.length && str[pos] !== ';') { ++pos }
521
- if (pos === str.length) { return res }
522
-
523
- ++pos
524
- while (str[pos] === ' ' || str[pos] === '\t') { ++pos }
525
- if (!str.startsWith('filename="', pos)) { return }
526
-
527
- valueStart = pos + 10
528
- valueEnd = str.indexOf('"', valueStart)
529
- if (valueEnd === -1 || str.indexOf('\\', valueStart) !== -1) { return }
530
-
531
- res.push(['filename', decodeUtf8Text(str.slice(valueStart, valueEnd))])
532
- return res
533
- }
534
-
535
- function parseParams (str) {
536
- if (str.indexOf(';') === -1) { return [decodeUtf8Text(str)] }
537
-
538
- const fastFormData = parseFormDataDisposition(str)
539
- if (fastFormData !== undefined) { return fastFormData }
540
-
541
- const res = []
542
- let state = STATE_KEY
543
- let charset = ''
544
- let inquote = false
545
- let escaping = false
546
- let p = 0
547
- let tmp = ''
548
- const len = str.length
549
-
550
- for (var i = 0; i < len; ++i) { // eslint-disable-line no-var
551
- const char = str[i]
552
- if (char === '\\' && inquote) {
553
- if (escaping) { escaping = false } else {
554
- escaping = true
555
- continue
556
- }
557
- } else if (char === '"') {
558
- if (!escaping) {
559
- if (inquote) {
560
- inquote = false
561
- state = STATE_KEY
562
- // Skip any remaining characters until we hit a semicolon or end of string
563
- // This ensures we don't include characters after the closing quote
564
- while (i + 1 < len && str[i + 1] !== ';') {
565
- ++i
566
- }
567
- } else { inquote = true }
568
- continue
569
- } else { escaping = false }
570
- } else {
571
- if (escaping && inquote) { tmp += '\\' }
572
- escaping = false
573
- if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") {
574
- if (state === STATE_CHARSET) {
575
- state = STATE_LANG
576
- charset = tmp.substring(1)
577
- } else { state = STATE_VALUE }
578
- tmp = ''
579
- continue
580
- } else if (state === STATE_KEY &&
581
- (char === '*' || char === '=') &&
582
- res.length) {
583
- state = char === '*'
584
- ? STATE_CHARSET
585
- : STATE_VALUE
586
- res[p] = [tmp, undefined]
587
- tmp = ''
588
- continue
589
- } else if (!inquote && char === ';') {
590
- state = STATE_KEY
591
- if (charset) {
592
- if (tmp.length) {
593
- tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),
594
- 'binary',
595
- charset)
596
- }
597
- charset = ''
598
- } else if (tmp.length) {
599
- tmp = decodeUtf8Text(tmp)
600
- }
601
- if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp }
602
- tmp = ''
603
- ++p
604
- continue
605
- } else if (!inquote && (char === ' ' || char === '\t')) { continue }
606
- }
607
- tmp += char
608
- }
609
- if (charset && tmp.length) {
610
- tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer),
611
- 'binary',
612
- charset)
613
- } else if (tmp) {
614
- tmp = decodeUtf8Text(tmp)
615
- }
616
-
617
- if (res[p] === undefined) {
618
- if (tmp) { res[p] = tmp }
619
- } else { res[p][1] = tmp }
620
-
621
- return res
622
- }
623
-
624
- module.exports = parseParams
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/package.json DELETED
@@ -1,79 +0,0 @@
1
- {
2
- "name": "@fastify/busboy",
3
- "version": "3.2.2",
4
- "author": "Brian White <mscdex@mscdex.net>",
5
- "contributors": [
6
- {
7
- "name": "Igor Savin",
8
- "email": "kibertoad@gmail.com",
9
- "url": "https://github.com/kibertoad"
10
- },
11
- {
12
- "name": "Aras Abbasi",
13
- "email": "aras.abbasi@gmail.com",
14
- "url": "https://github.com/uzlopak"
15
- }
16
- ],
17
- "description": "A streaming parser for HTML form data for node.js",
18
- "main": "index.js",
19
- "type": "commonjs",
20
- "types": "types/index.d.ts",
21
- "scripts": {
22
- "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify",
23
- "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js",
24
- "coveralls": "nyc report --reporter=lcov",
25
- "lint": "eslint",
26
- "lint:fix": "eslint --fix",
27
- "test:unit": "c8 --check-coverage --statements 100 --branches 100 --functions 100 --lines 100 node --test",
28
- "test:types": "tstyche",
29
- "test": "npm run test:unit && npm run test:types"
30
- },
31
- "devDependencies": {
32
- "@types/node": "^26.0.1",
33
- "busboy": "^1.6.0",
34
- "c8": "^12.0.0",
35
- "photofinish": "^1.8.0",
36
- "snazzy": "^9.0.0",
37
- "eslint": "^9.39.0",
38
- "neostandard": "^0.12.0",
39
- "tinybench": "^6.0.0",
40
- "tstyche": "^7.0.0",
41
- "tslib": "^2.8.1",
42
- "typescript": "~6.0.2"
43
- },
44
- "keywords": [
45
- "uploads",
46
- "forms",
47
- "multipart",
48
- "form-data"
49
- ],
50
- "license": "MIT",
51
- "repository": {
52
- "type": "git",
53
- "url": "git+https://github.com/fastify/busboy.git"
54
- },
55
- "bugs": {
56
- "url": "https://github.com/fastify/busboy/issues"
57
- },
58
- "homepage": "https://github.com/fastify/busboy#readme",
59
- "standard": {
60
- "globals": [
61
- "describe",
62
- "it"
63
- ],
64
- "ignore": [
65
- "bench"
66
- ]
67
- },
68
- "files": [
69
- "README.md",
70
- "LICENSE",
71
- "index.js",
72
- "lib/*",
73
- "types/*",
74
- "deps/encoding/*",
75
- "deps/dicer/lib",
76
- "deps/streamsearch/",
77
- "deps/dicer/LICENSE"
78
- ]
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/types/dicer.tst.ts DELETED
@@ -1,83 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import { Dicer } from '.'
3
- import * as fs from 'fs'
4
- import * as stream from 'stream'
5
-
6
- function testDicerSyntax () {
7
- const opts: Dicer.Config = {
8
- boundary: 'testing',
9
- }
10
- const dicer = new Dicer(opts)
11
- const opts2: Dicer.Config = {
12
- headerFirst: true,
13
- maxHeaderPairs: 1,
14
- }
15
- const opts3: Dicer.Config = {
16
- boundary: 'more-testing',
17
- headerFirst: false,
18
- maxHeaderPairs: 8,
19
- }
20
-
21
- dicer.setBoundary('new-testing-boundary')
22
- dicer.on('part', handleDicerPartStream)
23
- dicer.on('finish', () => {
24
- console.log('dicer parsing finished')
25
- })
26
- dicer.on('preamble', part => {
27
- console.log('dicer preamble to new part')
28
- })
29
- dicer.on('trailer', data => {
30
- console.log(`dicer trailing data found: ${data.length} bytes`)
31
- })
32
- dicer.on('close', () => {
33
- console.log('dicer close')
34
- })
35
- dicer.on('drain', () => {
36
- console.log('dicer drain')
37
- })
38
- dicer.on('error', err => {
39
- console.error(`dicer error: ${err.message || JSON.stringify(err)}`)
40
- })
41
- dicer.on('finish', () => {
42
- console.log('dicer finish')
43
- })
44
- dicer.on('pipe', (src: stream.Readable) => {
45
- console.log('dicer pipe')
46
- })
47
- dicer.on('unpipe', (src: stream.Readable) => {
48
- console.log('dicer unpipe')
49
- })
50
- const inputFileStream = fs.createReadStream('in-test-file.txt')
51
- inputFileStream.pipe(dicer)
52
- }
53
- /**
54
- * Handle a part found by a Dicer parser
55
- *
56
- * @param part Part found
57
- */
58
- function handleDicerPartStream (part: Dicer.PartStream) {
59
- console.log('dicer part found')
60
- const outputFileStream = fs.createWriteStream('out-test-file.txt')
61
- part.on('readable', () => {
62
- console.log('part readable')
63
- })
64
- part.on('header', header => {
65
- console.log(`part header found:\n${JSON.stringify(header)}`)
66
- })
67
- part.on('data', () => {
68
- console.log('part data')
69
- })
70
- part.on('finish', () => {
71
- console.log('part finished')
72
- })
73
- part.on('error', err => {
74
- console.error(`part error: ${err.message || JSON.stringify(err)}`)
75
- })
76
- part.on('end', () => {
77
- console.log('part ended')
78
- })
79
- part.on('close', () => {
80
- console.log('part closed')
81
- })
82
- part.pipe(outputFileStream)
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/types/index.d.ts DELETED
@@ -1,236 +0,0 @@
1
- // Definitions by: Jacob Baskin <https://github.com/jacobbaskin>
2
- // BendingBender <https://github.com/BendingBender>
3
- // Igor Savin <https://github.com/kibertoad>
4
-
5
- /// <reference types="node" />
6
- import * as http from 'node:http'
7
- import { Readable, Writable } from 'node:stream'
8
-
9
- declare module 'stream' {
10
- interface Readable {
11
- /**
12
- * Emitted when the configured file size limit is reached.
13
- */
14
- on(event: 'limit', listener: () => void): this;
15
- once(event: 'limit', listener: () => void): this;
16
- addListener(event: 'limit', listener: () => void): this;
17
- removeListener(event: 'limit', listener: () => void): this;
18
- }
19
- }
20
- export { Dicer } from '../deps/dicer/lib/dicer'
21
-
22
- export const Busboy: BusboyConstructor
23
- export default Busboy
24
-
25
- export interface BusboyConfig {
26
- /**
27
- * These are the HTTP headers of the incoming request, which are used by individual parsers.
28
- */
29
- headers: BusboyHeaders;
30
- /**
31
- * `highWaterMark` to use for this Busboy instance.
32
- * @default WritableStream default.
33
- */
34
- highWaterMark?: number | undefined;
35
- /**
36
- * highWaterMark to use for file streams.
37
- * @default ReadableStream default.
38
- */
39
- fileHwm?: number | undefined;
40
- /**
41
- * Default character set to use when one isn't defined.
42
- * @default 'utf8'
43
- */
44
- defCharset?: string | undefined;
45
- /**
46
- * Detect if a Part is a file.
47
- *
48
- * By default a file is detected if contentType
49
- * is application/octet-stream or fileName is not
50
- * undefined.
51
- *
52
- * Modify this to handle e.g. Blobs.
53
- */
54
- isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean;
55
- /**
56
- * If paths in the multipart 'filename' field shall be preserved.
57
- * @default false
58
- */
59
- preservePath?: boolean | undefined;
60
- /**
61
- * Various limits on incoming data.
62
- */
63
- limits?:
64
- | {
65
- /**
66
- * Max field name size (in bytes)
67
- * @default 100 bytes
68
- */
69
- fieldNameSize?: number | undefined;
70
- /**
71
- * Max field value size (in bytes)
72
- * @default 1MB
73
- */
74
- fieldSize?: number | undefined;
75
- /**
76
- * Max number of non-file fields
77
- * @default Infinity
78
- */
79
- fields?: number | undefined;
80
- /**
81
- * For multipart forms, the max file size (in bytes)
82
- * @default Infinity
83
- */
84
- fileSize?: number | undefined;
85
- /**
86
- * For multipart forms, the max number of file fields
87
- * @default Infinity
88
- */
89
- files?: number | undefined;
90
- /**
91
- * For multipart forms, the max number of parts (fields + files)
92
- * @default Infinity
93
- */
94
- parts?: number | undefined;
95
- /**
96
- * For multipart forms, the max number of header key=>value pairs to parse
97
- * @default 2000
98
- */
99
- headerPairs?: number | undefined;
100
-
101
- /**
102
- * For multipart forms, the max size of a header part
103
- * @default 81920
104
- */
105
- headerSize?: number | undefined;
106
- }
107
- | undefined;
108
- }
109
-
110
- export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders
111
-
112
- export interface BusboyFileStream extends
113
- Readable {
114
-
115
- truncated: boolean;
116
-
117
- /**
118
- * The number of bytes that have been read so far.
119
- */
120
- bytesRead: number;
121
- }
122
-
123
- export interface BusboyInstance extends Writable {
124
- addListener<Event extends keyof BusboyEvents>(
125
- event: Event,
126
- listener: BusboyEvents[Event]
127
- ): this;
128
-
129
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
130
-
131
- on<Event extends keyof BusboyEvents>(
132
- event: Event,
133
- listener: BusboyEvents[Event]
134
- ): this;
135
-
136
- on(event: string | symbol, listener: (...args: any[]) => void): this;
137
-
138
- once<Event extends keyof BusboyEvents>(
139
- event: Event,
140
- listener: BusboyEvents[Event]
141
- ): this;
142
-
143
- once(event: string | symbol, listener: (...args: any[]) => void): this;
144
-
145
- removeListener<Event extends keyof BusboyEvents>(
146
- event: Event,
147
- listener: BusboyEvents[Event]
148
- ): this;
149
-
150
- removeListener(
151
- event: string | symbol,
152
- listener: (...args: any[]) => void
153
- ): this;
154
-
155
- off<Event extends keyof BusboyEvents>(
156
- event: Event,
157
- listener: BusboyEvents[Event]
158
- ): this;
159
-
160
- off(event: string | symbol, listener: (...args: any[]) => void): this;
161
-
162
- prependListener<Event extends keyof BusboyEvents>(
163
- event: Event,
164
- listener: BusboyEvents[Event]
165
- ): this;
166
-
167
- prependListener(
168
- event: string | symbol,
169
- listener: (...args: any[]) => void
170
- ): this;
171
-
172
- prependOnceListener<Event extends keyof BusboyEvents>(
173
- event: Event,
174
- listener: BusboyEvents[Event]
175
- ): this;
176
-
177
- prependOnceListener(
178
- event: string | symbol,
179
- listener: (...args: any[]) => void
180
- ): this;
181
- }
182
-
183
- export interface BusboyEvents {
184
- /**
185
- * Emitted for each new file form field found.
186
- *
187
- * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the
188
- * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents),
189
- * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any**
190
- * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically
191
- * and safely discarded (these discarded files do still count towards `files` and `parts` limits).
192
- * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated`
193
- * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens.
194
- *
195
- * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream.
196
- * @param listener.mimeType Contains the 'Content-Type' value for the file stream.
197
- */
198
- file: (
199
- fieldname: string,
200
- stream: BusboyFileStream,
201
- filename: string,
202
- transferEncoding: string,
203
- mimeType: string,
204
- ) => void;
205
- /**
206
- * Emitted for each new non-file field found.
207
- */
208
- field: (
209
- fieldname: string,
210
- value: string,
211
- fieldnameTruncated: boolean,
212
- valueTruncated: boolean,
213
- transferEncoding: string,
214
- mimeType: string,
215
- ) => void;
216
- finish: () => void;
217
- /**
218
- * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted.
219
- */
220
- partsLimit: () => void;
221
- /**
222
- * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted.
223
- */
224
- filesLimit: () => void;
225
- /**
226
- * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted.
227
- */
228
- fieldsLimit: () => void;
229
- error: (error: unknown) => void;
230
- }
231
-
232
- export interface BusboyConstructor {
233
- (options: BusboyConfig): BusboyInstance;
234
-
235
- new(options: BusboyConfig): BusboyInstance;
236
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@fastify/busboy/types/index.tst.ts DELETED
@@ -1,301 +0,0 @@
1
- /* eslint-disable import-x/no-duplicates */
2
- /* eslint-disable no-new */
3
- import BusboyDefault, { Busboy, BusboyFileStream } from '.'
4
- import { expect } from 'tstyche'
5
- import BusboyESM from '.'
6
-
7
- expect(new BusboyESM({ headers: { 'content-type': 'foo' } })).type.toBe<
8
- InstanceType<typeof Busboy>
9
- >()
10
- expect(new Busboy({ headers: { 'content-type': 'foo' } })).type.toBe<
11
- InstanceType<typeof Busboy>
12
- >()
13
-
14
- expect(BusboyDefault).type.not.toBeConstructableWith({})
15
- const busboy = BusboyDefault({ headers: { 'content-type': 'foo' } })
16
- new BusboyDefault({ headers: { 'content-type': 'foo' } })
17
- new BusboyDefault({ headers: { 'content-type': 'foo' }, highWaterMark: 1000 })
18
- new BusboyDefault({ headers: { 'content-type': 'foo' }, fileHwm: 1000 })
19
- new BusboyDefault({ headers: { 'content-type': 'foo' }, defCharset: 'utf8' })
20
- new BusboyDefault({ headers: { 'content-type': 'foo' }, preservePath: true })
21
- new BusboyDefault({
22
- headers: { 'content-type': 'foo' },
23
- limits: { fieldNameSize: 200 }
24
- })
25
- new BusboyDefault({
26
- headers: { 'content-type': 'foo' },
27
- limits: { fieldSize: 200 }
28
- })
29
- new BusboyDefault({
30
- headers: { 'content-type': 'foo' },
31
- limits: { fields: 200 }
32
- })
33
- new BusboyDefault({
34
- headers: { 'content-type': 'foo' },
35
- limits: { fileSize: 200 }
36
- })
37
- new BusboyDefault({
38
- headers: { 'content-type': 'foo' },
39
- limits: { files: 200 }
40
- })
41
- new BusboyDefault({
42
- headers: { 'content-type': 'foo' },
43
- limits: { parts: 200 }
44
- })
45
- new BusboyDefault({
46
- headers: { 'content-type': 'foo' },
47
- limits: { headerPairs: 200 }
48
- })
49
- new BusboyDefault({
50
- headers: { 'content-type': 'foo' },
51
- limits: { headerSize: 200 }
52
- })
53
- new BusboyDefault({
54
- headers: { 'content-type': 'foo' },
55
- isPartAFile: (fieldName, contentType, fileName) =>
56
- fieldName === 'my-special-field' || fileName !== 'not-so-special.txt'
57
- })
58
- new BusboyDefault({
59
- headers: { 'content-type': 'foo' },
60
- isPartAFile: (fieldName, contentType, fileName) => fileName !== undefined
61
- })
62
-
63
- busboy.addListener('file', (fieldname, file, filename, encoding, mimetype) => {
64
- expect(fieldname).type.toBe<string>()
65
- expect(file).type.toBe<BusboyFileStream>()
66
- expect(filename).type.toBe<string>()
67
- expect(encoding).type.toBe<string>()
68
- expect(mimetype).type.toBe<string>()
69
- })
70
- busboy.addListener(
71
- 'field',
72
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
73
- expect(fieldname).type.toBe<string>()
74
- expect(val).type.toBe<string>()
75
- expect(fieldnameTruncated).type.toBe<boolean>()
76
- expect(valTruncated).type.toBe<boolean>()
77
- expect(encoding).type.toBe<string>()
78
- expect(mimetype).type.toBe<string>()
79
- }
80
- )
81
- busboy.addListener('partsLimit', () => {})
82
- busboy.addListener('filesLimit', () => {})
83
- busboy.addListener('fieldsLimit', () => {})
84
- busboy.addListener('error', (e) => {
85
- expect(e).type.toBe<unknown>()
86
- })
87
- busboy.addListener('finish', () => {})
88
- // test fallback
89
- busboy.on('foo', (foo) => {
90
- expect(foo).type.toBe<any>()
91
- })
92
- busboy.on(Symbol('foo'), (foo) => {
93
- expect(foo).type.toBe<any>()
94
- })
95
-
96
- busboy.on('file', (fieldname, file, filename, encoding, mimetype) => {
97
- expect(fieldname).type.toBe<string>()
98
- expect(file).type.toBe<BusboyFileStream>()
99
- expect(filename).type.toBe<string>()
100
- expect(encoding).type.toBe<string>()
101
- expect(mimetype).type.toBe<string>()
102
- })
103
- busboy.on(
104
- 'field',
105
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
106
- expect(fieldname).type.toBe<string>()
107
- expect(val).type.toBe<string>()
108
- expect(fieldnameTruncated).type.toBe<boolean>()
109
- expect(valTruncated).type.toBe<boolean>()
110
- expect(encoding).type.toBe<string>()
111
- expect(mimetype).type.toBe<string>()
112
- }
113
- )
114
- busboy.on('partsLimit', () => {})
115
- busboy.on('filesLimit', () => {})
116
- busboy.on('fieldsLimit', () => {})
117
- busboy.on('error', (e) => {
118
- expect(e).type.toBe<unknown>()
119
- })
120
- busboy.on('finish', () => {})
121
- // test fallback
122
- busboy.on('foo', (foo) => {
123
- expect(foo).type.toBe<any>()
124
- })
125
- busboy.on(Symbol('foo'), (foo) => {
126
- expect(foo).type.toBe<any>()
127
- })
128
-
129
- busboy.once('file', (fieldname, file, filename, encoding, mimetype) => {
130
- expect(fieldname).type.toBe<string>()
131
- expect(file).type.toBe<BusboyFileStream>()
132
- expect(filename).type.toBe<string>()
133
- expect(encoding).type.toBe<string>()
134
- expect(mimetype).type.toBe<string>()
135
- })
136
- busboy.once(
137
- 'field',
138
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
139
- expect(fieldname).type.toBe<string>()
140
- expect(val).type.toBe<string>()
141
- expect(fieldnameTruncated).type.toBe<boolean>()
142
- expect(valTruncated).type.toBe<boolean>()
143
- expect(encoding).type.toBe<string>()
144
- expect(mimetype).type.toBe<string>()
145
- }
146
- )
147
- busboy.once('partsLimit', () => {})
148
- busboy.once('filesLimit', () => {})
149
- busboy.once('fieldsLimit', () => {})
150
- busboy.once('error', (e) => {
151
- expect(e).type.toBe<unknown>()
152
- })
153
- busboy.once('finish', () => {})
154
- // test fallback
155
- busboy.once('foo', (foo) => {
156
- expect(foo).type.toBe<any>()
157
- })
158
- busboy.once(Symbol('foo'), (foo) => {
159
- expect(foo).type.toBe<any>()
160
- })
161
-
162
- busboy.removeListener(
163
- 'file',
164
- (fieldname, file, filename, encoding, mimetype) => {
165
- expect(fieldname).type.toBe<string>()
166
- expect(file).type.toBe<BusboyFileStream>()
167
- expect(filename).type.toBe<string>()
168
- expect(encoding).type.toBe<string>()
169
- expect(mimetype).type.toBe<string>()
170
- }
171
- )
172
- busboy.removeListener(
173
- 'field',
174
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
175
- expect(fieldname).type.toBe<string>()
176
- expect(val).type.toBe<string>()
177
- expect(fieldnameTruncated).type.toBe<boolean>()
178
- expect(valTruncated).type.toBe<boolean>()
179
- expect(encoding).type.toBe<string>()
180
- expect(mimetype).type.toBe<string>()
181
- }
182
- )
183
- busboy.removeListener('partsLimit', () => {})
184
- busboy.removeListener('filesLimit', () => {})
185
- busboy.removeListener('fieldsLimit', () => {})
186
- busboy.removeListener('error', (e) => {
187
- expect(e).type.toBe<unknown>()
188
- })
189
- busboy.removeListener('finish', () => {})
190
- // test fallback
191
- busboy.removeListener('foo', (foo) => {
192
- expect(foo).type.toBe<any>()
193
- })
194
- busboy.removeListener(Symbol('foo'), (foo) => {
195
- expect(foo).type.toBe<any>()
196
- })
197
-
198
- busboy.off('file', (fieldname, file, filename, encoding, mimetype) => {
199
- expect(fieldname).type.toBe<string>()
200
- expect(file).type.toBe<BusboyFileStream>()
201
- expect(filename).type.toBe<string>()
202
- expect(encoding).type.toBe<string>()
203
- expect(mimetype).type.toBe<string>()
204
- })
205
- busboy.off(
206
- 'field',
207
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
208
- expect(fieldname).type.toBe<string>()
209
- expect(val).type.toBe<string>()
210
- expect(fieldnameTruncated).type.toBe<boolean>()
211
- expect(valTruncated).type.toBe<boolean>()
212
- expect(encoding).type.toBe<string>()
213
- expect(mimetype).type.toBe<string>()
214
- }
215
- )
216
- busboy.off('partsLimit', () => {})
217
- busboy.off('filesLimit', () => {})
218
- busboy.off('fieldsLimit', () => {})
219
- busboy.off('error', (e) => {
220
- expect(e).type.toBe<unknown>()
221
- })
222
- busboy.off('finish', () => {})
223
- // test fallback
224
- busboy.off('foo', (foo) => {
225
- expect(foo).type.toBe<any>()
226
- })
227
- busboy.off(Symbol('foo'), (foo) => {
228
- expect(foo).type.toBe<any>()
229
- })
230
-
231
- busboy.prependListener(
232
- 'file',
233
- (fieldname, file, filename, encoding, mimetype) => {
234
- expect(fieldname).type.toBe<string>()
235
- expect(file).type.toBe<BusboyFileStream>()
236
- expect(filename).type.toBe<string>()
237
- expect(encoding).type.toBe<string>()
238
- expect(mimetype).type.toBe<string>()
239
- }
240
- )
241
- busboy.prependListener(
242
- 'field',
243
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
244
- expect(fieldname).type.toBe<string>()
245
- expect(val).type.toBe<string>()
246
- expect(fieldnameTruncated).type.toBe<boolean>()
247
- expect(valTruncated).type.toBe<boolean>()
248
- expect(encoding).type.toBe<string>()
249
- expect(mimetype).type.toBe<string>()
250
- }
251
- )
252
- busboy.prependListener('partsLimit', () => {})
253
- busboy.prependListener('filesLimit', () => {})
254
- busboy.prependListener('fieldsLimit', () => {})
255
- busboy.prependListener('error', (e) => {
256
- expect(e).type.toBe<unknown>()
257
- })
258
- busboy.prependListener('finish', () => {})
259
- // test fallback
260
- busboy.prependListener('foo', (foo) => {
261
- expect(foo).type.toBe<any>()
262
- })
263
- busboy.prependListener(Symbol('foo'), (foo) => {
264
- expect(foo).type.toBe<any>()
265
- })
266
-
267
- busboy.prependOnceListener(
268
- 'file',
269
- (fieldname, file, filename, encoding, mimetype) => {
270
- expect(fieldname).type.toBe<string>()
271
- expect(file).type.toBe<BusboyFileStream>()
272
- expect(filename).type.toBe<string>()
273
- expect(encoding).type.toBe<string>()
274
- expect(mimetype).type.toBe<string>()
275
- }
276
- )
277
- busboy.prependOnceListener(
278
- 'field',
279
- (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => {
280
- expect(fieldname).type.toBe<string>()
281
- expect(val).type.toBe<string>()
282
- expect(fieldnameTruncated).type.toBe<boolean>()
283
- expect(valTruncated).type.toBe<boolean>()
284
- expect(encoding).type.toBe<string>()
285
- expect(mimetype).type.toBe<string>()
286
- }
287
- )
288
- busboy.prependOnceListener('partsLimit', () => {})
289
- busboy.prependOnceListener('filesLimit', () => {})
290
- busboy.prependOnceListener('fieldsLimit', () => {})
291
- busboy.prependOnceListener('error', (e) => {
292
- expect(e).type.toBe<unknown>()
293
- })
294
- busboy.prependOnceListener('finish', () => {})
295
- // test fallback
296
- busboy.prependOnceListener('foo', (foo) => {
297
- expect(foo).type.toBe<any>()
298
- })
299
- busboy.prependOnceListener(Symbol('foo'), (foo) => {
300
- expect(foo).type.toBe<any>()
301
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@firebase/app-check-interop-types/README.md DELETED
@@ -1,3 +0,0 @@
1
- # @firebase/app-check-interop-types
2
-
3
- **This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
 
 
 
 
node_modules/@firebase/app-check-interop-types/index.d.ts DELETED
@@ -1,51 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- export interface FirebaseAppCheckInternal {
19
- // Get the current AttestationToken. Attaches to the most recent in-flight request if one
20
- // is present. Returns null if no token is present and no token requests are in-flight.
21
- getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult>;
22
-
23
- // Always returns a fresh limited-use token suitable for Replay Protection.
24
- // The returned token must be used and consumed as soon as possible.
25
- getLimitedUseToken(): Promise<AppCheckTokenResult>;
26
-
27
- // Registers a listener to changes in the token state. There can be more than one listener
28
- // registered at the same time for one or more FirebaseAppAttestation instances. The
29
- // listeners call back on the UI thread whenever the current token associated with this
30
- // FirebaseAppAttestation changes.
31
- addTokenListener(listener: AppCheckTokenListener): void;
32
-
33
- // Unregisters a listener to changes in the token state.
34
- removeTokenListener(listener: AppCheckTokenListener): void;
35
- }
36
-
37
- type AppCheckTokenListener = (token: AppCheckTokenResult) => void;
38
-
39
- // If the error field is defined, the token field will be populated with a dummy token
40
- interface AppCheckTokenResult {
41
- readonly token: string;
42
- readonly error?: Error;
43
- }
44
-
45
- export type AppCheckInternalComponentName = 'app-check-internal';
46
-
47
- declare module '@firebase/component' {
48
- interface NameServiceMapping {
49
- 'app-check-internal': FirebaseAppCheckInternal;
50
- }
51
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@firebase/app-check-interop-types/package.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@firebase/app-check-interop-types",
3
- "version": "0.3.5",
4
- "description": "@firebase/app-check-interop-types Types",
5
- "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
- "license": "Apache-2.0",
7
- "scripts": {
8
- "test": "tsc",
9
- "test:ci": "node ../../scripts/run_tests_in_ci.js"
10
- },
11
- "files": [
12
- "index.d.ts"
13
- ],
14
- "repository": {
15
- "directory": "packages/app-check-interop-types",
16
- "type": "git",
17
- "url": "git+https://github.com/firebase/firebase-js-sdk.git"
18
- },
19
- "bugs": {
20
- "url": "https://github.com/firebase/firebase-js-sdk/issues"
21
- },
22
- "devDependencies": {
23
- "typescript": "5.5.4"
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
node_modules/@firebase/app-types/README.md DELETED
@@ -1,3 +0,0 @@
1
- # @firebase/app-types
2
-
3
- **This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
 
 
 
 
node_modules/@firebase/app-types/index.d.ts DELETED
@@ -1,129 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { LogCallback, LogLevelString, LogOptions } from '@firebase/logger';
18
-
19
- export type FirebaseOptions = {
20
- apiKey?: string;
21
- authDomain?: string;
22
- databaseURL?: string;
23
- projectId?: string;
24
- storageBucket?: string;
25
- messagingSenderId?: string;
26
- appId?: string;
27
- measurementId?: string;
28
- };
29
-
30
- export interface FirebaseAppConfig {
31
- name?: string;
32
- automaticDataCollectionEnabled?: boolean;
33
- }
34
-
35
- export class FirebaseApp {
36
- /**
37
- * The (read-only) name (identifier) for this App. '[DEFAULT]' is the default
38
- * App.
39
- */
40
- name: string;
41
-
42
- /**
43
- * The (read-only) configuration options from the app initialization.
44
- */
45
- options: FirebaseOptions;
46
-
47
- /**
48
- * The settable config flag for GDPR opt-in/opt-out
49
- */
50
- automaticDataCollectionEnabled: boolean;
51
-
52
- /**
53
- * Make the given App unusable and free resources.
54
- */
55
- delete(): Promise<void>;
56
- }
57
-
58
- export interface FirebaseNamespace {
59
- /**
60
- * Create (and initialize) a FirebaseApp.
61
- *
62
- * @param options Options to configure the services used in the App.
63
- * @param config The optional config for your firebase app
64
- */
65
- initializeApp(
66
- options: FirebaseOptions,
67
- config?: FirebaseAppConfig
68
- ): FirebaseApp;
69
- /**
70
- * Create (and initialize) a FirebaseApp.
71
- *
72
- * @param options Options to configure the services used in the App.
73
- * @param name The optional name of the app to initialize ('[DEFAULT]' if
74
- * omitted)
75
- */
76
- initializeApp(options: FirebaseOptions, name?: string): FirebaseApp;
77
-
78
- app: {
79
- /**
80
- * Retrieve an instance of a FirebaseApp.
81
- *
82
- * Usage: firebase.app()
83
- *
84
- * @param name The optional name of the app to return ('[DEFAULT]' if omitted)
85
- */
86
- (name?: string): FirebaseApp;
87
-
88
- /**
89
- * For testing FirebaseApp instances:
90
- * app() instanceof firebase.app.App
91
- *
92
- * DO NOT call this constuctor directly (use firebase.app() instead).
93
- */
94
- App: typeof FirebaseApp;
95
- };
96
-
97
- /**
98
- * A (read-only) array of all the initialized Apps.
99
- */
100
- apps: FirebaseApp[];
101
-
102
- /**
103
- * Registers a library's name and version for platform logging purposes.
104
- * @param library Name of 1p or 3p library (e.g. firestore, angularfire)
105
- * @param version Current version of that library.
106
- */
107
- registerVersion(library: string, version: string, variant?: string): void;
108
-
109
- // Sets log level for all Firebase components.
110
- setLogLevel(logLevel: LogLevelString): void;
111
-
112
- // Sets log handler for all Firebase components.
113
- onLog(logCallback: LogCallback, options?: LogOptions): void;
114
-
115
- // The current SDK version.
116
- SDK_VERSION: string;
117
- }
118
-
119
- export interface VersionService {
120
- library: string;
121
- version: string;
122
- }
123
-
124
- declare module '@firebase/component' {
125
- interface NameServiceMapping {
126
- 'app-version': VersionService;
127
- 'platform-identifier': VersionService;
128
- }
129
- }