Ver Fonte

记录初始化状态

Y7000\张扬阳 há 3 semanas atrás
pai
commit
8e6614928e
100 ficheiros alterados com 49029 adições e 0 exclusões
  1. 9 0
      .claude/settings.local.json
  2. 0 0
      .env.example
  3. 0 0
      drizzle.config.ts
  4. 16 0
      node_modules/.bin/drizzle-kit
  5. 17 0
      node_modules/.bin/drizzle-kit.cmd
  6. 28 0
      node_modules/.bin/drizzle-kit.ps1
  7. 16 0
      node_modules/.bin/esbuild
  8. 17 0
      node_modules/.bin/esbuild.cmd
  9. 28 0
      node_modules/.bin/esbuild.ps1
  10. 16 0
      node_modules/.bin/tsc
  11. 17 0
      node_modules/.bin/tsc.cmd
  12. 28 0
      node_modules/.bin/tsc.ps1
  13. 16 0
      node_modules/.bin/tsserver
  14. 17 0
      node_modules/.bin/tsserver.cmd
  15. 28 0
      node_modules/.bin/tsserver.ps1
  16. 16 0
      node_modules/.bin/tsx
  17. 17 0
      node_modules/.bin/tsx.cmd
  18. 28 0
      node_modules/.bin/tsx.ps1
  19. 625 0
      node_modules/.package-lock.json
  20. 464 0
      node_modules/@drizzle-team/brocli/README.md
  21. 1509 0
      node_modules/@drizzle-team/brocli/index.cjs
  22. 0 0
      node_modules/@drizzle-team/brocli/index.cjs.map
  23. 298 0
      node_modules/@drizzle-team/brocli/index.d.cts
  24. 298 0
      node_modules/@drizzle-team/brocli/index.d.ts
  25. 1485 0
      node_modules/@drizzle-team/brocli/index.js
  26. 0 0
      node_modules/@drizzle-team/brocli/index.js.map
  27. 59 0
      node_modules/@drizzle-team/brocli/package.json
  28. 21 0
      node_modules/@esbuild-kit/core-utils/LICENSE
  29. 11 0
      node_modules/@esbuild-kit/core-utils/README.md
  30. 32 0
      node_modules/@esbuild-kit/core-utils/dist/index.d.ts
  31. 1 0
      node_modules/@esbuild-kit/core-utils/dist/index.js
  32. 16 0
      node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild
  33. 17 0
      node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild.cmd
  34. 28 0
      node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild.ps1
  35. 3 0
      node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/README.md
  36. BIN
      node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/esbuild.exe
  37. 17 0
      node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/package.json
  38. 21 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/LICENSE.md
  39. 3 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/README.md
  40. 221 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/bin/esbuild
  41. 287 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/install.js
  42. 660 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/lib/main.d.ts
  43. 2393 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/lib/main.js
  44. 42 0
      node_modules/@esbuild-kit/core-utils/node_modules/esbuild/package.json
  45. 33 0
      node_modules/@esbuild-kit/core-utils/package.json
  46. 21 0
      node_modules/@esbuild-kit/esm-loader/LICENSE
  47. 155 0
      node_modules/@esbuild-kit/esm-loader/README.md
  48. 11 0
      node_modules/@esbuild-kit/esm-loader/dist/index.js
  49. 31 0
      node_modules/@esbuild-kit/esm-loader/package.json
  50. 3 0
      node_modules/@esbuild/win32-x64/README.md
  51. BIN
      node_modules/@esbuild/win32-x64/esbuild.exe
  52. 20 0
      node_modules/@esbuild/win32-x64/package.json
  53. 21 0
      node_modules/@types/node/LICENSE
  54. 15 0
      node_modules/@types/node/README.md
  55. 950 0
      node_modules/@types/node/assert.d.ts
  56. 59 0
      node_modules/@types/node/assert/strict.d.ts
  57. 603 0
      node_modules/@types/node/async_hooks.d.ts
  58. 466 0
      node_modules/@types/node/buffer.buffer.d.ts
  59. 1765 0
      node_modules/@types/node/buffer.d.ts
  60. 1366 0
      node_modules/@types/node/child_process.d.ts
  61. 432 0
      node_modules/@types/node/cluster.d.ts
  62. 21 0
      node_modules/@types/node/compatibility/iterators.d.ts
  63. 93 0
      node_modules/@types/node/console.d.ts
  64. 14 0
      node_modules/@types/node/constants.d.ts
  65. 4047 0
      node_modules/@types/node/crypto.d.ts
  66. 537 0
      node_modules/@types/node/dgram.d.ts
  67. 552 0
      node_modules/@types/node/diagnostics_channel.d.ts
  68. 876 0
      node_modules/@types/node/dns.d.ts
  69. 497 0
      node_modules/@types/node/dns/promises.d.ts
  70. 150 0
      node_modules/@types/node/domain.d.ts
  71. 1011 0
      node_modules/@types/node/events.d.ts
  72. 4658 0
      node_modules/@types/node/fs.d.ts
  73. 1319 0
      node_modules/@types/node/fs/promises.d.ts
  74. 150 0
      node_modules/@types/node/globals.d.ts
  75. 101 0
      node_modules/@types/node/globals.typedarray.d.ts
  76. 2147 0
      node_modules/@types/node/http.d.ts
  77. 2470 0
      node_modules/@types/node/http2.d.ts
  78. 400 0
      node_modules/@types/node/https.d.ts
  79. 115 0
      node_modules/@types/node/index.d.ts
  80. 264 0
      node_modules/@types/node/inspector.d.ts
  81. 4401 0
      node_modules/@types/node/inspector.generated.d.ts
  82. 35 0
      node_modules/@types/node/inspector/promises.d.ts
  83. 754 0
      node_modules/@types/node/module.d.ts
  84. 970 0
      node_modules/@types/node/net.d.ts
  85. 498 0
      node_modules/@types/node/os.d.ts
  86. 155 0
      node_modules/@types/node/package.json
  87. 178 0
      node_modules/@types/node/path.d.ts
  88. 8 0
      node_modules/@types/node/path/posix.d.ts
  89. 8 0
      node_modules/@types/node/path/win32.d.ts
  90. 612 0
      node_modules/@types/node/perf_hooks.d.ts
  91. 2175 0
      node_modules/@types/node/process.d.ts
  92. 89 0
      node_modules/@types/node/punycode.d.ts
  93. 139 0
      node_modules/@types/node/querystring.d.ts
  94. 897 0
      node_modules/@types/node/quic.d.ts
  95. 507 0
      node_modules/@types/node/readline.d.ts
  96. 158 0
      node_modules/@types/node/readline/promises.d.ts
  97. 405 0
      node_modules/@types/node/repl.d.ts
  98. 47 0
      node_modules/@types/node/sea.d.ts
  99. 1021 0
      node_modules/@types/node/sqlite.d.ts
  100. 1774 0
      node_modules/@types/node/stream.d.ts

+ 9 - 0
.claude/settings.local.json

@@ -0,0 +1,9 @@
+{
+  "permissions": {
+    "allow": [
+      "Bash(git commit *)",
+      "Bash(npm init *)",
+      "Bash(npm install *)"
+    ]
+  }
+}

+ 0 - 0
.env.example


+ 0 - 0
drizzle.config.ts


+ 16 - 0
node_modules/.bin/drizzle-kit

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../drizzle-kit/bin.cjs" "$@"
+else 
+  exec node  "$basedir/../drizzle-kit/bin.cjs" "$@"
+fi

+ 17 - 0
node_modules/.bin/drizzle-kit.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\drizzle-kit\bin.cjs" %*

+ 28 - 0
node_modules/.bin/drizzle-kit.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../drizzle-kit/bin.cjs" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../drizzle-kit/bin.cjs" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../drizzle-kit/bin.cjs" $args
+  } else {
+    & "node$exe"  "$basedir/../drizzle-kit/bin.cjs" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/esbuild

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../esbuild/bin/esbuild" "$@"
+else 
+  exec node  "$basedir/../esbuild/bin/esbuild" "$@"
+fi

+ 17 - 0
node_modules/.bin/esbuild.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\esbuild\bin\esbuild" %*

+ 28 - 0
node_modules/.bin/esbuild.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  } else {
+    & "node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/tsc

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../typescript/bin/tsc" "$@"
+else 
+  exec node  "$basedir/../typescript/bin/tsc" "$@"
+fi

+ 17 - 0
node_modules/.bin/tsc.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\typescript\bin\tsc" %*

+ 28 - 0
node_modules/.bin/tsc.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../typescript/bin/tsc" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../typescript/bin/tsc" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../typescript/bin/tsc" $args
+  } else {
+    & "node$exe"  "$basedir/../typescript/bin/tsc" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/tsserver

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../typescript/bin/tsserver" "$@"
+else 
+  exec node  "$basedir/../typescript/bin/tsserver" "$@"
+fi

+ 17 - 0
node_modules/.bin/tsserver.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\typescript\bin\tsserver" %*

+ 28 - 0
node_modules/.bin/tsserver.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  } else {
+    & "node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/tsx

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../tsx/dist/cli.mjs" "$@"
+else 
+  exec node  "$basedir/../tsx/dist/cli.mjs" "$@"
+fi

+ 17 - 0
node_modules/.bin/tsx.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\tsx\dist\cli.mjs" %*

+ 28 - 0
node_modules/.bin/tsx.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../tsx/dist/cli.mjs" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../tsx/dist/cli.mjs" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../tsx/dist/cli.mjs" $args
+  } else {
+    & "node$exe"  "$basedir/../tsx/dist/cli.mjs" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 625 - 0
node_modules/.package-lock.json

@@ -0,0 +1,625 @@
+{
+  "name": "zhishiku",
+  "version": "1.0.0",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "node_modules/@drizzle-team/brocli": {
+      "version": "0.10.2",
+      "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz",
+      "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==",
+      "dev": true,
+      "license": "Apache-2.0"
+    },
+    "node_modules/@esbuild-kit/core-utils": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz",
+      "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==",
+      "deprecated": "Merged into tsx: https://tsx.is",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "esbuild": "~0.18.20",
+        "source-map-support": "^0.5.21"
+      }
+    },
+    "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+      "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": {
+      "version": "0.18.20",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+      "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "optionalDependencies": {
+        "@esbuild/android-arm": "0.18.20",
+        "@esbuild/android-arm64": "0.18.20",
+        "@esbuild/android-x64": "0.18.20",
+        "@esbuild/darwin-arm64": "0.18.20",
+        "@esbuild/darwin-x64": "0.18.20",
+        "@esbuild/freebsd-arm64": "0.18.20",
+        "@esbuild/freebsd-x64": "0.18.20",
+        "@esbuild/linux-arm": "0.18.20",
+        "@esbuild/linux-arm64": "0.18.20",
+        "@esbuild/linux-ia32": "0.18.20",
+        "@esbuild/linux-loong64": "0.18.20",
+        "@esbuild/linux-mips64el": "0.18.20",
+        "@esbuild/linux-ppc64": "0.18.20",
+        "@esbuild/linux-riscv64": "0.18.20",
+        "@esbuild/linux-s390x": "0.18.20",
+        "@esbuild/linux-x64": "0.18.20",
+        "@esbuild/netbsd-x64": "0.18.20",
+        "@esbuild/openbsd-x64": "0.18.20",
+        "@esbuild/sunos-x64": "0.18.20",
+        "@esbuild/win32-arm64": "0.18.20",
+        "@esbuild/win32-ia32": "0.18.20",
+        "@esbuild/win32-x64": "0.18.20"
+      }
+    },
+    "node_modules/@esbuild-kit/esm-loader": {
+      "version": "2.6.5",
+      "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz",
+      "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==",
+      "deprecated": "Merged into tsx: https://tsx.is",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@esbuild-kit/core-utils": "^3.3.2",
+        "get-tsconfig": "^4.7.0"
+      }
+    },
+    "node_modules/@esbuild/win32-x64": {
+      "version": "0.25.12",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz",
+      "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/@types/node": {
+      "version": "25.6.0",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
+      "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==",
+      "devOptional": true,
+      "license": "MIT",
+      "dependencies": {
+        "undici-types": "~7.19.0"
+      }
+    },
+    "node_modules/@types/pg": {
+      "version": "8.20.0",
+      "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.20.0.tgz",
+      "integrity": "sha512-bEPFOaMAHTEP1EzpvHTbmwR8UsFyHSKsRisLIHVMXnpNefSbGA1bD6CVy+qKjGSqmZqNqBDV2azOBo8TgkcVow==",
+      "devOptional": true,
+      "license": "MIT",
+      "dependencies": {
+        "@types/node": "*",
+        "pg-protocol": "*",
+        "pg-types": "^2.2.0"
+      }
+    },
+    "node_modules/buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/dotenv": {
+      "version": "17.4.2",
+      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
+      "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
+      "license": "BSD-2-Clause",
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://dotenvx.com"
+      }
+    },
+    "node_modules/drizzle-kit": {
+      "version": "0.31.10",
+      "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.10.tgz",
+      "integrity": "sha512-7OZcmQUrdGI+DUNNsKBn1aW8qSoKuTH7d0mYgSP8bAzdFzKoovxEFnoGQp2dVs82EOJeYycqRtciopszwUf8bw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@drizzle-team/brocli": "^0.10.2",
+        "@esbuild-kit/esm-loader": "^2.5.5",
+        "esbuild": "^0.25.4",
+        "tsx": "^4.21.0"
+      },
+      "bin": {
+        "drizzle-kit": "bin.cjs"
+      }
+    },
+    "node_modules/drizzle-orm": {
+      "version": "0.45.2",
+      "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.2.tgz",
+      "integrity": "sha512-kY0BSaTNYWnoDMVoyY8uxmyHjpJW1geOmBMdSSicKo9CIIWkSxMIj2rkeSR51b8KAPB7m+qysjuHme5nKP+E5Q==",
+      "license": "Apache-2.0",
+      "peerDependencies": {
+        "@aws-sdk/client-rds-data": ">=3",
+        "@cloudflare/workers-types": ">=4",
+        "@electric-sql/pglite": ">=0.2.0",
+        "@libsql/client": ">=0.10.0",
+        "@libsql/client-wasm": ">=0.10.0",
+        "@neondatabase/serverless": ">=0.10.0",
+        "@op-engineering/op-sqlite": ">=2",
+        "@opentelemetry/api": "^1.4.1",
+        "@planetscale/database": ">=1.13",
+        "@prisma/client": "*",
+        "@tidbcloud/serverless": "*",
+        "@types/better-sqlite3": "*",
+        "@types/pg": "*",
+        "@types/sql.js": "*",
+        "@upstash/redis": ">=1.34.7",
+        "@vercel/postgres": ">=0.8.0",
+        "@xata.io/client": "*",
+        "better-sqlite3": ">=7",
+        "bun-types": "*",
+        "expo-sqlite": ">=14.0.0",
+        "gel": ">=2",
+        "knex": "*",
+        "kysely": "*",
+        "mysql2": ">=2",
+        "pg": ">=8",
+        "postgres": ">=3",
+        "sql.js": ">=1",
+        "sqlite3": ">=5"
+      },
+      "peerDependenciesMeta": {
+        "@aws-sdk/client-rds-data": {
+          "optional": true
+        },
+        "@cloudflare/workers-types": {
+          "optional": true
+        },
+        "@electric-sql/pglite": {
+          "optional": true
+        },
+        "@libsql/client": {
+          "optional": true
+        },
+        "@libsql/client-wasm": {
+          "optional": true
+        },
+        "@neondatabase/serverless": {
+          "optional": true
+        },
+        "@op-engineering/op-sqlite": {
+          "optional": true
+        },
+        "@opentelemetry/api": {
+          "optional": true
+        },
+        "@planetscale/database": {
+          "optional": true
+        },
+        "@prisma/client": {
+          "optional": true
+        },
+        "@tidbcloud/serverless": {
+          "optional": true
+        },
+        "@types/better-sqlite3": {
+          "optional": true
+        },
+        "@types/pg": {
+          "optional": true
+        },
+        "@types/sql.js": {
+          "optional": true
+        },
+        "@upstash/redis": {
+          "optional": true
+        },
+        "@vercel/postgres": {
+          "optional": true
+        },
+        "@xata.io/client": {
+          "optional": true
+        },
+        "better-sqlite3": {
+          "optional": true
+        },
+        "bun-types": {
+          "optional": true
+        },
+        "expo-sqlite": {
+          "optional": true
+        },
+        "gel": {
+          "optional": true
+        },
+        "knex": {
+          "optional": true
+        },
+        "kysely": {
+          "optional": true
+        },
+        "mysql2": {
+          "optional": true
+        },
+        "pg": {
+          "optional": true
+        },
+        "postgres": {
+          "optional": true
+        },
+        "prisma": {
+          "optional": true
+        },
+        "sql.js": {
+          "optional": true
+        },
+        "sqlite3": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/esbuild": {
+      "version": "0.25.12",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
+      "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=18"
+      },
+      "optionalDependencies": {
+        "@esbuild/aix-ppc64": "0.25.12",
+        "@esbuild/android-arm": "0.25.12",
+        "@esbuild/android-arm64": "0.25.12",
+        "@esbuild/android-x64": "0.25.12",
+        "@esbuild/darwin-arm64": "0.25.12",
+        "@esbuild/darwin-x64": "0.25.12",
+        "@esbuild/freebsd-arm64": "0.25.12",
+        "@esbuild/freebsd-x64": "0.25.12",
+        "@esbuild/linux-arm": "0.25.12",
+        "@esbuild/linux-arm64": "0.25.12",
+        "@esbuild/linux-ia32": "0.25.12",
+        "@esbuild/linux-loong64": "0.25.12",
+        "@esbuild/linux-mips64el": "0.25.12",
+        "@esbuild/linux-ppc64": "0.25.12",
+        "@esbuild/linux-riscv64": "0.25.12",
+        "@esbuild/linux-s390x": "0.25.12",
+        "@esbuild/linux-x64": "0.25.12",
+        "@esbuild/netbsd-arm64": "0.25.12",
+        "@esbuild/netbsd-x64": "0.25.12",
+        "@esbuild/openbsd-arm64": "0.25.12",
+        "@esbuild/openbsd-x64": "0.25.12",
+        "@esbuild/openharmony-arm64": "0.25.12",
+        "@esbuild/sunos-x64": "0.25.12",
+        "@esbuild/win32-arm64": "0.25.12",
+        "@esbuild/win32-ia32": "0.25.12",
+        "@esbuild/win32-x64": "0.25.12"
+      }
+    },
+    "node_modules/get-tsconfig": {
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
+      "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "resolve-pkg-maps": "^1.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+      }
+    },
+    "node_modules/pg": {
+      "version": "8.20.0",
+      "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz",
+      "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==",
+      "license": "MIT",
+      "dependencies": {
+        "pg-connection-string": "^2.12.0",
+        "pg-pool": "^3.13.0",
+        "pg-protocol": "^1.13.0",
+        "pg-types": "2.2.0",
+        "pgpass": "1.0.5"
+      },
+      "engines": {
+        "node": ">= 16.0.0"
+      },
+      "optionalDependencies": {
+        "pg-cloudflare": "^1.3.0"
+      },
+      "peerDependencies": {
+        "pg-native": ">=3.0.1"
+      },
+      "peerDependenciesMeta": {
+        "pg-native": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/pg-cloudflare": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz",
+      "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==",
+      "license": "MIT",
+      "optional": true
+    },
+    "node_modules/pg-connection-string": {
+      "version": "2.12.0",
+      "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz",
+      "integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==",
+      "license": "MIT"
+    },
+    "node_modules/pg-int8": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
+      "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=4.0.0"
+      }
+    },
+    "node_modules/pg-pool": {
+      "version": "3.13.0",
+      "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz",
+      "integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==",
+      "license": "MIT",
+      "peerDependencies": {
+        "pg": ">=8.0"
+      }
+    },
+    "node_modules/pg-protocol": {
+      "version": "1.13.0",
+      "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz",
+      "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==",
+      "license": "MIT"
+    },
+    "node_modules/pg-types": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
+      "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
+      "license": "MIT",
+      "dependencies": {
+        "pg-int8": "1.0.1",
+        "postgres-array": "~2.0.0",
+        "postgres-bytea": "~1.0.0",
+        "postgres-date": "~1.0.4",
+        "postgres-interval": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/pgpass": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
+      "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
+      "license": "MIT",
+      "dependencies": {
+        "split2": "^4.1.0"
+      }
+    },
+    "node_modules/postgres-array": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
+      "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/postgres-bytea": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",
+      "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/postgres-date": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
+      "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/postgres-interval": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
+      "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
+      "license": "MIT",
+      "dependencies": {
+        "xtend": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/resolve-pkg-maps": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+      "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+      "dev": true,
+      "license": "MIT",
+      "funding": {
+        "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+      }
+    },
+    "node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "dev": true,
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/source-map-support": {
+      "version": "0.5.21",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+      "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      }
+    },
+    "node_modules/split2": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+      "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">= 10.x"
+      }
+    },
+    "node_modules/tsx": {
+      "version": "4.21.0",
+      "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
+      "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "esbuild": "~0.27.0",
+        "get-tsconfig": "^4.7.5"
+      },
+      "bin": {
+        "tsx": "dist/cli.mjs"
+      },
+      "engines": {
+        "node": ">=18.0.0"
+      },
+      "optionalDependencies": {
+        "fsevents": "~2.3.3"
+      }
+    },
+    "node_modules/tsx/node_modules/@esbuild/win32-x64": {
+      "version": "0.27.7",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
+      "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
+      "cpu": [
+        "x64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "win32"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/tsx/node_modules/esbuild": {
+      "version": "0.27.7",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
+      "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
+      "dev": true,
+      "hasInstallScript": true,
+      "license": "MIT",
+      "bin": {
+        "esbuild": "bin/esbuild"
+      },
+      "engines": {
+        "node": ">=18"
+      },
+      "optionalDependencies": {
+        "@esbuild/aix-ppc64": "0.27.7",
+        "@esbuild/android-arm": "0.27.7",
+        "@esbuild/android-arm64": "0.27.7",
+        "@esbuild/android-x64": "0.27.7",
+        "@esbuild/darwin-arm64": "0.27.7",
+        "@esbuild/darwin-x64": "0.27.7",
+        "@esbuild/freebsd-arm64": "0.27.7",
+        "@esbuild/freebsd-x64": "0.27.7",
+        "@esbuild/linux-arm": "0.27.7",
+        "@esbuild/linux-arm64": "0.27.7",
+        "@esbuild/linux-ia32": "0.27.7",
+        "@esbuild/linux-loong64": "0.27.7",
+        "@esbuild/linux-mips64el": "0.27.7",
+        "@esbuild/linux-ppc64": "0.27.7",
+        "@esbuild/linux-riscv64": "0.27.7",
+        "@esbuild/linux-s390x": "0.27.7",
+        "@esbuild/linux-x64": "0.27.7",
+        "@esbuild/netbsd-arm64": "0.27.7",
+        "@esbuild/netbsd-x64": "0.27.7",
+        "@esbuild/openbsd-arm64": "0.27.7",
+        "@esbuild/openbsd-x64": "0.27.7",
+        "@esbuild/openharmony-arm64": "0.27.7",
+        "@esbuild/sunos-x64": "0.27.7",
+        "@esbuild/win32-arm64": "0.27.7",
+        "@esbuild/win32-ia32": "0.27.7",
+        "@esbuild/win32-x64": "0.27.7"
+      }
+    },
+    "node_modules/typescript": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
+      "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "bin": {
+        "tsc": "bin/tsc",
+        "tsserver": "bin/tsserver"
+      },
+      "engines": {
+        "node": ">=14.17"
+      }
+    },
+    "node_modules/undici-types": {
+      "version": "7.19.2",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz",
+      "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==",
+      "devOptional": true,
+      "license": "MIT"
+    },
+    "node_modules/xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.4"
+      }
+    }
+  }
+}

+ 464 - 0
node_modules/@drizzle-team/brocli/README.md

@@ -0,0 +1,464 @@
+# Brocli 🥦
+Modern type-safe way of building CLIs with TypeScript or JavaScript  
+by [Drizzle Team](https://drizzle.team)  
+
+```ts
+import { command, string, boolean, run } from "@drizzle-team/brocli";
+
+const push = command({
+  name: "push",
+  options: {
+    dialect: string().enum("postgresql", "mysql", "sqlite"),
+    databaseSchema: string().required(),
+    databaseUrl: string().required(),
+    strict: boolean().default(false),
+  },
+  handler: (opts) => {
+    ...
+  },
+});
+
+run([push]); // parse shell arguments and run command
+```
+ 
+### Why?
+Brocli is meant to solve a list of challenges we've faced while building 
+[Drizzle ORM](https://orm.drizzle.team) CLI companion for generating and running SQL schema migrations:
+- [x] Explicit, straightforward and discoverable API
+- [x] Typed options(arguments) with built in validation
+- [x] Ability to reuse options(or option sets) across commands
+- [x] Transformer hook to decouple runtime config consumption from command business logic
+- [x] `--version`, `-v` as either string or callback
+- [x] Command hooks to run common stuff before/after command
+- [x] Explicit global params passthrough
+- [x] Testability, the most important part for us to iterate without breaking
+- [x] Themes, simple API to style global/command helps
+- [x] Docs generation API to eliminate docs drifting
+
+### Learn by examples
+If you need API referece - [see here](#api-reference), this list of practical example 
+is meant to a be a zero to hero walk through for you to learn Brocli 🚀  
+
+Simple echo command with positional argument:
+```ts
+import { run, command, positional } from "@drizzle-team/brocli";
+
+const echo = command({
+  name: "echo",
+  options: {
+    text: positional().desc("Text to echo").default("echo"),
+  },
+  handler: (opts) => {
+    console.log(opts.text);
+  },
+});
+
+run([echo])
+```
+```bash
+~ bun run index.ts echo
+echo
+
+~ bun run index.ts echo text
+text
+```
+
+Print version with `--version -v`:
+```ts
+...
+
+run([echo], {
+  version: "1.0.0",
+);
+```
+```bash
+~ bun run index.ts --version
+1.0.0
+```
+  
+Version accepts async callback for you to do any kind of io if necessary before printing cli version:  
+```ts
+import { run, command, positional } from "@drizzle-team/brocli";
+
+const version = async () => {
+  // you can run async here, for example fetch version of runtime-dependend library
+
+  const envVersion = process.env.CLI_VERSION;
+  console.log(chalk.gray(envVersion), "\n");
+};
+
+const echo = command({ ... });
+
+run([echo], {
+  version: version,
+);
+```
+
+
+
+  
+  
+
+
+# API reference
+[**`command`**](#command)  
+- [`command → name`](#command-name)
+- [`command → desc`](#command-desc)
+- [`command → shortDesc`](#command-shortDesc)
+- [`command → aliases`](#command-aliases)
+- [`command → options`](#command-options)
+- [`command → transform`](#command-transform)
+- [`command → handler`](#command-handler)
+- [`command → help`](#command-help)
+- [`command → hidden`](#command-hidden)
+- [`command → metadata`](#command-metadata)
+
+[**`options`**](#options)  
+- [`string`](#options-string)
+- [`boolean`](#options-boolean)
+- [`number`](#options-number)
+- [`enum`](#options-enum)
+- [`positional`](#options-positional)
+- [`required`](#options-required)
+- [`alias`](#options-alias)
+- [`desc`](#options-desc)
+- [`default`](#options-default)
+- [`hidden`](#options-hidden)
+
+  
+[**`run`**](#run)
+- [`string`](#options-string)
+
+  
+Brocli **`command`** declaration has:  
+`name` - command name, will be listed in `help`  
+`desc` - optional description, will be listed in the command `help`  
+`shortDesc` - optional short description, will be listed in the all commands/all subcommands `help`   
+`aliases` - command name aliases  
+`hidden` - flag to hide command from `help`  
+`help` - command help text or a callback to print help text with dynamically provided config  
+`options` - typed list of shell arguments to be parsed and provided to `transform` or `handler`    
+`transform` - optional hook, will be called before handler to modify CLI params  
+`handler` - called with either typed `options` or `transform` params, place to run your command business logic  
+`metadata` - optional meta information for docs generation flow
+
+`name`, `desc`, `shortDesc` and `metadata` are provided to docs generation step  
+  
+  
+```ts
+import { command, string, boolean } from "@drizzle-team/brocli";
+
+
+
+const push = command({
+  name: "push",
+  options: {
+    dialect: string().enum("postgresql", "mysql", "sqlite"),
+    databaseSchema: string().required(),
+    databaseUrl: string().required(),
+    strict: boolean().default(false),
+  },
+  transform: (opts) => {
+  },
+  handler: (opts) => {
+    ...
+  },
+});
+```
+
+
+
+```ts
+import { command } from "@drizzle-team/brocli";
+
+const cmd = command({
+  name: "cmd",
+  options: {
+    dialect: string().enum("postgresql", "mysql", "sqlite"),
+    schema: string().required(),
+    url: string().required(),
+  },
+  handler: (opts) => {
+    ...
+  },
+});
+
+```
+
+### Option builder
+Initial builder functions:
+
+-   `string(name?: string)` - defines option as a string-type option which requires data to be passed as `--option=value` or `--option value`    
+    -   `name` - name by which option is passed in cli args  
+    If not specified, defaults to key of this option    
+    :warning: - must not contain `=` character, not be in `--help`,`-h`,`--version`,`-v` and be unique per each command  
+    :speech_balloon: - will be automatically prefixed with `-` if one character long, `--` if longer  
+    If you wish to have only single hyphen as a prefix on multi character name - simply specify name with it: `string('-longname')`  
+
+-   `number(name?: string)` - defines option as a number-type option which requires data to be passed as `--option=value` or `--option value`    
+    -   `name` - name by which option is passed in cli args  
+    If not specified, defaults to key of this option    
+    :warning: - must not contain `=` character, not be in `--help`,`-h`,`--version`,`-v` and be unique per each command  
+    :speech_balloon: - will be automatically prefixed with `-` if one character long, `--` if longer  
+    If you wish to have only single hyphen as a prefix on multi character name - simply specify name with it: `number('-longname')`  
+
+-   `boolean(name?: string)` - defines option as a boolean-type option which requires data to be passed as `--option`  
+    -   `name` - name by which option is passed in cli args  
+    If not specified, defaults to key of this option    
+    :warning: - must not contain `=` character, not be in `--help`,`-h`,`--version`,`-v` and be unique per each command  
+    :speech_balloon: - will be automatically prefixed with `-` if one character long, `--` if longer  
+    If you wish to have only single hyphen as a prefix on multi character name - simply specify name with it: `boolean('-longname')`  
+
+-   `positional(displayName?: string)` - defines option as a positional-type option which requires data to be passed after a command as `command value`    
+    -   `displayName` - name by which option is passed in cli args  
+    If not specified, defaults to key of this option  
+    :warning: - does not consume options and data that starts with  
+    
+Extensions: 
+
+-   `.alias(...aliases: string[])` - defines aliases for option  
+     -   `aliases` - aliases by which option is passed in cli args  
+    :warning: - must not contain `=` character, not be in `--help`,`-h`,`--version`,`-v` and be unique per each command  
+    :speech_balloon: - will be automatically prefixed with `-` if one character long, `--` if longer  
+    If you wish to have only single hyphen as a prefix on multi character alias - simply specify alias with it: `.alias('-longname')`  
+
+-   `.desc(description: string)` - defines description for option to be displayed in `help` command  
+
+-   `.required()` - sets option as required, which means that application will print an error if it is not present in cli args  
+
+-   `.default(value: string | boolean)` - sets default value for option which will be assigned to it in case it is not present in cli args
+
+-   `.hidden()` - sets option as hidden - option will be omitted from being displayed in `help` command
+
+-   `.enum(values: [string, ...string[]])` - limits values of string to one of specified here  
+    -   `values` - allowed enum values  
+
+-   `.int()` - ensures that number is an integer  
+
+-   `.min(value: number)` - specified minimal allowed value for numbers  
+    -   `value` - minimal allowed value  
+    :warning: - does not limit defaults
+
+-   `.max(value: number)` - specified maximal allowed value for numbers  
+    -   `value` - maximal allowed value  
+    :warning: - does not limit defaults
+
+### Creating handlers
+
+Normally, you can write handlers right in the `command()` function, however there might be cases where you'd want to define your handlers separately.  
+For such cases, you'd want to infer type of `options` that will be passes inside your handler.  
+You can do it using `TypeOf` type:  
+
+```Typescript
+import { string, boolean, type TypeOf } from '@drizzle-team/brocli'
+
+const commandOptions = {
+    opt1: string(),
+    opt2: boolean('flag').alias('f'),
+    // And so on... 
+}
+
+export const commandHandler = (options: TypeOf<typeof commandOptions>) => {
+    // Your logic goes here...
+}
+```
+
+Or by using `handler(options, myHandler () => {...})`
+
+```Typescript
+import { string, boolean, handler } from '@drizzle-team/brocli'
+
+const commandOptions = {
+    opt1: string(),
+    opt2: boolean('flag').alias('f'),
+    // And so on... 
+}
+
+export const commandHandler = handler(commandOptions, (options) => {
+    // Your logic goes here...
+});
+```
+
+### Defining commands
+
+To define commands, use `command()` function:  
+
+```Typescript
+import { command, type Command, string, boolean, type TypeOf } from '@drizzle-team/brocli'
+
+const commandOptions = {
+    opt1: string(),
+    opt2: boolean('flag').alias('f'),
+    // And so on... 
+}
+
+const commands: Command[] = []
+
+commands.push(command({
+    name: 'command', 
+    aliases: ['c', 'cmd'],
+    desc: 'Description goes here',
+    shortDesc: 'Short description'
+    hidden: false,
+    options: commandOptions,
+    transform: (options) => {
+        // Preprocess options here...
+        return processedOptions
+    },
+    handler: (processedOptions) => {
+        // Your logic goes here...
+    },
+    help: () => 'This command works like this: ...',
+    subcommands: [
+        command(
+            // You can define subcommands like this
+        )
+    ]
+}));
+```
+
+Parameters:  
+
+-   `name` - name by which command is searched in cli args  
+    :warning: - must not start with `-` character, be equal to [`true`, `false`, `0`, `1`] (case-insensitive) and be unique per command collection  
+
+-   `aliases` - aliases by which command is searched in cli args  
+    :warning: - must not start with `-` character, be equal to [`true`, `false`, `0`, `1`] (case-insensitive) and be unique per command collection  
+
+-   `desc` - description for command to be displayed in `help` command  
+
+-   `shortDesc` - short description for command to be displayed in `help` command  
+
+-   `hidden` - sets command as hidden - if `true`, command will be omitted from being displayed in `help` command  
+
+-   `options` - object containing command options created using `string` and `boolean` functions  
+
+-   `transform` - optional function to preprocess options before they are passed to handler    
+    :warning: - type of return mutates type of handler's input  
+
+-   `handler` - function, which will be executed in case of successful option parse  
+    :warning: - must be present if your command doesn't have subcommands  
+    If command has subcommands but no handler, help for this command is going to be called instead of handler
+
+-   `help` - function or string, which will be executed or printed when help is called for this command  
+    :warning: - if passed, takes prevalence over theme's `commandHelp` event  
+
+-   `subcommands` - subcommands for command    
+    :warning: - command can't have subcommands and `positional` options at the same time  
+
+-   `metadata` - any data that you want to attach to command to later use in docs generation step  
+
+### Running commands
+
+After defining commands, you're going to need to execute `run` function to start command execution
+
+```Typescript
+import { command, type Command, run, string, boolean, type TypeOf } from '@drizzle-team/brocli'
+
+const commandOptions = {
+    opt1: string(),
+    opt2: boolean('flag').alias('f'),
+    // And so on... 
+}
+
+const commandHandler = (options: TypeOf<typeof commandOptions>) => {
+    // Your logic goes here...
+}
+
+const commands: Command[] = []
+
+commands.push(command({
+    name: 'command', 
+    aliases: ['c', 'cmd'],
+    desc: 'Description goes here',
+    hidden: false,
+    options: commandOptions,
+    handler: commandHandler,
+}));
+
+// And so on...
+
+run(commands, {
+    name: 'mysoft',
+    description: 'MySoft CLI',
+    omitKeysOfUndefinedOptions: true,
+    argSource: customEnvironmentArgvStorage,
+    version: '1.0.0',
+    help: () => {
+        console.log('Command list:');
+        commands.forEach(c => console.log('This command does ... and has options ...'));
+    },
+	theme: async (event) => {
+		if (event.type === 'commandHelp') {
+			await myCustomUniversalCommandHelp(event.command);
+
+			return true;
+		}
+
+		if (event.type === 'unknownError') {
+			console.log('Something went wrong...');
+
+			return true;
+		}
+
+		return false;
+	},
+    hook: (event, command) => {
+        if(event === 'before') console.log(`Command '${command.name}' started`)
+        if(event === 'after') console.log(`Command '${command.name}' succesfully finished it's work`)
+    }
+})
+```
+
+Parameters:
+
+-   `name` - name that's used to invoke your application from cli.  
+Used for themes that print usage examples, example:  
+`app do-task --help` results in `Usage: app do-task <positional> [flags] ...`  
+Default: `undefined`
+
+-   `description` - description of your app  
+Used for themes, example:  
+`myapp --help` results in  
+```
+MyApp CLI
+
+Usage: myapp [command]...
+```  
+Default: `undefined`
+
+-   `omitKeysOfUndefinedOptions` - flag that determines whether undefined options will be passed to transform\handler or not  
+Default: `false`  
+
+-   `argSource` - location of array of args in your environment  
+:warning: - first two items of this storage will be ignored as they typically contain executable and executed file paths  
+Default: `process.argv`
+
+-   `version` - string or handler used to print your app version  
+:warning: - if passed, takes prevalence over theme's version event
+
+-   `help` - string or handler used to print your app's global help    
+:warning: - if passed, takes prevalence over theme's `globalHelp` event
+
+-   `theme(event: BroCliEvent)` - function that's used to customize messages that are printed on various events    
+Return:  
+    `true` | `Promise<true>` if you consider event processed  
+    `false` | `Promise<false>` to redirect event to default theme  
+
+-   `hook(event: EventType, command: Command)` - function that's used to execute code before and after every command's `transform` and `handler` execution  
+
+### Additional functions
+
+-   `commandsInfo(commands: Command[])` - get simplified representation of your command collection  
+Can be used to generate docs  
+
+-   `test(command: Command, args: string)` - test behaviour for command with specified arguments  
+:warning: - if command has `transform`, it will get called, however `handler` won't  
+
+-   `getCommandNameWithParents(command: Command)` - get subcommand's name with parent command names  
+
+## CLI
+
+In `BroCLI`, command doesn't have to be the first argument, instead it may be passed in any order.  
+To make this possible, hovewer, option that's passed right before command should have an explicit value, even if it is a flag: `--verbose true <command-name>` (does not apply to reserved flags: [ `--help` | `-h` | `--version` | `-v`])    
+Options are parsed in strict mode, meaning that having any unrecognized options will result in an error.     

+ 1509 - 0
node_modules/@drizzle-team/brocli/index.cjs

@@ -0,0 +1,1509 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js
+var require_clone = __commonJS({
+  "node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js"(exports2, module2) {
+    "use strict";
+    var clone2 = function() {
+      "use strict";
+      function _instanceof(obj, type) {
+        return type != null && obj instanceof type;
+      }
+      var nativeMap;
+      try {
+        nativeMap = Map;
+      } catch (_) {
+        nativeMap = function() {
+        };
+      }
+      var nativeSet;
+      try {
+        nativeSet = Set;
+      } catch (_) {
+        nativeSet = function() {
+        };
+      }
+      var nativePromise;
+      try {
+        nativePromise = Promise;
+      } catch (_) {
+        nativePromise = function() {
+        };
+      }
+      function clone3(parent, circular, depth, prototype, includeNonEnumerable) {
+        if (typeof circular === "object") {
+          depth = circular.depth;
+          prototype = circular.prototype;
+          includeNonEnumerable = circular.includeNonEnumerable;
+          circular = circular.circular;
+        }
+        var allParents = [];
+        var allChildren = [];
+        var useBuffer = typeof Buffer != "undefined";
+        if (typeof circular == "undefined")
+          circular = true;
+        if (typeof depth == "undefined")
+          depth = Infinity;
+        function _clone(parent2, depth2) {
+          if (parent2 === null)
+            return null;
+          if (depth2 === 0)
+            return parent2;
+          var child;
+          var proto;
+          if (typeof parent2 != "object") {
+            return parent2;
+          }
+          if (_instanceof(parent2, nativeMap)) {
+            child = new nativeMap();
+          } else if (_instanceof(parent2, nativeSet)) {
+            child = new nativeSet();
+          } else if (_instanceof(parent2, nativePromise)) {
+            child = new nativePromise(function(resolve, reject) {
+              parent2.then(function(value) {
+                resolve(_clone(value, depth2 - 1));
+              }, function(err) {
+                reject(_clone(err, depth2 - 1));
+              });
+            });
+          } else if (clone3.__isArray(parent2)) {
+            child = [];
+          } else if (clone3.__isRegExp(parent2)) {
+            child = new RegExp(parent2.source, __getRegExpFlags(parent2));
+            if (parent2.lastIndex) child.lastIndex = parent2.lastIndex;
+          } else if (clone3.__isDate(parent2)) {
+            child = new Date(parent2.getTime());
+          } else if (useBuffer && Buffer.isBuffer(parent2)) {
+            if (Buffer.allocUnsafe) {
+              child = Buffer.allocUnsafe(parent2.length);
+            } else {
+              child = new Buffer(parent2.length);
+            }
+            parent2.copy(child);
+            return child;
+          } else if (_instanceof(parent2, Error)) {
+            child = Object.create(parent2);
+          } else {
+            if (typeof prototype == "undefined") {
+              proto = Object.getPrototypeOf(parent2);
+              child = Object.create(proto);
+            } else {
+              child = Object.create(prototype);
+              proto = prototype;
+            }
+          }
+          if (circular) {
+            var index = allParents.indexOf(parent2);
+            if (index != -1) {
+              return allChildren[index];
+            }
+            allParents.push(parent2);
+            allChildren.push(child);
+          }
+          if (_instanceof(parent2, nativeMap)) {
+            parent2.forEach(function(value, key) {
+              var keyChild = _clone(key, depth2 - 1);
+              var valueChild = _clone(value, depth2 - 1);
+              child.set(keyChild, valueChild);
+            });
+          }
+          if (_instanceof(parent2, nativeSet)) {
+            parent2.forEach(function(value) {
+              var entryChild = _clone(value, depth2 - 1);
+              child.add(entryChild);
+            });
+          }
+          for (var i in parent2) {
+            var attrs;
+            if (proto) {
+              attrs = Object.getOwnPropertyDescriptor(proto, i);
+            }
+            if (attrs && attrs.set == null) {
+              continue;
+            }
+            child[i] = _clone(parent2[i], depth2 - 1);
+          }
+          if (Object.getOwnPropertySymbols) {
+            var symbols = Object.getOwnPropertySymbols(parent2);
+            for (var i = 0; i < symbols.length; i++) {
+              var symbol = symbols[i];
+              var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
+              if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
+                continue;
+              }
+              child[symbol] = _clone(parent2[symbol], depth2 - 1);
+              if (!descriptor.enumerable) {
+                Object.defineProperty(child, symbol, {
+                  enumerable: false
+                });
+              }
+            }
+          }
+          if (includeNonEnumerable) {
+            var allPropertyNames = Object.getOwnPropertyNames(parent2);
+            for (var i = 0; i < allPropertyNames.length; i++) {
+              var propertyName = allPropertyNames[i];
+              var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
+              if (descriptor && descriptor.enumerable) {
+                continue;
+              }
+              child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
+              Object.defineProperty(child, propertyName, {
+                enumerable: false
+              });
+            }
+          }
+          return child;
+        }
+        return _clone(parent, depth);
+      }
+      clone3.clonePrototype = function clonePrototype(parent) {
+        if (parent === null)
+          return null;
+        var c = function() {
+        };
+        c.prototype = parent;
+        return new c();
+      };
+      function __objToStr(o) {
+        return Object.prototype.toString.call(o);
+      }
+      clone3.__objToStr = __objToStr;
+      function __isDate(o) {
+        return typeof o === "object" && __objToStr(o) === "[object Date]";
+      }
+      clone3.__isDate = __isDate;
+      function __isArray(o) {
+        return typeof o === "object" && __objToStr(o) === "[object Array]";
+      }
+      clone3.__isArray = __isArray;
+      function __isRegExp(o) {
+        return typeof o === "object" && __objToStr(o) === "[object RegExp]";
+      }
+      clone3.__isRegExp = __isRegExp;
+      function __getRegExpFlags(re) {
+        var flags = "";
+        if (re.global) flags += "g";
+        if (re.ignoreCase) flags += "i";
+        if (re.multiline) flags += "m";
+        return flags;
+      }
+      clone3.__getRegExpFlags = __getRegExpFlags;
+      return clone3;
+    }();
+    if (typeof module2 === "object" && module2.exports) {
+      module2.exports = clone2;
+    }
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js
+var require_quote = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js"(exports2, module2) {
+    "use strict";
+    module2.exports = function quote(xs) {
+      return xs.map(function(s) {
+        if (s && typeof s === "object") {
+          return s.op.replace(/(.)/g, "\\$1");
+        }
+        if (/["\s]/.test(s) && !/'/.test(s)) {
+          return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
+        }
+        if (/["'\s]/.test(s)) {
+          return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
+        }
+        return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
+      }).join(" ");
+    };
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js
+var require_parse = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js"(exports2, module2) {
+    "use strict";
+    var CONTROL = "(?:" + [
+      "\\|\\|",
+      "\\&\\&",
+      ";;",
+      "\\|\\&",
+      "\\<\\(",
+      "\\<\\<\\<",
+      ">>",
+      ">\\&",
+      "<\\&",
+      "[&;()|<>]"
+    ].join("|") + ")";
+    var controlRE = new RegExp("^" + CONTROL + "$");
+    var META = "|&;()<> \\t";
+    var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
+    var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
+    var hash = /^#$/;
+    var SQ = "'";
+    var DQ = '"';
+    var DS = "$";
+    var TOKEN = "";
+    var mult = 4294967296;
+    for (i = 0; i < 4; i++) {
+      TOKEN += (mult * Math.random()).toString(16);
+    }
+    var i;
+    var startsWithToken = new RegExp("^" + TOKEN);
+    function matchAll(s, r) {
+      var origIndex = r.lastIndex;
+      var matches = [];
+      var matchObj;
+      while (matchObj = r.exec(s)) {
+        matches.push(matchObj);
+        if (r.lastIndex === matchObj.index) {
+          r.lastIndex += 1;
+        }
+      }
+      r.lastIndex = origIndex;
+      return matches;
+    }
+    function getVar(env, pre, key) {
+      var r = typeof env === "function" ? env(key) : env[key];
+      if (typeof r === "undefined" && key != "") {
+        r = "";
+      } else if (typeof r === "undefined") {
+        r = "$";
+      }
+      if (typeof r === "object") {
+        return pre + TOKEN + JSON.stringify(r) + TOKEN;
+      }
+      return pre + r;
+    }
+    function parseInternal(string2, env, opts) {
+      if (!opts) {
+        opts = {};
+      }
+      var BS = opts.escape || "\\";
+      var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+";
+      var chunker = new RegExp([
+        "(" + CONTROL + ")",
+        // control chars
+        "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"
+      ].join("|"), "g");
+      var matches = matchAll(string2, chunker);
+      if (matches.length === 0) {
+        return [];
+      }
+      if (!env) {
+        env = {};
+      }
+      var commented = false;
+      return matches.map(function(match) {
+        var s = match[0];
+        if (!s || commented) {
+          return void 0;
+        }
+        if (controlRE.test(s)) {
+          return { op: s };
+        }
+        var quote = false;
+        var esc = false;
+        var out = "";
+        var isGlob = false;
+        var i2;
+        function parseEnvVar() {
+          i2 += 1;
+          var varend;
+          var varname;
+          var char = s.charAt(i2);
+          if (char === "{") {
+            i2 += 1;
+            if (s.charAt(i2) === "}") {
+              throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1));
+            }
+            varend = s.indexOf("}", i2);
+            if (varend < 0) {
+              throw new Error("Bad substitution: " + s.slice(i2));
+            }
+            varname = s.slice(i2, varend);
+            i2 = varend;
+          } else if (/[*@#?$!_-]/.test(char)) {
+            varname = char;
+            i2 += 1;
+          } else {
+            var slicedFromI = s.slice(i2);
+            varend = slicedFromI.match(/[^\w\d_]/);
+            if (!varend) {
+              varname = slicedFromI;
+              i2 = s.length;
+            } else {
+              varname = slicedFromI.slice(0, varend.index);
+              i2 += varend.index - 1;
+            }
+          }
+          return getVar(env, "", varname);
+        }
+        for (i2 = 0; i2 < s.length; i2++) {
+          var c = s.charAt(i2);
+          isGlob = isGlob || !quote && (c === "*" || c === "?");
+          if (esc) {
+            out += c;
+            esc = false;
+          } else if (quote) {
+            if (c === quote) {
+              quote = false;
+            } else if (quote == SQ) {
+              out += c;
+            } else {
+              if (c === BS) {
+                i2 += 1;
+                c = s.charAt(i2);
+                if (c === DQ || c === BS || c === DS) {
+                  out += c;
+                } else {
+                  out += BS + c;
+                }
+              } else if (c === DS) {
+                out += parseEnvVar();
+              } else {
+                out += c;
+              }
+            }
+          } else if (c === DQ || c === SQ) {
+            quote = c;
+          } else if (controlRE.test(c)) {
+            return { op: s };
+          } else if (hash.test(c)) {
+            commented = true;
+            var commentObj = { comment: string2.slice(match.index + i2 + 1) };
+            if (out.length) {
+              return [out, commentObj];
+            }
+            return [commentObj];
+          } else if (c === BS) {
+            esc = true;
+          } else if (c === DS) {
+            out += parseEnvVar();
+          } else {
+            out += c;
+          }
+        }
+        if (isGlob) {
+          return { op: "glob", pattern: out };
+        }
+        return out;
+      }).reduce(function(prev, arg) {
+        return typeof arg === "undefined" ? prev : prev.concat(arg);
+      }, []);
+    }
+    module2.exports = function parse(s, env, opts) {
+      var mapped = parseInternal(s, env, opts);
+      if (typeof env !== "function") {
+        return mapped;
+      }
+      return mapped.reduce(function(acc, s2) {
+        if (typeof s2 === "object") {
+          return acc.concat(s2);
+        }
+        var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
+        if (xs.length === 1) {
+          return acc.concat(xs[0]);
+        }
+        return acc.concat(xs.filter(Boolean).map(function(x) {
+          if (startsWithToken.test(x)) {
+            return JSON.parse(x.split(TOKEN)[1]);
+          }
+          return x;
+        }));
+      }, []);
+    };
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js
+var require_shell_quote = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js"(exports2) {
+    "use strict";
+    exports2.quote = require_quote();
+    exports2.parse = require_parse();
+  }
+});
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+  BroCliError: () => BroCliError,
+  boolean: () => boolean,
+  command: () => command2,
+  commandsInfo: () => commandsInfo,
+  getCommandNameWithParents: () => getCommandNameWithParents,
+  handler: () => handler,
+  number: () => number,
+  positional: () => positional,
+  run: () => run,
+  string: () => string,
+  test: () => test
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/brocli-error.ts
+var BroCliError = class extends Error {
+  constructor(message, event) {
+    const errPrefix = "BroCli error: ";
+    super(message === void 0 ? message : `${errPrefix}${message}`);
+    this.event = event;
+  }
+};
+
+// src/command-core.ts
+var import_clone = __toESM(require_clone(), 1);
+
+// src/event-handler.ts
+var getOptionTypeText = (option) => {
+  let result = "";
+  switch (option.type) {
+    case "boolean":
+      result = "";
+      break;
+    case "number": {
+      if ((option.minVal ?? option.maxVal) !== void 0) {
+        let text = "";
+        if (option.isInt) text = text + `integer `;
+        if (option.minVal !== void 0) text = text + `[${option.minVal};`;
+        else text = text + `(\u221E;`;
+        if (option.maxVal !== void 0) text = text + `${option.maxVal}]`;
+        else text = text + `\u221E)`;
+        result = text;
+        break;
+      }
+      if (option.isInt) {
+        result = "integer";
+        break;
+      }
+      result = "number";
+      break;
+    }
+    case "string": {
+      if (option.enumVals) {
+        result = "[ " + option.enumVals.join(" | ") + " ]";
+        break;
+      }
+      result = "string";
+      break;
+    }
+    case "positional": {
+      result = `${option.isRequired ? "<" : "["}${option.enumVals ? option.enumVals.join("|") : option.name}${option.isRequired ? ">" : "]"}`;
+      break;
+    }
+  }
+  if (option.isRequired && option.type !== "positional") result = "!" + result.length ? " " : "" + result;
+  return result;
+};
+var defaultEventHandler = async (event) => {
+  switch (event.type) {
+    case "command_help": {
+      const command3 = event.command;
+      const commandName = getCommandNameWithParents(command3);
+      const cliName = event.name;
+      const desc = command3.desc ?? command3.shortDesc;
+      const subs = command3.subcommands?.filter((s) => !s.hidden);
+      const subcommands = subs && subs.length ? subs : void 0;
+      if (desc !== void 0) {
+        console.log(`
+${desc}`);
+      }
+      const opts = Object.values(command3.options ?? {}).filter(
+        (opt) => !opt.config.isHidden
+      );
+      const positionals = opts.filter((opt) => opt.config.type === "positional");
+      const options = opts.filter((opt) => opt.config.type !== "positional");
+      console.log("\nUsage:");
+      if (command3.handler) {
+        console.log(
+          `  ${cliName ? cliName + " " : ""}${commandName}${positionals.length ? " " + positionals.map(({ config: p }) => getOptionTypeText(p)).join(" ") : ""} [flags]`
+        );
+      } else console.log(`  ${cliName ? cliName + " " : ""}${commandName} [command]`);
+      if (command3.aliases) {
+        console.log(`
+Aliases:`);
+        console.log(`  ${[command3.name, ...command3.aliases].join(", ")}`);
+      }
+      if (subcommands) {
+        console.log("\nAvailable Commands:");
+        const padding = 3;
+        const maxLength = subcommands.reduce((p, e) => e.name.length > p ? e.name.length : p, 0);
+        const paddedLength = maxLength + padding;
+        const preDescPad = 2 + paddedLength;
+        const data = subcommands.map(
+          (s) => `  ${s.name.padEnd(paddedLength)}${(() => {
+            const description = s.shortDesc ?? s.desc;
+            if (!description?.length) return "";
+            const split = description.split("\n");
+            const first = split.shift();
+            const final = [first, ...split.map((s2) => "".padEnd(preDescPad) + s2)].join("\n");
+            return final;
+          })()}`
+        ).join("\n");
+        console.log(data);
+      }
+      if (options.length) {
+        const aliasLength = options.reduce((p, e) => {
+          const currentLength = e.config.aliases.reduce((pa, a) => pa + a.length, 0) + (e.config.aliases.length - 1) * 2 + 1;
+          return currentLength > p ? currentLength : p;
+        }, 0);
+        const paddedAliasLength = aliasLength > 0 ? aliasLength + 1 : 0;
+        const nameLength = options.reduce((p, e) => {
+          const typeLen = getOptionTypeText(e.config).length;
+          const length = typeLen > 0 ? e.config.name.length + 1 + typeLen : e.config.name.length;
+          return length > p ? length : p;
+        }, 0) + 3;
+        const preDescPad = paddedAliasLength + nameLength + 2;
+        const data = options.map(
+          ({ config: opt }) => `  ${`${opt.aliases.length ? opt.aliases.join(", ") + "," : ""}`.padEnd(paddedAliasLength)}${`${opt.name}${(() => {
+            const typeText = getOptionTypeText(opt);
+            return typeText.length ? " " + typeText : "";
+          })()}`.padEnd(nameLength)}${(() => {
+            if (!opt.description?.length) {
+              return opt.default !== void 0 ? `default: ${JSON.stringify(opt.default)}` : "";
+            }
+            const split = opt.description.split("\n");
+            const first = split.shift();
+            const def = opt.default !== void 0 ? ` (default: ${JSON.stringify(opt.default)})` : "";
+            const final = [first, ...split.map((s) => "".padEnd(preDescPad) + s)].join("\n") + def;
+            return final;
+          })()}`
+        ).join("\n");
+        console.log("\nFlags:");
+        console.log(data);
+      }
+      console.log("\nGlobal flags:");
+      console.log(`  -h, --help      help for ${commandName}`);
+      console.log(`  -v, --version   version${cliName ? ` for ${cliName}` : ""}`);
+      if (subcommands) {
+        console.log(
+          `
+Use "${cliName ? cliName + " " : ""}${commandName} [command] --help" for more information about a command.
+`
+        );
+      }
+      return true;
+    }
+    case "global_help": {
+      const cliName = event.name;
+      const desc = event.description;
+      const commands = event.commands.filter((c) => !c.hidden);
+      if (desc !== void 0) {
+        console.log(`${desc}
+`);
+      }
+      console.log("Usage:");
+      console.log(`  ${cliName ? cliName + " " : ""}[command]`);
+      if (commands.length) {
+        console.log("\nAvailable Commands:");
+        const padding = 3;
+        const maxLength = commands.reduce((p, e) => e.name.length > p ? e.name.length : p, 0);
+        const paddedLength = maxLength + padding;
+        const data = commands.map(
+          (c) => `  ${c.name.padEnd(paddedLength)}${(() => {
+            const desc2 = c.shortDesc ?? c.desc;
+            if (!desc2?.length) return "";
+            const split = desc2.split("\n");
+            const first = split.shift();
+            const final = [first, ...split.map((s) => "".padEnd(paddedLength + 2) + s)].join("\n");
+            return final;
+          })()}`
+        ).join("\n");
+        console.log(data);
+      } else {
+        console.log("\nNo available commands.");
+      }
+      console.log("\nFlags:");
+      console.log(`  -h, --help      help${cliName ? ` for ${cliName}` : ""}`);
+      console.log(`  -v, --version   version${cliName ? ` for ${cliName}` : ""}`);
+      console.log("\n");
+      return true;
+    }
+    case "version": {
+      return true;
+    }
+    case "error": {
+      let msg;
+      switch (event.violation) {
+        case "above_max": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const max = option.maxVal;
+          msg = `Invalid value: number type argument '${matchedName}' expects maximal value of ${max} as an input, got: ${data}`;
+          break;
+        }
+        case "below_min": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const min = option.minVal;
+          msg = `Invalid value: number type argument '${matchedName}' expects minimal value of ${min} as an input, got: ${data}`;
+          break;
+        }
+        case "expected_int": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid value: number type argument '${matchedName}' expects an integer as an input, got: ${data}`;
+          break;
+        }
+        case "invalid_boolean_syntax": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid syntax: boolean type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value> | ${matchedName}.
+Allowed values: true, false, 0, 1`;
+          break;
+        }
+        case "invalid_string_syntax": {
+          const matchedName = event.offender.namePart;
+          msg = `Invalid syntax: string type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value>`;
+          break;
+        }
+        case "invalid_number_syntax": {
+          const matchedName = event.offender.namePart;
+          msg = `Invalid syntax: number type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value>`;
+          break;
+        }
+        case "invalid_number_value": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid value: number type argument '${matchedName}' expects a number as an input, got: ${data}`;
+          break;
+        }
+        case "enum_violation": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const values = option.enumVals;
+          msg = option.type === "positional" ? `Invalid value: value for the positional argument '${option.name}' must be either one of the following: ${values.join(", ")}; Received: ${data}` : `Invalid value: value for the argument '${matchedName}' must be either one of the following: ${values.join(", ")}; Received: ${data}`;
+          break;
+        }
+        case "unknown_command_error": {
+          const msg2 = `Unknown command: '${event.offender}'.
+Type '--help' to get help on the cli.`;
+          console.error(msg2);
+          return true;
+        }
+        case "unknown_subcommand_error": {
+          const cName = getCommandNameWithParents(event.command);
+          const msg2 = `Unknown command: ${cName} ${event.offender}.
+Type '${cName} --help' to get the help on command.`;
+          console.error(msg2);
+          return true;
+        }
+        case "missing_args_error": {
+          const { missing: missingOpts, command: command3 } = event;
+          msg = `Command '${command3.name}' is missing following required options: ${missingOpts.map((opt) => {
+            const name = opt.shift();
+            const aliases = opt;
+            if (aliases.length) return `${name} [${aliases.join(", ")}]`;
+            return name;
+          }).join(", ")}`;
+          break;
+        }
+        case "unrecognized_args_error": {
+          const { command: command3, unrecognized } = event;
+          msg = `Unrecognized options for command '${command3.name}': ${unrecognized.join(", ")}`;
+          break;
+        }
+        case "unknown_error": {
+          const e = event.error;
+          console.error(typeof e === "object" && e !== null && "message" in e ? e.message : e);
+          return true;
+        }
+      }
+      console.error(msg);
+      return true;
+    }
+  }
+  return false;
+};
+var eventHandlerWrapper = (customEventHandler) => async (event) => await customEventHandler(event) ? true : await defaultEventHandler(event);
+
+// src/util.ts
+var import_shell_quote = __toESM(require_shell_quote(), 1);
+function isInt(value) {
+  return value === Math.floor(value);
+}
+var shellArgs = (str) => (0, import_shell_quote.parse)(str).map((e) => e.toString());
+var executeOrLog = async (target) => typeof target === "string" ? console.log(target) : target ? await target() : void 0;
+
+// src/command-core.ts
+var generatePrefix = (name) => name.startsWith("-") ? name : name.length > 1 ? `--${name}` : `-${name}`;
+var validateOptions = (config) => {
+  const cloned = (0, import_clone.default)(config);
+  const entries = [];
+  const storedNames = [];
+  const cfgEntries = Object.entries(cloned);
+  for (const [key, value] of cfgEntries) {
+    const cfg = value._.config;
+    if (cfg.name === void 0) cfg.name = key;
+    if (cfg.type === "positional") continue;
+    if (cfg.name.includes("=")) {
+      throw new BroCliError(
+        `Can't define option '${generatePrefix(cfg.name)}' - option names and aliases cannot contain '='!`
+      );
+    }
+    for (const alias of cfg.aliases) {
+      if (alias.includes("=")) {
+        throw new BroCliError(
+          `Can't define option '${generatePrefix(cfg.name)}' - option names and aliases cannot contain '='!`
+        );
+      }
+    }
+    cfg.name = generatePrefix(cfg.name);
+    cfg.aliases = cfg.aliases.map((a) => generatePrefix(a));
+  }
+  for (const [key, value] of cfgEntries) {
+    const cfg = value._.config;
+    if (cfg.type === "positional") {
+      entries.push([key, { config: cfg, $output: void 0 }]);
+      continue;
+    }
+    const reservedNames = ["--help", "-h", "--version", "-v"];
+    const allNames = [cfg.name, ...cfg.aliases];
+    for (const name of allNames) {
+      const match = reservedNames.find((n) => n === name);
+      if (match) throw new BroCliError(`Can't define option '${cfg.name}' - name '${match}' is reserved!`);
+    }
+    for (const storage of storedNames) {
+      const nameOccupier = storage.find((e) => e === cfg.name);
+      if (!nameOccupier) continue;
+      throw new BroCliError(
+        `Can't define option '${cfg.name}' - name is already in use by option '${storage[0]}'!`
+      );
+    }
+    for (const alias of cfg.aliases) {
+      for (const storage of storedNames) {
+        const nameOccupier = storage.find((e) => e === alias);
+        if (!nameOccupier) continue;
+        throw new BroCliError(
+          `Can't define option '${cfg.name}' - alias '${alias}' is already in use by option '${storage[0]}'!`
+        );
+      }
+    }
+    const currentNames = [cfg.name, ...cfg.aliases];
+    storedNames.push(currentNames);
+    currentNames.forEach((name, idx) => {
+      if (currentNames.findIndex((e) => e === name) === idx) return;
+      throw new BroCliError(
+        `Can't define option '${cfg.name}' - duplicate alias '${name}'!`
+      );
+    });
+    entries.push([key, { config: cfg, $output: void 0 }]);
+  }
+  return Object.fromEntries(entries);
+};
+var assignParent = (parent, subcommands) => subcommands.forEach((e) => {
+  e.parent = parent;
+  if (e.subcommands) assignParent(e, e.subcommands);
+});
+var command2 = (command3) => {
+  const allNames = command3.aliases ? [command3.name, ...command3.aliases] : [command3.name];
+  const cmd = (0, import_clone.default)(command3);
+  if (command3.subcommands && command3.options && Object.values(command3.options).find((opt) => opt._.config.type === "positional")) {
+    throw new BroCliError(
+      `Can't define command '${cmd.name}' - command can't have subcommands and positional args at the same time!`
+    );
+  }
+  if (!command3.handler && !command3.subcommands) {
+    throw new BroCliError(
+      `Can't define command '${cmd.name}' - command without subcommands must have a handler present!`
+    );
+  }
+  const processedOptions = command3.options ? validateOptions(command3.options) : void 0;
+  cmd.options = processedOptions;
+  cmd.name = cmd.name ?? cmd.aliases?.shift();
+  if (!cmd.name) throw new BroCliError(`Can't define command without name!`);
+  cmd.aliases = cmd.aliases?.length ? cmd.aliases : void 0;
+  if (cmd.name.startsWith("-")) {
+    throw new BroCliError(`Can't define command '${cmd.name}' - command name can't start with '-'!`);
+  }
+  cmd.aliases?.forEach((a) => {
+    if (a.startsWith("-")) {
+      throw new BroCliError(`Can't define command '${cmd.name}' - command aliases can't start with '-'!`);
+    }
+  });
+  allNames.forEach((n, i) => {
+    if (n === "help") {
+      throw new BroCliError(
+        `Can't define command '${cmd.name}' - 'help' is a reserved name. If you want to redefine help message - do so in runCli's config.`
+      );
+    }
+    const lCaseName = n?.toLowerCase();
+    if (lCaseName === "0" || lCaseName === "1" || lCaseName === "true" || lCaseName === "false") {
+      throw new BroCliError(
+        `Can't define command '${cmd.name}' - '${n}' is a reserved for boolean values name!`
+      );
+    }
+    const idx = allNames.findIndex((an) => an === n);
+    if (idx !== i) throw new BroCliError(`Can't define command '${cmd.name}' - duplicate alias '${n}'!`);
+  });
+  if (cmd.subcommands) {
+    assignParent(cmd, cmd.subcommands);
+  }
+  return cmd;
+};
+var getCommandInner = (commands, candidates, args, cliName, cliDescription) => {
+  const { data: arg, originalIndex: index } = candidates.shift();
+  const command3 = commands.find((c) => {
+    const names = c.aliases ? [c.name, ...c.aliases] : [c.name];
+    const res = names.find((name) => name === arg);
+    return res;
+  });
+  if (!command3) {
+    return {
+      command: command3,
+      args
+    };
+  }
+  const newArgs = removeByIndex(args, index);
+  if (!candidates.length || !command3.subcommands) {
+    return {
+      command: command3,
+      args: newArgs
+    };
+  }
+  const newCandidates = candidates.map((c) => ({ data: c.data, originalIndex: c.originalIndex - 1 }));
+  const subcommand = getCommandInner(command3.subcommands, newCandidates, newArgs, cliName, cliDescription);
+  if (!subcommand.command) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unknown_subcommand_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      offender: candidates[0].data
+    });
+  }
+  return subcommand;
+};
+var getCommand = (commands, args, cliName, cliDescription) => {
+  const candidates = [];
+  for (let i = 0; i < args.length; ++i) {
+    const arg = args[i];
+    if (arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v") {
+      const lCaseNext = args[i + 1]?.toLowerCase();
+      if (lCaseNext === "0" || lCaseNext === "1" || lCaseNext === "true" || lCaseNext === "false") ++i;
+      continue;
+    }
+    if (arg?.startsWith("-")) {
+      if (!arg.includes("=")) ++i;
+      continue;
+    }
+    candidates.push({
+      data: arg,
+      originalIndex: i
+    });
+  }
+  if (!candidates.length) {
+    return {
+      command: void 0,
+      args
+    };
+  }
+  const firstCandidate = candidates[0];
+  if (firstCandidate.data === "help") {
+    return {
+      command: "help",
+      args: removeByIndex(args, firstCandidate.originalIndex)
+    };
+  }
+  const { command: command3, args: argsRes } = getCommandInner(commands, candidates, args, cliName, cliDescription);
+  if (!command3) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unknown_command_error",
+      commands,
+      name: cliName,
+      description: cliDescription,
+      offender: firstCandidate.data
+    });
+  }
+  return {
+    command: command3,
+    args: argsRes
+  };
+};
+var parseArg = (command3, options, positionals, arg, nextArg, cliName, cliDescription) => {
+  let data = void 0;
+  const argSplit = arg.split("=");
+  const hasEq = arg.includes("=");
+  const namePart = argSplit.shift();
+  const dataPart = hasEq ? argSplit.join("=") : nextArg;
+  let skipNext = !hasEq;
+  if (namePart === "--help" || namePart === "-h") {
+    return {
+      isHelp: true
+    };
+  }
+  if (namePart === "--version" || namePart === "-v") {
+    return {
+      isVersion: true
+    };
+  }
+  if (!arg.startsWith("-")) {
+    if (!positionals.length) return {};
+    const pos = positionals.shift();
+    if (pos[1].enumVals && !pos[1].enumVals.find((val) => val === arg)) {
+      throw new BroCliError(void 0, {
+        type: "error",
+        name: cliName,
+        description: cliDescription,
+        violation: "enum_violation",
+        command: command3,
+        option: pos[1],
+        offender: {
+          dataPart: arg
+        }
+      });
+    }
+    data = arg;
+    return {
+      data,
+      skipNext: false,
+      name: pos[0],
+      option: pos[1]
+    };
+  }
+  const option = options.find(([optKey, opt]) => {
+    const names = [opt.name, ...opt.aliases];
+    if (opt.type === "boolean") {
+      const match = names.find((name) => name === namePart);
+      if (!match) return false;
+      let lcaseData = dataPart?.toLowerCase();
+      if (!hasEq && nextArg?.startsWith("-")) {
+        data = true;
+        skipNext = false;
+        return true;
+      }
+      if (lcaseData === void 0 || lcaseData === "" || lcaseData === "true" || lcaseData === "1") {
+        data = true;
+        return true;
+      }
+      if (lcaseData === "false" || lcaseData === "0") {
+        data = false;
+        return true;
+      }
+      if (!hasEq) {
+        data = true;
+        skipNext = false;
+        return true;
+      }
+      throw new BroCliError(void 0, {
+        type: "error",
+        name: cliName,
+        description: cliDescription,
+        violation: "invalid_boolean_syntax",
+        option: opt,
+        command: command3,
+        offender: {
+          namePart,
+          dataPart
+        }
+      });
+    } else {
+      const match = names.find((name) => name === namePart);
+      if (!match) return false;
+      if (opt.type === "string") {
+        if (!hasEq && nextArg === void 0) {
+          throw new BroCliError(void 0, {
+            type: "error",
+            name: cliName,
+            description: cliDescription,
+            violation: "invalid_string_syntax",
+            option: opt,
+            command: command3,
+            offender: {
+              namePart,
+              dataPart
+            }
+          });
+        }
+        if (opt.enumVals && !opt.enumVals.find((val) => val === dataPart)) {
+          throw new BroCliError(void 0, {
+            type: "error",
+            name: cliName,
+            description: cliDescription,
+            violation: "enum_violation",
+            option: opt,
+            command: command3,
+            offender: {
+              namePart,
+              dataPart
+            }
+          });
+        }
+        data = dataPart;
+        return true;
+      }
+      if (!hasEq && nextArg === void 0) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "invalid_number_syntax",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      const numData = Number(dataPart);
+      if (isNaN(numData)) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "invalid_number_value",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.isInt && !isInt(numData)) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "expected_int",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.minVal !== void 0 && numData < opt.minVal) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "below_min",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.maxVal !== void 0 && numData > opt.maxVal) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "above_max",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      data = numData;
+      return true;
+    }
+  });
+  return {
+    data,
+    skipNext,
+    name: option?.[0],
+    option: option?.[1]
+  };
+};
+var parseOptions = (command3, args, cliName, cliDescription, omitKeysOfUndefinedOptions) => {
+  const options = command3.options;
+  const optEntries = Object.entries(options ?? {}).map(
+    (opt) => [opt[0], opt[1].config]
+  );
+  const nonPositionalEntries = optEntries.filter(([key, opt]) => opt.type !== "positional");
+  const positionalEntries = optEntries.filter(([key, opt]) => opt.type === "positional");
+  const result = {};
+  const missingRequiredArr = [];
+  const unrecognizedArgsArr = [];
+  for (let i = 0; i < args.length; ++i) {
+    const arg = args[i];
+    const nextArg = args[i + 1];
+    const {
+      data,
+      name,
+      option,
+      skipNext,
+      isHelp,
+      isVersion
+    } = parseArg(command3, nonPositionalEntries, positionalEntries, arg, nextArg, cliName, cliDescription);
+    if (!option) unrecognizedArgsArr.push(arg.split("=")[0]);
+    if (skipNext) ++i;
+    if (isHelp) return "help";
+    if (isVersion) return "version";
+    result[name] = data;
+  }
+  for (const [optKey, option] of optEntries) {
+    const data = result[optKey] ?? option.default;
+    if (!omitKeysOfUndefinedOptions) {
+      result[optKey] = data;
+    } else {
+      if (data !== void 0) result[optKey] = data;
+    }
+    if (option.isRequired && result[optKey] === void 0) missingRequiredArr.push([option.name, ...option.aliases]);
+  }
+  if (missingRequiredArr.length) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "missing_args_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      missing: missingRequiredArr
+    });
+  }
+  if (unrecognizedArgsArr.length) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unrecognized_args_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      unrecognized: unrecognizedArgsArr
+    });
+  }
+  return Object.keys(result).length ? result : void 0;
+};
+var getCommandNameWithParents = (command3) => command3.parent ? `${getCommandNameWithParents(command3.parent)} ${command3.name}` : command3.name;
+var validateCommands = (commands, parent) => {
+  const storedNames = {};
+  for (const cmd of commands) {
+    const storageVals = Object.values(storedNames);
+    for (const storage of storageVals) {
+      const nameOccupier = storage.find((e) => e === cmd.name);
+      if (!nameOccupier) continue;
+      throw new BroCliError(
+        `Can't define command '${getCommandNameWithParents(cmd)}': name is already in use by command '${parent ? `${getCommandNameWithParents(parent)} ` : ""}${storage[0]}'!`
+      );
+    }
+    if (cmd.aliases) {
+      for (const alias of cmd.aliases) {
+        for (const storage of storageVals) {
+          const nameOccupier = storage.find((e) => e === alias);
+          if (!nameOccupier) continue;
+          throw new BroCliError(
+            `Can't define command '${getCommandNameWithParents(cmd)}': alias '${alias}' is already in use by command '${parent ? `${getCommandNameWithParents(parent)} ` : ""}${storage[0]}'!`
+          );
+        }
+      }
+    }
+    storedNames[cmd.name] = cmd.aliases ? [cmd.name, ...cmd.aliases] : [cmd.name];
+    if (cmd.subcommands) cmd.subcommands = validateCommands(cmd.subcommands, cmd);
+  }
+  return commands;
+};
+var removeByIndex = (arr, idx) => [...arr.slice(0, idx), ...arr.slice(idx + 1, arr.length)];
+var run = async (commands, config) => {
+  const eventHandler = config?.theme ? eventHandlerWrapper(config.theme) : defaultEventHandler;
+  const argSource = config?.argSource ?? process.argv;
+  const version = config?.version;
+  const help = config?.help;
+  const omitKeysOfUndefinedOptions = config?.omitKeysOfUndefinedOptions ?? false;
+  const cliName = config?.name;
+  const cliDescription = config?.description;
+  try {
+    const processedCmds = validateCommands(commands);
+    let args = argSource.slice(2, argSource.length);
+    if (!args.length) {
+      return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h");
+    if (helpIndex !== -1 && (helpIndex > 0 ? args[helpIndex - 1]?.startsWith("-") && !args[helpIndex - 1].includes("=") ? false : true : true)) {
+      const command4 = getCommand(processedCmds, args, cliName, cliDescription).command;
+      if (typeof command4 === "object") {
+        return command4.help !== void 0 ? await executeOrLog(command4.help) : await eventHandler({
+          type: "command_help",
+          description: cliDescription,
+          name: cliName,
+          command: command4
+        });
+      } else {
+        return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+          type: "global_help",
+          description: cliDescription,
+          name: cliName,
+          commands: processedCmds
+        });
+      }
+    }
+    const versionIndex = args.findIndex((arg) => arg === "--version" || arg === "-v");
+    if (versionIndex !== -1 && (versionIndex > 0 ? args[versionIndex - 1]?.startsWith("-") ? false : true : true)) {
+      return version !== void 0 ? await executeOrLog(version) : await eventHandler({
+        type: "version",
+        name: cliName,
+        description: cliDescription
+      });
+    }
+    const { command: command3, args: newArgs } = getCommand(processedCmds, args, cliName, cliDescription);
+    if (!command3) {
+      return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    if (command3 === "help") {
+      let helpCommand;
+      let newestArgs = newArgs;
+      do {
+        const res = getCommand(processedCmds, newestArgs, cliName, cliDescription);
+        helpCommand = res.command;
+        newestArgs = res.args;
+      } while (helpCommand === "help");
+      return helpCommand ? helpCommand.help !== void 0 ? await executeOrLog(helpCommand.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: helpCommand
+      }) : help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    const optionResult = parseOptions(command3, newArgs, cliName, cliDescription, omitKeysOfUndefinedOptions);
+    if (optionResult === "help") {
+      return command3.help !== void 0 ? await executeOrLog(command3.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: command3
+      });
+    }
+    if (optionResult === "version") {
+      return version !== void 0 ? await executeOrLog(version) : await eventHandler({
+        type: "version",
+        name: cliName,
+        description: cliDescription
+      });
+    }
+    if (command3.handler) {
+      if (config?.hook) await config.hook("before", command3);
+      await command3.handler(command3.transform ? await command3.transform(optionResult) : optionResult);
+      if (config?.hook) await config.hook("after", command3);
+      return;
+    } else {
+      return command3.help !== void 0 ? await executeOrLog(command3.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: command3
+      });
+    }
+  } catch (e) {
+    if (e instanceof BroCliError) {
+      if (e.event) await eventHandler(e.event);
+      else {
+        if (!config?.noExit) console.error(e.message);
+        else return e.message;
+      }
+    } else {
+      await eventHandler({
+        type: "error",
+        violation: "unknown_error",
+        name: cliName,
+        description: cliDescription,
+        error: e
+      });
+    }
+    if (!config?.noExit) process.exit(1);
+    return;
+  }
+};
+var handler = (options, handler2) => handler2;
+var test = async (command3, args) => {
+  try {
+    const cliParsedArgs = shellArgs(args);
+    const options = parseOptions(command3, cliParsedArgs, void 0, void 0);
+    if (options === "help" || options === "version") {
+      return {
+        type: options
+      };
+    }
+    return {
+      options: command3.transform ? await command3.transform(options) : options,
+      type: "handler"
+    };
+  } catch (e) {
+    return {
+      type: "error",
+      error: e
+    };
+  }
+};
+var commandsInfo = (commands) => {
+  const validated = validateCommands(commands);
+  return Object.fromEntries(validated.map((c) => [c.name, {
+    name: c.name,
+    aliases: (0, import_clone.default)(c.aliases),
+    desc: c.desc,
+    shortDesc: c.shortDesc,
+    isHidden: c.hidden,
+    options: c.options ? Object.fromEntries(Object.entries(c.options).map(([key, opt]) => [key, (0, import_clone.default)(opt.config)])) : void 0,
+    metadata: (0, import_clone.default)(c.metadata),
+    subcommands: c.subcommands ? commandsInfo(c.subcommands) : void 0
+  }]));
+};
+
+// src/option-builder.ts
+var OptionBuilderBase = class _OptionBuilderBase {
+  _;
+  config = () => this._.config;
+  constructor(config) {
+    this._ = {
+      config: config ?? {
+        aliases: [],
+        type: "string"
+      },
+      $output: void 0
+    };
+  }
+  string(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "string", name });
+  }
+  number(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "number", name });
+  }
+  boolean(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "boolean", name });
+  }
+  positional(displayName) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "positional", name: displayName });
+  }
+  alias(...aliases) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, aliases });
+  }
+  desc(description) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, description });
+  }
+  hidden() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isHidden: true });
+  }
+  required() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isRequired: true });
+  }
+  default(value) {
+    const config = this.config();
+    const enums = config.enumVals;
+    if (enums && !enums.find((v) => value === v)) {
+      throw new Error(
+        `Option enums [ ${enums.join(", ")} ] are incompatible with default value ${value}`
+      );
+    }
+    return new _OptionBuilderBase({ ...config, default: value });
+  }
+  enum(...values) {
+    const config = this.config();
+    const defaultVal = config.default;
+    if (defaultVal !== void 0 && !values.find((v) => defaultVal === v)) {
+      throw new Error(
+        `Option enums [ ${values.join(", ")} ] are incompatible with default value ${defaultVal}`
+      );
+    }
+    return new _OptionBuilderBase({ ...config, enumVals: values });
+  }
+  min(value) {
+    const config = this.config();
+    const maxVal = config.maxVal;
+    if (maxVal !== void 0 && maxVal < value) {
+      throw new BroCliError("Unable to define option's min value to be higher than max value!");
+    }
+    return new _OptionBuilderBase({ ...config, minVal: value });
+  }
+  max(value) {
+    const config = this.config();
+    const minVal = config.minVal;
+    if (minVal !== void 0 && minVal > value) {
+      throw new BroCliError("Unable to define option's max value to be lower than min value!");
+    }
+    return new _OptionBuilderBase({ ...config, maxVal: value });
+  }
+  int() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isInt: true });
+  }
+};
+function string(name) {
+  return typeof name === "string" ? new OptionBuilderBase().string(name) : new OptionBuilderBase().string();
+}
+function number(name) {
+  return typeof name === "string" ? new OptionBuilderBase().number(name) : new OptionBuilderBase().number();
+}
+function boolean(name) {
+  return typeof name === "string" ? new OptionBuilderBase().boolean(name) : new OptionBuilderBase().boolean();
+}
+function positional(displayName) {
+  return typeof displayName === "string" ? new OptionBuilderBase().positional(displayName) : new OptionBuilderBase().positional();
+}
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+  BroCliError,
+  boolean,
+  command,
+  commandsInfo,
+  getCommandNameWithParents,
+  handler,
+  number,
+  positional,
+  run,
+  string,
+  test
+});
+//# sourceMappingURL=index.cjs.map

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
node_modules/@drizzle-team/brocli/index.cjs.map


+ 298 - 0
node_modules/@drizzle-team/brocli/index.d.cts

@@ -0,0 +1,298 @@
+type OptionType = 'string' | 'boolean' | 'number' | 'positional';
+type OutputType = string | boolean | number | undefined;
+type BuilderConfig<TType extends OptionType = OptionType> = {
+    name?: string | undefined;
+    aliases: string[];
+    type: TType;
+    description?: string;
+    default?: OutputType;
+    isHidden?: boolean;
+    isRequired?: boolean;
+    isInt?: boolean;
+    minVal?: number;
+    maxVal?: number;
+    enumVals?: [string, ...string[]];
+};
+type ProcessedBuilderConfig = {
+    name: string;
+    aliases: string[];
+    type: OptionType;
+    description?: string;
+    default?: OutputType;
+    isHidden?: boolean;
+    isRequired?: boolean;
+    isInt?: boolean;
+    minVal?: number;
+    maxVal?: number;
+    enumVals?: [string, ...string[]];
+};
+type BuilderConfigLimited = BuilderConfig & {
+    type: Exclude<OptionType, 'positional'>;
+};
+declare class OptionBuilderBase<TBuilderConfig extends BuilderConfig = BuilderConfig, TOutput extends OutputType = string, TOmit extends string = '', TEnums extends string | undefined = undefined> {
+    _: {
+        config: TBuilderConfig;
+        /**
+         * Type-level only field
+         *
+         * Do not attempt to access at a runtime
+         */
+        $output: TOutput;
+    };
+    private config;
+    constructor(config?: TBuilderConfig);
+    string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
+    string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
+    number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
+    number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, string | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
+    boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
+    boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
+    positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
+    positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
+    alias(...aliases: string[]): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'alias'>, TOmit | 'alias'>;
+    desc<TDescription extends string>(description: TDescription): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'desc'>, TOmit | 'desc'>;
+    hidden(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'hidden'>, TOmit | 'hidden'>;
+    required(): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'required' | 'default'>, TOmit | 'required' | 'default'>;
+    default<TDefVal extends TEnums extends undefined ? Exclude<TOutput, undefined> : TEnums>(value: TDefVal): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'enum' | 'required' | 'default', TEnums>, TOmit | 'enum' | 'required' | 'default'>;
+    enum<TValues extends [string, ...string[]], TUnion extends TValues[number] = TValues[number]>(...values: TValues): Omit<OptionBuilderBase<TBuilderConfig, TUnion | (TOutput extends undefined ? undefined : never), TOmit | 'enum', TUnion>, TOmit | 'enum'>;
+    min(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'min'>, TOmit | 'min'>;
+    max(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'max'>, TOmit | 'max'>;
+    int(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'int'>, TOmit | 'int'>;
+}
+type GenericBuilderInternalsFields = {
+    /**
+     * Type-level only field
+     *
+     * Do not attempt to access at a runtime
+     */
+    $output: OutputType;
+    config: BuilderConfig;
+};
+type GenericBuilderInternals = {
+    _: GenericBuilderInternalsFields;
+};
+type GenericBuilderInternalsFieldsLimited = {
+    /**
+     * Type-level only field
+     *
+     * Do not attempt to access at a runtime
+     */
+    $output: OutputType;
+    config: BuilderConfigLimited;
+};
+type GenericBuilderInternalsLimited = {
+    _: GenericBuilderInternalsFieldsLimited;
+};
+type ProcessedOptions<TOptionConfig extends Record<string, GenericBuilderInternals> = Record<string, GenericBuilderInternals>> = {
+    [K in keyof TOptionConfig]: K extends string ? {
+        config: ProcessedBuilderConfig;
+        /**
+         * Type-level only field
+         *
+         * Do not attempt to access at a runtime
+         */
+        $output: TOptionConfig[K]['_']['$output'];
+    } : never;
+};
+type Simplify<T> = {
+    [K in keyof T]: T[K];
+} & {};
+type TypeOf<TOptions extends Record<string, GenericBuilderInternals>> = Simplify<{
+    [K in keyof TOptions]: TOptions[K]['_']['$output'];
+}>;
+declare function string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
+declare function string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
+declare function number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
+declare function number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
+declare function boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
+declare function boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
+declare function positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
+declare function positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
+
+type CommandHandler<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = (options: TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined) => any;
+type CommandInfo = {
+    name: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: Record<string, ProcessedBuilderConfig>;
+    metadata?: any;
+    subcommands?: CommandsInfo;
+};
+type CommandsInfo = Record<string, CommandInfo>;
+type EventType = 'before' | 'after';
+type BroCliConfig = {
+    name?: string;
+    description?: string;
+    argSource?: string[];
+    help?: string | Function;
+    version?: string | Function;
+    omitKeysOfUndefinedOptions?: boolean;
+    hook?: (event: EventType, command: Command) => any;
+    theme?: EventHandler;
+};
+type GenericCommandHandler = (options?: Record<string, OutputType> | undefined) => any;
+type RawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined, TTransformed = TOptsData extends undefined ? undefined : TOptsData> = {
+    name?: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: TOpts;
+    help?: string | Function;
+    transform?: (options: TOptsData) => TTransformed;
+    handler?: (options: Awaited<TTransformed>) => any;
+    subcommands?: [Command, ...Command[]];
+    metadata?: any;
+};
+type AnyRawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = {
+    name?: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: TOpts;
+    help?: string | Function;
+    transform?: GenericCommandHandler;
+    handler?: GenericCommandHandler;
+    subcommands?: [Command, ...Command[]];
+    metadata?: any;
+};
+type Command<TOptsType = any, TTransformedType = any> = {
+    name: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: ProcessedOptions;
+    help?: string | Function;
+    transform?: GenericCommandHandler;
+    handler?: GenericCommandHandler;
+    subcommands?: [Command, ...Command[]];
+    parent?: Command;
+    metadata?: any;
+};
+type CommandCandidate = {
+    data: string;
+    originalIndex: number;
+};
+type InnerCommandParseRes = {
+    command: Command | undefined;
+    args: string[];
+};
+type TestResult<THandlerInput> = {
+    type: 'handler';
+    options: THandlerInput;
+} | {
+    type: 'help' | 'version';
+} | {
+    type: 'error';
+    error: unknown;
+};
+declare const command: <TOpts extends Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? { [K_1 in keyof { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }]: { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }[K_1]; } : undefined, TTransformed = TOptsData>(command: RawCommand<TOpts, TOptsData, TTransformed>) => Command<TOptsData, Awaited<TTransformed>>;
+declare const getCommandNameWithParents: (command: Command) => string;
+/**
+ * Runs CLI commands
+ *
+ * @param commands - command collection
+ *
+ * @param config - additional settings
+ */
+declare const run: (commands: Command[], config?: BroCliConfig) => Promise<void>;
+declare const handler: <TOpts extends Record<string, GenericBuilderInternals>>(options: TOpts, handler: CommandHandler<TOpts>) => CommandHandler<TOpts>;
+declare const test: <TOpts, THandlerInput>(command: Command<TOpts, THandlerInput>, args: string) => Promise<TestResult<THandlerInput>>;
+declare const commandsInfo: (commands: Command[]) => CommandsInfo;
+
+type CommandHelpEvent = {
+    type: 'command_help';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+};
+type GlobalHelpEvent = {
+    type: 'global_help';
+    description: string | undefined;
+    name: string | undefined;
+    commands: Command[];
+};
+type MissingArgsEvent = {
+    type: 'error';
+    violation: 'missing_args_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    missing: [string[], ...string[][]];
+};
+type UnrecognizedArgsEvent = {
+    type: 'error';
+    violation: 'unrecognized_args_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    unrecognized: [string, ...string[]];
+};
+type UnknownCommandEvent = {
+    type: 'error';
+    violation: 'unknown_command_error';
+    name: string | undefined;
+    description: string | undefined;
+    commands: Command[];
+    offender: string;
+};
+type UnknownSubcommandEvent = {
+    type: 'error';
+    violation: 'unknown_subcommand_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    offender: string;
+};
+type UnknownErrorEvent = {
+    type: 'error';
+    violation: 'unknown_error';
+    name: string | undefined;
+    description: string | undefined;
+    error: unknown;
+};
+type VersionEvent = {
+    type: 'version';
+    name: string | undefined;
+    description: string | undefined;
+};
+type GenericValidationViolation = 'above_max' | 'below_min' | 'expected_int' | 'invalid_boolean_syntax' | 'invalid_string_syntax' | 'invalid_number_syntax' | 'invalid_number_value' | 'enum_violation';
+type ValidationViolation = BroCliEvent extends infer Event ? Event extends {
+    violation: string;
+} ? Event['violation'] : never : never;
+type ValidationErrorEvent = {
+    type: 'error';
+    violation: GenericValidationViolation;
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    option: ProcessedBuilderConfig;
+    offender: {
+        namePart?: string;
+        dataPart?: string;
+    };
+};
+type BroCliEvent = CommandHelpEvent | GlobalHelpEvent | MissingArgsEvent | UnrecognizedArgsEvent | UnknownCommandEvent | UnknownSubcommandEvent | ValidationErrorEvent | VersionEvent | UnknownErrorEvent;
+type BroCliEventType = BroCliEvent['type'];
+/**
+ * Return `true` if your handler processes the event
+ *
+ * Return `false` to process event with a built-in handler
+ */
+type EventHandler = (event: BroCliEvent) => boolean | Promise<boolean>;
+
+/**
+ * Internal error class used to bypass runCli's logging without stack trace
+ *
+ * Used only for malformed commands and options
+ */
+declare class BroCliError extends Error {
+    event?: BroCliEvent | undefined;
+    constructor(message: string | undefined, event?: BroCliEvent | undefined);
+}
+
+export { type AnyRawCommand, type BroCliConfig, BroCliError, type BroCliEvent, type BroCliEventType, type BuilderConfig, type BuilderConfigLimited, type Command, type CommandCandidate, type CommandHandler, type CommandHelpEvent, type CommandInfo, type CommandsInfo, type EventHandler, type EventType, type GenericBuilderInternals, type GenericBuilderInternalsFields, type GenericBuilderInternalsFieldsLimited, type GenericBuilderInternalsLimited, type GenericCommandHandler, type GenericValidationViolation, type GlobalHelpEvent, type InnerCommandParseRes, type MissingArgsEvent, OptionBuilderBase, type OptionType, type OutputType, type ProcessedBuilderConfig, type ProcessedOptions, type RawCommand, type Simplify, type TestResult, type TypeOf, type UnknownCommandEvent, type UnknownErrorEvent, type UnknownSubcommandEvent, type UnrecognizedArgsEvent, type ValidationErrorEvent, type ValidationViolation, type VersionEvent, boolean, command, commandsInfo, getCommandNameWithParents, handler, number, positional, run, string, test };

+ 298 - 0
node_modules/@drizzle-team/brocli/index.d.ts

@@ -0,0 +1,298 @@
+type OptionType = 'string' | 'boolean' | 'number' | 'positional';
+type OutputType = string | boolean | number | undefined;
+type BuilderConfig<TType extends OptionType = OptionType> = {
+    name?: string | undefined;
+    aliases: string[];
+    type: TType;
+    description?: string;
+    default?: OutputType;
+    isHidden?: boolean;
+    isRequired?: boolean;
+    isInt?: boolean;
+    minVal?: number;
+    maxVal?: number;
+    enumVals?: [string, ...string[]];
+};
+type ProcessedBuilderConfig = {
+    name: string;
+    aliases: string[];
+    type: OptionType;
+    description?: string;
+    default?: OutputType;
+    isHidden?: boolean;
+    isRequired?: boolean;
+    isInt?: boolean;
+    minVal?: number;
+    maxVal?: number;
+    enumVals?: [string, ...string[]];
+};
+type BuilderConfigLimited = BuilderConfig & {
+    type: Exclude<OptionType, 'positional'>;
+};
+declare class OptionBuilderBase<TBuilderConfig extends BuilderConfig = BuilderConfig, TOutput extends OutputType = string, TOmit extends string = '', TEnums extends string | undefined = undefined> {
+    _: {
+        config: TBuilderConfig;
+        /**
+         * Type-level only field
+         *
+         * Do not attempt to access at a runtime
+         */
+        $output: TOutput;
+    };
+    private config;
+    constructor(config?: TBuilderConfig);
+    string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
+    string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
+    number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
+    number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, string | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
+    boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
+    boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
+    positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
+    positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
+    alias(...aliases: string[]): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'alias'>, TOmit | 'alias'>;
+    desc<TDescription extends string>(description: TDescription): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'desc'>, TOmit | 'desc'>;
+    hidden(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'hidden'>, TOmit | 'hidden'>;
+    required(): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'required' | 'default'>, TOmit | 'required' | 'default'>;
+    default<TDefVal extends TEnums extends undefined ? Exclude<TOutput, undefined> : TEnums>(value: TDefVal): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'enum' | 'required' | 'default', TEnums>, TOmit | 'enum' | 'required' | 'default'>;
+    enum<TValues extends [string, ...string[]], TUnion extends TValues[number] = TValues[number]>(...values: TValues): Omit<OptionBuilderBase<TBuilderConfig, TUnion | (TOutput extends undefined ? undefined : never), TOmit | 'enum', TUnion>, TOmit | 'enum'>;
+    min(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'min'>, TOmit | 'min'>;
+    max(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'max'>, TOmit | 'max'>;
+    int(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'int'>, TOmit | 'int'>;
+}
+type GenericBuilderInternalsFields = {
+    /**
+     * Type-level only field
+     *
+     * Do not attempt to access at a runtime
+     */
+    $output: OutputType;
+    config: BuilderConfig;
+};
+type GenericBuilderInternals = {
+    _: GenericBuilderInternalsFields;
+};
+type GenericBuilderInternalsFieldsLimited = {
+    /**
+     * Type-level only field
+     *
+     * Do not attempt to access at a runtime
+     */
+    $output: OutputType;
+    config: BuilderConfigLimited;
+};
+type GenericBuilderInternalsLimited = {
+    _: GenericBuilderInternalsFieldsLimited;
+};
+type ProcessedOptions<TOptionConfig extends Record<string, GenericBuilderInternals> = Record<string, GenericBuilderInternals>> = {
+    [K in keyof TOptionConfig]: K extends string ? {
+        config: ProcessedBuilderConfig;
+        /**
+         * Type-level only field
+         *
+         * Do not attempt to access at a runtime
+         */
+        $output: TOptionConfig[K]['_']['$output'];
+    } : never;
+};
+type Simplify<T> = {
+    [K in keyof T]: T[K];
+} & {};
+type TypeOf<TOptions extends Record<string, GenericBuilderInternals>> = Simplify<{
+    [K in keyof TOptions]: TOptions[K]['_']['$output'];
+}>;
+declare function string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
+declare function string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
+declare function number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
+declare function number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
+declare function boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
+declare function boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
+declare function positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
+declare function positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
+
+type CommandHandler<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = (options: TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined) => any;
+type CommandInfo = {
+    name: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: Record<string, ProcessedBuilderConfig>;
+    metadata?: any;
+    subcommands?: CommandsInfo;
+};
+type CommandsInfo = Record<string, CommandInfo>;
+type EventType = 'before' | 'after';
+type BroCliConfig = {
+    name?: string;
+    description?: string;
+    argSource?: string[];
+    help?: string | Function;
+    version?: string | Function;
+    omitKeysOfUndefinedOptions?: boolean;
+    hook?: (event: EventType, command: Command) => any;
+    theme?: EventHandler;
+};
+type GenericCommandHandler = (options?: Record<string, OutputType> | undefined) => any;
+type RawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined, TTransformed = TOptsData extends undefined ? undefined : TOptsData> = {
+    name?: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: TOpts;
+    help?: string | Function;
+    transform?: (options: TOptsData) => TTransformed;
+    handler?: (options: Awaited<TTransformed>) => any;
+    subcommands?: [Command, ...Command[]];
+    metadata?: any;
+};
+type AnyRawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = {
+    name?: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: TOpts;
+    help?: string | Function;
+    transform?: GenericCommandHandler;
+    handler?: GenericCommandHandler;
+    subcommands?: [Command, ...Command[]];
+    metadata?: any;
+};
+type Command<TOptsType = any, TTransformedType = any> = {
+    name: string;
+    aliases?: [string, ...string[]];
+    desc?: string;
+    shortDesc?: string;
+    hidden?: boolean;
+    options?: ProcessedOptions;
+    help?: string | Function;
+    transform?: GenericCommandHandler;
+    handler?: GenericCommandHandler;
+    subcommands?: [Command, ...Command[]];
+    parent?: Command;
+    metadata?: any;
+};
+type CommandCandidate = {
+    data: string;
+    originalIndex: number;
+};
+type InnerCommandParseRes = {
+    command: Command | undefined;
+    args: string[];
+};
+type TestResult<THandlerInput> = {
+    type: 'handler';
+    options: THandlerInput;
+} | {
+    type: 'help' | 'version';
+} | {
+    type: 'error';
+    error: unknown;
+};
+declare const command: <TOpts extends Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? { [K_1 in keyof { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }]: { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }[K_1]; } : undefined, TTransformed = TOptsData>(command: RawCommand<TOpts, TOptsData, TTransformed>) => Command<TOptsData, Awaited<TTransformed>>;
+declare const getCommandNameWithParents: (command: Command) => string;
+/**
+ * Runs CLI commands
+ *
+ * @param commands - command collection
+ *
+ * @param config - additional settings
+ */
+declare const run: (commands: Command[], config?: BroCliConfig) => Promise<void>;
+declare const handler: <TOpts extends Record<string, GenericBuilderInternals>>(options: TOpts, handler: CommandHandler<TOpts>) => CommandHandler<TOpts>;
+declare const test: <TOpts, THandlerInput>(command: Command<TOpts, THandlerInput>, args: string) => Promise<TestResult<THandlerInput>>;
+declare const commandsInfo: (commands: Command[]) => CommandsInfo;
+
+type CommandHelpEvent = {
+    type: 'command_help';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+};
+type GlobalHelpEvent = {
+    type: 'global_help';
+    description: string | undefined;
+    name: string | undefined;
+    commands: Command[];
+};
+type MissingArgsEvent = {
+    type: 'error';
+    violation: 'missing_args_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    missing: [string[], ...string[][]];
+};
+type UnrecognizedArgsEvent = {
+    type: 'error';
+    violation: 'unrecognized_args_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    unrecognized: [string, ...string[]];
+};
+type UnknownCommandEvent = {
+    type: 'error';
+    violation: 'unknown_command_error';
+    name: string | undefined;
+    description: string | undefined;
+    commands: Command[];
+    offender: string;
+};
+type UnknownSubcommandEvent = {
+    type: 'error';
+    violation: 'unknown_subcommand_error';
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    offender: string;
+};
+type UnknownErrorEvent = {
+    type: 'error';
+    violation: 'unknown_error';
+    name: string | undefined;
+    description: string | undefined;
+    error: unknown;
+};
+type VersionEvent = {
+    type: 'version';
+    name: string | undefined;
+    description: string | undefined;
+};
+type GenericValidationViolation = 'above_max' | 'below_min' | 'expected_int' | 'invalid_boolean_syntax' | 'invalid_string_syntax' | 'invalid_number_syntax' | 'invalid_number_value' | 'enum_violation';
+type ValidationViolation = BroCliEvent extends infer Event ? Event extends {
+    violation: string;
+} ? Event['violation'] : never : never;
+type ValidationErrorEvent = {
+    type: 'error';
+    violation: GenericValidationViolation;
+    name: string | undefined;
+    description: string | undefined;
+    command: Command;
+    option: ProcessedBuilderConfig;
+    offender: {
+        namePart?: string;
+        dataPart?: string;
+    };
+};
+type BroCliEvent = CommandHelpEvent | GlobalHelpEvent | MissingArgsEvent | UnrecognizedArgsEvent | UnknownCommandEvent | UnknownSubcommandEvent | ValidationErrorEvent | VersionEvent | UnknownErrorEvent;
+type BroCliEventType = BroCliEvent['type'];
+/**
+ * Return `true` if your handler processes the event
+ *
+ * Return `false` to process event with a built-in handler
+ */
+type EventHandler = (event: BroCliEvent) => boolean | Promise<boolean>;
+
+/**
+ * Internal error class used to bypass runCli's logging without stack trace
+ *
+ * Used only for malformed commands and options
+ */
+declare class BroCliError extends Error {
+    event?: BroCliEvent | undefined;
+    constructor(message: string | undefined, event?: BroCliEvent | undefined);
+}
+
+export { type AnyRawCommand, type BroCliConfig, BroCliError, type BroCliEvent, type BroCliEventType, type BuilderConfig, type BuilderConfigLimited, type Command, type CommandCandidate, type CommandHandler, type CommandHelpEvent, type CommandInfo, type CommandsInfo, type EventHandler, type EventType, type GenericBuilderInternals, type GenericBuilderInternalsFields, type GenericBuilderInternalsFieldsLimited, type GenericBuilderInternalsLimited, type GenericCommandHandler, type GenericValidationViolation, type GlobalHelpEvent, type InnerCommandParseRes, type MissingArgsEvent, OptionBuilderBase, type OptionType, type OutputType, type ProcessedBuilderConfig, type ProcessedOptions, type RawCommand, type Simplify, type TestResult, type TypeOf, type UnknownCommandEvent, type UnknownErrorEvent, type UnknownSubcommandEvent, type UnrecognizedArgsEvent, type ValidationErrorEvent, type ValidationViolation, type VersionEvent, boolean, command, commandsInfo, getCommandNameWithParents, handler, number, positional, run, string, test };

+ 1485 - 0
node_modules/@drizzle-team/brocli/index.js

@@ -0,0 +1,1485 @@
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+
+// node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js
+var require_clone = __commonJS({
+  "node_modules/.pnpm/clone@2.1.2/node_modules/clone/clone.js"(exports, module) {
+    "use strict";
+    var clone2 = function() {
+      "use strict";
+      function _instanceof(obj, type) {
+        return type != null && obj instanceof type;
+      }
+      var nativeMap;
+      try {
+        nativeMap = Map;
+      } catch (_) {
+        nativeMap = function() {
+        };
+      }
+      var nativeSet;
+      try {
+        nativeSet = Set;
+      } catch (_) {
+        nativeSet = function() {
+        };
+      }
+      var nativePromise;
+      try {
+        nativePromise = Promise;
+      } catch (_) {
+        nativePromise = function() {
+        };
+      }
+      function clone3(parent, circular, depth, prototype, includeNonEnumerable) {
+        if (typeof circular === "object") {
+          depth = circular.depth;
+          prototype = circular.prototype;
+          includeNonEnumerable = circular.includeNonEnumerable;
+          circular = circular.circular;
+        }
+        var allParents = [];
+        var allChildren = [];
+        var useBuffer = typeof Buffer != "undefined";
+        if (typeof circular == "undefined")
+          circular = true;
+        if (typeof depth == "undefined")
+          depth = Infinity;
+        function _clone(parent2, depth2) {
+          if (parent2 === null)
+            return null;
+          if (depth2 === 0)
+            return parent2;
+          var child;
+          var proto;
+          if (typeof parent2 != "object") {
+            return parent2;
+          }
+          if (_instanceof(parent2, nativeMap)) {
+            child = new nativeMap();
+          } else if (_instanceof(parent2, nativeSet)) {
+            child = new nativeSet();
+          } else if (_instanceof(parent2, nativePromise)) {
+            child = new nativePromise(function(resolve, reject) {
+              parent2.then(function(value) {
+                resolve(_clone(value, depth2 - 1));
+              }, function(err) {
+                reject(_clone(err, depth2 - 1));
+              });
+            });
+          } else if (clone3.__isArray(parent2)) {
+            child = [];
+          } else if (clone3.__isRegExp(parent2)) {
+            child = new RegExp(parent2.source, __getRegExpFlags(parent2));
+            if (parent2.lastIndex) child.lastIndex = parent2.lastIndex;
+          } else if (clone3.__isDate(parent2)) {
+            child = new Date(parent2.getTime());
+          } else if (useBuffer && Buffer.isBuffer(parent2)) {
+            if (Buffer.allocUnsafe) {
+              child = Buffer.allocUnsafe(parent2.length);
+            } else {
+              child = new Buffer(parent2.length);
+            }
+            parent2.copy(child);
+            return child;
+          } else if (_instanceof(parent2, Error)) {
+            child = Object.create(parent2);
+          } else {
+            if (typeof prototype == "undefined") {
+              proto = Object.getPrototypeOf(parent2);
+              child = Object.create(proto);
+            } else {
+              child = Object.create(prototype);
+              proto = prototype;
+            }
+          }
+          if (circular) {
+            var index = allParents.indexOf(parent2);
+            if (index != -1) {
+              return allChildren[index];
+            }
+            allParents.push(parent2);
+            allChildren.push(child);
+          }
+          if (_instanceof(parent2, nativeMap)) {
+            parent2.forEach(function(value, key) {
+              var keyChild = _clone(key, depth2 - 1);
+              var valueChild = _clone(value, depth2 - 1);
+              child.set(keyChild, valueChild);
+            });
+          }
+          if (_instanceof(parent2, nativeSet)) {
+            parent2.forEach(function(value) {
+              var entryChild = _clone(value, depth2 - 1);
+              child.add(entryChild);
+            });
+          }
+          for (var i in parent2) {
+            var attrs;
+            if (proto) {
+              attrs = Object.getOwnPropertyDescriptor(proto, i);
+            }
+            if (attrs && attrs.set == null) {
+              continue;
+            }
+            child[i] = _clone(parent2[i], depth2 - 1);
+          }
+          if (Object.getOwnPropertySymbols) {
+            var symbols = Object.getOwnPropertySymbols(parent2);
+            for (var i = 0; i < symbols.length; i++) {
+              var symbol = symbols[i];
+              var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol);
+              if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
+                continue;
+              }
+              child[symbol] = _clone(parent2[symbol], depth2 - 1);
+              if (!descriptor.enumerable) {
+                Object.defineProperty(child, symbol, {
+                  enumerable: false
+                });
+              }
+            }
+          }
+          if (includeNonEnumerable) {
+            var allPropertyNames = Object.getOwnPropertyNames(parent2);
+            for (var i = 0; i < allPropertyNames.length; i++) {
+              var propertyName = allPropertyNames[i];
+              var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName);
+              if (descriptor && descriptor.enumerable) {
+                continue;
+              }
+              child[propertyName] = _clone(parent2[propertyName], depth2 - 1);
+              Object.defineProperty(child, propertyName, {
+                enumerable: false
+              });
+            }
+          }
+          return child;
+        }
+        return _clone(parent, depth);
+      }
+      clone3.clonePrototype = function clonePrototype(parent) {
+        if (parent === null)
+          return null;
+        var c = function() {
+        };
+        c.prototype = parent;
+        return new c();
+      };
+      function __objToStr(o) {
+        return Object.prototype.toString.call(o);
+      }
+      clone3.__objToStr = __objToStr;
+      function __isDate(o) {
+        return typeof o === "object" && __objToStr(o) === "[object Date]";
+      }
+      clone3.__isDate = __isDate;
+      function __isArray(o) {
+        return typeof o === "object" && __objToStr(o) === "[object Array]";
+      }
+      clone3.__isArray = __isArray;
+      function __isRegExp(o) {
+        return typeof o === "object" && __objToStr(o) === "[object RegExp]";
+      }
+      clone3.__isRegExp = __isRegExp;
+      function __getRegExpFlags(re) {
+        var flags = "";
+        if (re.global) flags += "g";
+        if (re.ignoreCase) flags += "i";
+        if (re.multiline) flags += "m";
+        return flags;
+      }
+      clone3.__getRegExpFlags = __getRegExpFlags;
+      return clone3;
+    }();
+    if (typeof module === "object" && module.exports) {
+      module.exports = clone2;
+    }
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js
+var require_quote = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/quote.js"(exports, module) {
+    "use strict";
+    module.exports = function quote(xs) {
+      return xs.map(function(s) {
+        if (s && typeof s === "object") {
+          return s.op.replace(/(.)/g, "\\$1");
+        }
+        if (/["\s]/.test(s) && !/'/.test(s)) {
+          return "'" + s.replace(/(['\\])/g, "\\$1") + "'";
+        }
+        if (/["'\s]/.test(s)) {
+          return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"';
+        }
+        return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
+      }).join(" ");
+    };
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js
+var require_parse = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/parse.js"(exports, module) {
+    "use strict";
+    var CONTROL = "(?:" + [
+      "\\|\\|",
+      "\\&\\&",
+      ";;",
+      "\\|\\&",
+      "\\<\\(",
+      "\\<\\<\\<",
+      ">>",
+      ">\\&",
+      "<\\&",
+      "[&;()|<>]"
+    ].join("|") + ")";
+    var controlRE = new RegExp("^" + CONTROL + "$");
+    var META = "|&;()<> \\t";
+    var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
+    var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
+    var hash = /^#$/;
+    var SQ = "'";
+    var DQ = '"';
+    var DS = "$";
+    var TOKEN = "";
+    var mult = 4294967296;
+    for (i = 0; i < 4; i++) {
+      TOKEN += (mult * Math.random()).toString(16);
+    }
+    var i;
+    var startsWithToken = new RegExp("^" + TOKEN);
+    function matchAll(s, r) {
+      var origIndex = r.lastIndex;
+      var matches = [];
+      var matchObj;
+      while (matchObj = r.exec(s)) {
+        matches.push(matchObj);
+        if (r.lastIndex === matchObj.index) {
+          r.lastIndex += 1;
+        }
+      }
+      r.lastIndex = origIndex;
+      return matches;
+    }
+    function getVar(env, pre, key) {
+      var r = typeof env === "function" ? env(key) : env[key];
+      if (typeof r === "undefined" && key != "") {
+        r = "";
+      } else if (typeof r === "undefined") {
+        r = "$";
+      }
+      if (typeof r === "object") {
+        return pre + TOKEN + JSON.stringify(r) + TOKEN;
+      }
+      return pre + r;
+    }
+    function parseInternal(string2, env, opts) {
+      if (!opts) {
+        opts = {};
+      }
+      var BS = opts.escape || "\\";
+      var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+";
+      var chunker = new RegExp([
+        "(" + CONTROL + ")",
+        // control chars
+        "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"
+      ].join("|"), "g");
+      var matches = matchAll(string2, chunker);
+      if (matches.length === 0) {
+        return [];
+      }
+      if (!env) {
+        env = {};
+      }
+      var commented = false;
+      return matches.map(function(match) {
+        var s = match[0];
+        if (!s || commented) {
+          return void 0;
+        }
+        if (controlRE.test(s)) {
+          return { op: s };
+        }
+        var quote = false;
+        var esc = false;
+        var out = "";
+        var isGlob = false;
+        var i2;
+        function parseEnvVar() {
+          i2 += 1;
+          var varend;
+          var varname;
+          var char = s.charAt(i2);
+          if (char === "{") {
+            i2 += 1;
+            if (s.charAt(i2) === "}") {
+              throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1));
+            }
+            varend = s.indexOf("}", i2);
+            if (varend < 0) {
+              throw new Error("Bad substitution: " + s.slice(i2));
+            }
+            varname = s.slice(i2, varend);
+            i2 = varend;
+          } else if (/[*@#?$!_-]/.test(char)) {
+            varname = char;
+            i2 += 1;
+          } else {
+            var slicedFromI = s.slice(i2);
+            varend = slicedFromI.match(/[^\w\d_]/);
+            if (!varend) {
+              varname = slicedFromI;
+              i2 = s.length;
+            } else {
+              varname = slicedFromI.slice(0, varend.index);
+              i2 += varend.index - 1;
+            }
+          }
+          return getVar(env, "", varname);
+        }
+        for (i2 = 0; i2 < s.length; i2++) {
+          var c = s.charAt(i2);
+          isGlob = isGlob || !quote && (c === "*" || c === "?");
+          if (esc) {
+            out += c;
+            esc = false;
+          } else if (quote) {
+            if (c === quote) {
+              quote = false;
+            } else if (quote == SQ) {
+              out += c;
+            } else {
+              if (c === BS) {
+                i2 += 1;
+                c = s.charAt(i2);
+                if (c === DQ || c === BS || c === DS) {
+                  out += c;
+                } else {
+                  out += BS + c;
+                }
+              } else if (c === DS) {
+                out += parseEnvVar();
+              } else {
+                out += c;
+              }
+            }
+          } else if (c === DQ || c === SQ) {
+            quote = c;
+          } else if (controlRE.test(c)) {
+            return { op: s };
+          } else if (hash.test(c)) {
+            commented = true;
+            var commentObj = { comment: string2.slice(match.index + i2 + 1) };
+            if (out.length) {
+              return [out, commentObj];
+            }
+            return [commentObj];
+          } else if (c === BS) {
+            esc = true;
+          } else if (c === DS) {
+            out += parseEnvVar();
+          } else {
+            out += c;
+          }
+        }
+        if (isGlob) {
+          return { op: "glob", pattern: out };
+        }
+        return out;
+      }).reduce(function(prev, arg) {
+        return typeof arg === "undefined" ? prev : prev.concat(arg);
+      }, []);
+    }
+    module.exports = function parse(s, env, opts) {
+      var mapped = parseInternal(s, env, opts);
+      if (typeof env !== "function") {
+        return mapped;
+      }
+      return mapped.reduce(function(acc, s2) {
+        if (typeof s2 === "object") {
+          return acc.concat(s2);
+        }
+        var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
+        if (xs.length === 1) {
+          return acc.concat(xs[0]);
+        }
+        return acc.concat(xs.filter(Boolean).map(function(x) {
+          if (startsWithToken.test(x)) {
+            return JSON.parse(x.split(TOKEN)[1]);
+          }
+          return x;
+        }));
+      }, []);
+    };
+  }
+});
+
+// node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js
+var require_shell_quote = __commonJS({
+  "node_modules/.pnpm/shell-quote@1.8.1/node_modules/shell-quote/index.js"(exports) {
+    "use strict";
+    exports.quote = require_quote();
+    exports.parse = require_parse();
+  }
+});
+
+// src/brocli-error.ts
+var BroCliError = class extends Error {
+  constructor(message, event) {
+    const errPrefix = "BroCli error: ";
+    super(message === void 0 ? message : `${errPrefix}${message}`);
+    this.event = event;
+  }
+};
+
+// src/command-core.ts
+var import_clone = __toESM(require_clone(), 1);
+
+// src/event-handler.ts
+var getOptionTypeText = (option) => {
+  let result = "";
+  switch (option.type) {
+    case "boolean":
+      result = "";
+      break;
+    case "number": {
+      if ((option.minVal ?? option.maxVal) !== void 0) {
+        let text = "";
+        if (option.isInt) text = text + `integer `;
+        if (option.minVal !== void 0) text = text + `[${option.minVal};`;
+        else text = text + `(\u221E;`;
+        if (option.maxVal !== void 0) text = text + `${option.maxVal}]`;
+        else text = text + `\u221E)`;
+        result = text;
+        break;
+      }
+      if (option.isInt) {
+        result = "integer";
+        break;
+      }
+      result = "number";
+      break;
+    }
+    case "string": {
+      if (option.enumVals) {
+        result = "[ " + option.enumVals.join(" | ") + " ]";
+        break;
+      }
+      result = "string";
+      break;
+    }
+    case "positional": {
+      result = `${option.isRequired ? "<" : "["}${option.enumVals ? option.enumVals.join("|") : option.name}${option.isRequired ? ">" : "]"}`;
+      break;
+    }
+  }
+  if (option.isRequired && option.type !== "positional") result = "!" + result.length ? " " : "" + result;
+  return result;
+};
+var defaultEventHandler = async (event) => {
+  switch (event.type) {
+    case "command_help": {
+      const command3 = event.command;
+      const commandName = getCommandNameWithParents(command3);
+      const cliName = event.name;
+      const desc = command3.desc ?? command3.shortDesc;
+      const subs = command3.subcommands?.filter((s) => !s.hidden);
+      const subcommands = subs && subs.length ? subs : void 0;
+      if (desc !== void 0) {
+        console.log(`
+${desc}`);
+      }
+      const opts = Object.values(command3.options ?? {}).filter(
+        (opt) => !opt.config.isHidden
+      );
+      const positionals = opts.filter((opt) => opt.config.type === "positional");
+      const options = opts.filter((opt) => opt.config.type !== "positional");
+      console.log("\nUsage:");
+      if (command3.handler) {
+        console.log(
+          `  ${cliName ? cliName + " " : ""}${commandName}${positionals.length ? " " + positionals.map(({ config: p }) => getOptionTypeText(p)).join(" ") : ""} [flags]`
+        );
+      } else console.log(`  ${cliName ? cliName + " " : ""}${commandName} [command]`);
+      if (command3.aliases) {
+        console.log(`
+Aliases:`);
+        console.log(`  ${[command3.name, ...command3.aliases].join(", ")}`);
+      }
+      if (subcommands) {
+        console.log("\nAvailable Commands:");
+        const padding = 3;
+        const maxLength = subcommands.reduce((p, e) => e.name.length > p ? e.name.length : p, 0);
+        const paddedLength = maxLength + padding;
+        const preDescPad = 2 + paddedLength;
+        const data = subcommands.map(
+          (s) => `  ${s.name.padEnd(paddedLength)}${(() => {
+            const description = s.shortDesc ?? s.desc;
+            if (!description?.length) return "";
+            const split = description.split("\n");
+            const first = split.shift();
+            const final = [first, ...split.map((s2) => "".padEnd(preDescPad) + s2)].join("\n");
+            return final;
+          })()}`
+        ).join("\n");
+        console.log(data);
+      }
+      if (options.length) {
+        const aliasLength = options.reduce((p, e) => {
+          const currentLength = e.config.aliases.reduce((pa, a) => pa + a.length, 0) + (e.config.aliases.length - 1) * 2 + 1;
+          return currentLength > p ? currentLength : p;
+        }, 0);
+        const paddedAliasLength = aliasLength > 0 ? aliasLength + 1 : 0;
+        const nameLength = options.reduce((p, e) => {
+          const typeLen = getOptionTypeText(e.config).length;
+          const length = typeLen > 0 ? e.config.name.length + 1 + typeLen : e.config.name.length;
+          return length > p ? length : p;
+        }, 0) + 3;
+        const preDescPad = paddedAliasLength + nameLength + 2;
+        const data = options.map(
+          ({ config: opt }) => `  ${`${opt.aliases.length ? opt.aliases.join(", ") + "," : ""}`.padEnd(paddedAliasLength)}${`${opt.name}${(() => {
+            const typeText = getOptionTypeText(opt);
+            return typeText.length ? " " + typeText : "";
+          })()}`.padEnd(nameLength)}${(() => {
+            if (!opt.description?.length) {
+              return opt.default !== void 0 ? `default: ${JSON.stringify(opt.default)}` : "";
+            }
+            const split = opt.description.split("\n");
+            const first = split.shift();
+            const def = opt.default !== void 0 ? ` (default: ${JSON.stringify(opt.default)})` : "";
+            const final = [first, ...split.map((s) => "".padEnd(preDescPad) + s)].join("\n") + def;
+            return final;
+          })()}`
+        ).join("\n");
+        console.log("\nFlags:");
+        console.log(data);
+      }
+      console.log("\nGlobal flags:");
+      console.log(`  -h, --help      help for ${commandName}`);
+      console.log(`  -v, --version   version${cliName ? ` for ${cliName}` : ""}`);
+      if (subcommands) {
+        console.log(
+          `
+Use "${cliName ? cliName + " " : ""}${commandName} [command] --help" for more information about a command.
+`
+        );
+      }
+      return true;
+    }
+    case "global_help": {
+      const cliName = event.name;
+      const desc = event.description;
+      const commands = event.commands.filter((c) => !c.hidden);
+      if (desc !== void 0) {
+        console.log(`${desc}
+`);
+      }
+      console.log("Usage:");
+      console.log(`  ${cliName ? cliName + " " : ""}[command]`);
+      if (commands.length) {
+        console.log("\nAvailable Commands:");
+        const padding = 3;
+        const maxLength = commands.reduce((p, e) => e.name.length > p ? e.name.length : p, 0);
+        const paddedLength = maxLength + padding;
+        const data = commands.map(
+          (c) => `  ${c.name.padEnd(paddedLength)}${(() => {
+            const desc2 = c.shortDesc ?? c.desc;
+            if (!desc2?.length) return "";
+            const split = desc2.split("\n");
+            const first = split.shift();
+            const final = [first, ...split.map((s) => "".padEnd(paddedLength + 2) + s)].join("\n");
+            return final;
+          })()}`
+        ).join("\n");
+        console.log(data);
+      } else {
+        console.log("\nNo available commands.");
+      }
+      console.log("\nFlags:");
+      console.log(`  -h, --help      help${cliName ? ` for ${cliName}` : ""}`);
+      console.log(`  -v, --version   version${cliName ? ` for ${cliName}` : ""}`);
+      console.log("\n");
+      return true;
+    }
+    case "version": {
+      return true;
+    }
+    case "error": {
+      let msg;
+      switch (event.violation) {
+        case "above_max": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const max = option.maxVal;
+          msg = `Invalid value: number type argument '${matchedName}' expects maximal value of ${max} as an input, got: ${data}`;
+          break;
+        }
+        case "below_min": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const min = option.minVal;
+          msg = `Invalid value: number type argument '${matchedName}' expects minimal value of ${min} as an input, got: ${data}`;
+          break;
+        }
+        case "expected_int": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid value: number type argument '${matchedName}' expects an integer as an input, got: ${data}`;
+          break;
+        }
+        case "invalid_boolean_syntax": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid syntax: boolean type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value> | ${matchedName}.
+Allowed values: true, false, 0, 1`;
+          break;
+        }
+        case "invalid_string_syntax": {
+          const matchedName = event.offender.namePart;
+          msg = `Invalid syntax: string type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value>`;
+          break;
+        }
+        case "invalid_number_syntax": {
+          const matchedName = event.offender.namePart;
+          msg = `Invalid syntax: number type argument '${matchedName}' must have it's value passed in the following formats: ${matchedName}=<value> | ${matchedName} <value>`;
+          break;
+        }
+        case "invalid_number_value": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          msg = `Invalid value: number type argument '${matchedName}' expects a number as an input, got: ${data}`;
+          break;
+        }
+        case "enum_violation": {
+          const matchedName = event.offender.namePart;
+          const data = event.offender.dataPart;
+          const option = event.option;
+          const values = option.enumVals;
+          msg = option.type === "positional" ? `Invalid value: value for the positional argument '${option.name}' must be either one of the following: ${values.join(", ")}; Received: ${data}` : `Invalid value: value for the argument '${matchedName}' must be either one of the following: ${values.join(", ")}; Received: ${data}`;
+          break;
+        }
+        case "unknown_command_error": {
+          const msg2 = `Unknown command: '${event.offender}'.
+Type '--help' to get help on the cli.`;
+          console.error(msg2);
+          return true;
+        }
+        case "unknown_subcommand_error": {
+          const cName = getCommandNameWithParents(event.command);
+          const msg2 = `Unknown command: ${cName} ${event.offender}.
+Type '${cName} --help' to get the help on command.`;
+          console.error(msg2);
+          return true;
+        }
+        case "missing_args_error": {
+          const { missing: missingOpts, command: command3 } = event;
+          msg = `Command '${command3.name}' is missing following required options: ${missingOpts.map((opt) => {
+            const name = opt.shift();
+            const aliases = opt;
+            if (aliases.length) return `${name} [${aliases.join(", ")}]`;
+            return name;
+          }).join(", ")}`;
+          break;
+        }
+        case "unrecognized_args_error": {
+          const { command: command3, unrecognized } = event;
+          msg = `Unrecognized options for command '${command3.name}': ${unrecognized.join(", ")}`;
+          break;
+        }
+        case "unknown_error": {
+          const e = event.error;
+          console.error(typeof e === "object" && e !== null && "message" in e ? e.message : e);
+          return true;
+        }
+      }
+      console.error(msg);
+      return true;
+    }
+  }
+  return false;
+};
+var eventHandlerWrapper = (customEventHandler) => async (event) => await customEventHandler(event) ? true : await defaultEventHandler(event);
+
+// src/util.ts
+var import_shell_quote = __toESM(require_shell_quote(), 1);
+function isInt(value) {
+  return value === Math.floor(value);
+}
+var shellArgs = (str) => (0, import_shell_quote.parse)(str).map((e) => e.toString());
+var executeOrLog = async (target) => typeof target === "string" ? console.log(target) : target ? await target() : void 0;
+
+// src/command-core.ts
+var generatePrefix = (name) => name.startsWith("-") ? name : name.length > 1 ? `--${name}` : `-${name}`;
+var validateOptions = (config) => {
+  const cloned = (0, import_clone.default)(config);
+  const entries = [];
+  const storedNames = [];
+  const cfgEntries = Object.entries(cloned);
+  for (const [key, value] of cfgEntries) {
+    const cfg = value._.config;
+    if (cfg.name === void 0) cfg.name = key;
+    if (cfg.type === "positional") continue;
+    if (cfg.name.includes("=")) {
+      throw new BroCliError(
+        `Can't define option '${generatePrefix(cfg.name)}' - option names and aliases cannot contain '='!`
+      );
+    }
+    for (const alias of cfg.aliases) {
+      if (alias.includes("=")) {
+        throw new BroCliError(
+          `Can't define option '${generatePrefix(cfg.name)}' - option names and aliases cannot contain '='!`
+        );
+      }
+    }
+    cfg.name = generatePrefix(cfg.name);
+    cfg.aliases = cfg.aliases.map((a) => generatePrefix(a));
+  }
+  for (const [key, value] of cfgEntries) {
+    const cfg = value._.config;
+    if (cfg.type === "positional") {
+      entries.push([key, { config: cfg, $output: void 0 }]);
+      continue;
+    }
+    const reservedNames = ["--help", "-h", "--version", "-v"];
+    const allNames = [cfg.name, ...cfg.aliases];
+    for (const name of allNames) {
+      const match = reservedNames.find((n) => n === name);
+      if (match) throw new BroCliError(`Can't define option '${cfg.name}' - name '${match}' is reserved!`);
+    }
+    for (const storage of storedNames) {
+      const nameOccupier = storage.find((e) => e === cfg.name);
+      if (!nameOccupier) continue;
+      throw new BroCliError(
+        `Can't define option '${cfg.name}' - name is already in use by option '${storage[0]}'!`
+      );
+    }
+    for (const alias of cfg.aliases) {
+      for (const storage of storedNames) {
+        const nameOccupier = storage.find((e) => e === alias);
+        if (!nameOccupier) continue;
+        throw new BroCliError(
+          `Can't define option '${cfg.name}' - alias '${alias}' is already in use by option '${storage[0]}'!`
+        );
+      }
+    }
+    const currentNames = [cfg.name, ...cfg.aliases];
+    storedNames.push(currentNames);
+    currentNames.forEach((name, idx) => {
+      if (currentNames.findIndex((e) => e === name) === idx) return;
+      throw new BroCliError(
+        `Can't define option '${cfg.name}' - duplicate alias '${name}'!`
+      );
+    });
+    entries.push([key, { config: cfg, $output: void 0 }]);
+  }
+  return Object.fromEntries(entries);
+};
+var assignParent = (parent, subcommands) => subcommands.forEach((e) => {
+  e.parent = parent;
+  if (e.subcommands) assignParent(e, e.subcommands);
+});
+var command2 = (command3) => {
+  const allNames = command3.aliases ? [command3.name, ...command3.aliases] : [command3.name];
+  const cmd = (0, import_clone.default)(command3);
+  if (command3.subcommands && command3.options && Object.values(command3.options).find((opt) => opt._.config.type === "positional")) {
+    throw new BroCliError(
+      `Can't define command '${cmd.name}' - command can't have subcommands and positional args at the same time!`
+    );
+  }
+  if (!command3.handler && !command3.subcommands) {
+    throw new BroCliError(
+      `Can't define command '${cmd.name}' - command without subcommands must have a handler present!`
+    );
+  }
+  const processedOptions = command3.options ? validateOptions(command3.options) : void 0;
+  cmd.options = processedOptions;
+  cmd.name = cmd.name ?? cmd.aliases?.shift();
+  if (!cmd.name) throw new BroCliError(`Can't define command without name!`);
+  cmd.aliases = cmd.aliases?.length ? cmd.aliases : void 0;
+  if (cmd.name.startsWith("-")) {
+    throw new BroCliError(`Can't define command '${cmd.name}' - command name can't start with '-'!`);
+  }
+  cmd.aliases?.forEach((a) => {
+    if (a.startsWith("-")) {
+      throw new BroCliError(`Can't define command '${cmd.name}' - command aliases can't start with '-'!`);
+    }
+  });
+  allNames.forEach((n, i) => {
+    if (n === "help") {
+      throw new BroCliError(
+        `Can't define command '${cmd.name}' - 'help' is a reserved name. If you want to redefine help message - do so in runCli's config.`
+      );
+    }
+    const lCaseName = n?.toLowerCase();
+    if (lCaseName === "0" || lCaseName === "1" || lCaseName === "true" || lCaseName === "false") {
+      throw new BroCliError(
+        `Can't define command '${cmd.name}' - '${n}' is a reserved for boolean values name!`
+      );
+    }
+    const idx = allNames.findIndex((an) => an === n);
+    if (idx !== i) throw new BroCliError(`Can't define command '${cmd.name}' - duplicate alias '${n}'!`);
+  });
+  if (cmd.subcommands) {
+    assignParent(cmd, cmd.subcommands);
+  }
+  return cmd;
+};
+var getCommandInner = (commands, candidates, args, cliName, cliDescription) => {
+  const { data: arg, originalIndex: index } = candidates.shift();
+  const command3 = commands.find((c) => {
+    const names = c.aliases ? [c.name, ...c.aliases] : [c.name];
+    const res = names.find((name) => name === arg);
+    return res;
+  });
+  if (!command3) {
+    return {
+      command: command3,
+      args
+    };
+  }
+  const newArgs = removeByIndex(args, index);
+  if (!candidates.length || !command3.subcommands) {
+    return {
+      command: command3,
+      args: newArgs
+    };
+  }
+  const newCandidates = candidates.map((c) => ({ data: c.data, originalIndex: c.originalIndex - 1 }));
+  const subcommand = getCommandInner(command3.subcommands, newCandidates, newArgs, cliName, cliDescription);
+  if (!subcommand.command) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unknown_subcommand_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      offender: candidates[0].data
+    });
+  }
+  return subcommand;
+};
+var getCommand = (commands, args, cliName, cliDescription) => {
+  const candidates = [];
+  for (let i = 0; i < args.length; ++i) {
+    const arg = args[i];
+    if (arg === "--help" || arg === "-h" || arg === "--version" || arg === "-v") {
+      const lCaseNext = args[i + 1]?.toLowerCase();
+      if (lCaseNext === "0" || lCaseNext === "1" || lCaseNext === "true" || lCaseNext === "false") ++i;
+      continue;
+    }
+    if (arg?.startsWith("-")) {
+      if (!arg.includes("=")) ++i;
+      continue;
+    }
+    candidates.push({
+      data: arg,
+      originalIndex: i
+    });
+  }
+  if (!candidates.length) {
+    return {
+      command: void 0,
+      args
+    };
+  }
+  const firstCandidate = candidates[0];
+  if (firstCandidate.data === "help") {
+    return {
+      command: "help",
+      args: removeByIndex(args, firstCandidate.originalIndex)
+    };
+  }
+  const { command: command3, args: argsRes } = getCommandInner(commands, candidates, args, cliName, cliDescription);
+  if (!command3) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unknown_command_error",
+      commands,
+      name: cliName,
+      description: cliDescription,
+      offender: firstCandidate.data
+    });
+  }
+  return {
+    command: command3,
+    args: argsRes
+  };
+};
+var parseArg = (command3, options, positionals, arg, nextArg, cliName, cliDescription) => {
+  let data = void 0;
+  const argSplit = arg.split("=");
+  const hasEq = arg.includes("=");
+  const namePart = argSplit.shift();
+  const dataPart = hasEq ? argSplit.join("=") : nextArg;
+  let skipNext = !hasEq;
+  if (namePart === "--help" || namePart === "-h") {
+    return {
+      isHelp: true
+    };
+  }
+  if (namePart === "--version" || namePart === "-v") {
+    return {
+      isVersion: true
+    };
+  }
+  if (!arg.startsWith("-")) {
+    if (!positionals.length) return {};
+    const pos = positionals.shift();
+    if (pos[1].enumVals && !pos[1].enumVals.find((val) => val === arg)) {
+      throw new BroCliError(void 0, {
+        type: "error",
+        name: cliName,
+        description: cliDescription,
+        violation: "enum_violation",
+        command: command3,
+        option: pos[1],
+        offender: {
+          dataPart: arg
+        }
+      });
+    }
+    data = arg;
+    return {
+      data,
+      skipNext: false,
+      name: pos[0],
+      option: pos[1]
+    };
+  }
+  const option = options.find(([optKey, opt]) => {
+    const names = [opt.name, ...opt.aliases];
+    if (opt.type === "boolean") {
+      const match = names.find((name) => name === namePart);
+      if (!match) return false;
+      let lcaseData = dataPart?.toLowerCase();
+      if (!hasEq && nextArg?.startsWith("-")) {
+        data = true;
+        skipNext = false;
+        return true;
+      }
+      if (lcaseData === void 0 || lcaseData === "" || lcaseData === "true" || lcaseData === "1") {
+        data = true;
+        return true;
+      }
+      if (lcaseData === "false" || lcaseData === "0") {
+        data = false;
+        return true;
+      }
+      if (!hasEq) {
+        data = true;
+        skipNext = false;
+        return true;
+      }
+      throw new BroCliError(void 0, {
+        type: "error",
+        name: cliName,
+        description: cliDescription,
+        violation: "invalid_boolean_syntax",
+        option: opt,
+        command: command3,
+        offender: {
+          namePart,
+          dataPart
+        }
+      });
+    } else {
+      const match = names.find((name) => name === namePart);
+      if (!match) return false;
+      if (opt.type === "string") {
+        if (!hasEq && nextArg === void 0) {
+          throw new BroCliError(void 0, {
+            type: "error",
+            name: cliName,
+            description: cliDescription,
+            violation: "invalid_string_syntax",
+            option: opt,
+            command: command3,
+            offender: {
+              namePart,
+              dataPart
+            }
+          });
+        }
+        if (opt.enumVals && !opt.enumVals.find((val) => val === dataPart)) {
+          throw new BroCliError(void 0, {
+            type: "error",
+            name: cliName,
+            description: cliDescription,
+            violation: "enum_violation",
+            option: opt,
+            command: command3,
+            offender: {
+              namePart,
+              dataPart
+            }
+          });
+        }
+        data = dataPart;
+        return true;
+      }
+      if (!hasEq && nextArg === void 0) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "invalid_number_syntax",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      const numData = Number(dataPart);
+      if (isNaN(numData)) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "invalid_number_value",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.isInt && !isInt(numData)) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "expected_int",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.minVal !== void 0 && numData < opt.minVal) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "below_min",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      if (opt.maxVal !== void 0 && numData > opt.maxVal) {
+        throw new BroCliError(void 0, {
+          type: "error",
+          name: cliName,
+          description: cliDescription,
+          violation: "above_max",
+          option: opt,
+          command: command3,
+          offender: {
+            namePart,
+            dataPart
+          }
+        });
+      }
+      data = numData;
+      return true;
+    }
+  });
+  return {
+    data,
+    skipNext,
+    name: option?.[0],
+    option: option?.[1]
+  };
+};
+var parseOptions = (command3, args, cliName, cliDescription, omitKeysOfUndefinedOptions) => {
+  const options = command3.options;
+  const optEntries = Object.entries(options ?? {}).map(
+    (opt) => [opt[0], opt[1].config]
+  );
+  const nonPositionalEntries = optEntries.filter(([key, opt]) => opt.type !== "positional");
+  const positionalEntries = optEntries.filter(([key, opt]) => opt.type === "positional");
+  const result = {};
+  const missingRequiredArr = [];
+  const unrecognizedArgsArr = [];
+  for (let i = 0; i < args.length; ++i) {
+    const arg = args[i];
+    const nextArg = args[i + 1];
+    const {
+      data,
+      name,
+      option,
+      skipNext,
+      isHelp,
+      isVersion
+    } = parseArg(command3, nonPositionalEntries, positionalEntries, arg, nextArg, cliName, cliDescription);
+    if (!option) unrecognizedArgsArr.push(arg.split("=")[0]);
+    if (skipNext) ++i;
+    if (isHelp) return "help";
+    if (isVersion) return "version";
+    result[name] = data;
+  }
+  for (const [optKey, option] of optEntries) {
+    const data = result[optKey] ?? option.default;
+    if (!omitKeysOfUndefinedOptions) {
+      result[optKey] = data;
+    } else {
+      if (data !== void 0) result[optKey] = data;
+    }
+    if (option.isRequired && result[optKey] === void 0) missingRequiredArr.push([option.name, ...option.aliases]);
+  }
+  if (missingRequiredArr.length) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "missing_args_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      missing: missingRequiredArr
+    });
+  }
+  if (unrecognizedArgsArr.length) {
+    throw new BroCliError(void 0, {
+      type: "error",
+      violation: "unrecognized_args_error",
+      name: cliName,
+      description: cliDescription,
+      command: command3,
+      unrecognized: unrecognizedArgsArr
+    });
+  }
+  return Object.keys(result).length ? result : void 0;
+};
+var getCommandNameWithParents = (command3) => command3.parent ? `${getCommandNameWithParents(command3.parent)} ${command3.name}` : command3.name;
+var validateCommands = (commands, parent) => {
+  const storedNames = {};
+  for (const cmd of commands) {
+    const storageVals = Object.values(storedNames);
+    for (const storage of storageVals) {
+      const nameOccupier = storage.find((e) => e === cmd.name);
+      if (!nameOccupier) continue;
+      throw new BroCliError(
+        `Can't define command '${getCommandNameWithParents(cmd)}': name is already in use by command '${parent ? `${getCommandNameWithParents(parent)} ` : ""}${storage[0]}'!`
+      );
+    }
+    if (cmd.aliases) {
+      for (const alias of cmd.aliases) {
+        for (const storage of storageVals) {
+          const nameOccupier = storage.find((e) => e === alias);
+          if (!nameOccupier) continue;
+          throw new BroCliError(
+            `Can't define command '${getCommandNameWithParents(cmd)}': alias '${alias}' is already in use by command '${parent ? `${getCommandNameWithParents(parent)} ` : ""}${storage[0]}'!`
+          );
+        }
+      }
+    }
+    storedNames[cmd.name] = cmd.aliases ? [cmd.name, ...cmd.aliases] : [cmd.name];
+    if (cmd.subcommands) cmd.subcommands = validateCommands(cmd.subcommands, cmd);
+  }
+  return commands;
+};
+var removeByIndex = (arr, idx) => [...arr.slice(0, idx), ...arr.slice(idx + 1, arr.length)];
+var run = async (commands, config) => {
+  const eventHandler = config?.theme ? eventHandlerWrapper(config.theme) : defaultEventHandler;
+  const argSource = config?.argSource ?? process.argv;
+  const version = config?.version;
+  const help = config?.help;
+  const omitKeysOfUndefinedOptions = config?.omitKeysOfUndefinedOptions ?? false;
+  const cliName = config?.name;
+  const cliDescription = config?.description;
+  try {
+    const processedCmds = validateCommands(commands);
+    let args = argSource.slice(2, argSource.length);
+    if (!args.length) {
+      return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h");
+    if (helpIndex !== -1 && (helpIndex > 0 ? args[helpIndex - 1]?.startsWith("-") && !args[helpIndex - 1].includes("=") ? false : true : true)) {
+      const command4 = getCommand(processedCmds, args, cliName, cliDescription).command;
+      if (typeof command4 === "object") {
+        return command4.help !== void 0 ? await executeOrLog(command4.help) : await eventHandler({
+          type: "command_help",
+          description: cliDescription,
+          name: cliName,
+          command: command4
+        });
+      } else {
+        return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+          type: "global_help",
+          description: cliDescription,
+          name: cliName,
+          commands: processedCmds
+        });
+      }
+    }
+    const versionIndex = args.findIndex((arg) => arg === "--version" || arg === "-v");
+    if (versionIndex !== -1 && (versionIndex > 0 ? args[versionIndex - 1]?.startsWith("-") ? false : true : true)) {
+      return version !== void 0 ? await executeOrLog(version) : await eventHandler({
+        type: "version",
+        name: cliName,
+        description: cliDescription
+      });
+    }
+    const { command: command3, args: newArgs } = getCommand(processedCmds, args, cliName, cliDescription);
+    if (!command3) {
+      return help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    if (command3 === "help") {
+      let helpCommand;
+      let newestArgs = newArgs;
+      do {
+        const res = getCommand(processedCmds, newestArgs, cliName, cliDescription);
+        helpCommand = res.command;
+        newestArgs = res.args;
+      } while (helpCommand === "help");
+      return helpCommand ? helpCommand.help !== void 0 ? await executeOrLog(helpCommand.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: helpCommand
+      }) : help !== void 0 ? await executeOrLog(help) : await eventHandler({
+        type: "global_help",
+        description: cliDescription,
+        name: cliName,
+        commands: processedCmds
+      });
+    }
+    const optionResult = parseOptions(command3, newArgs, cliName, cliDescription, omitKeysOfUndefinedOptions);
+    if (optionResult === "help") {
+      return command3.help !== void 0 ? await executeOrLog(command3.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: command3
+      });
+    }
+    if (optionResult === "version") {
+      return version !== void 0 ? await executeOrLog(version) : await eventHandler({
+        type: "version",
+        name: cliName,
+        description: cliDescription
+      });
+    }
+    if (command3.handler) {
+      if (config?.hook) await config.hook("before", command3);
+      await command3.handler(command3.transform ? await command3.transform(optionResult) : optionResult);
+      if (config?.hook) await config.hook("after", command3);
+      return;
+    } else {
+      return command3.help !== void 0 ? await executeOrLog(command3.help) : await eventHandler({
+        type: "command_help",
+        description: cliDescription,
+        name: cliName,
+        command: command3
+      });
+    }
+  } catch (e) {
+    if (e instanceof BroCliError) {
+      if (e.event) await eventHandler(e.event);
+      else {
+        if (!config?.noExit) console.error(e.message);
+        else return e.message;
+      }
+    } else {
+      await eventHandler({
+        type: "error",
+        violation: "unknown_error",
+        name: cliName,
+        description: cliDescription,
+        error: e
+      });
+    }
+    if (!config?.noExit) process.exit(1);
+    return;
+  }
+};
+var handler = (options, handler2) => handler2;
+var test = async (command3, args) => {
+  try {
+    const cliParsedArgs = shellArgs(args);
+    const options = parseOptions(command3, cliParsedArgs, void 0, void 0);
+    if (options === "help" || options === "version") {
+      return {
+        type: options
+      };
+    }
+    return {
+      options: command3.transform ? await command3.transform(options) : options,
+      type: "handler"
+    };
+  } catch (e) {
+    return {
+      type: "error",
+      error: e
+    };
+  }
+};
+var commandsInfo = (commands) => {
+  const validated = validateCommands(commands);
+  return Object.fromEntries(validated.map((c) => [c.name, {
+    name: c.name,
+    aliases: (0, import_clone.default)(c.aliases),
+    desc: c.desc,
+    shortDesc: c.shortDesc,
+    isHidden: c.hidden,
+    options: c.options ? Object.fromEntries(Object.entries(c.options).map(([key, opt]) => [key, (0, import_clone.default)(opt.config)])) : void 0,
+    metadata: (0, import_clone.default)(c.metadata),
+    subcommands: c.subcommands ? commandsInfo(c.subcommands) : void 0
+  }]));
+};
+
+// src/option-builder.ts
+var OptionBuilderBase = class _OptionBuilderBase {
+  _;
+  config = () => this._.config;
+  constructor(config) {
+    this._ = {
+      config: config ?? {
+        aliases: [],
+        type: "string"
+      },
+      $output: void 0
+    };
+  }
+  string(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "string", name });
+  }
+  number(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "number", name });
+  }
+  boolean(name) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "boolean", name });
+  }
+  positional(displayName) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, type: "positional", name: displayName });
+  }
+  alias(...aliases) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, aliases });
+  }
+  desc(description) {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, description });
+  }
+  hidden() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isHidden: true });
+  }
+  required() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isRequired: true });
+  }
+  default(value) {
+    const config = this.config();
+    const enums = config.enumVals;
+    if (enums && !enums.find((v) => value === v)) {
+      throw new Error(
+        `Option enums [ ${enums.join(", ")} ] are incompatible with default value ${value}`
+      );
+    }
+    return new _OptionBuilderBase({ ...config, default: value });
+  }
+  enum(...values) {
+    const config = this.config();
+    const defaultVal = config.default;
+    if (defaultVal !== void 0 && !values.find((v) => defaultVal === v)) {
+      throw new Error(
+        `Option enums [ ${values.join(", ")} ] are incompatible with default value ${defaultVal}`
+      );
+    }
+    return new _OptionBuilderBase({ ...config, enumVals: values });
+  }
+  min(value) {
+    const config = this.config();
+    const maxVal = config.maxVal;
+    if (maxVal !== void 0 && maxVal < value) {
+      throw new BroCliError("Unable to define option's min value to be higher than max value!");
+    }
+    return new _OptionBuilderBase({ ...config, minVal: value });
+  }
+  max(value) {
+    const config = this.config();
+    const minVal = config.minVal;
+    if (minVal !== void 0 && minVal > value) {
+      throw new BroCliError("Unable to define option's max value to be lower than min value!");
+    }
+    return new _OptionBuilderBase({ ...config, maxVal: value });
+  }
+  int() {
+    const config = this.config();
+    return new _OptionBuilderBase({ ...config, isInt: true });
+  }
+};
+function string(name) {
+  return typeof name === "string" ? new OptionBuilderBase().string(name) : new OptionBuilderBase().string();
+}
+function number(name) {
+  return typeof name === "string" ? new OptionBuilderBase().number(name) : new OptionBuilderBase().number();
+}
+function boolean(name) {
+  return typeof name === "string" ? new OptionBuilderBase().boolean(name) : new OptionBuilderBase().boolean();
+}
+function positional(displayName) {
+  return typeof displayName === "string" ? new OptionBuilderBase().positional(displayName) : new OptionBuilderBase().positional();
+}
+export {
+  BroCliError,
+  boolean,
+  command2 as command,
+  commandsInfo,
+  getCommandNameWithParents,
+  handler,
+  number,
+  positional,
+  run,
+  string,
+  test
+};
+//# sourceMappingURL=index.js.map

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
node_modules/@drizzle-team/brocli/index.js.map


+ 59 - 0
node_modules/@drizzle-team/brocli/package.json

@@ -0,0 +1,59 @@
+{
+	"name": "@drizzle-team/brocli",
+	"type": "module",
+	"author": "Drizzle Team",
+	"version": "0.10.2",
+	"description": "Modern type-safe way of building CLIs",
+	"license": "Apache-2.0",
+	"sideEffects": false,
+	"publishConfig": {
+		"provenance": true
+	},
+	"repository": {
+		"type": "git",
+		"url": "git+https://github.com/drizzle-team/brocli.git"
+	},
+	"homepage": "https://github.com/drizzle-team/brocli",
+	"scripts": {
+		"build": "pnpm tsx scripts/build.ts",
+		"b": "pnpm build",
+		"pack": "(cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
+		"publish": "npm publish package.tgz",
+		"test": "vitest run && npx tsc --noEmit",
+		"mtest": "npx tsx tests/manual.ts",
+		"lint": "dprint check --list-different"
+	},
+	"devDependencies": {
+		"@arethetypeswrong/cli": "^0.15.3",
+		"@originjs/vite-plugin-commonjs": "^1.0.3",
+		"@types/clone": "^2.1.4",
+		"@types/node": "^20.12.13",
+		"@types/shell-quote": "^1.7.5",
+		"clone": "^2.1.2",
+		"dprint": "^0.46.2",
+		"shell-quote": "^1.8.1",
+		"tsup": "^8.1.0",
+		"tsx": "^4.7.0",
+		"typescript": "latest",
+		"vite-tsconfig-paths": "^4.3.2",
+		"vitest": "^1.6.0",
+		"zx": "^8.1.2"
+	},
+	"main": "./index.cjs",
+	"module": "./index.js",
+	"types": "./index.d.ts",
+	"exports": {
+		".": {
+			"import": {
+				"types": "./index.d.ts",
+				"default": "./index.js"
+			},
+			"require": {
+				"types": "./index.d.cjs",
+				"default": "./index.cjs"
+			},
+			"types": "./index.d.ts",
+			"default": "./index.js"
+		}
+	}
+}

+ 21 - 0
node_modules/@esbuild-kit/core-utils/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 11 - 0
node_modules/@esbuild-kit/core-utils/README.md

@@ -0,0 +1,11 @@
+# @esbuild-kit/core-utils
+
+Core utility functions used by [@esbuild-kit/cjs-loader](https://github.com/esbuild-kit/cjs-loader) and [@esbuild-kit/esm-loader](https://github.com/esbuild-kit/esm-loader).
+
+## Library
+
+### esbuild
+Transform defaults, caching, and source-map handling.
+
+### Source map support
+Uses [native source-map](https://nodejs.org/api/process.html#processsetsourcemapsenabledval) if available, fallsback to [source-map-support](https://www.npmjs.com/package/source-map-support).

+ 32 - 0
node_modules/@esbuild-kit/core-utils/dist/index.d.ts

@@ -0,0 +1,32 @@
+import { MessagePort } from 'node:worker_threads';
+import { UrlAndMap } from 'source-map-support';
+import { TransformOptions } from 'esbuild';
+
+type Transformed = {
+    code: string;
+    map: RawSourceMap;
+    warnings?: unknown[];
+};
+
+type RawSourceMap = UrlAndMap['map'];
+declare function installSourceMapSupport(
+/**
+ * To support Node v20 where loaders are executed in its own thread
+ * https://nodejs.org/docs/latest-v20.x/api/esm.html#globalpreload
+ */
+loaderPort?: MessagePort): ({ code, map }: Transformed, filePath: string, mainThreadPort?: MessagePort) => string;
+
+declare function transformDynamicImport(filePath: string, code: string): {
+    code: string;
+    map: any;
+} | undefined;
+
+declare function transformSync(code: string, filePath: string, extendOptions?: TransformOptions): Transformed;
+declare function transform(code: string, filePath: string, extendOptions?: TransformOptions): Promise<Transformed>;
+
+declare const resolveTsPath: (filePath: string) => string | undefined;
+
+type Version = [number, number, number];
+declare const compareNodeVersion: (version: Version) => number;
+
+export { RawSourceMap, compareNodeVersion, installSourceMapSupport, resolveTsPath, transform, transformDynamicImport, transformSync };

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 0
node_modules/@esbuild-kit/core-utils/dist/index.js


+ 16 - 0
node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../esbuild/bin/esbuild" "$@"
+else 
+  exec node  "$basedir/../esbuild/bin/esbuild" "$@"
+fi

+ 17 - 0
node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\esbuild\bin\esbuild" %*

+ 28 - 0
node_modules/@esbuild-kit/core-utils/node_modules/.bin/esbuild.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  } else {
+    & "node$exe"  "$basedir/../esbuild/bin/esbuild" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 3 - 0
node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/README.md

@@ -0,0 +1,3 @@
+# esbuild
+
+This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.

BIN
node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/esbuild.exe


+ 17 - 0
node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64/package.json

@@ -0,0 +1,17 @@
+{
+  "name": "@esbuild/win32-x64",
+  "version": "0.18.20",
+  "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
+  "repository": "https://github.com/evanw/esbuild",
+  "license": "MIT",
+  "preferUnplugged": true,
+  "engines": {
+    "node": ">=12"
+  },
+  "os": [
+    "win32"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 21 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/LICENSE.md

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Evan Wallace
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 3 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/README.md

@@ -0,0 +1,3 @@
+# esbuild
+
+This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details.

+ 221 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/bin/esbuild

@@ -0,0 +1,221 @@
+#!/usr/bin/env node
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+
+// lib/npm/node-platform.ts
+var fs = require("fs");
+var os = require("os");
+var path = require("path");
+var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
+var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
+var packageDarwin_arm64 = "@esbuild/darwin-arm64";
+var packageDarwin_x64 = "@esbuild/darwin-x64";
+var knownWindowsPackages = {
+  "win32 arm64 LE": "@esbuild/win32-arm64",
+  "win32 ia32 LE": "@esbuild/win32-ia32",
+  "win32 x64 LE": "@esbuild/win32-x64"
+};
+var knownUnixlikePackages = {
+  "android arm64 LE": "@esbuild/android-arm64",
+  "darwin arm64 LE": "@esbuild/darwin-arm64",
+  "darwin x64 LE": "@esbuild/darwin-x64",
+  "freebsd arm64 LE": "@esbuild/freebsd-arm64",
+  "freebsd x64 LE": "@esbuild/freebsd-x64",
+  "linux arm LE": "@esbuild/linux-arm",
+  "linux arm64 LE": "@esbuild/linux-arm64",
+  "linux ia32 LE": "@esbuild/linux-ia32",
+  "linux mips64el LE": "@esbuild/linux-mips64el",
+  "linux ppc64 LE": "@esbuild/linux-ppc64",
+  "linux riscv64 LE": "@esbuild/linux-riscv64",
+  "linux s390x BE": "@esbuild/linux-s390x",
+  "linux x64 LE": "@esbuild/linux-x64",
+  "linux loong64 LE": "@esbuild/linux-loong64",
+  "netbsd x64 LE": "@esbuild/netbsd-x64",
+  "openbsd x64 LE": "@esbuild/openbsd-x64",
+  "sunos x64 LE": "@esbuild/sunos-x64"
+};
+var knownWebAssemblyFallbackPackages = {
+  "android arm LE": "@esbuild/android-arm",
+  "android x64 LE": "@esbuild/android-x64"
+};
+function pkgAndSubpathForCurrentPlatform() {
+  let pkg;
+  let subpath;
+  let isWASM2 = false;
+  let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
+  if (platformKey in knownWindowsPackages) {
+    pkg = knownWindowsPackages[platformKey];
+    subpath = "esbuild.exe";
+  } else if (platformKey in knownUnixlikePackages) {
+    pkg = knownUnixlikePackages[platformKey];
+    subpath = "bin/esbuild";
+  } else if (platformKey in knownWebAssemblyFallbackPackages) {
+    pkg = knownWebAssemblyFallbackPackages[platformKey];
+    subpath = "bin/esbuild";
+    isWASM2 = true;
+  } else {
+    throw new Error(`Unsupported platform: ${platformKey}`);
+  }
+  return { pkg, subpath, isWASM: isWASM2 };
+}
+function pkgForSomeOtherPlatform() {
+  const libMainJS = require.resolve("esbuild");
+  const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS)));
+  if (path.basename(nodeModulesDirectory) === "node_modules") {
+    for (const unixKey in knownUnixlikePackages) {
+      try {
+        const pkg = knownUnixlikePackages[unixKey];
+        if (fs.existsSync(path.join(nodeModulesDirectory, pkg)))
+          return pkg;
+      } catch {
+      }
+    }
+    for (const windowsKey in knownWindowsPackages) {
+      try {
+        const pkg = knownWindowsPackages[windowsKey];
+        if (fs.existsSync(path.join(nodeModulesDirectory, pkg)))
+          return pkg;
+      } catch {
+      }
+    }
+  }
+  return null;
+}
+function downloadedBinPath(pkg, subpath) {
+  const esbuildLibDir = path.dirname(require.resolve("esbuild"));
+  return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
+}
+function generateBinPath() {
+  if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
+    if (!fs.existsSync(ESBUILD_BINARY_PATH)) {
+      console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
+    } else {
+      return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
+    }
+  }
+  const { pkg, subpath, isWASM: isWASM2 } = pkgAndSubpathForCurrentPlatform();
+  let binPath2;
+  try {
+    binPath2 = require.resolve(`${pkg}/${subpath}`);
+  } catch (e) {
+    binPath2 = downloadedBinPath(pkg, subpath);
+    if (!fs.existsSync(binPath2)) {
+      try {
+        require.resolve(pkg);
+      } catch {
+        const otherPkg = pkgForSomeOtherPlatform();
+        if (otherPkg) {
+          let suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild on Windows or macOS and copying "node_modules"
+into a Docker image that runs Linux, or by copying "node_modules" between
+Windows and WSL environments.
+
+If you are installing with npm, you can try not copying the "node_modules"
+directory when you copy the files over, and running "npm ci" or "npm install"
+on the destination platform after the copy. Or you could consider using yarn
+instead of npm which has built-in support for installing a package on multiple
+platforms simultaneously.
+
+If you are installing with yarn, you can try listing both this platform and the
+other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
+feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+          if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
+            suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild with npm running inside of Rosetta 2 and then
+trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
+2 is Apple's on-the-fly x86_64-to-arm64 translation service).
+
+If you are installing with npm, you can try ensuring that both npm and node are
+not running under Rosetta 2 and then reinstalling esbuild. This likely involves
+changing how you installed npm and/or node. For example, installing node with
+the universal installer here should work: https://nodejs.org/en/download/. Or
+you could consider using yarn instead of npm which has built-in support for
+installing a package on multiple platforms simultaneously.
+
+If you are installing with yarn, you can try listing both "arm64" and "x64"
+in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
+https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+          }
+          throw new Error(`
+You installed esbuild for another platform than the one you're currently using.
+This won't work because esbuild is written with native code and needs to
+install a platform-specific binary executable.
+${suggestions}
+Another alternative is to use the "esbuild-wasm" package instead, which works
+the same way on all platforms. But it comes with a heavy performance cost and
+can sometimes be 10x slower than the "esbuild" package, so you may also not
+want to do that.
+`);
+        }
+        throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
+
+If you are installing esbuild with npm, make sure that you don't specify the
+"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
+of "package.json" is used by esbuild to install the correct binary executable
+for your current platform.`);
+      }
+      throw e;
+    }
+  }
+  if (/\.zip\//.test(binPath2)) {
+    let pnpapi;
+    try {
+      pnpapi = require("pnpapi");
+    } catch (e) {
+    }
+    if (pnpapi) {
+      const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
+      const binTargetPath = path.join(
+        root,
+        "node_modules",
+        ".cache",
+        "esbuild",
+        `pnpapi-${pkg.replace("/", "-")}-${"0.18.20"}-${path.basename(subpath)}`
+      );
+      if (!fs.existsSync(binTargetPath)) {
+        fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
+        fs.copyFileSync(binPath2, binTargetPath);
+        fs.chmodSync(binTargetPath, 493);
+      }
+      return { binPath: binTargetPath, isWASM: isWASM2 };
+    }
+  }
+  return { binPath: binPath2, isWASM: isWASM2 };
+}
+
+// lib/npm/node-shim.ts
+var { binPath, isWASM } = generateBinPath();
+if (isWASM) {
+  require("child_process").execFileSync("node", [binPath].concat(process.argv.slice(2)), { stdio: "inherit" });
+} else {
+  require("child_process").execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
+}

+ 287 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/install.js

@@ -0,0 +1,287 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+
+// lib/npm/node-platform.ts
+var fs = require("fs");
+var os = require("os");
+var path = require("path");
+var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
+var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
+var knownWindowsPackages = {
+  "win32 arm64 LE": "@esbuild/win32-arm64",
+  "win32 ia32 LE": "@esbuild/win32-ia32",
+  "win32 x64 LE": "@esbuild/win32-x64"
+};
+var knownUnixlikePackages = {
+  "android arm64 LE": "@esbuild/android-arm64",
+  "darwin arm64 LE": "@esbuild/darwin-arm64",
+  "darwin x64 LE": "@esbuild/darwin-x64",
+  "freebsd arm64 LE": "@esbuild/freebsd-arm64",
+  "freebsd x64 LE": "@esbuild/freebsd-x64",
+  "linux arm LE": "@esbuild/linux-arm",
+  "linux arm64 LE": "@esbuild/linux-arm64",
+  "linux ia32 LE": "@esbuild/linux-ia32",
+  "linux mips64el LE": "@esbuild/linux-mips64el",
+  "linux ppc64 LE": "@esbuild/linux-ppc64",
+  "linux riscv64 LE": "@esbuild/linux-riscv64",
+  "linux s390x BE": "@esbuild/linux-s390x",
+  "linux x64 LE": "@esbuild/linux-x64",
+  "linux loong64 LE": "@esbuild/linux-loong64",
+  "netbsd x64 LE": "@esbuild/netbsd-x64",
+  "openbsd x64 LE": "@esbuild/openbsd-x64",
+  "sunos x64 LE": "@esbuild/sunos-x64"
+};
+var knownWebAssemblyFallbackPackages = {
+  "android arm LE": "@esbuild/android-arm",
+  "android x64 LE": "@esbuild/android-x64"
+};
+function pkgAndSubpathForCurrentPlatform() {
+  let pkg;
+  let subpath;
+  let isWASM = false;
+  let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
+  if (platformKey in knownWindowsPackages) {
+    pkg = knownWindowsPackages[platformKey];
+    subpath = "esbuild.exe";
+  } else if (platformKey in knownUnixlikePackages) {
+    pkg = knownUnixlikePackages[platformKey];
+    subpath = "bin/esbuild";
+  } else if (platformKey in knownWebAssemblyFallbackPackages) {
+    pkg = knownWebAssemblyFallbackPackages[platformKey];
+    subpath = "bin/esbuild";
+    isWASM = true;
+  } else {
+    throw new Error(`Unsupported platform: ${platformKey}`);
+  }
+  return { pkg, subpath, isWASM };
+}
+function downloadedBinPath(pkg, subpath) {
+  const esbuildLibDir = path.dirname(require.resolve("esbuild"));
+  return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
+}
+
+// lib/npm/node-install.ts
+var fs2 = require("fs");
+var os2 = require("os");
+var path2 = require("path");
+var zlib = require("zlib");
+var https = require("https");
+var child_process = require("child_process");
+var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
+var toPath = path2.join(__dirname, "bin", "esbuild");
+var isToPathJS = true;
+function validateBinaryVersion(...command) {
+  command.push("--version");
+  let stdout;
+  try {
+    stdout = child_process.execFileSync(command.shift(), command, {
+      // Without this, this install script strangely crashes with the error
+      // "EACCES: permission denied, write" but only on Ubuntu Linux when node is
+      // installed from the Snap Store. This is not a problem when you download
+      // the official version of node. The problem appears to be that stderr
+      // (i.e. file descriptor 2) isn't writable?
+      //
+      // More info:
+      // - https://snapcraft.io/ (what the Snap Store is)
+      // - https://nodejs.org/dist/ (download the official version of node)
+      // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
+      //
+      stdio: "pipe"
+    }).toString().trim();
+  } catch (err) {
+    if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
+      let os3 = "this version of macOS";
+      try {
+        os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
+      } catch {
+      }
+      throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
+
+The Go compiler (which esbuild relies on) no longer supports ${os3},
+which means the "esbuild" binary executable can't be run. You can either:
+
+  * Update your version of macOS to one that the Go compiler supports
+  * Use the "esbuild-wasm" package instead of the "esbuild" package
+  * Build esbuild yourself using an older version of the Go compiler
+`);
+    }
+    throw err;
+  }
+  if (stdout !== versionFromPackageJSON) {
+    throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
+  }
+}
+function isYarn() {
+  const { npm_config_user_agent } = process.env;
+  if (npm_config_user_agent) {
+    return /\byarn\//.test(npm_config_user_agent);
+  }
+  return false;
+}
+function fetch(url) {
+  return new Promise((resolve, reject) => {
+    https.get(url, (res) => {
+      if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location)
+        return fetch(res.headers.location).then(resolve, reject);
+      if (res.statusCode !== 200)
+        return reject(new Error(`Server responded with ${res.statusCode}`));
+      let chunks = [];
+      res.on("data", (chunk) => chunks.push(chunk));
+      res.on("end", () => resolve(Buffer.concat(chunks)));
+    }).on("error", reject);
+  });
+}
+function extractFileFromTarGzip(buffer, subpath) {
+  try {
+    buffer = zlib.unzipSync(buffer);
+  } catch (err) {
+    throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`);
+  }
+  let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, "");
+  let offset = 0;
+  subpath = `package/${subpath}`;
+  while (offset < buffer.length) {
+    let name = str(offset, 100);
+    let size = parseInt(str(offset + 124, 12), 8);
+    offset += 512;
+    if (!isNaN(size)) {
+      if (name === subpath)
+        return buffer.subarray(offset, offset + size);
+      offset += size + 511 & ~511;
+    }
+  }
+  throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
+}
+function installUsingNPM(pkg, subpath, binPath) {
+  const env = { ...process.env, npm_config_global: void 0 };
+  const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
+  const installDir = path2.join(esbuildLibDir, "npm-install");
+  fs2.mkdirSync(installDir);
+  try {
+    fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
+    child_process.execSync(
+      `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
+      { cwd: installDir, stdio: "pipe", env }
+    );
+    const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
+    fs2.renameSync(installedBinPath, binPath);
+  } finally {
+    try {
+      removeRecursive(installDir);
+    } catch {
+    }
+  }
+}
+function removeRecursive(dir) {
+  for (const entry of fs2.readdirSync(dir)) {
+    const entryPath = path2.join(dir, entry);
+    let stats;
+    try {
+      stats = fs2.lstatSync(entryPath);
+    } catch {
+      continue;
+    }
+    if (stats.isDirectory())
+      removeRecursive(entryPath);
+    else
+      fs2.unlinkSync(entryPath);
+  }
+  fs2.rmdirSync(dir);
+}
+function applyManualBinaryPathOverride(overridePath) {
+  const pathString = JSON.stringify(overridePath);
+  fs2.writeFileSync(toPath, `#!/usr/bin/env node
+require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' });
+`);
+  const libMain = path2.join(__dirname, "lib", "main.js");
+  const code = fs2.readFileSync(libMain, "utf8");
+  fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
+${code}`);
+}
+function maybeOptimizePackage(binPath) {
+  if (os2.platform() !== "win32" && !isYarn()) {
+    const tempPath = path2.join(__dirname, "bin-esbuild");
+    try {
+      fs2.linkSync(binPath, tempPath);
+      fs2.renameSync(tempPath, toPath);
+      isToPathJS = false;
+      fs2.unlinkSync(tempPath);
+    } catch {
+    }
+  }
+}
+async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
+  const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
+  console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
+  try {
+    fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
+    fs2.chmodSync(binPath, 493);
+  } catch (e) {
+    console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
+    throw e;
+  }
+}
+async function checkAndPreparePackage() {
+  if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
+    if (!fs2.existsSync(ESBUILD_BINARY_PATH)) {
+      console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
+    } else {
+      applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
+      return;
+    }
+  }
+  const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
+  let binPath;
+  try {
+    binPath = require.resolve(`${pkg}/${subpath}`);
+  } catch (e) {
+    console.error(`[esbuild] Failed to find package "${pkg}" on the file system
+
+This can happen if you use the "--no-optional" flag. The "optionalDependencies"
+package.json feature is used by esbuild to install the correct binary executable
+for your current platform. This install script will now attempt to work around
+this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
+`);
+    binPath = downloadedBinPath(pkg, subpath);
+    try {
+      console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
+      installUsingNPM(pkg, subpath, binPath);
+    } catch (e2) {
+      console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`);
+      try {
+        await downloadDirectlyFromNPM(pkg, subpath, binPath);
+      } catch (e3) {
+        throw new Error(`Failed to install package "${pkg}"`);
+      }
+    }
+  }
+  maybeOptimizePackage(binPath);
+}
+checkAndPreparePackage().then(() => {
+  if (isToPathJS) {
+    validateBinaryVersion(process.execPath, toPath);
+  } else {
+    validateBinaryVersion(toPath);
+  }
+});

+ 660 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/lib/main.d.ts

@@ -0,0 +1,660 @@
+export type Platform = 'browser' | 'node' | 'neutral'
+export type Format = 'iife' | 'cjs' | 'esm'
+export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
+export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
+export type Charset = 'ascii' | 'utf8'
+export type Drop = 'console' | 'debugger'
+
+interface CommonOptions {
+  /** Documentation: https://esbuild.github.io/api/#sourcemap */
+  sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both'
+  /** Documentation: https://esbuild.github.io/api/#legal-comments */
+  legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'
+  /** Documentation: https://esbuild.github.io/api/#source-root */
+  sourceRoot?: string
+  /** Documentation: https://esbuild.github.io/api/#sources-content */
+  sourcesContent?: boolean
+
+  /** Documentation: https://esbuild.github.io/api/#format */
+  format?: Format
+  /** Documentation: https://esbuild.github.io/api/#global-name */
+  globalName?: string
+  /** Documentation: https://esbuild.github.io/api/#target */
+  target?: string | string[]
+  /** Documentation: https://esbuild.github.io/api/#supported */
+  supported?: Record<string, boolean>
+  /** Documentation: https://esbuild.github.io/api/#platform */
+  platform?: Platform
+
+  /** Documentation: https://esbuild.github.io/api/#mangle-props */
+  mangleProps?: RegExp
+  /** Documentation: https://esbuild.github.io/api/#mangle-props */
+  reserveProps?: RegExp
+  /** Documentation: https://esbuild.github.io/api/#mangle-props */
+  mangleQuoted?: boolean
+  /** Documentation: https://esbuild.github.io/api/#mangle-props */
+  mangleCache?: Record<string, string | false>
+  /** Documentation: https://esbuild.github.io/api/#drop */
+  drop?: Drop[]
+  /** Documentation: https://esbuild.github.io/api/#drop-labels */
+  dropLabels?: string[]
+  /** Documentation: https://esbuild.github.io/api/#minify */
+  minify?: boolean
+  /** Documentation: https://esbuild.github.io/api/#minify */
+  minifyWhitespace?: boolean
+  /** Documentation: https://esbuild.github.io/api/#minify */
+  minifyIdentifiers?: boolean
+  /** Documentation: https://esbuild.github.io/api/#minify */
+  minifySyntax?: boolean
+  /** Documentation: https://esbuild.github.io/api/#line-limit */
+  lineLimit?: number
+  /** Documentation: https://esbuild.github.io/api/#charset */
+  charset?: Charset
+  /** Documentation: https://esbuild.github.io/api/#tree-shaking */
+  treeShaking?: boolean
+  /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
+  ignoreAnnotations?: boolean
+
+  /** Documentation: https://esbuild.github.io/api/#jsx */
+  jsx?: 'transform' | 'preserve' | 'automatic'
+  /** Documentation: https://esbuild.github.io/api/#jsx-factory */
+  jsxFactory?: string
+  /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
+  jsxFragment?: string
+  /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
+  jsxImportSource?: string
+  /** Documentation: https://esbuild.github.io/api/#jsx-development */
+  jsxDev?: boolean
+  /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
+  jsxSideEffects?: boolean
+
+  /** Documentation: https://esbuild.github.io/api/#define */
+  define?: { [key: string]: string }
+  /** Documentation: https://esbuild.github.io/api/#pure */
+  pure?: string[]
+  /** Documentation: https://esbuild.github.io/api/#keep-names */
+  keepNames?: boolean
+
+  /** Documentation: https://esbuild.github.io/api/#color */
+  color?: boolean
+  /** Documentation: https://esbuild.github.io/api/#log-level */
+  logLevel?: LogLevel
+  /** Documentation: https://esbuild.github.io/api/#log-limit */
+  logLimit?: number
+  /** Documentation: https://esbuild.github.io/api/#log-override */
+  logOverride?: Record<string, LogLevel>
+
+  /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
+  tsconfigRaw?: string | TsconfigRaw
+}
+
+export interface TsconfigRaw {
+  compilerOptions?: {
+    alwaysStrict?: boolean
+    baseUrl?: boolean
+    experimentalDecorators?: boolean
+    importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
+    jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
+    jsxFactory?: string
+    jsxFragmentFactory?: string
+    jsxImportSource?: string
+    paths?: Record<string, string[]>
+    preserveValueImports?: boolean
+    strict?: boolean
+    target?: string
+    useDefineForClassFields?: boolean
+    verbatimModuleSyntax?: boolean
+  }
+}
+
+export interface BuildOptions extends CommonOptions {
+  /** Documentation: https://esbuild.github.io/api/#bundle */
+  bundle?: boolean
+  /** Documentation: https://esbuild.github.io/api/#splitting */
+  splitting?: boolean
+  /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
+  preserveSymlinks?: boolean
+  /** Documentation: https://esbuild.github.io/api/#outfile */
+  outfile?: string
+  /** Documentation: https://esbuild.github.io/api/#metafile */
+  metafile?: boolean
+  /** Documentation: https://esbuild.github.io/api/#outdir */
+  outdir?: string
+  /** Documentation: https://esbuild.github.io/api/#outbase */
+  outbase?: string
+  /** Documentation: https://esbuild.github.io/api/#external */
+  external?: string[]
+  /** Documentation: https://esbuild.github.io/api/#packages */
+  packages?: 'external'
+  /** Documentation: https://esbuild.github.io/api/#alias */
+  alias?: Record<string, string>
+  /** Documentation: https://esbuild.github.io/api/#loader */
+  loader?: { [ext: string]: Loader }
+  /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
+  resolveExtensions?: string[]
+  /** Documentation: https://esbuild.github.io/api/#main-fields */
+  mainFields?: string[]
+  /** Documentation: https://esbuild.github.io/api/#conditions */
+  conditions?: string[]
+  /** Documentation: https://esbuild.github.io/api/#write */
+  write?: boolean
+  /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
+  allowOverwrite?: boolean
+  /** Documentation: https://esbuild.github.io/api/#tsconfig */
+  tsconfig?: string
+  /** Documentation: https://esbuild.github.io/api/#out-extension */
+  outExtension?: { [ext: string]: string }
+  /** Documentation: https://esbuild.github.io/api/#public-path */
+  publicPath?: string
+  /** Documentation: https://esbuild.github.io/api/#entry-names */
+  entryNames?: string
+  /** Documentation: https://esbuild.github.io/api/#chunk-names */
+  chunkNames?: string
+  /** Documentation: https://esbuild.github.io/api/#asset-names */
+  assetNames?: string
+  /** Documentation: https://esbuild.github.io/api/#inject */
+  inject?: string[]
+  /** Documentation: https://esbuild.github.io/api/#banner */
+  banner?: { [type: string]: string }
+  /** Documentation: https://esbuild.github.io/api/#footer */
+  footer?: { [type: string]: string }
+  /** Documentation: https://esbuild.github.io/api/#entry-points */
+  entryPoints?: string[] | Record<string, string> | { in: string, out: string }[]
+  /** Documentation: https://esbuild.github.io/api/#stdin */
+  stdin?: StdinOptions
+  /** Documentation: https://esbuild.github.io/plugins/ */
+  plugins?: Plugin[]
+  /** Documentation: https://esbuild.github.io/api/#working-directory */
+  absWorkingDir?: string
+  /** Documentation: https://esbuild.github.io/api/#node-paths */
+  nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
+}
+
+export interface StdinOptions {
+  contents: string | Uint8Array
+  resolveDir?: string
+  sourcefile?: string
+  loader?: Loader
+}
+
+export interface Message {
+  id: string
+  pluginName: string
+  text: string
+  location: Location | null
+  notes: Note[]
+
+  /**
+   * Optional user-specified data that is passed through unmodified. You can
+   * use this to stash the original error, for example.
+   */
+  detail: any
+}
+
+export interface Note {
+  text: string
+  location: Location | null
+}
+
+export interface Location {
+  file: string
+  namespace: string
+  /** 1-based */
+  line: number
+  /** 0-based, in bytes */
+  column: number
+  /** in bytes */
+  length: number
+  lineText: string
+  suggestion: string
+}
+
+export interface OutputFile {
+  path: string
+  contents: Uint8Array
+  hash: string
+  /** "contents" as text (changes automatically with "contents") */
+  readonly text: string
+}
+
+export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
+  errors: Message[]
+  warnings: Message[]
+  /** Only when "write: false" */
+  outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
+  /** Only when "metafile: true" */
+  metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
+  /** Only when "mangleCache" is present */
+  mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
+}
+
+export interface BuildFailure extends Error {
+  errors: Message[]
+  warnings: Message[]
+}
+
+/** Documentation: https://esbuild.github.io/api/#serve-arguments */
+export interface ServeOptions {
+  port?: number
+  host?: string
+  servedir?: string
+  keyfile?: string
+  certfile?: string
+  fallback?: string
+  onRequest?: (args: ServeOnRequestArgs) => void
+}
+
+export interface ServeOnRequestArgs {
+  remoteAddress: string
+  method: string
+  path: string
+  status: number
+  /** The time to generate the response, not to send it */
+  timeInMS: number
+}
+
+/** Documentation: https://esbuild.github.io/api/#serve-return-values */
+export interface ServeResult {
+  port: number
+  host: string
+}
+
+export interface TransformOptions extends CommonOptions {
+  /** Documentation: https://esbuild.github.io/api/#sourcefile */
+  sourcefile?: string
+  /** Documentation: https://esbuild.github.io/api/#loader */
+  loader?: Loader
+  /** Documentation: https://esbuild.github.io/api/#banner */
+  banner?: string
+  /** Documentation: https://esbuild.github.io/api/#footer */
+  footer?: string
+}
+
+export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
+  code: string
+  map: string
+  warnings: Message[]
+  /** Only when "mangleCache" is present */
+  mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
+  /** Only when "legalComments" is "external" */
+  legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
+}
+
+export interface TransformFailure extends Error {
+  errors: Message[]
+  warnings: Message[]
+}
+
+export interface Plugin {
+  name: string
+  setup: (build: PluginBuild) => (void | Promise<void>)
+}
+
+export interface PluginBuild {
+  /** Documentation: https://esbuild.github.io/plugins/#build-options */
+  initialOptions: BuildOptions
+
+  /** Documentation: https://esbuild.github.io/plugins/#resolve */
+  resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>
+
+  /** Documentation: https://esbuild.github.io/plugins/#on-start */
+  onStart(callback: () =>
+    (OnStartResult | null | void | Promise<OnStartResult | null | void>)): void
+
+  /** Documentation: https://esbuild.github.io/plugins/#on-end */
+  onEnd(callback: (result: BuildResult) =>
+    (OnEndResult | null | void | Promise<OnEndResult | null | void>)): void
+
+  /** Documentation: https://esbuild.github.io/plugins/#on-resolve */
+  onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) =>
+    (OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void
+
+  /** Documentation: https://esbuild.github.io/plugins/#on-load */
+  onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) =>
+    (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void
+
+  /** Documentation: https://esbuild.github.io/plugins/#on-dispose */
+  onDispose(callback: () => void): void
+
+  // This is a full copy of the esbuild library in case you need it
+  esbuild: {
+    context: typeof context,
+    build: typeof build,
+    buildSync: typeof buildSync,
+    transform: typeof transform,
+    transformSync: typeof transformSync,
+    formatMessages: typeof formatMessages,
+    formatMessagesSync: typeof formatMessagesSync,
+    analyzeMetafile: typeof analyzeMetafile,
+    analyzeMetafileSync: typeof analyzeMetafileSync,
+    initialize: typeof initialize,
+    version: typeof version,
+  }
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#resolve-options */
+export interface ResolveOptions {
+  pluginName?: string
+  importer?: string
+  namespace?: string
+  resolveDir?: string
+  kind?: ImportKind
+  pluginData?: any
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#resolve-results */
+export interface ResolveResult {
+  errors: Message[]
+  warnings: Message[]
+
+  path: string
+  external: boolean
+  sideEffects: boolean
+  namespace: string
+  suffix: string
+  pluginData: any
+}
+
+export interface OnStartResult {
+  errors?: PartialMessage[]
+  warnings?: PartialMessage[]
+}
+
+export interface OnEndResult {
+  errors?: PartialMessage[]
+  warnings?: PartialMessage[]
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */
+export interface OnResolveOptions {
+  filter: RegExp
+  namespace?: string
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
+export interface OnResolveArgs {
+  path: string
+  importer: string
+  namespace: string
+  resolveDir: string
+  kind: ImportKind
+  pluginData: any
+}
+
+export type ImportKind =
+  | 'entry-point'
+
+  // JS
+  | 'import-statement'
+  | 'require-call'
+  | 'dynamic-import'
+  | 'require-resolve'
+
+  // CSS
+  | 'import-rule'
+  | 'composes-from'
+  | 'url-token'
+
+/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
+export interface OnResolveResult {
+  pluginName?: string
+
+  errors?: PartialMessage[]
+  warnings?: PartialMessage[]
+
+  path?: string
+  external?: boolean
+  sideEffects?: boolean
+  namespace?: string
+  suffix?: string
+  pluginData?: any
+
+  watchFiles?: string[]
+  watchDirs?: string[]
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#on-load-options */
+export interface OnLoadOptions {
+  filter: RegExp
+  namespace?: string
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
+export interface OnLoadArgs {
+  path: string
+  namespace: string
+  suffix: string
+  pluginData: any
+}
+
+/** Documentation: https://esbuild.github.io/plugins/#on-load-results */
+export interface OnLoadResult {
+  pluginName?: string
+
+  errors?: PartialMessage[]
+  warnings?: PartialMessage[]
+
+  contents?: string | Uint8Array
+  resolveDir?: string
+  loader?: Loader
+  pluginData?: any
+
+  watchFiles?: string[]
+  watchDirs?: string[]
+}
+
+export interface PartialMessage {
+  id?: string
+  pluginName?: string
+  text?: string
+  location?: Partial<Location> | null
+  notes?: PartialNote[]
+  detail?: any
+}
+
+export interface PartialNote {
+  text?: string
+  location?: Partial<Location> | null
+}
+
+/** Documentation: https://esbuild.github.io/api/#metafile */
+export interface Metafile {
+  inputs: {
+    [path: string]: {
+      bytes: number
+      imports: {
+        path: string
+        kind: ImportKind
+        external?: boolean
+        original?: string
+      }[]
+      format?: 'cjs' | 'esm'
+    }
+  }
+  outputs: {
+    [path: string]: {
+      bytes: number
+      inputs: {
+        [path: string]: {
+          bytesInOutput: number
+        }
+      }
+      imports: {
+        path: string
+        kind: ImportKind | 'file-loader'
+        external?: boolean
+      }[]
+      exports: string[]
+      entryPoint?: string
+      cssBundle?: string
+    }
+  }
+}
+
+export interface FormatMessagesOptions {
+  kind: 'error' | 'warning'
+  color?: boolean
+  terminalWidth?: number
+}
+
+export interface AnalyzeMetafileOptions {
+  color?: boolean
+  verbose?: boolean
+}
+
+export interface WatchOptions {
+}
+
+export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
+  /** Documentation: https://esbuild.github.io/api/#rebuild */
+  rebuild(): Promise<BuildResult<ProvidedOptions>>
+
+  /** Documentation: https://esbuild.github.io/api/#watch */
+  watch(options?: WatchOptions): Promise<void>
+
+  /** Documentation: https://esbuild.github.io/api/#serve */
+  serve(options?: ServeOptions): Promise<ServeResult>
+
+  cancel(): Promise<void>
+  dispose(): Promise<void>
+}
+
+// This is a TypeScript type-level function which replaces any keys in "In"
+// that aren't in "Out" with "never". We use this to reject properties with
+// typos in object literals. See: https://stackoverflow.com/questions/49580725
+type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never }
+
+/**
+ * This function invokes the "esbuild" command-line tool for you. It returns a
+ * promise that either resolves with a "BuildResult" object or rejects with a
+ * "BuildFailure" object.
+ *
+ * - Works in node: yes
+ * - Works in browser: yes
+ *
+ * Documentation: https://esbuild.github.io/api/#build
+ */
+export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>
+
+/**
+ * This is the advanced long-running form of "build" that supports additional
+ * features such as watch mode and a local development server.
+ *
+ * - Works in node: yes
+ * - Works in browser: no
+ *
+ * Documentation: https://esbuild.github.io/api/#build
+ */
+export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>
+
+/**
+ * This function transforms a single JavaScript file. It can be used to minify
+ * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
+ * to older JavaScript. It returns a promise that is either resolved with a
+ * "TransformResult" object or rejected with a "TransformFailure" object.
+ *
+ * - Works in node: yes
+ * - Works in browser: yes
+ *
+ * Documentation: https://esbuild.github.io/api/#transform
+ */
+export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>
+
+/**
+ * Converts log messages to formatted message strings suitable for printing in
+ * the terminal. This allows you to reuse the built-in behavior of esbuild's
+ * log message formatter. This is a batch-oriented API for efficiency.
+ *
+ * - Works in node: yes
+ * - Works in browser: yes
+ */
+export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>
+
+/**
+ * Pretty-prints an analysis of the metafile JSON to a string. This is just for
+ * convenience to be able to match esbuild's pretty-printing exactly. If you want
+ * to customize it, you can just inspect the data in the metafile yourself.
+ *
+ * - Works in node: yes
+ * - Works in browser: yes
+ *
+ * Documentation: https://esbuild.github.io/api/#analyze
+ */
+export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>
+
+/**
+ * A synchronous version of "build".
+ *
+ * - Works in node: yes
+ * - Works in browser: no
+ *
+ * Documentation: https://esbuild.github.io/api/#build
+ */
+export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>
+
+/**
+ * A synchronous version of "transform".
+ *
+ * - Works in node: yes
+ * - Works in browser: no
+ *
+ * Documentation: https://esbuild.github.io/api/#transform
+ */
+export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>
+
+/**
+ * A synchronous version of "formatMessages".
+ *
+ * - Works in node: yes
+ * - Works in browser: no
+ */
+export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]
+
+/**
+ * A synchronous version of "analyzeMetafile".
+ *
+ * - Works in node: yes
+ * - Works in browser: no
+ *
+ * Documentation: https://esbuild.github.io/api/#analyze
+ */
+export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string
+
+/**
+ * This configures the browser-based version of esbuild. It is necessary to
+ * call this first and wait for the returned promise to be resolved before
+ * making other API calls when using esbuild in the browser.
+ *
+ * - Works in node: yes
+ * - Works in browser: yes ("options" is required)
+ *
+ * Documentation: https://esbuild.github.io/api/#browser
+ */
+export declare function initialize(options: InitializeOptions): Promise<void>
+
+export interface InitializeOptions {
+  /**
+   * The URL of the "esbuild.wasm" file. This must be provided when running
+   * esbuild in the browser.
+   */
+  wasmURL?: string | URL
+
+  /**
+   * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
+   * is a typed array or ArrayBuffer containing the binary code of the
+   * "esbuild.wasm" file.
+   *
+   * You can use this as an alternative to "wasmURL" for environments where it's
+   * not possible to download the WebAssembly module.
+   */
+  wasmModule?: WebAssembly.Module
+
+  /**
+   * By default esbuild runs the WebAssembly-based browser API in a web worker
+   * to avoid blocking the UI thread. This can be disabled by setting "worker"
+   * to false.
+   */
+  worker?: boolean
+}
+
+export let version: string

+ 2393 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/lib/main.js

@@ -0,0 +1,2393 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// lib/npm/node.ts
+var node_exports = {};
+__export(node_exports, {
+  analyzeMetafile: () => analyzeMetafile,
+  analyzeMetafileSync: () => analyzeMetafileSync,
+  build: () => build,
+  buildSync: () => buildSync,
+  context: () => context,
+  default: () => node_default,
+  formatMessages: () => formatMessages,
+  formatMessagesSync: () => formatMessagesSync,
+  initialize: () => initialize,
+  transform: () => transform,
+  transformSync: () => transformSync,
+  version: () => version
+});
+module.exports = __toCommonJS(node_exports);
+
+// lib/shared/stdio_protocol.ts
+function encodePacket(packet) {
+  let visit = (value) => {
+    if (value === null) {
+      bb.write8(0);
+    } else if (typeof value === "boolean") {
+      bb.write8(1);
+      bb.write8(+value);
+    } else if (typeof value === "number") {
+      bb.write8(2);
+      bb.write32(value | 0);
+    } else if (typeof value === "string") {
+      bb.write8(3);
+      bb.write(encodeUTF8(value));
+    } else if (value instanceof Uint8Array) {
+      bb.write8(4);
+      bb.write(value);
+    } else if (value instanceof Array) {
+      bb.write8(5);
+      bb.write32(value.length);
+      for (let item of value) {
+        visit(item);
+      }
+    } else {
+      let keys = Object.keys(value);
+      bb.write8(6);
+      bb.write32(keys.length);
+      for (let key of keys) {
+        bb.write(encodeUTF8(key));
+        visit(value[key]);
+      }
+    }
+  };
+  let bb = new ByteBuffer();
+  bb.write32(0);
+  bb.write32(packet.id << 1 | +!packet.isRequest);
+  visit(packet.value);
+  writeUInt32LE(bb.buf, bb.len - 4, 0);
+  return bb.buf.subarray(0, bb.len);
+}
+function decodePacket(bytes) {
+  let visit = () => {
+    switch (bb.read8()) {
+      case 0:
+        return null;
+      case 1:
+        return !!bb.read8();
+      case 2:
+        return bb.read32();
+      case 3:
+        return decodeUTF8(bb.read());
+      case 4:
+        return bb.read();
+      case 5: {
+        let count = bb.read32();
+        let value2 = [];
+        for (let i = 0; i < count; i++) {
+          value2.push(visit());
+        }
+        return value2;
+      }
+      case 6: {
+        let count = bb.read32();
+        let value2 = {};
+        for (let i = 0; i < count; i++) {
+          value2[decodeUTF8(bb.read())] = visit();
+        }
+        return value2;
+      }
+      default:
+        throw new Error("Invalid packet");
+    }
+  };
+  let bb = new ByteBuffer(bytes);
+  let id = bb.read32();
+  let isRequest = (id & 1) === 0;
+  id >>>= 1;
+  let value = visit();
+  if (bb.ptr !== bytes.length) {
+    throw new Error("Invalid packet");
+  }
+  return { id, isRequest, value };
+}
+var ByteBuffer = class {
+  constructor(buf = new Uint8Array(1024)) {
+    this.buf = buf;
+    this.len = 0;
+    this.ptr = 0;
+  }
+  _write(delta) {
+    if (this.len + delta > this.buf.length) {
+      let clone = new Uint8Array((this.len + delta) * 2);
+      clone.set(this.buf);
+      this.buf = clone;
+    }
+    this.len += delta;
+    return this.len - delta;
+  }
+  write8(value) {
+    let offset = this._write(1);
+    this.buf[offset] = value;
+  }
+  write32(value) {
+    let offset = this._write(4);
+    writeUInt32LE(this.buf, value, offset);
+  }
+  write(bytes) {
+    let offset = this._write(4 + bytes.length);
+    writeUInt32LE(this.buf, bytes.length, offset);
+    this.buf.set(bytes, offset + 4);
+  }
+  _read(delta) {
+    if (this.ptr + delta > this.buf.length) {
+      throw new Error("Invalid packet");
+    }
+    this.ptr += delta;
+    return this.ptr - delta;
+  }
+  read8() {
+    return this.buf[this._read(1)];
+  }
+  read32() {
+    return readUInt32LE(this.buf, this._read(4));
+  }
+  read() {
+    let length = this.read32();
+    let bytes = new Uint8Array(length);
+    let ptr = this._read(bytes.length);
+    bytes.set(this.buf.subarray(ptr, ptr + length));
+    return bytes;
+  }
+};
+var encodeUTF8;
+var decodeUTF8;
+var encodeInvariant;
+if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
+  let encoder = new TextEncoder();
+  let decoder = new TextDecoder();
+  encodeUTF8 = (text) => encoder.encode(text);
+  decodeUTF8 = (bytes) => decoder.decode(bytes);
+  encodeInvariant = 'new TextEncoder().encode("")';
+} else if (typeof Buffer !== "undefined") {
+  encodeUTF8 = (text) => Buffer.from(text);
+  decodeUTF8 = (bytes) => {
+    let { buffer, byteOffset, byteLength } = bytes;
+    return Buffer.from(buffer, byteOffset, byteLength).toString();
+  };
+  encodeInvariant = 'Buffer.from("")';
+} else {
+  throw new Error("No UTF-8 codec found");
+}
+if (!(encodeUTF8("") instanceof Uint8Array))
+  throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false
+
+This indicates that your JavaScript environment is broken. You cannot use
+esbuild in this environment because esbuild relies on this invariant. This
+is not a problem with esbuild. You need to fix your environment instead.
+`);
+function readUInt32LE(buffer, offset) {
+  return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24;
+}
+function writeUInt32LE(buffer, value, offset) {
+  buffer[offset++] = value;
+  buffer[offset++] = value >> 8;
+  buffer[offset++] = value >> 16;
+  buffer[offset++] = value >> 24;
+}
+
+// lib/shared/common.ts
+var quote = JSON.stringify;
+var buildLogLevelDefault = "warning";
+var transformLogLevelDefault = "silent";
+function validateTarget(target) {
+  validateStringValue(target, "target");
+  if (target.indexOf(",") >= 0)
+    throw new Error(`Invalid target: ${target}`);
+  return target;
+}
+var canBeAnything = () => null;
+var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
+var mustBeString = (value) => typeof value === "string" ? null : "a string";
+var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
+var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
+var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
+var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
+var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
+var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
+var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
+var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
+var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
+var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
+var mustBeStringOrArray = (value) => typeof value === "string" || Array.isArray(value) ? null : "a string or an array";
+var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
+var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
+function getFlag(object, keys, key, mustBeFn) {
+  let value = object[key];
+  keys[key + ""] = true;
+  if (value === void 0)
+    return void 0;
+  let mustBe = mustBeFn(value);
+  if (mustBe !== null)
+    throw new Error(`${quote(key)} must be ${mustBe}`);
+  return value;
+}
+function checkForInvalidFlags(object, keys, where) {
+  for (let key in object) {
+    if (!(key in keys)) {
+      throw new Error(`Invalid option ${where}: ${quote(key)}`);
+    }
+  }
+}
+function validateInitializeOptions(options) {
+  let keys = /* @__PURE__ */ Object.create(null);
+  let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL);
+  let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule);
+  let worker = getFlag(options, keys, "worker", mustBeBoolean);
+  checkForInvalidFlags(options, keys, "in initialize() call");
+  return {
+    wasmURL,
+    wasmModule,
+    worker
+  };
+}
+function validateMangleCache(mangleCache) {
+  let validated;
+  if (mangleCache !== void 0) {
+    validated = /* @__PURE__ */ Object.create(null);
+    for (let key in mangleCache) {
+      let value = mangleCache[key];
+      if (typeof value === "string" || value === false) {
+        validated[key] = value;
+      } else {
+        throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`);
+      }
+    }
+  }
+  return validated;
+}
+function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) {
+  let color = getFlag(options, keys, "color", mustBeBoolean);
+  let logLevel = getFlag(options, keys, "logLevel", mustBeString);
+  let logLimit = getFlag(options, keys, "logLimit", mustBeInteger);
+  if (color !== void 0)
+    flags.push(`--color=${color}`);
+  else if (isTTY2)
+    flags.push(`--color=true`);
+  flags.push(`--log-level=${logLevel || logLevelDefault}`);
+  flags.push(`--log-limit=${logLimit || 0}`);
+}
+function validateStringValue(value, what, key) {
+  if (typeof value !== "string") {
+    throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`);
+  }
+  return value;
+}
+function pushCommonFlags(flags, options, keys) {
+  let legalComments = getFlag(options, keys, "legalComments", mustBeString);
+  let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString);
+  let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean);
+  let target = getFlag(options, keys, "target", mustBeStringOrArray);
+  let format = getFlag(options, keys, "format", mustBeString);
+  let globalName = getFlag(options, keys, "globalName", mustBeString);
+  let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
+  let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp);
+  let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean);
+  let minify = getFlag(options, keys, "minify", mustBeBoolean);
+  let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean);
+  let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
+  let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
+  let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
+  let drop = getFlag(options, keys, "drop", mustBeArray);
+  let dropLabels = getFlag(options, keys, "dropLabels", mustBeArray);
+  let charset = getFlag(options, keys, "charset", mustBeString);
+  let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
+  let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
+  let jsx = getFlag(options, keys, "jsx", mustBeString);
+  let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
+  let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
+  let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString);
+  let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean);
+  let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean);
+  let define = getFlag(options, keys, "define", mustBeObject);
+  let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
+  let supported = getFlag(options, keys, "supported", mustBeObject);
+  let pure = getFlag(options, keys, "pure", mustBeArray);
+  let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
+  let platform = getFlag(options, keys, "platform", mustBeString);
+  let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
+  if (legalComments)
+    flags.push(`--legal-comments=${legalComments}`);
+  if (sourceRoot !== void 0)
+    flags.push(`--source-root=${sourceRoot}`);
+  if (sourcesContent !== void 0)
+    flags.push(`--sources-content=${sourcesContent}`);
+  if (target) {
+    if (Array.isArray(target))
+      flags.push(`--target=${Array.from(target).map(validateTarget).join(",")}`);
+    else
+      flags.push(`--target=${validateTarget(target)}`);
+  }
+  if (format)
+    flags.push(`--format=${format}`);
+  if (globalName)
+    flags.push(`--global-name=${globalName}`);
+  if (platform)
+    flags.push(`--platform=${platform}`);
+  if (tsconfigRaw)
+    flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
+  if (minify)
+    flags.push("--minify");
+  if (minifySyntax)
+    flags.push("--minify-syntax");
+  if (minifyWhitespace)
+    flags.push("--minify-whitespace");
+  if (minifyIdentifiers)
+    flags.push("--minify-identifiers");
+  if (lineLimit)
+    flags.push(`--line-limit=${lineLimit}`);
+  if (charset)
+    flags.push(`--charset=${charset}`);
+  if (treeShaking !== void 0)
+    flags.push(`--tree-shaking=${treeShaking}`);
+  if (ignoreAnnotations)
+    flags.push(`--ignore-annotations`);
+  if (drop)
+    for (let what of drop)
+      flags.push(`--drop:${validateStringValue(what, "drop")}`);
+  if (dropLabels)
+    flags.push(`--drop-labels=${Array.from(dropLabels).map((what) => validateStringValue(what, "dropLabels")).join(",")}`);
+  if (mangleProps)
+    flags.push(`--mangle-props=${mangleProps.source}`);
+  if (reserveProps)
+    flags.push(`--reserve-props=${reserveProps.source}`);
+  if (mangleQuoted !== void 0)
+    flags.push(`--mangle-quoted=${mangleQuoted}`);
+  if (jsx)
+    flags.push(`--jsx=${jsx}`);
+  if (jsxFactory)
+    flags.push(`--jsx-factory=${jsxFactory}`);
+  if (jsxFragment)
+    flags.push(`--jsx-fragment=${jsxFragment}`);
+  if (jsxImportSource)
+    flags.push(`--jsx-import-source=${jsxImportSource}`);
+  if (jsxDev)
+    flags.push(`--jsx-dev`);
+  if (jsxSideEffects)
+    flags.push(`--jsx-side-effects`);
+  if (define) {
+    for (let key in define) {
+      if (key.indexOf("=") >= 0)
+        throw new Error(`Invalid define: ${key}`);
+      flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`);
+    }
+  }
+  if (logOverride) {
+    for (let key in logOverride) {
+      if (key.indexOf("=") >= 0)
+        throw new Error(`Invalid log override: ${key}`);
+      flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`);
+    }
+  }
+  if (supported) {
+    for (let key in supported) {
+      if (key.indexOf("=") >= 0)
+        throw new Error(`Invalid supported: ${key}`);
+      const value = supported[key];
+      if (typeof value !== "boolean")
+        throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`);
+      flags.push(`--supported:${key}=${value}`);
+    }
+  }
+  if (pure)
+    for (let fn of pure)
+      flags.push(`--pure:${validateStringValue(fn, "pure")}`);
+  if (keepNames)
+    flags.push(`--keep-names`);
+}
+function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) {
+  var _a2;
+  let flags = [];
+  let entries = [];
+  let keys = /* @__PURE__ */ Object.create(null);
+  let stdinContents = null;
+  let stdinResolveDir = null;
+  pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
+  pushCommonFlags(flags, options, keys);
+  let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
+  let bundle = getFlag(options, keys, "bundle", mustBeBoolean);
+  let splitting = getFlag(options, keys, "splitting", mustBeBoolean);
+  let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean);
+  let metafile = getFlag(options, keys, "metafile", mustBeBoolean);
+  let outfile = getFlag(options, keys, "outfile", mustBeString);
+  let outdir = getFlag(options, keys, "outdir", mustBeString);
+  let outbase = getFlag(options, keys, "outbase", mustBeString);
+  let tsconfig = getFlag(options, keys, "tsconfig", mustBeString);
+  let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArray);
+  let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArray);
+  let mainFields = getFlag(options, keys, "mainFields", mustBeArray);
+  let conditions = getFlag(options, keys, "conditions", mustBeArray);
+  let external = getFlag(options, keys, "external", mustBeArray);
+  let packages = getFlag(options, keys, "packages", mustBeString);
+  let alias = getFlag(options, keys, "alias", mustBeObject);
+  let loader = getFlag(options, keys, "loader", mustBeObject);
+  let outExtension = getFlag(options, keys, "outExtension", mustBeObject);
+  let publicPath = getFlag(options, keys, "publicPath", mustBeString);
+  let entryNames = getFlag(options, keys, "entryNames", mustBeString);
+  let chunkNames = getFlag(options, keys, "chunkNames", mustBeString);
+  let assetNames = getFlag(options, keys, "assetNames", mustBeString);
+  let inject = getFlag(options, keys, "inject", mustBeArray);
+  let banner = getFlag(options, keys, "banner", mustBeObject);
+  let footer = getFlag(options, keys, "footer", mustBeObject);
+  let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints);
+  let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString);
+  let stdin = getFlag(options, keys, "stdin", mustBeObject);
+  let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
+  let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean);
+  let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
+  keys.plugins = true;
+  checkForInvalidFlags(options, keys, `in ${callName}() call`);
+  if (sourcemap)
+    flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`);
+  if (bundle)
+    flags.push("--bundle");
+  if (allowOverwrite)
+    flags.push("--allow-overwrite");
+  if (splitting)
+    flags.push("--splitting");
+  if (preserveSymlinks)
+    flags.push("--preserve-symlinks");
+  if (metafile)
+    flags.push(`--metafile`);
+  if (outfile)
+    flags.push(`--outfile=${outfile}`);
+  if (outdir)
+    flags.push(`--outdir=${outdir}`);
+  if (outbase)
+    flags.push(`--outbase=${outbase}`);
+  if (tsconfig)
+    flags.push(`--tsconfig=${tsconfig}`);
+  if (packages)
+    flags.push(`--packages=${packages}`);
+  if (resolveExtensions) {
+    let values = [];
+    for (let value of resolveExtensions) {
+      validateStringValue(value, "resolve extension");
+      if (value.indexOf(",") >= 0)
+        throw new Error(`Invalid resolve extension: ${value}`);
+      values.push(value);
+    }
+    flags.push(`--resolve-extensions=${values.join(",")}`);
+  }
+  if (publicPath)
+    flags.push(`--public-path=${publicPath}`);
+  if (entryNames)
+    flags.push(`--entry-names=${entryNames}`);
+  if (chunkNames)
+    flags.push(`--chunk-names=${chunkNames}`);
+  if (assetNames)
+    flags.push(`--asset-names=${assetNames}`);
+  if (mainFields) {
+    let values = [];
+    for (let value of mainFields) {
+      validateStringValue(value, "main field");
+      if (value.indexOf(",") >= 0)
+        throw new Error(`Invalid main field: ${value}`);
+      values.push(value);
+    }
+    flags.push(`--main-fields=${values.join(",")}`);
+  }
+  if (conditions) {
+    let values = [];
+    for (let value of conditions) {
+      validateStringValue(value, "condition");
+      if (value.indexOf(",") >= 0)
+        throw new Error(`Invalid condition: ${value}`);
+      values.push(value);
+    }
+    flags.push(`--conditions=${values.join(",")}`);
+  }
+  if (external)
+    for (let name of external)
+      flags.push(`--external:${validateStringValue(name, "external")}`);
+  if (alias) {
+    for (let old in alias) {
+      if (old.indexOf("=") >= 0)
+        throw new Error(`Invalid package name in alias: ${old}`);
+      flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`);
+    }
+  }
+  if (banner) {
+    for (let type in banner) {
+      if (type.indexOf("=") >= 0)
+        throw new Error(`Invalid banner file type: ${type}`);
+      flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`);
+    }
+  }
+  if (footer) {
+    for (let type in footer) {
+      if (type.indexOf("=") >= 0)
+        throw new Error(`Invalid footer file type: ${type}`);
+      flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`);
+    }
+  }
+  if (inject)
+    for (let path3 of inject)
+      flags.push(`--inject:${validateStringValue(path3, "inject")}`);
+  if (loader) {
+    for (let ext in loader) {
+      if (ext.indexOf("=") >= 0)
+        throw new Error(`Invalid loader extension: ${ext}`);
+      flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`);
+    }
+  }
+  if (outExtension) {
+    for (let ext in outExtension) {
+      if (ext.indexOf("=") >= 0)
+        throw new Error(`Invalid out extension: ${ext}`);
+      flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`);
+    }
+  }
+  if (entryPoints) {
+    if (Array.isArray(entryPoints)) {
+      for (let i = 0, n = entryPoints.length; i < n; i++) {
+        let entryPoint = entryPoints[i];
+        if (typeof entryPoint === "object" && entryPoint !== null) {
+          let entryPointKeys = /* @__PURE__ */ Object.create(null);
+          let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
+          let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
+          checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i);
+          if (input === void 0)
+            throw new Error('Missing property "in" for entry point at index ' + i);
+          if (output === void 0)
+            throw new Error('Missing property "out" for entry point at index ' + i);
+          entries.push([output, input]);
+        } else {
+          entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]);
+        }
+      }
+    } else {
+      for (let key in entryPoints) {
+        entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]);
+      }
+    }
+  }
+  if (stdin) {
+    let stdinKeys = /* @__PURE__ */ Object.create(null);
+    let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array);
+    let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString);
+    let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString);
+    let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString);
+    checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object');
+    if (sourcefile)
+      flags.push(`--sourcefile=${sourcefile}`);
+    if (loader2)
+      flags.push(`--loader=${loader2}`);
+    if (resolveDir)
+      stdinResolveDir = resolveDir;
+    if (typeof contents === "string")
+      stdinContents = encodeUTF8(contents);
+    else if (contents instanceof Uint8Array)
+      stdinContents = contents;
+  }
+  let nodePaths = [];
+  if (nodePathsInput) {
+    for (let value of nodePathsInput) {
+      value += "";
+      nodePaths.push(value);
+    }
+  }
+  return {
+    entries,
+    flags,
+    write,
+    stdinContents,
+    stdinResolveDir,
+    absWorkingDir,
+    nodePaths,
+    mangleCache: validateMangleCache(mangleCache)
+  };
+}
+function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
+  let flags = [];
+  let keys = /* @__PURE__ */ Object.create(null);
+  pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
+  pushCommonFlags(flags, options, keys);
+  let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
+  let sourcefile = getFlag(options, keys, "sourcefile", mustBeString);
+  let loader = getFlag(options, keys, "loader", mustBeString);
+  let banner = getFlag(options, keys, "banner", mustBeString);
+  let footer = getFlag(options, keys, "footer", mustBeString);
+  let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
+  checkForInvalidFlags(options, keys, `in ${callName}() call`);
+  if (sourcemap)
+    flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
+  if (sourcefile)
+    flags.push(`--sourcefile=${sourcefile}`);
+  if (loader)
+    flags.push(`--loader=${loader}`);
+  if (banner)
+    flags.push(`--banner=${banner}`);
+  if (footer)
+    flags.push(`--footer=${footer}`);
+  return {
+    flags,
+    mangleCache: validateMangleCache(mangleCache)
+  };
+}
+function createChannel(streamIn) {
+  const requestCallbacksByKey = {};
+  const closeData = { didClose: false, reason: "" };
+  let responseCallbacks = {};
+  let nextRequestID = 0;
+  let nextBuildKey = 0;
+  let stdout = new Uint8Array(16 * 1024);
+  let stdoutUsed = 0;
+  let readFromStdout = (chunk) => {
+    let limit = stdoutUsed + chunk.length;
+    if (limit > stdout.length) {
+      let swap = new Uint8Array(limit * 2);
+      swap.set(stdout);
+      stdout = swap;
+    }
+    stdout.set(chunk, stdoutUsed);
+    stdoutUsed += chunk.length;
+    let offset = 0;
+    while (offset + 4 <= stdoutUsed) {
+      let length = readUInt32LE(stdout, offset);
+      if (offset + 4 + length > stdoutUsed) {
+        break;
+      }
+      offset += 4;
+      handleIncomingPacket(stdout.subarray(offset, offset + length));
+      offset += length;
+    }
+    if (offset > 0) {
+      stdout.copyWithin(0, offset, stdoutUsed);
+      stdoutUsed -= offset;
+    }
+  };
+  let afterClose = (error) => {
+    closeData.didClose = true;
+    if (error)
+      closeData.reason = ": " + (error.message || error);
+    const text = "The service was stopped" + closeData.reason;
+    for (let id in responseCallbacks) {
+      responseCallbacks[id](text, null);
+    }
+    responseCallbacks = {};
+  };
+  let sendRequest = (refs, value, callback) => {
+    if (closeData.didClose)
+      return callback("The service is no longer running" + closeData.reason, null);
+    let id = nextRequestID++;
+    responseCallbacks[id] = (error, response) => {
+      try {
+        callback(error, response);
+      } finally {
+        if (refs)
+          refs.unref();
+      }
+    };
+    if (refs)
+      refs.ref();
+    streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
+  };
+  let sendResponse = (id, value) => {
+    if (closeData.didClose)
+      throw new Error("The service is no longer running" + closeData.reason);
+    streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
+  };
+  let handleRequest = async (id, request) => {
+    try {
+      if (request.command === "ping") {
+        sendResponse(id, {});
+        return;
+      }
+      if (typeof request.key === "number") {
+        const requestCallbacks = requestCallbacksByKey[request.key];
+        if (requestCallbacks) {
+          const callback = requestCallbacks[request.command];
+          if (callback) {
+            await callback(id, request);
+            return;
+          }
+        }
+      }
+      throw new Error(`Invalid command: ` + request.command);
+    } catch (e) {
+      const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")];
+      try {
+        sendResponse(id, { errors });
+      } catch {
+      }
+    }
+  };
+  let isFirstPacket = true;
+  let handleIncomingPacket = (bytes) => {
+    if (isFirstPacket) {
+      isFirstPacket = false;
+      let binaryVersion = String.fromCharCode(...bytes);
+      if (binaryVersion !== "0.18.20") {
+        throw new Error(`Cannot start service: Host version "${"0.18.20"}" does not match binary version ${quote(binaryVersion)}`);
+      }
+      return;
+    }
+    let packet = decodePacket(bytes);
+    if (packet.isRequest) {
+      handleRequest(packet.id, packet.value);
+    } else {
+      let callback = responseCallbacks[packet.id];
+      delete responseCallbacks[packet.id];
+      if (packet.value.error)
+        callback(packet.value.error, {});
+      else
+        callback(null, packet.value);
+    }
+  };
+  let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
+    let refCount = 0;
+    const buildKey = nextBuildKey++;
+    const requestCallbacks = {};
+    const buildRefs = {
+      ref() {
+        if (++refCount === 1) {
+          if (refs)
+            refs.ref();
+        }
+      },
+      unref() {
+        if (--refCount === 0) {
+          delete requestCallbacksByKey[buildKey];
+          if (refs)
+            refs.unref();
+        }
+      }
+    };
+    requestCallbacksByKey[buildKey] = requestCallbacks;
+    buildRefs.ref();
+    buildOrContextImpl(
+      callName,
+      buildKey,
+      sendRequest,
+      sendResponse,
+      buildRefs,
+      streamIn,
+      requestCallbacks,
+      options,
+      isTTY2,
+      defaultWD2,
+      (err, res) => {
+        try {
+          callback(err, res);
+        } finally {
+          buildRefs.unref();
+        }
+      }
+    );
+  };
+  let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => {
+    const details = createObjectStash();
+    let start = (inputPath) => {
+      try {
+        if (typeof input !== "string" && !(input instanceof Uint8Array))
+          throw new Error('The input to "transform" must be a string or a Uint8Array');
+        let {
+          flags,
+          mangleCache
+        } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault);
+        let request = {
+          command: "transform",
+          flags,
+          inputFS: inputPath !== null,
+          input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
+        };
+        if (mangleCache)
+          request.mangleCache = mangleCache;
+        sendRequest(refs, request, (error, response) => {
+          if (error)
+            return callback(new Error(error), null);
+          let errors = replaceDetailsInMessages(response.errors, details);
+          let warnings = replaceDetailsInMessages(response.warnings, details);
+          let outstanding = 1;
+          let next = () => {
+            if (--outstanding === 0) {
+              let result = {
+                warnings,
+                code: response.code,
+                map: response.map,
+                mangleCache: void 0,
+                legalComments: void 0
+              };
+              if ("legalComments" in response)
+                result.legalComments = response == null ? void 0 : response.legalComments;
+              if (response.mangleCache)
+                result.mangleCache = response == null ? void 0 : response.mangleCache;
+              callback(null, result);
+            }
+          };
+          if (errors.length > 0)
+            return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
+          if (response.codeFS) {
+            outstanding++;
+            fs3.readFile(response.code, (err, contents) => {
+              if (err !== null) {
+                callback(err, null);
+              } else {
+                response.code = contents;
+                next();
+              }
+            });
+          }
+          if (response.mapFS) {
+            outstanding++;
+            fs3.readFile(response.map, (err, contents) => {
+              if (err !== null) {
+                callback(err, null);
+              } else {
+                response.map = contents;
+                next();
+              }
+            });
+          }
+          next();
+        });
+      } catch (e) {
+        let flags = [];
+        try {
+          pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault);
+        } catch {
+        }
+        const error = extractErrorMessageV8(e, streamIn, details, void 0, "");
+        sendRequest(refs, { command: "error", flags, error }, () => {
+          error.detail = details.load(error.detail);
+          callback(failureErrorWithLog("Transform failed", [error], []), null);
+        });
+      }
+    };
+    if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
+      let next = start;
+      start = () => fs3.writeFile(input, next);
+    }
+    start(null);
+  };
+  let formatMessages2 = ({ callName, refs, messages, options, callback }) => {
+    let result = sanitizeMessages(messages, "messages", null, "");
+    if (!options)
+      throw new Error(`Missing second argument in ${callName}() call`);
+    let keys = {};
+    let kind = getFlag(options, keys, "kind", mustBeString);
+    let color = getFlag(options, keys, "color", mustBeBoolean);
+    let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger);
+    checkForInvalidFlags(options, keys, `in ${callName}() call`);
+    if (kind === void 0)
+      throw new Error(`Missing "kind" in ${callName}() call`);
+    if (kind !== "error" && kind !== "warning")
+      throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
+    let request = {
+      command: "format-msgs",
+      messages: result,
+      isWarning: kind === "warning"
+    };
+    if (color !== void 0)
+      request.color = color;
+    if (terminalWidth !== void 0)
+      request.terminalWidth = terminalWidth;
+    sendRequest(refs, request, (error, response) => {
+      if (error)
+        return callback(new Error(error), null);
+      callback(null, response.messages);
+    });
+  };
+  let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => {
+    if (options === void 0)
+      options = {};
+    let keys = {};
+    let color = getFlag(options, keys, "color", mustBeBoolean);
+    let verbose = getFlag(options, keys, "verbose", mustBeBoolean);
+    checkForInvalidFlags(options, keys, `in ${callName}() call`);
+    let request = {
+      command: "analyze-metafile",
+      metafile
+    };
+    if (color !== void 0)
+      request.color = color;
+    if (verbose !== void 0)
+      request.verbose = verbose;
+    sendRequest(refs, request, (error, response) => {
+      if (error)
+        return callback(new Error(error), null);
+      callback(null, response.result);
+    });
+  };
+  return {
+    readFromStdout,
+    afterClose,
+    service: {
+      buildOrContext,
+      transform: transform2,
+      formatMessages: formatMessages2,
+      analyzeMetafile: analyzeMetafile2
+    }
+  };
+}
+function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) {
+  const details = createObjectStash();
+  const isContext = callName === "context";
+  const handleError = (e, pluginName) => {
+    const flags = [];
+    try {
+      pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault);
+    } catch {
+    }
+    const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName);
+    sendRequest(refs, { command: "error", flags, error: message }, () => {
+      message.detail = details.load(message.detail);
+      callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null);
+    });
+  };
+  let plugins;
+  if (typeof options === "object") {
+    const value = options.plugins;
+    if (value !== void 0) {
+      if (!Array.isArray(value))
+        return handleError(new Error(`"plugins" must be an array`), "");
+      plugins = value;
+    }
+  }
+  if (plugins && plugins.length > 0) {
+    if (streamIn.isSync)
+      return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
+    handlePlugins(
+      buildKey,
+      sendRequest,
+      sendResponse,
+      refs,
+      streamIn,
+      requestCallbacks,
+      options,
+      plugins,
+      details
+    ).then(
+      (result) => {
+        if (!result.ok)
+          return handleError(result.error, result.pluginName);
+        try {
+          buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks);
+        } catch (e) {
+          handleError(e, "");
+        }
+      },
+      (e) => handleError(e, "")
+    );
+    return;
+  }
+  try {
+    buildOrContextContinue(null, (result, done) => done([], []), () => {
+    });
+  } catch (e) {
+    handleError(e, "");
+  }
+  function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) {
+    const writeDefault = streamIn.hasFS;
+    const {
+      entries,
+      flags,
+      write,
+      stdinContents,
+      stdinResolveDir,
+      absWorkingDir,
+      nodePaths,
+      mangleCache
+    } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault);
+    if (write && !streamIn.hasFS)
+      throw new Error(`The "write" option is unavailable in this environment`);
+    const request = {
+      command: "build",
+      key: buildKey,
+      entries,
+      flags,
+      write,
+      stdinContents,
+      stdinResolveDir,
+      absWorkingDir: absWorkingDir || defaultWD2,
+      nodePaths,
+      context: isContext
+    };
+    if (requestPlugins)
+      request.plugins = requestPlugins;
+    if (mangleCache)
+      request.mangleCache = mangleCache;
+    const buildResponseToResult = (response, callback2) => {
+      const result = {
+        errors: replaceDetailsInMessages(response.errors, details),
+        warnings: replaceDetailsInMessages(response.warnings, details),
+        outputFiles: void 0,
+        metafile: void 0,
+        mangleCache: void 0
+      };
+      const originalErrors = result.errors.slice();
+      const originalWarnings = result.warnings.slice();
+      if (response.outputFiles)
+        result.outputFiles = response.outputFiles.map(convertOutputFiles);
+      if (response.metafile)
+        result.metafile = JSON.parse(response.metafile);
+      if (response.mangleCache)
+        result.mangleCache = response.mangleCache;
+      if (response.writeToStdout !== void 0)
+        console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
+      runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => {
+        if (originalErrors.length > 0 || onEndErrors.length > 0) {
+          const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings));
+          return callback2(error, null, onEndErrors, onEndWarnings);
+        }
+        callback2(null, result, onEndErrors, onEndWarnings);
+      });
+    };
+    let latestResultPromise;
+    let provideLatestResult;
+    if (isContext)
+      requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => {
+        buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
+          const response = {
+            errors: onEndErrors,
+            warnings: onEndWarnings
+          };
+          if (provideLatestResult)
+            provideLatestResult(err, result);
+          latestResultPromise = void 0;
+          provideLatestResult = void 0;
+          sendResponse(id, response);
+          resolve();
+        });
+      });
+    sendRequest(refs, request, (error, response) => {
+      if (error)
+        return callback(new Error(error), null);
+      if (!isContext) {
+        return buildResponseToResult(response, (err, res) => {
+          scheduleOnDisposeCallbacks();
+          return callback(err, res);
+        });
+      }
+      if (response.errors.length > 0) {
+        return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null);
+      }
+      let didDispose = false;
+      const result = {
+        rebuild: () => {
+          if (!latestResultPromise)
+            latestResultPromise = new Promise((resolve, reject) => {
+              let settlePromise;
+              provideLatestResult = (err, result2) => {
+                if (!settlePromise)
+                  settlePromise = () => err ? reject(err) : resolve(result2);
+              };
+              const triggerAnotherBuild = () => {
+                const request2 = {
+                  command: "rebuild",
+                  key: buildKey
+                };
+                sendRequest(refs, request2, (error2, response2) => {
+                  if (error2) {
+                    reject(new Error(error2));
+                  } else if (settlePromise) {
+                    settlePromise();
+                  } else {
+                    triggerAnotherBuild();
+                  }
+                });
+              };
+              triggerAnotherBuild();
+            });
+          return latestResultPromise;
+        },
+        watch: (options2 = {}) => new Promise((resolve, reject) => {
+          if (!streamIn.hasFS)
+            throw new Error(`Cannot use the "watch" API in this environment`);
+          const keys = {};
+          checkForInvalidFlags(options2, keys, `in watch() call`);
+          const request2 = {
+            command: "watch",
+            key: buildKey
+          };
+          sendRequest(refs, request2, (error2) => {
+            if (error2)
+              reject(new Error(error2));
+            else
+              resolve(void 0);
+          });
+        }),
+        serve: (options2 = {}) => new Promise((resolve, reject) => {
+          if (!streamIn.hasFS)
+            throw new Error(`Cannot use the "serve" API in this environment`);
+          const keys = {};
+          const port = getFlag(options2, keys, "port", mustBeInteger);
+          const host = getFlag(options2, keys, "host", mustBeString);
+          const servedir = getFlag(options2, keys, "servedir", mustBeString);
+          const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
+          const certfile = getFlag(options2, keys, "certfile", mustBeString);
+          const fallback = getFlag(options2, keys, "fallback", mustBeString);
+          const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction);
+          checkForInvalidFlags(options2, keys, `in serve() call`);
+          const request2 = {
+            command: "serve",
+            key: buildKey,
+            onRequest: !!onRequest
+          };
+          if (port !== void 0)
+            request2.port = port;
+          if (host !== void 0)
+            request2.host = host;
+          if (servedir !== void 0)
+            request2.servedir = servedir;
+          if (keyfile !== void 0)
+            request2.keyfile = keyfile;
+          if (certfile !== void 0)
+            request2.certfile = certfile;
+          if (fallback !== void 0)
+            request2.fallback = fallback;
+          sendRequest(refs, request2, (error2, response2) => {
+            if (error2)
+              return reject(new Error(error2));
+            if (onRequest) {
+              requestCallbacks["serve-request"] = (id, request3) => {
+                onRequest(request3.args);
+                sendResponse(id, {});
+              };
+            }
+            resolve(response2);
+          });
+        }),
+        cancel: () => new Promise((resolve) => {
+          if (didDispose)
+            return resolve();
+          const request2 = {
+            command: "cancel",
+            key: buildKey
+          };
+          sendRequest(refs, request2, () => {
+            resolve();
+          });
+        }),
+        dispose: () => new Promise((resolve) => {
+          if (didDispose)
+            return resolve();
+          didDispose = true;
+          const request2 = {
+            command: "dispose",
+            key: buildKey
+          };
+          sendRequest(refs, request2, () => {
+            resolve();
+            scheduleOnDisposeCallbacks();
+            refs.unref();
+          });
+        })
+      };
+      refs.ref();
+      callback(null, result);
+    });
+  }
+}
+var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
+  let onStartCallbacks = [];
+  let onEndCallbacks = [];
+  let onResolveCallbacks = {};
+  let onLoadCallbacks = {};
+  let onDisposeCallbacks = [];
+  let nextCallbackID = 0;
+  let i = 0;
+  let requestPlugins = [];
+  let isSetupDone = false;
+  plugins = [...plugins];
+  for (let item of plugins) {
+    let keys = {};
+    if (typeof item !== "object")
+      throw new Error(`Plugin at index ${i} must be an object`);
+    const name = getFlag(item, keys, "name", mustBeString);
+    if (typeof name !== "string" || name === "")
+      throw new Error(`Plugin at index ${i} is missing a name`);
+    try {
+      let setup = getFlag(item, keys, "setup", mustBeFunction);
+      if (typeof setup !== "function")
+        throw new Error(`Plugin is missing a setup function`);
+      checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`);
+      let plugin = {
+        name,
+        onStart: false,
+        onEnd: false,
+        onResolve: [],
+        onLoad: []
+      };
+      i++;
+      let resolve = (path3, options = {}) => {
+        if (!isSetupDone)
+          throw new Error('Cannot call "resolve" before plugin setup has completed');
+        if (typeof path3 !== "string")
+          throw new Error(`The path to resolve must be a string`);
+        let keys2 = /* @__PURE__ */ Object.create(null);
+        let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
+        let importer = getFlag(options, keys2, "importer", mustBeString);
+        let namespace = getFlag(options, keys2, "namespace", mustBeString);
+        let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
+        let kind = getFlag(options, keys2, "kind", mustBeString);
+        let pluginData = getFlag(options, keys2, "pluginData", canBeAnything);
+        checkForInvalidFlags(options, keys2, "in resolve() call");
+        return new Promise((resolve2, reject) => {
+          const request = {
+            command: "resolve",
+            path: path3,
+            key: buildKey,
+            pluginName: name
+          };
+          if (pluginName != null)
+            request.pluginName = pluginName;
+          if (importer != null)
+            request.importer = importer;
+          if (namespace != null)
+            request.namespace = namespace;
+          if (resolveDir != null)
+            request.resolveDir = resolveDir;
+          if (kind != null)
+            request.kind = kind;
+          else
+            throw new Error(`Must specify "kind" when calling "resolve"`);
+          if (pluginData != null)
+            request.pluginData = details.store(pluginData);
+          sendRequest(refs, request, (error, response) => {
+            if (error !== null)
+              reject(new Error(error));
+            else
+              resolve2({
+                errors: replaceDetailsInMessages(response.errors, details),
+                warnings: replaceDetailsInMessages(response.warnings, details),
+                path: response.path,
+                external: response.external,
+                sideEffects: response.sideEffects,
+                namespace: response.namespace,
+                suffix: response.suffix,
+                pluginData: details.load(response.pluginData)
+              });
+          });
+        });
+      };
+      let promise = setup({
+        initialOptions,
+        resolve,
+        onStart(callback) {
+          let registeredText = `This error came from the "onStart" callback registered here:`;
+          let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
+          onStartCallbacks.push({ name, callback, note: registeredNote });
+          plugin.onStart = true;
+        },
+        onEnd(callback) {
+          let registeredText = `This error came from the "onEnd" callback registered here:`;
+          let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
+          onEndCallbacks.push({ name, callback, note: registeredNote });
+          plugin.onEnd = true;
+        },
+        onResolve(options, callback) {
+          let registeredText = `This error came from the "onResolve" callback registered here:`;
+          let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
+          let keys2 = {};
+          let filter = getFlag(options, keys2, "filter", mustBeRegExp);
+          let namespace = getFlag(options, keys2, "namespace", mustBeString);
+          checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`);
+          if (filter == null)
+            throw new Error(`onResolve() call is missing a filter`);
+          let id = nextCallbackID++;
+          onResolveCallbacks[id] = { name, callback, note: registeredNote };
+          plugin.onResolve.push({ id, filter: filter.source, namespace: namespace || "" });
+        },
+        onLoad(options, callback) {
+          let registeredText = `This error came from the "onLoad" callback registered here:`;
+          let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
+          let keys2 = {};
+          let filter = getFlag(options, keys2, "filter", mustBeRegExp);
+          let namespace = getFlag(options, keys2, "namespace", mustBeString);
+          checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`);
+          if (filter == null)
+            throw new Error(`onLoad() call is missing a filter`);
+          let id = nextCallbackID++;
+          onLoadCallbacks[id] = { name, callback, note: registeredNote };
+          plugin.onLoad.push({ id, filter: filter.source, namespace: namespace || "" });
+        },
+        onDispose(callback) {
+          onDisposeCallbacks.push(callback);
+        },
+        esbuild: streamIn.esbuild
+      });
+      if (promise)
+        await promise;
+      requestPlugins.push(plugin);
+    } catch (e) {
+      return { ok: false, error: e, pluginName: name };
+    }
+  }
+  requestCallbacks["on-start"] = async (id, request) => {
+    let response = { errors: [], warnings: [] };
+    await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
+      try {
+        let result = await callback();
+        if (result != null) {
+          if (typeof result !== "object")
+            throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`);
+          let keys = {};
+          let errors = getFlag(result, keys, "errors", mustBeArray);
+          let warnings = getFlag(result, keys, "warnings", mustBeArray);
+          checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`);
+          if (errors != null)
+            response.errors.push(...sanitizeMessages(errors, "errors", details, name));
+          if (warnings != null)
+            response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name));
+        }
+      } catch (e) {
+        response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name));
+      }
+    }));
+    sendResponse(id, response);
+  };
+  requestCallbacks["on-resolve"] = async (id, request) => {
+    let response = {}, name = "", callback, note;
+    for (let id2 of request.ids) {
+      try {
+        ({ name, callback, note } = onResolveCallbacks[id2]);
+        let result = await callback({
+          path: request.path,
+          importer: request.importer,
+          namespace: request.namespace,
+          resolveDir: request.resolveDir,
+          kind: request.kind,
+          pluginData: details.load(request.pluginData)
+        });
+        if (result != null) {
+          if (typeof result !== "object")
+            throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`);
+          let keys = {};
+          let pluginName = getFlag(result, keys, "pluginName", mustBeString);
+          let path3 = getFlag(result, keys, "path", mustBeString);
+          let namespace = getFlag(result, keys, "namespace", mustBeString);
+          let suffix = getFlag(result, keys, "suffix", mustBeString);
+          let external = getFlag(result, keys, "external", mustBeBoolean);
+          let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
+          let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
+          let errors = getFlag(result, keys, "errors", mustBeArray);
+          let warnings = getFlag(result, keys, "warnings", mustBeArray);
+          let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
+          let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
+          checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`);
+          response.id = id2;
+          if (pluginName != null)
+            response.pluginName = pluginName;
+          if (path3 != null)
+            response.path = path3;
+          if (namespace != null)
+            response.namespace = namespace;
+          if (suffix != null)
+            response.suffix = suffix;
+          if (external != null)
+            response.external = external;
+          if (sideEffects != null)
+            response.sideEffects = sideEffects;
+          if (pluginData != null)
+            response.pluginData = details.store(pluginData);
+          if (errors != null)
+            response.errors = sanitizeMessages(errors, "errors", details, name);
+          if (warnings != null)
+            response.warnings = sanitizeMessages(warnings, "warnings", details, name);
+          if (watchFiles != null)
+            response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
+          if (watchDirs != null)
+            response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
+          break;
+        }
+      } catch (e) {
+        response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
+        break;
+      }
+    }
+    sendResponse(id, response);
+  };
+  requestCallbacks["on-load"] = async (id, request) => {
+    let response = {}, name = "", callback, note;
+    for (let id2 of request.ids) {
+      try {
+        ({ name, callback, note } = onLoadCallbacks[id2]);
+        let result = await callback({
+          path: request.path,
+          namespace: request.namespace,
+          suffix: request.suffix,
+          pluginData: details.load(request.pluginData)
+        });
+        if (result != null) {
+          if (typeof result !== "object")
+            throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`);
+          let keys = {};
+          let pluginName = getFlag(result, keys, "pluginName", mustBeString);
+          let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
+          let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
+          let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
+          let loader = getFlag(result, keys, "loader", mustBeString);
+          let errors = getFlag(result, keys, "errors", mustBeArray);
+          let warnings = getFlag(result, keys, "warnings", mustBeArray);
+          let watchFiles = getFlag(result, keys, "watchFiles", mustBeArray);
+          let watchDirs = getFlag(result, keys, "watchDirs", mustBeArray);
+          checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`);
+          response.id = id2;
+          if (pluginName != null)
+            response.pluginName = pluginName;
+          if (contents instanceof Uint8Array)
+            response.contents = contents;
+          else if (contents != null)
+            response.contents = encodeUTF8(contents);
+          if (resolveDir != null)
+            response.resolveDir = resolveDir;
+          if (pluginData != null)
+            response.pluginData = details.store(pluginData);
+          if (loader != null)
+            response.loader = loader;
+          if (errors != null)
+            response.errors = sanitizeMessages(errors, "errors", details, name);
+          if (warnings != null)
+            response.warnings = sanitizeMessages(warnings, "warnings", details, name);
+          if (watchFiles != null)
+            response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
+          if (watchDirs != null)
+            response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
+          break;
+        }
+      } catch (e) {
+        response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
+        break;
+      }
+    }
+    sendResponse(id, response);
+  };
+  let runOnEndCallbacks = (result, done) => done([], []);
+  if (onEndCallbacks.length > 0) {
+    runOnEndCallbacks = (result, done) => {
+      (async () => {
+        const onEndErrors = [];
+        const onEndWarnings = [];
+        for (const { name, callback, note } of onEndCallbacks) {
+          let newErrors;
+          let newWarnings;
+          try {
+            const value = await callback(result);
+            if (value != null) {
+              if (typeof value !== "object")
+                throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`);
+              let keys = {};
+              let errors = getFlag(value, keys, "errors", mustBeArray);
+              let warnings = getFlag(value, keys, "warnings", mustBeArray);
+              checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`);
+              if (errors != null)
+                newErrors = sanitizeMessages(errors, "errors", details, name);
+              if (warnings != null)
+                newWarnings = sanitizeMessages(warnings, "warnings", details, name);
+            }
+          } catch (e) {
+            newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)];
+          }
+          if (newErrors) {
+            onEndErrors.push(...newErrors);
+            try {
+              result.errors.push(...newErrors);
+            } catch {
+            }
+          }
+          if (newWarnings) {
+            onEndWarnings.push(...newWarnings);
+            try {
+              result.warnings.push(...newWarnings);
+            } catch {
+            }
+          }
+        }
+        done(onEndErrors, onEndWarnings);
+      })();
+    };
+  }
+  let scheduleOnDisposeCallbacks = () => {
+    for (const cb of onDisposeCallbacks) {
+      setTimeout(() => cb(), 0);
+    }
+  };
+  isSetupDone = true;
+  return {
+    ok: true,
+    requestPlugins,
+    runOnEndCallbacks,
+    scheduleOnDisposeCallbacks
+  };
+};
+function createObjectStash() {
+  const map = /* @__PURE__ */ new Map();
+  let nextID = 0;
+  return {
+    load(id) {
+      return map.get(id);
+    },
+    store(value) {
+      if (value === void 0)
+        return -1;
+      const id = nextID++;
+      map.set(id, value);
+      return id;
+    }
+  };
+}
+function extractCallerV8(e, streamIn, ident) {
+  let note;
+  let tried = false;
+  return () => {
+    if (tried)
+      return note;
+    tried = true;
+    try {
+      let lines = (e.stack + "").split("\n");
+      lines.splice(1, 1);
+      let location = parseStackLinesV8(streamIn, lines, ident);
+      if (location) {
+        note = { text: e.message, location };
+        return note;
+      }
+    } catch {
+    }
+  };
+}
+function extractErrorMessageV8(e, streamIn, stash, note, pluginName) {
+  let text = "Internal error";
+  let location = null;
+  try {
+    text = (e && e.message || e) + "";
+  } catch {
+  }
+  try {
+    location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), "");
+  } catch {
+  }
+  return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
+}
+function parseStackLinesV8(streamIn, lines, ident) {
+  let at = "    at ";
+  if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) {
+    for (let i = 1; i < lines.length; i++) {
+      let line = lines[i];
+      if (!line.startsWith(at))
+        continue;
+      line = line.slice(at.length);
+      while (true) {
+        let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line);
+        if (match) {
+          line = match[1];
+          continue;
+        }
+        match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line);
+        if (match) {
+          line = match[1];
+          continue;
+        }
+        match = /^(\S+):(\d+):(\d+)$/.exec(line);
+        if (match) {
+          let contents;
+          try {
+            contents = streamIn.readFileSync(match[1], "utf8");
+          } catch {
+            break;
+          }
+          let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || "";
+          let column = +match[3] - 1;
+          let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0;
+          return {
+            file: match[1],
+            namespace: "file",
+            line: +match[2],
+            column: encodeUTF8(lineText.slice(0, column)).length,
+            length: encodeUTF8(lineText.slice(column, column + length)).length,
+            lineText: lineText + "\n" + lines.slice(1).join("\n"),
+            suggestion: ""
+          };
+        }
+        break;
+      }
+    }
+  }
+  return null;
+}
+function failureErrorWithLog(text, errors, warnings) {
+  let limit = 5;
+  let summary = errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
+    if (i === limit)
+      return "\n...";
+    if (!e.location)
+      return `
+error: ${e.text}`;
+    let { file, line, column } = e.location;
+    let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : "";
+    return `
+${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
+  }).join("");
+  let error = new Error(`${text}${summary}`);
+  error.errors = errors;
+  error.warnings = warnings;
+  return error;
+}
+function replaceDetailsInMessages(messages, stash) {
+  for (const message of messages) {
+    message.detail = stash.load(message.detail);
+  }
+  return messages;
+}
+function sanitizeLocation(location, where) {
+  if (location == null)
+    return null;
+  let keys = {};
+  let file = getFlag(location, keys, "file", mustBeString);
+  let namespace = getFlag(location, keys, "namespace", mustBeString);
+  let line = getFlag(location, keys, "line", mustBeInteger);
+  let column = getFlag(location, keys, "column", mustBeInteger);
+  let length = getFlag(location, keys, "length", mustBeInteger);
+  let lineText = getFlag(location, keys, "lineText", mustBeString);
+  let suggestion = getFlag(location, keys, "suggestion", mustBeString);
+  checkForInvalidFlags(location, keys, where);
+  return {
+    file: file || "",
+    namespace: namespace || "",
+    line: line || 0,
+    column: column || 0,
+    length: length || 0,
+    lineText: lineText || "",
+    suggestion: suggestion || ""
+  };
+}
+function sanitizeMessages(messages, property, stash, fallbackPluginName) {
+  let messagesClone = [];
+  let index = 0;
+  for (const message of messages) {
+    let keys = {};
+    let id = getFlag(message, keys, "id", mustBeString);
+    let pluginName = getFlag(message, keys, "pluginName", mustBeString);
+    let text = getFlag(message, keys, "text", mustBeString);
+    let location = getFlag(message, keys, "location", mustBeObjectOrNull);
+    let notes = getFlag(message, keys, "notes", mustBeArray);
+    let detail = getFlag(message, keys, "detail", canBeAnything);
+    let where = `in element ${index} of "${property}"`;
+    checkForInvalidFlags(message, keys, where);
+    let notesClone = [];
+    if (notes) {
+      for (const note of notes) {
+        let noteKeys = {};
+        let noteText = getFlag(note, noteKeys, "text", mustBeString);
+        let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
+        checkForInvalidFlags(note, noteKeys, where);
+        notesClone.push({
+          text: noteText || "",
+          location: sanitizeLocation(noteLocation, where)
+        });
+      }
+    }
+    messagesClone.push({
+      id: id || "",
+      pluginName: pluginName || fallbackPluginName,
+      text: text || "",
+      location: sanitizeLocation(location, where),
+      notes: notesClone,
+      detail: stash ? stash.store(detail) : -1
+    });
+    index++;
+  }
+  return messagesClone;
+}
+function sanitizeStringArray(values, property) {
+  const result = [];
+  for (const value of values) {
+    if (typeof value !== "string")
+      throw new Error(`${quote(property)} must be an array of strings`);
+    result.push(value);
+  }
+  return result;
+}
+function convertOutputFiles({ path: path3, contents, hash }) {
+  let text = null;
+  return {
+    path: path3,
+    contents,
+    hash,
+    get text() {
+      const binary = this.contents;
+      if (text === null || binary !== contents) {
+        contents = binary;
+        text = decodeUTF8(binary);
+      }
+      return text;
+    }
+  };
+}
+
+// lib/npm/node-platform.ts
+var fs = require("fs");
+var os = require("os");
+var path = require("path");
+var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
+var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
+var packageDarwin_arm64 = "@esbuild/darwin-arm64";
+var packageDarwin_x64 = "@esbuild/darwin-x64";
+var knownWindowsPackages = {
+  "win32 arm64 LE": "@esbuild/win32-arm64",
+  "win32 ia32 LE": "@esbuild/win32-ia32",
+  "win32 x64 LE": "@esbuild/win32-x64"
+};
+var knownUnixlikePackages = {
+  "android arm64 LE": "@esbuild/android-arm64",
+  "darwin arm64 LE": "@esbuild/darwin-arm64",
+  "darwin x64 LE": "@esbuild/darwin-x64",
+  "freebsd arm64 LE": "@esbuild/freebsd-arm64",
+  "freebsd x64 LE": "@esbuild/freebsd-x64",
+  "linux arm LE": "@esbuild/linux-arm",
+  "linux arm64 LE": "@esbuild/linux-arm64",
+  "linux ia32 LE": "@esbuild/linux-ia32",
+  "linux mips64el LE": "@esbuild/linux-mips64el",
+  "linux ppc64 LE": "@esbuild/linux-ppc64",
+  "linux riscv64 LE": "@esbuild/linux-riscv64",
+  "linux s390x BE": "@esbuild/linux-s390x",
+  "linux x64 LE": "@esbuild/linux-x64",
+  "linux loong64 LE": "@esbuild/linux-loong64",
+  "netbsd x64 LE": "@esbuild/netbsd-x64",
+  "openbsd x64 LE": "@esbuild/openbsd-x64",
+  "sunos x64 LE": "@esbuild/sunos-x64"
+};
+var knownWebAssemblyFallbackPackages = {
+  "android arm LE": "@esbuild/android-arm",
+  "android x64 LE": "@esbuild/android-x64"
+};
+function pkgAndSubpathForCurrentPlatform() {
+  let pkg;
+  let subpath;
+  let isWASM = false;
+  let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
+  if (platformKey in knownWindowsPackages) {
+    pkg = knownWindowsPackages[platformKey];
+    subpath = "esbuild.exe";
+  } else if (platformKey in knownUnixlikePackages) {
+    pkg = knownUnixlikePackages[platformKey];
+    subpath = "bin/esbuild";
+  } else if (platformKey in knownWebAssemblyFallbackPackages) {
+    pkg = knownWebAssemblyFallbackPackages[platformKey];
+    subpath = "bin/esbuild";
+    isWASM = true;
+  } else {
+    throw new Error(`Unsupported platform: ${platformKey}`);
+  }
+  return { pkg, subpath, isWASM };
+}
+function pkgForSomeOtherPlatform() {
+  const libMainJS = require.resolve("esbuild");
+  const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS)));
+  if (path.basename(nodeModulesDirectory) === "node_modules") {
+    for (const unixKey in knownUnixlikePackages) {
+      try {
+        const pkg = knownUnixlikePackages[unixKey];
+        if (fs.existsSync(path.join(nodeModulesDirectory, pkg)))
+          return pkg;
+      } catch {
+      }
+    }
+    for (const windowsKey in knownWindowsPackages) {
+      try {
+        const pkg = knownWindowsPackages[windowsKey];
+        if (fs.existsSync(path.join(nodeModulesDirectory, pkg)))
+          return pkg;
+      } catch {
+      }
+    }
+  }
+  return null;
+}
+function downloadedBinPath(pkg, subpath) {
+  const esbuildLibDir = path.dirname(require.resolve("esbuild"));
+  return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
+}
+function generateBinPath() {
+  if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
+    if (!fs.existsSync(ESBUILD_BINARY_PATH)) {
+      console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
+    } else {
+      return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
+    }
+  }
+  const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
+  let binPath;
+  try {
+    binPath = require.resolve(`${pkg}/${subpath}`);
+  } catch (e) {
+    binPath = downloadedBinPath(pkg, subpath);
+    if (!fs.existsSync(binPath)) {
+      try {
+        require.resolve(pkg);
+      } catch {
+        const otherPkg = pkgForSomeOtherPlatform();
+        if (otherPkg) {
+          let suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild on Windows or macOS and copying "node_modules"
+into a Docker image that runs Linux, or by copying "node_modules" between
+Windows and WSL environments.
+
+If you are installing with npm, you can try not copying the "node_modules"
+directory when you copy the files over, and running "npm ci" or "npm install"
+on the destination platform after the copy. Or you could consider using yarn
+instead of npm which has built-in support for installing a package on multiple
+platforms simultaneously.
+
+If you are installing with yarn, you can try listing both this platform and the
+other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
+feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+          if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
+            suggestions = `
+Specifically the "${otherPkg}" package is present but this platform
+needs the "${pkg}" package instead. People often get into this
+situation by installing esbuild with npm running inside of Rosetta 2 and then
+trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
+2 is Apple's on-the-fly x86_64-to-arm64 translation service).
+
+If you are installing with npm, you can try ensuring that both npm and node are
+not running under Rosetta 2 and then reinstalling esbuild. This likely involves
+changing how you installed npm and/or node. For example, installing node with
+the universal installer here should work: https://nodejs.org/en/download/. Or
+you could consider using yarn instead of npm which has built-in support for
+installing a package on multiple platforms simultaneously.
+
+If you are installing with yarn, you can try listing both "arm64" and "x64"
+in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
+https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
+Keep in mind that this means multiple copies of esbuild will be present.
+`;
+          }
+          throw new Error(`
+You installed esbuild for another platform than the one you're currently using.
+This won't work because esbuild is written with native code and needs to
+install a platform-specific binary executable.
+${suggestions}
+Another alternative is to use the "esbuild-wasm" package instead, which works
+the same way on all platforms. But it comes with a heavy performance cost and
+can sometimes be 10x slower than the "esbuild" package, so you may also not
+want to do that.
+`);
+        }
+        throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
+
+If you are installing esbuild with npm, make sure that you don't specify the
+"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
+of "package.json" is used by esbuild to install the correct binary executable
+for your current platform.`);
+      }
+      throw e;
+    }
+  }
+  if (/\.zip\//.test(binPath)) {
+    let pnpapi;
+    try {
+      pnpapi = require("pnpapi");
+    } catch (e) {
+    }
+    if (pnpapi) {
+      const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
+      const binTargetPath = path.join(
+        root,
+        "node_modules",
+        ".cache",
+        "esbuild",
+        `pnpapi-${pkg.replace("/", "-")}-${"0.18.20"}-${path.basename(subpath)}`
+      );
+      if (!fs.existsSync(binTargetPath)) {
+        fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
+        fs.copyFileSync(binPath, binTargetPath);
+        fs.chmodSync(binTargetPath, 493);
+      }
+      return { binPath: binTargetPath, isWASM };
+    }
+  }
+  return { binPath, isWASM };
+}
+
+// lib/npm/node.ts
+var child_process = require("child_process");
+var crypto = require("crypto");
+var path2 = require("path");
+var fs2 = require("fs");
+var os2 = require("os");
+var tty = require("tty");
+var worker_threads;
+if (process.env.ESBUILD_WORKER_THREADS !== "0") {
+  try {
+    worker_threads = require("worker_threads");
+  } catch {
+  }
+  let [major, minor] = process.versions.node.split(".");
+  if (
+    // <v12.17.0 does not work
+    +major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13
+  ) {
+    worker_threads = void 0;
+  }
+}
+var _a;
+var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.18.20";
+var esbuildCommandAndArgs = () => {
+  if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
+    throw new Error(
+      `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
+
+More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`
+    );
+  }
+  if (false) {
+    return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]];
+  } else {
+    const { binPath, isWASM } = generateBinPath();
+    if (isWASM) {
+      return ["node", [binPath]];
+    } else {
+      return [binPath, []];
+    }
+  }
+};
+var isTTY = () => tty.isatty(2);
+var fsSync = {
+  readFile(tempFile, callback) {
+    try {
+      let contents = fs2.readFileSync(tempFile, "utf8");
+      try {
+        fs2.unlinkSync(tempFile);
+      } catch {
+      }
+      callback(null, contents);
+    } catch (err) {
+      callback(err, null);
+    }
+  },
+  writeFile(contents, callback) {
+    try {
+      let tempFile = randomFileName();
+      fs2.writeFileSync(tempFile, contents);
+      callback(tempFile);
+    } catch {
+      callback(null);
+    }
+  }
+};
+var fsAsync = {
+  readFile(tempFile, callback) {
+    try {
+      fs2.readFile(tempFile, "utf8", (err, contents) => {
+        try {
+          fs2.unlink(tempFile, () => callback(err, contents));
+        } catch {
+          callback(err, contents);
+        }
+      });
+    } catch (err) {
+      callback(err, null);
+    }
+  },
+  writeFile(contents, callback) {
+    try {
+      let tempFile = randomFileName();
+      fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile));
+    } catch {
+      callback(null);
+    }
+  }
+};
+var version = "0.18.20";
+var build = (options) => ensureServiceIsRunning().build(options);
+var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
+var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
+var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options);
+var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options);
+var buildSync = (options) => {
+  if (worker_threads && !isInternalWorkerThread) {
+    if (!workerThreadService)
+      workerThreadService = startWorkerThreadService(worker_threads);
+    return workerThreadService.buildSync(options);
+  }
+  let result;
+  runServiceSync((service) => service.buildOrContext({
+    callName: "buildSync",
+    refs: null,
+    options,
+    isTTY: isTTY(),
+    defaultWD,
+    callback: (err, res) => {
+      if (err)
+        throw err;
+      result = res;
+    }
+  }));
+  return result;
+};
+var transformSync = (input, options) => {
+  if (worker_threads && !isInternalWorkerThread) {
+    if (!workerThreadService)
+      workerThreadService = startWorkerThreadService(worker_threads);
+    return workerThreadService.transformSync(input, options);
+  }
+  let result;
+  runServiceSync((service) => service.transform({
+    callName: "transformSync",
+    refs: null,
+    input,
+    options: options || {},
+    isTTY: isTTY(),
+    fs: fsSync,
+    callback: (err, res) => {
+      if (err)
+        throw err;
+      result = res;
+    }
+  }));
+  return result;
+};
+var formatMessagesSync = (messages, options) => {
+  if (worker_threads && !isInternalWorkerThread) {
+    if (!workerThreadService)
+      workerThreadService = startWorkerThreadService(worker_threads);
+    return workerThreadService.formatMessagesSync(messages, options);
+  }
+  let result;
+  runServiceSync((service) => service.formatMessages({
+    callName: "formatMessagesSync",
+    refs: null,
+    messages,
+    options,
+    callback: (err, res) => {
+      if (err)
+        throw err;
+      result = res;
+    }
+  }));
+  return result;
+};
+var analyzeMetafileSync = (metafile, options) => {
+  if (worker_threads && !isInternalWorkerThread) {
+    if (!workerThreadService)
+      workerThreadService = startWorkerThreadService(worker_threads);
+    return workerThreadService.analyzeMetafileSync(metafile, options);
+  }
+  let result;
+  runServiceSync((service) => service.analyzeMetafile({
+    callName: "analyzeMetafileSync",
+    refs: null,
+    metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
+    options,
+    callback: (err, res) => {
+      if (err)
+        throw err;
+      result = res;
+    }
+  }));
+  return result;
+};
+var initializeWasCalled = false;
+var initialize = (options) => {
+  options = validateInitializeOptions(options || {});
+  if (options.wasmURL)
+    throw new Error(`The "wasmURL" option only works in the browser`);
+  if (options.wasmModule)
+    throw new Error(`The "wasmModule" option only works in the browser`);
+  if (options.worker)
+    throw new Error(`The "worker" option only works in the browser`);
+  if (initializeWasCalled)
+    throw new Error('Cannot call "initialize" more than once');
+  ensureServiceIsRunning();
+  initializeWasCalled = true;
+  return Promise.resolve();
+};
+var defaultWD = process.cwd();
+var longLivedService;
+var ensureServiceIsRunning = () => {
+  if (longLivedService)
+    return longLivedService;
+  let [command, args] = esbuildCommandAndArgs();
+  let child = child_process.spawn(command, args.concat(`--service=${"0.18.20"}`, "--ping"), {
+    windowsHide: true,
+    stdio: ["pipe", "pipe", "inherit"],
+    cwd: defaultWD
+  });
+  let { readFromStdout, afterClose, service } = createChannel({
+    writeToStdin(bytes) {
+      child.stdin.write(bytes, (err) => {
+        if (err)
+          afterClose(err);
+      });
+    },
+    readFileSync: fs2.readFileSync,
+    isSync: false,
+    hasFS: true,
+    esbuild: node_exports
+  });
+  child.stdin.on("error", afterClose);
+  child.on("error", afterClose);
+  const stdin = child.stdin;
+  const stdout = child.stdout;
+  stdout.on("data", readFromStdout);
+  stdout.on("end", afterClose);
+  let refCount = 0;
+  child.unref();
+  if (stdin.unref) {
+    stdin.unref();
+  }
+  if (stdout.unref) {
+    stdout.unref();
+  }
+  const refs = {
+    ref() {
+      if (++refCount === 1)
+        child.ref();
+    },
+    unref() {
+      if (--refCount === 0)
+        child.unref();
+    }
+  };
+  longLivedService = {
+    build: (options) => new Promise((resolve, reject) => {
+      service.buildOrContext({
+        callName: "build",
+        refs,
+        options,
+        isTTY: isTTY(),
+        defaultWD,
+        callback: (err, res) => err ? reject(err) : resolve(res)
+      });
+    }),
+    context: (options) => new Promise((resolve, reject) => service.buildOrContext({
+      callName: "context",
+      refs,
+      options,
+      isTTY: isTTY(),
+      defaultWD,
+      callback: (err, res) => err ? reject(err) : resolve(res)
+    })),
+    transform: (input, options) => new Promise((resolve, reject) => service.transform({
+      callName: "transform",
+      refs,
+      input,
+      options: options || {},
+      isTTY: isTTY(),
+      fs: fsAsync,
+      callback: (err, res) => err ? reject(err) : resolve(res)
+    })),
+    formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({
+      callName: "formatMessages",
+      refs,
+      messages,
+      options,
+      callback: (err, res) => err ? reject(err) : resolve(res)
+    })),
+    analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({
+      callName: "analyzeMetafile",
+      refs,
+      metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
+      options,
+      callback: (err, res) => err ? reject(err) : resolve(res)
+    }))
+  };
+  return longLivedService;
+};
+var runServiceSync = (callback) => {
+  let [command, args] = esbuildCommandAndArgs();
+  let stdin = new Uint8Array();
+  let { readFromStdout, afterClose, service } = createChannel({
+    writeToStdin(bytes) {
+      if (stdin.length !== 0)
+        throw new Error("Must run at most one command");
+      stdin = bytes;
+    },
+    isSync: true,
+    hasFS: true,
+    esbuild: node_exports
+  });
+  callback(service);
+  let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.18.20"}`), {
+    cwd: defaultWD,
+    windowsHide: true,
+    input: stdin,
+    // We don't know how large the output could be. If it's too large, the
+    // command will fail with ENOBUFS. Reserve 16mb for now since that feels
+    // like it should be enough. Also allow overriding this with an environment
+    // variable.
+    maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
+  });
+  readFromStdout(stdout);
+  afterClose(null);
+};
+var randomFileName = () => {
+  return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
+};
+var workerThreadService = null;
+var startWorkerThreadService = (worker_threads2) => {
+  let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
+  let worker = new worker_threads2.Worker(__filename, {
+    workerData: { workerPort, defaultWD, esbuildVersion: "0.18.20" },
+    transferList: [workerPort],
+    // From node's documentation: https://nodejs.org/api/worker_threads.html
+    //
+    //   Take care when launching worker threads from preload scripts (scripts loaded
+    //   and run using the `-r` command line flag). Unless the `execArgv` option is
+    //   explicitly set, new Worker threads automatically inherit the command line flags
+    //   from the running process and will preload the same preload scripts as the main
+    //   thread. If the preload script unconditionally launches a worker thread, every
+    //   thread spawned will spawn another until the application crashes.
+    //
+    execArgv: []
+  });
+  let nextID = 0;
+  let fakeBuildError = (text) => {
+    let error = new Error(`Build failed with 1 error:
+error: ${text}`);
+    let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
+    error.errors = errors;
+    error.warnings = [];
+    return error;
+  };
+  let validateBuildSyncOptions = (options) => {
+    if (!options)
+      return;
+    let plugins = options.plugins;
+    if (plugins && plugins.length > 0)
+      throw fakeBuildError(`Cannot use plugins in synchronous API calls`);
+  };
+  let applyProperties = (object, properties) => {
+    for (let key in properties) {
+      object[key] = properties[key];
+    }
+  };
+  let runCallSync = (command, args) => {
+    let id = nextID++;
+    let sharedBuffer = new SharedArrayBuffer(8);
+    let sharedBufferView = new Int32Array(sharedBuffer);
+    let msg = { sharedBuffer, id, command, args };
+    worker.postMessage(msg);
+    let status = Atomics.wait(sharedBufferView, 0, 0);
+    if (status !== "ok" && status !== "not-equal")
+      throw new Error("Internal error: Atomics.wait() failed: " + status);
+    let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
+    if (id !== id2)
+      throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
+    if (reject) {
+      applyProperties(reject, properties);
+      throw reject;
+    }
+    return resolve;
+  };
+  worker.unref();
+  return {
+    buildSync(options) {
+      validateBuildSyncOptions(options);
+      return runCallSync("build", [options]);
+    },
+    transformSync(input, options) {
+      return runCallSync("transform", [input, options]);
+    },
+    formatMessagesSync(messages, options) {
+      return runCallSync("formatMessages", [messages, options]);
+    },
+    analyzeMetafileSync(metafile, options) {
+      return runCallSync("analyzeMetafile", [metafile, options]);
+    }
+  };
+};
+var startSyncServiceWorker = () => {
+  let workerPort = worker_threads.workerData.workerPort;
+  let parentPort = worker_threads.parentPort;
+  let extractProperties = (object) => {
+    let properties = {};
+    if (object && typeof object === "object") {
+      for (let key in object) {
+        properties[key] = object[key];
+      }
+    }
+    return properties;
+  };
+  try {
+    let service = ensureServiceIsRunning();
+    defaultWD = worker_threads.workerData.defaultWD;
+    parentPort.on("message", (msg) => {
+      (async () => {
+        let { sharedBuffer, id, command, args } = msg;
+        let sharedBufferView = new Int32Array(sharedBuffer);
+        try {
+          switch (command) {
+            case "build":
+              workerPort.postMessage({ id, resolve: await service.build(args[0]) });
+              break;
+            case "transform":
+              workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
+              break;
+            case "formatMessages":
+              workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
+              break;
+            case "analyzeMetafile":
+              workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
+              break;
+            default:
+              throw new Error(`Invalid command: ${command}`);
+          }
+        } catch (reject) {
+          workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
+        }
+        Atomics.add(sharedBufferView, 0, 1);
+        Atomics.notify(sharedBufferView, 0, Infinity);
+      })();
+    });
+  } catch (reject) {
+    parentPort.on("message", (msg) => {
+      let { sharedBuffer, id } = msg;
+      let sharedBufferView = new Int32Array(sharedBuffer);
+      workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
+      Atomics.add(sharedBufferView, 0, 1);
+      Atomics.notify(sharedBufferView, 0, Infinity);
+    });
+  }
+};
+if (isInternalWorkerThread) {
+  startSyncServiceWorker();
+}
+var node_default = node_exports;
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+  analyzeMetafile,
+  analyzeMetafileSync,
+  build,
+  buildSync,
+  context,
+  formatMessages,
+  formatMessagesSync,
+  initialize,
+  transform,
+  transformSync,
+  version
+});

+ 42 - 0
node_modules/@esbuild-kit/core-utils/node_modules/esbuild/package.json

@@ -0,0 +1,42 @@
+{
+  "name": "esbuild",
+  "version": "0.18.20",
+  "description": "An extremely fast JavaScript and CSS bundler and minifier.",
+  "repository": "https://github.com/evanw/esbuild",
+  "scripts": {
+    "postinstall": "node install.js"
+  },
+  "main": "lib/main.js",
+  "types": "lib/main.d.ts",
+  "engines": {
+    "node": ">=12"
+  },
+  "bin": {
+    "esbuild": "bin/esbuild"
+  },
+  "optionalDependencies": {
+    "@esbuild/android-arm": "0.18.20",
+    "@esbuild/android-arm64": "0.18.20",
+    "@esbuild/android-x64": "0.18.20",
+    "@esbuild/darwin-arm64": "0.18.20",
+    "@esbuild/darwin-x64": "0.18.20",
+    "@esbuild/freebsd-arm64": "0.18.20",
+    "@esbuild/freebsd-x64": "0.18.20",
+    "@esbuild/linux-arm": "0.18.20",
+    "@esbuild/linux-arm64": "0.18.20",
+    "@esbuild/linux-ia32": "0.18.20",
+    "@esbuild/linux-loong64": "0.18.20",
+    "@esbuild/linux-mips64el": "0.18.20",
+    "@esbuild/linux-ppc64": "0.18.20",
+    "@esbuild/linux-riscv64": "0.18.20",
+    "@esbuild/linux-s390x": "0.18.20",
+    "@esbuild/linux-x64": "0.18.20",
+    "@esbuild/netbsd-x64": "0.18.20",
+    "@esbuild/openbsd-x64": "0.18.20",
+    "@esbuild/sunos-x64": "0.18.20",
+    "@esbuild/win32-arm64": "0.18.20",
+    "@esbuild/win32-ia32": "0.18.20",
+    "@esbuild/win32-x64": "0.18.20"
+  },
+  "license": "MIT"
+}

+ 33 - 0
node_modules/@esbuild-kit/core-utils/package.json

@@ -0,0 +1,33 @@
+{
+  "name": "@esbuild-kit/core-utils",
+  "version": "3.3.2",
+  "publishConfig": {
+    "access": "public"
+  },
+  "license": "MIT",
+  "repository": "esbuild-kit/core-utils",
+  "author": {
+    "name": "Hiroki Osame",
+    "email": "hiroki.osame@gmail.com"
+  },
+  "files": [
+    "dist"
+  ],
+  "main": "./dist/index.js",
+  "types": "./dist/index.d.ts",
+  "exports": {
+    "types": "./dist/index.d.ts",
+    "default": "./dist/index.js"
+  },
+  "imports": {
+    "#esbuild-kit/core-utils": {
+      "types": "./src/index.ts",
+      "development": "./src/index.ts",
+      "default": "./dist/index.js"
+    }
+  },
+  "dependencies": {
+    "esbuild": "~0.18.20",
+    "source-map-support": "^0.5.21"
+  }
+}

+ 21 - 0
node_modules/@esbuild-kit/esm-loader/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 155 - 0
node_modules/@esbuild-kit/esm-loader/README.md

@@ -0,0 +1,155 @@
+# esm-loader
+
+[Node.js loader](https://nodejs.org/api/esm.html#loaders) for loading TypeScript files.
+
+### Features
+- Transforms TypeScript to ESM on demand
+- Classic Node.js resolution (extensionless & directory imports)
+- Cached for performance boost
+- Supports Node.js v12.20.0+
+- Handles `node:` import prefixes
+- Resolves `tsconfig.json` [`paths`](https://www.typescriptlang.org/tsconfig#paths)
+- Named imports from JSON modules
+
+> **Protip: use with _cjs-loader_ or _tsx_**
+>
+> _esm-loader_ only transforms ES modules (`.mjs`/`.mts` extensions or `.js` files in `module` type packages).
+>
+> To transform CommonJS files (`.cjs`/`.cts` extensions or `.js` files in `commonjs` type packages), use this with [_cjs-loader_](https://github.com/esbuild-kit/cjs-loader).
+>
+> Alternatively, use [tsx](https://github.com/esbuild-kit/tsx) to handle them both automatically.
+
+<br>
+
+<p align="center">
+	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum">
+		<picture>
+			<source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image=dark">
+			<source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image">
+			<img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=platinum&image" alt="Premium sponsor banner">
+		</picture>
+	</a>
+</p>
+
+## Install
+
+```sh
+npm install --save-dev @esbuild-kit/esm-loader
+```
+
+## Usage
+
+Pass `@esbuild-kit/esm-loader` into the [`--loader`](https://nodejs.org/api/cli.html#--experimental-loadermodule) flag.
+```sh
+node --loader @esbuild-kit/esm-loader ./file.ts
+```
+
+### TypeScript configuration
+The following properties are used from `tsconfig.json` in the working directory:
+- [`strict`](https://www.typescriptlang.org/tsconfig#strict): Whether to transform to strict mode
+- [`jsx`](https://esbuild.github.io/api/#jsx): Whether to transform JSX
+	> **Warning:** When set to `preserve`, the JSX syntax will remain untransformed. To prevent Node.js from throwing a syntax error, chain another Node.js loader that can transform JSX to JS.
+- [`jsxFactory`](https://esbuild.github.io/api/#jsx-factory): How to transform JSX
+- [`jsxFragmentFactory`](https://esbuild.github.io/api/#jsx-fragment): How to transform JSX Fragments
+- [`jsxImportSource`](https://www.typescriptlang.org/tsconfig#jsxImportSource): Where to import JSX functions from
+- [`allowJs`](https://www.typescriptlang.org/tsconfig#allowJs): Whether to apply the tsconfig to JS files
+- [`paths`](https://www.typescriptlang.org/tsconfig#paths): For resolving aliases
+
+#### Custom `tsconfig.json` path
+By default, `tsconfig.json` will be detected from the current working directory.
+
+To set a custom path, use the `ESBK_TSCONFIG_PATH` environment variable:
+
+```sh
+ESBK_TSCONFIG_PATH=./path/to/tsconfig.custom.json node --loader @esbuild-kit/esm-loader ./file.ts
+```
+
+### Cache
+Modules transformations are cached in the system cache directory ([`TMPDIR`](https://en.wikipedia.org/wiki/TMPDIR)). Transforms are cached by content hash so duplicate dependencies are not re-transformed.
+
+Set environment variable `ESBK_DISABLE_CACHE` to a truthy value to disable the cache:
+
+```sh
+ESBK_DISABLE_CACHE=1 node --loader @esbuild-kit/esm-loader ./file.ts
+```
+
+<br>
+
+<p align="center">
+	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold">
+		<picture>
+			<source width="830" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image=dark">
+			<source width="830" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image">
+			<img width="830" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=gold&image" alt="Premium sponsor banner">
+		</picture>
+	</a>
+</p>
+
+## FAQ
+
+### Can it import JSON modules?
+Yes. This loader transpiles JSON modules so it's also compatible with named imports.
+
+### Can it import ESM modules over network?
+
+Node.js has built-in support for network imports [behind the `--experimental-network-imports` flag](https://nodejs.org/api/esm.html#network-based-loading-is-not-enabled-by-default).
+
+You can pass it in with `esm-loader`:
+
+```sh
+node --loader @esbuild-kit/esm-loader --experimental-network-imports ./file.ts
+```
+
+### Can it resolve files without an extension?
+
+In ESM, import paths must be explicit (must include file name and extension).
+
+For backwards compatibility, this loader adds support for classic Node resolution for extensions: `.js`, `.json`, `.ts`, `.tsx`, `.jsx`. Resolving a `index` file by the directory name works too.
+
+```js
+import file from './file' // -> ./file.js
+import directory from './directory' // -> ./directory/index.js
+```
+
+### Can it use Node.js's CommonJS resolution algorithm?
+
+ESM import resolution expects explicit import paths, whereas CommonJS resolution expects implicit imports (eg. extensionless & directory imports).
+
+As a result of this change, Node.js changes how it imports a path that matches both a file and directory. In ESM, the directory would be imported, but in CJS, the file would be imported.
+
+To use to the CommonJS resolution algorithm, use the [`--experimental-specifier-resolution=node`](https://nodejs.org/api/cli.html#--experimental-specifier-resolutionmode) flag.
+
+```sh
+node --loader @esbuild-kit/esm-loader --experimental-specifier-resolution=node ./file.ts
+```
+
+## Related
+
+- [tsx](https://github.com/esbuild-kit/tsx) - Node.js runtime powered by esbuild using [`@esbuild-kit/cjs-loader`](https://github.com/esbuild-kit/cjs-loader) and [`@esbuild-kit/esm-loader`](https://github.com/esbuild-kit/esm-loader).
+
+- [@esbuild-kit/cjs-loader](https://github.com/esbuild-kit/cjs-loader) - TypeScript & ESM to CJS transpiler using the Node.js loader API.
+
+## Sponsors
+
+<p align="center">
+	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1">
+		<picture>
+			<source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image=dark">
+			<source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image">
+			<img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver1&image" alt="Premium sponsor banner">
+		</picture>
+	</a>
+	<a href="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2">
+		<picture>
+			<source width="410" media="(prefers-color-scheme: dark)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image=dark">
+			<source width="410" media="(prefers-color-scheme: light)" srcset="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image">
+			<img width="410" src="https://privatenumber-sponsors.vercel.app/api/sponsor?tier=silver2&image" alt="Premium sponsor banner">
+		</picture>
+	</a>
+</p>
+
+<p align="center">
+	<a href="https://github.com/sponsors/privatenumber">
+		<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
+	</a>
+</p>

Diff do ficheiro suprimidas por serem muito extensas
+ 11 - 0
node_modules/@esbuild-kit/esm-loader/dist/index.js


+ 31 - 0
node_modules/@esbuild-kit/esm-loader/package.json

@@ -0,0 +1,31 @@
+{
+  "name": "@esbuild-kit/esm-loader",
+  "version": "2.6.5",
+  "publishConfig": {
+    "access": "public"
+  },
+  "description": "Node.js loader for compiling TypeScript modules to ESM",
+  "keywords": [
+    "esbuild",
+    "loader",
+    "node",
+    "esm",
+    "typescript"
+  ],
+  "license": "MIT",
+  "repository": "esbuild-kit/esm-loader",
+  "author": {
+    "name": "Hiroki Osame",
+    "email": "hiroki.osame@gmail.com"
+  },
+  "type": "module",
+  "files": [
+    "dist"
+  ],
+  "main": "./dist/index.js",
+  "exports": "./dist/index.js",
+  "dependencies": {
+    "@esbuild-kit/core-utils": "^3.3.2",
+    "get-tsconfig": "^4.7.0"
+  }
+}

+ 3 - 0
node_modules/@esbuild/win32-x64/README.md

@@ -0,0 +1,3 @@
+# esbuild
+
+This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.

BIN
node_modules/@esbuild/win32-x64/esbuild.exe


+ 20 - 0
node_modules/@esbuild/win32-x64/package.json

@@ -0,0 +1,20 @@
+{
+  "name": "@esbuild/win32-x64",
+  "version": "0.25.12",
+  "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/evanw/esbuild.git"
+  },
+  "license": "MIT",
+  "preferUnplugged": true,
+  "engines": {
+    "node": ">=18"
+  },
+  "os": [
+    "win32"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 21 - 0
node_modules/@types/node/LICENSE

@@ -0,0 +1,21 @@
+    MIT License
+
+    Copyright (c) Microsoft Corporation.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE

+ 15 - 0
node_modules/@types/node/README.md

@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for node (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
+
+### Additional Details
+ * Last updated: Fri, 10 Apr 2026 03:39:58 GMT
+ * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig).

+ 950 - 0
node_modules/@types/node/assert.d.ts

@@ -0,0 +1,950 @@
+declare module "node:assert" {
+    import strict = require("node:assert/strict");
+    /**
+     * An alias of {@link assert.ok}.
+     * @since v0.5.9
+     * @param value The input that is checked for being truthy.
+     */
+    function assert(value: unknown, message?: string | Error): asserts value;
+    const kOptions: unique symbol;
+    namespace assert {
+        type AssertMethodNames =
+            | "deepEqual"
+            | "deepStrictEqual"
+            | "doesNotMatch"
+            | "doesNotReject"
+            | "doesNotThrow"
+            | "equal"
+            | "fail"
+            | "ifError"
+            | "match"
+            | "notDeepEqual"
+            | "notDeepStrictEqual"
+            | "notEqual"
+            | "notStrictEqual"
+            | "ok"
+            | "partialDeepStrictEqual"
+            | "rejects"
+            | "strictEqual"
+            | "throws";
+        interface AssertOptions {
+            /**
+             * If set to `'full'`, shows the full diff in assertion errors.
+             * @default 'simple'
+             */
+            diff?: "simple" | "full" | undefined;
+            /**
+             * If set to `true`, non-strict methods behave like their
+             * corresponding strict methods.
+             * @default true
+             */
+            strict?: boolean | undefined;
+            /**
+             * If set to `true`, skips prototype and constructor
+             * comparison in deep equality checks.
+             * @since v24.9.0
+             * @default false
+             */
+            skipPrototype?: boolean | undefined;
+        }
+        interface Assert extends Pick<typeof assert, AssertMethodNames> {
+            readonly [kOptions]: AssertOptions & { strict: false };
+        }
+        interface AssertStrict extends Pick<typeof strict, AssertMethodNames> {
+            readonly [kOptions]: AssertOptions & { strict: true };
+        }
+        /**
+         * The `Assert` class allows creating independent assertion instances with custom options.
+         * @since v24.6.0
+         */
+        var Assert: {
+            /**
+             * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages.
+             *
+             * ```js
+             * const { Assert } = require('node:assert');
+             * const assertInstance = new Assert({ diff: 'full' });
+             * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 });
+             * // Shows a full diff in the error message.
+             * ```
+             *
+             * **Important**: When destructuring assertion methods from an `Assert` instance,
+             * the methods lose their connection to the instance's configuration options (such
+             * as `diff`, `strict`, and `skipPrototype` settings).
+             * The destructured methods will fall back to default behavior instead.
+             *
+             * ```js
+             * const myAssert = new Assert({ diff: 'full' });
+             *
+             * // This works as expected - uses 'full' diff
+             * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } });
+             *
+             * // This loses the 'full' diff setting - falls back to default 'simple' diff
+             * const { strictEqual } = myAssert;
+             * strictEqual({ a: 1 }, { b: { c: 1 } });
+             * ```
+             *
+             * The `skipPrototype` option affects all deep equality methods:
+             *
+             * ```js
+             * class Foo {
+             *   constructor(a) {
+             *     this.a = a;
+             *   }
+             * }
+             *
+             * class Bar {
+             *   constructor(a) {
+             *     this.a = a;
+             *   }
+             * }
+             *
+             * const foo = new Foo(1);
+             * const bar = new Bar(1);
+             *
+             * // Default behavior - fails due to different constructors
+             * const assert1 = new Assert();
+             * assert1.deepStrictEqual(foo, bar); // AssertionError
+             *
+             * // Skip prototype comparison - passes if properties are equal
+             * const assert2 = new Assert({ skipPrototype: true });
+             * assert2.deepStrictEqual(foo, bar); // OK
+             * ```
+             *
+             * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
+             * (diff: 'simple', non-strict mode).
+             * To maintain custom options when using destructured methods, avoid
+             * destructuring and call methods directly on the instance.
+             * @since v24.6.0
+             */
+            new(
+                options?: AssertOptions & { strict?: true | undefined },
+            ): AssertStrict;
+            new(
+                options: AssertOptions,
+            ): Assert;
+        };
+        interface AssertionErrorOptions {
+            /**
+             * If provided, the error message is set to this value.
+             */
+            message?: string | undefined;
+            /**
+             * The `actual` property on the error instance.
+             */
+            actual?: unknown;
+            /**
+             * The `expected` property on the error instance.
+             */
+            expected?: unknown;
+            /**
+             * The `operator` property on the error instance.
+             */
+            operator?: string | undefined;
+            /**
+             * If provided, the generated stack trace omits frames before this function.
+             */
+            stackStartFn?: Function | undefined;
+            /**
+             * If set to `'full'`, shows the full diff in assertion errors.
+             * @default 'simple'
+             */
+            diff?: "simple" | "full" | undefined;
+        }
+        /**
+         * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
+         */
+        class AssertionError extends Error {
+            constructor(options: AssertionErrorOptions);
+            /**
+             * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
+             */
+            actual: unknown;
+            /**
+             * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
+             */
+            expected: unknown;
+            /**
+             * Indicates if the message was auto-generated (`true`) or not.
+             */
+            generatedMessage: boolean;
+            /**
+             * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
+             */
+            code: "ERR_ASSERTION";
+            /**
+             * Set to the passed in operator value.
+             */
+            operator: string;
+        }
+        type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
+        /**
+         * Throws an `AssertionError` with the provided error message or a default
+         * error message. If the `message` parameter is an instance of an `Error` then
+         * it will be thrown instead of the `AssertionError`.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.fail();
+         * // AssertionError [ERR_ASSERTION]: Failed
+         *
+         * assert.fail('boom');
+         * // AssertionError [ERR_ASSERTION]: boom
+         *
+         * assert.fail(new TypeError('need array'));
+         * // TypeError: need array
+         * ```
+         * @since v0.1.21
+         * @param [message='Failed']
+         */
+        function fail(message?: string | Error): never;
+        /**
+         * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
+         *
+         * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
+         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+         * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
+         *
+         * Be aware that in the `repl` the error message will be different to the one
+         * thrown in a file! See below for further details.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.ok(true);
+         * // OK
+         * assert.ok(1);
+         * // OK
+         *
+         * assert.ok();
+         * // AssertionError: No value argument passed to `assert.ok()`
+         *
+         * assert.ok(false, 'it\'s false');
+         * // AssertionError: it's false
+         *
+         * // In the repl:
+         * assert.ok(typeof 123 === 'string');
+         * // AssertionError: false == true
+         *
+         * // In a file (e.g. test.js):
+         * assert.ok(typeof 123 === 'string');
+         * // AssertionError: The expression evaluated to a falsy value:
+         * //
+         * //   assert.ok(typeof 123 === 'string')
+         *
+         * assert.ok(false);
+         * // AssertionError: The expression evaluated to a falsy value:
+         * //
+         * //   assert.ok(false)
+         *
+         * assert.ok(0);
+         * // AssertionError: The expression evaluated to a falsy value:
+         * //
+         * //   assert.ok(0)
+         * ```
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * // Using `assert()` works the same:
+         * assert(2 + 2 > 5);;
+         * // AssertionError: The expression evaluated to a falsy value:
+         * //
+         * //   assert(2 + 2 > 5)
+         * ```
+         * @since v0.1.21
+         */
+        function ok(value: unknown, message?: string | Error): asserts value;
+        /**
+         * **Strict assertion mode**
+         *
+         * An alias of {@link strictEqual}.
+         *
+         * **Legacy assertion mode**
+         *
+         * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
+         *
+         * Tests shallow, coercive equality between the `actual` and `expected` parameters
+         * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
+         * and treated as being identical if both sides are `NaN`.
+         *
+         * ```js
+         * import assert from 'node:assert';
+         *
+         * assert.equal(1, 1);
+         * // OK, 1 == 1
+         * assert.equal(1, '1');
+         * // OK, 1 == '1'
+         * assert.equal(NaN, NaN);
+         * // OK
+         *
+         * assert.equal(1, 2);
+         * // AssertionError: 1 == 2
+         * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
+         * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
+         * ```
+         *
+         * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+         * @since v0.1.21
+         */
+        function equal(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * **Strict assertion mode**
+         *
+         * An alias of {@link notStrictEqual}.
+         *
+         * **Legacy assertion mode**
+         *
+         * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
+         *
+         * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
+         * specially handled and treated as being identical if both sides are `NaN`.
+         *
+         * ```js
+         * import assert from 'node:assert';
+         *
+         * assert.notEqual(1, 2);
+         * // OK
+         *
+         * assert.notEqual(1, 1);
+         * // AssertionError: 1 != 1
+         *
+         * assert.notEqual(1, '1');
+         * // AssertionError: 1 != '1'
+         * ```
+         *
+         * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
+         * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
+         * @since v0.1.21
+         */
+        function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * **Strict assertion mode**
+         *
+         * An alias of {@link deepStrictEqual}.
+         *
+         * **Legacy assertion mode**
+         *
+         * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
+         *
+         * Tests for deep equality between the `actual` and `expected` parameters. Consider
+         * using {@link deepStrictEqual} instead. {@link deepEqual} can have
+         * surprising results.
+         *
+         * _Deep equality_ means that the enumerable "own" properties of child objects
+         * are also recursively evaluated by the following rules.
+         * @since v0.1.21
+         */
+        function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * **Strict assertion mode**
+         *
+         * An alias of {@link notDeepStrictEqual}.
+         *
+         * **Legacy assertion mode**
+         *
+         * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
+         *
+         * Tests for any deep inequality. Opposite of {@link deepEqual}.
+         *
+         * ```js
+         * import assert from 'node:assert';
+         *
+         * const obj1 = {
+         *   a: {
+         *     b: 1,
+         *   },
+         * };
+         * const obj2 = {
+         *   a: {
+         *     b: 2,
+         *   },
+         * };
+         * const obj3 = {
+         *   a: {
+         *     b: 1,
+         *   },
+         * };
+         * const obj4 = { __proto__: obj1 };
+         *
+         * assert.notDeepEqual(obj1, obj1);
+         * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+         *
+         * assert.notDeepEqual(obj1, obj2);
+         * // OK
+         *
+         * assert.notDeepEqual(obj1, obj3);
+         * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
+         *
+         * assert.notDeepEqual(obj1, obj4);
+         * // OK
+         * ```
+         *
+         * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
+         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+         * instead of the `AssertionError`.
+         * @since v0.1.21
+         */
+        function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * Tests strict equality between the `actual` and `expected` parameters as
+         * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.strictEqual(1, 2);
+         * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+         * //
+         * // 1 !== 2
+         *
+         * assert.strictEqual(1, 1);
+         * // OK
+         *
+         * assert.strictEqual('Hello foobar', 'Hello World!');
+         * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
+         * // + actual - expected
+         * //
+         * // + 'Hello foobar'
+         * // - 'Hello World!'
+         * //          ^
+         *
+         * const apples = 1;
+         * const oranges = 2;
+         * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
+         * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
+         *
+         * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
+         * // TypeError: Inputs are not identical
+         * ```
+         *
+         * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+         * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+         * instead of the `AssertionError`.
+         * @since v0.1.21
+         */
+        function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+        /**
+         * Tests strict inequality between the `actual` and `expected` parameters as
+         * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.notStrictEqual(1, 2);
+         * // OK
+         *
+         * assert.notStrictEqual(1, 1);
+         * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
+         * //
+         * // 1
+         *
+         * assert.notStrictEqual(1, '1');
+         * // OK
+         * ```
+         *
+         * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
+         * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
+         * instead of the `AssertionError`.
+         * @since v0.1.21
+         */
+        function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * Tests for deep equality between the `actual` and `expected` parameters.
+         * "Deep" equality means that the enumerable "own" properties of child objects
+         * are recursively evaluated also by the following rules.
+         * @since v1.2.0
+         */
+        function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
+        /**
+         * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
+         * // OK
+         * ```
+         *
+         * If the values are deeply and strictly equal, an `AssertionError` is thrown
+         * with a `message` property set equal to the value of the `message` parameter. If
+         * the `message` parameter is undefined, a default error message is assigned. If
+         * the `message` parameter is an instance of an `Error` then it will be thrown
+         * instead of the `AssertionError`.
+         * @since v1.2.0
+         */
+        function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+        /**
+         * Expects the function `fn` to throw an error.
+         *
+         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+         * a validation object where each property will be tested for strict deep equality,
+         * or an instance of error where each property will be tested for strict deep
+         * equality including the non-enumerable `message` and `name` properties. When
+         * using an object, it is also possible to use a regular expression, when
+         * validating against a string property. See below for examples.
+         *
+         * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
+         * fails.
+         *
+         * Custom validation object/error instance:
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * const err = new TypeError('Wrong value');
+         * err.code = 404;
+         * err.foo = 'bar';
+         * err.info = {
+         *   nested: true,
+         *   baz: 'text',
+         * };
+         * err.reg = /abc/i;
+         *
+         * assert.throws(
+         *   () => {
+         *     throw err;
+         *   },
+         *   {
+         *     name: 'TypeError',
+         *     message: 'Wrong value',
+         *     info: {
+         *       nested: true,
+         *       baz: 'text',
+         *     },
+         *     // Only properties on the validation object will be tested for.
+         *     // Using nested objects requires all properties to be present. Otherwise
+         *     // the validation is going to fail.
+         *   },
+         * );
+         *
+         * // Using regular expressions to validate error properties:
+         * assert.throws(
+         *   () => {
+         *     throw err;
+         *   },
+         *   {
+         *     // The `name` and `message` properties are strings and using regular
+         *     // expressions on those will match against the string. If they fail, an
+         *     // error is thrown.
+         *     name: /^TypeError$/,
+         *     message: /Wrong/,
+         *     foo: 'bar',
+         *     info: {
+         *       nested: true,
+         *       // It is not possible to use regular expressions for nested properties!
+         *       baz: 'text',
+         *     },
+         *     // The `reg` property contains a regular expression and only if the
+         *     // validation object contains an identical regular expression, it is going
+         *     // to pass.
+         *     reg: /abc/i,
+         *   },
+         * );
+         *
+         * // Fails due to the different `message` and `name` properties:
+         * assert.throws(
+         *   () => {
+         *     const otherErr = new Error('Not found');
+         *     // Copy all enumerable properties from `err` to `otherErr`.
+         *     for (const [key, value] of Object.entries(err)) {
+         *       otherErr[key] = value;
+         *     }
+         *     throw otherErr;
+         *   },
+         *   // The error's `message` and `name` properties will also be checked when using
+         *   // an error as validation object.
+         *   err,
+         * );
+         * ```
+         *
+         * Validate instanceof using constructor:
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.throws(
+         *   () => {
+         *     throw new Error('Wrong value');
+         *   },
+         *   Error,
+         * );
+         * ```
+         *
+         * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
+         *
+         * Using a regular expression runs `.toString` on the error object, and will
+         * therefore also include the error name.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.throws(
+         *   () => {
+         *     throw new Error('Wrong value');
+         *   },
+         *   /^Error: Wrong value$/,
+         * );
+         * ```
+         *
+         * Custom error validation:
+         *
+         * The function must return `true` to indicate all internal validations passed.
+         * It will otherwise fail with an `AssertionError`.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.throws(
+         *   () => {
+         *     throw new Error('Wrong value');
+         *   },
+         *   (err) => {
+         *     assert(err instanceof Error);
+         *     assert(/value/.test(err));
+         *     // Avoid returning anything from validation functions besides `true`.
+         *     // Otherwise, it's not clear what part of the validation failed. Instead,
+         *     // throw an error about the specific validation that failed (as done in this
+         *     // example) and add as much helpful debugging information to that error as
+         *     // possible.
+         *     return true;
+         *   },
+         *   'unexpected error',
+         * );
+         * ```
+         *
+         * `error` cannot be a string. If a string is provided as the second
+         * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
+         * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
+         * a string as the second argument gets considered:
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * function throwingFirst() {
+         *   throw new Error('First');
+         * }
+         *
+         * function throwingSecond() {
+         *   throw new Error('Second');
+         * }
+         *
+         * function notThrowing() {}
+         *
+         * // The second argument is a string and the input function threw an Error.
+         * // The first case will not throw as it does not match for the error message
+         * // thrown by the input function!
+         * assert.throws(throwingFirst, 'Second');
+         * // In the next example the message has no benefit over the message from the
+         * // error and since it is not clear if the user intended to actually match
+         * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
+         * assert.throws(throwingSecond, 'Second');
+         * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
+         *
+         * // The string is only used (as message) in case the function does not throw:
+         * assert.throws(notThrowing, 'Second');
+         * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
+         *
+         * // If it was intended to match for the error message do this instead:
+         * // It does not throw because the error messages match.
+         * assert.throws(throwingSecond, /Second$/);
+         *
+         * // If the error message does not match, an AssertionError is thrown.
+         * assert.throws(throwingFirst, /Second$/);
+         * // AssertionError [ERR_ASSERTION]
+         * ```
+         *
+         * Due to the confusing error-prone notation, avoid a string as the second
+         * argument.
+         * @since v0.1.21
+         */
+        function throws(block: () => unknown, message?: string | Error): void;
+        function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+        /**
+         * Asserts that the function `fn` does not throw an error.
+         *
+         * Using `assert.doesNotThrow()` is actually not useful because there
+         * is no benefit in catching an error and then rethrowing it. Instead, consider
+         * adding a comment next to the specific code path that should not throw and keep
+         * error messages as expressive as possible.
+         *
+         * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
+         *
+         * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
+         * different type, or if the `error` parameter is undefined, the error is
+         * propagated back to the caller.
+         *
+         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+         * function. See {@link throws} for more details.
+         *
+         * The following, for instance, will throw the `TypeError` because there is no
+         * matching error type in the assertion:
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.doesNotThrow(
+         *   () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   SyntaxError,
+         * );
+         * ```
+         *
+         * However, the following will result in an `AssertionError` with the message
+         * 'Got unwanted exception...':
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.doesNotThrow(
+         *   () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   TypeError,
+         * );
+         * ```
+         *
+         * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.doesNotThrow(
+         *   () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   /Wrong value/,
+         *   'Whoops',
+         * );
+         * // Throws: AssertionError: Got unwanted exception: Whoops
+         * ```
+         * @since v0.1.21
+         */
+        function doesNotThrow(block: () => unknown, message?: string | Error): void;
+        function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
+        /**
+         * Throws `value` if `value` is not `undefined` or `null`. This is useful when
+         * testing the `error` argument in callbacks. The stack trace contains all frames
+         * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.ifError(null);
+         * // OK
+         * assert.ifError(0);
+         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
+         * assert.ifError('error');
+         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
+         * assert.ifError(new Error());
+         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
+         *
+         * // Create some random error frames.
+         * let err;
+         * (function errorFrame() {
+         *   err = new Error('test error');
+         * })();
+         *
+         * (function ifErrorFrame() {
+         *   assert.ifError(err);
+         * })();
+         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
+         * //     at ifErrorFrame
+         * //     at errorFrame
+         * ```
+         * @since v0.1.97
+         */
+        function ifError(value: unknown): asserts value is null | undefined;
+        /**
+         * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+         * calls the function and awaits the returned promise to complete. It will then
+         * check that the promise is rejected.
+         *
+         * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
+         * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
+         * error. In both cases the error handler is skipped.
+         *
+         * Besides the async nature to await the completion behaves identically to {@link throws}.
+         *
+         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
+         * an object where each property will be tested for, or an instance of error where
+         * each property will be tested for including the non-enumerable `message` and `name` properties.
+         *
+         * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * await assert.rejects(
+         *   async () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   {
+         *     name: 'TypeError',
+         *     message: 'Wrong value',
+         *   },
+         * );
+         * ```
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * await assert.rejects(
+         *   async () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   (err) => {
+         *     assert.strictEqual(err.name, 'TypeError');
+         *     assert.strictEqual(err.message, 'Wrong value');
+         *     return true;
+         *   },
+         * );
+         * ```
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.rejects(
+         *   Promise.reject(new Error('Wrong value')),
+         *   Error,
+         * ).then(() => {
+         *   // ...
+         * });
+         * ```
+         *
+         * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
+         * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
+         * example in {@link throws} carefully if using a string as the second argument gets considered.
+         * @since v10.0.0
+         */
+        function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
+        function rejects(
+            block: (() => Promise<unknown>) | Promise<unknown>,
+            error: AssertPredicate,
+            message?: string | Error,
+        ): Promise<void>;
+        /**
+         * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
+         * calls the function and awaits the returned promise to complete. It will then
+         * check that the promise is not rejected.
+         *
+         * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
+         * the function does not return a promise, `assert.doesNotReject()` will return a
+         * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
+         * the error handler is skipped.
+         *
+         * Using `assert.doesNotReject()` is actually not useful because there is little
+         * benefit in catching a rejection and then rejecting it again. Instead, consider
+         * adding a comment next to the specific code path that should not reject and keep
+         * error messages as expressive as possible.
+         *
+         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
+         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
+         * function. See {@link throws} for more details.
+         *
+         * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * await assert.doesNotReject(
+         *   async () => {
+         *     throw new TypeError('Wrong value');
+         *   },
+         *   SyntaxError,
+         * );
+         * ```
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
+         *   .then(() => {
+         *     // ...
+         *   });
+         * ```
+         * @since v10.0.0
+         */
+        function doesNotReject(
+            block: (() => Promise<unknown>) | Promise<unknown>,
+            message?: string | Error,
+        ): Promise<void>;
+        function doesNotReject(
+            block: (() => Promise<unknown>) | Promise<unknown>,
+            error: AssertPredicate,
+            message?: string | Error,
+        ): Promise<void>;
+        /**
+         * Expects the `string` input to match the regular expression.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.match('I will fail', /pass/);
+         * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
+         *
+         * assert.match(123, /pass/);
+         * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+         *
+         * assert.match('I will pass', /pass/);
+         * // OK
+         * ```
+         *
+         * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+         * to the value of the `message` parameter. If the `message` parameter is
+         * undefined, a default error message is assigned. If the `message` parameter is an
+         * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+         * @since v13.6.0, v12.16.0
+         */
+        function match(value: string, regExp: RegExp, message?: string | Error): void;
+        /**
+         * Expects the `string` input not to match the regular expression.
+         *
+         * ```js
+         * import assert from 'node:assert/strict';
+         *
+         * assert.doesNotMatch('I will fail', /fail/);
+         * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
+         *
+         * assert.doesNotMatch(123, /pass/);
+         * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
+         *
+         * assert.doesNotMatch('I will pass', /different/);
+         * // OK
+         * ```
+         *
+         * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
+         * to the value of the `message` parameter. If the `message` parameter is
+         * undefined, a default error message is assigned. If the `message` parameter is an
+         * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
+         * @since v13.6.0, v12.16.0
+         */
+        function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
+        /**
+         * Tests for partial deep equality between the `actual` and `expected` parameters.
+         * "Deep" equality means that the enumerable "own" properties of child objects
+         * are recursively evaluated also by the following rules. "Partial" equality means
+         * that only properties that exist on the `expected` parameter are going to be
+         * compared.
+         *
+         * This method always passes the same test cases as `assert.deepStrictEqual()`,
+         * behaving as a super set of it.
+         * @since v22.13.0
+         */
+        function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
+    }
+    namespace assert {
+        export { strict };
+    }
+    export = assert;
+}
+declare module "assert" {
+    import assert = require("node:assert");
+    export = assert;
+}

+ 59 - 0
node_modules/@types/node/assert/strict.d.ts

@@ -0,0 +1,59 @@
+declare module "node:assert/strict" {
+    import {
+        Assert,
+        AssertionError,
+        AssertionErrorOptions,
+        AssertOptions,
+        AssertPredicate,
+        AssertStrict,
+        deepStrictEqual,
+        doesNotMatch,
+        doesNotReject,
+        doesNotThrow,
+        fail,
+        ifError,
+        match,
+        notDeepStrictEqual,
+        notStrictEqual,
+        ok,
+        partialDeepStrictEqual,
+        rejects,
+        strictEqual,
+        throws,
+    } from "node:assert";
+    function strict(value: unknown, message?: string | Error): asserts value;
+    namespace strict {
+        export {
+            Assert,
+            AssertionError,
+            AssertionErrorOptions,
+            AssertOptions,
+            AssertPredicate,
+            AssertStrict,
+            deepStrictEqual,
+            deepStrictEqual as deepEqual,
+            doesNotMatch,
+            doesNotReject,
+            doesNotThrow,
+            fail,
+            ifError,
+            match,
+            notDeepStrictEqual,
+            notDeepStrictEqual as notDeepEqual,
+            notStrictEqual,
+            notStrictEqual as notEqual,
+            ok,
+            partialDeepStrictEqual,
+            rejects,
+            strict,
+            strictEqual,
+            strictEqual as equal,
+            throws,
+        };
+    }
+    export = strict;
+}
+declare module "assert/strict" {
+    import strict = require("node:assert/strict");
+    export = strict;
+}

+ 603 - 0
node_modules/@types/node/async_hooks.d.ts

@@ -0,0 +1,603 @@
+declare module "node:async_hooks" {
+    /**
+     * ```js
+     * import { executionAsyncId } from 'node:async_hooks';
+     * import fs from 'node:fs';
+     *
+     * console.log(executionAsyncId());  // 1 - bootstrap
+     * const path = '.';
+     * fs.open(path, 'r', (err, fd) => {
+     *   console.log(executionAsyncId());  // 6 - open()
+     * });
+     * ```
+     *
+     * The ID returned from `executionAsyncId()` is related to execution timing, not
+     * causality (which is covered by `triggerAsyncId()`):
+     *
+     * ```js
+     * const server = net.createServer((conn) => {
+     *   // Returns the ID of the server, not of the new connection, because the
+     *   // callback runs in the execution scope of the server's MakeCallback().
+     *   async_hooks.executionAsyncId();
+     *
+     * }).listen(port, () => {
+     *   // Returns the ID of a TickObject (process.nextTick()) because all
+     *   // callbacks passed to .listen() are wrapped in a nextTick().
+     *   async_hooks.executionAsyncId();
+     * });
+     * ```
+     *
+     * Promise contexts may not get precise `executionAsyncIds` by default.
+     * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
+     * @since v8.1.0
+     * @return The `asyncId` of the current execution context. Useful to track when something calls.
+     */
+    function executionAsyncId(): number;
+    /**
+     * Resource objects returned by `executionAsyncResource()` are most often internal
+     * Node.js handle objects with undocumented APIs. Using any functions or properties
+     * on the object is likely to crash your application and should be avoided.
+     *
+     * Using `executionAsyncResource()` in the top-level execution context will
+     * return an empty object as there is no handle or request object to use,
+     * but having an object representing the top-level can be helpful.
+     *
+     * ```js
+     * import { open } from 'node:fs';
+     * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
+     *
+     * console.log(executionAsyncId(), executionAsyncResource());  // 1 {}
+     * open(new URL(import.meta.url), 'r', (err, fd) => {
+     *   console.log(executionAsyncId(), executionAsyncResource());  // 7 FSReqWrap
+     * });
+     * ```
+     *
+     * This can be used to implement continuation local storage without the
+     * use of a tracking `Map` to store the metadata:
+     *
+     * ```js
+     * import { createServer } from 'node:http';
+     * import {
+     *   executionAsyncId,
+     *   executionAsyncResource,
+     *   createHook,
+     * } from 'node:async_hooks';
+     * const sym = Symbol('state'); // Private symbol to avoid pollution
+     *
+     * createHook({
+     *   init(asyncId, type, triggerAsyncId, resource) {
+     *     const cr = executionAsyncResource();
+     *     if (cr) {
+     *       resource[sym] = cr[sym];
+     *     }
+     *   },
+     * }).enable();
+     *
+     * const server = createServer((req, res) => {
+     *   executionAsyncResource()[sym] = { state: req.url };
+     *   setTimeout(function() {
+     *     res.end(JSON.stringify(executionAsyncResource()[sym]));
+     *   }, 100);
+     * }).listen(3000);
+     * ```
+     * @since v13.9.0, v12.17.0
+     * @return The resource representing the current execution. Useful to store data within the resource.
+     */
+    function executionAsyncResource(): object;
+    /**
+     * ```js
+     * const server = net.createServer((conn) => {
+     *   // The resource that caused (or triggered) this callback to be called
+     *   // was that of the new connection. Thus the return value of triggerAsyncId()
+     *   // is the asyncId of "conn".
+     *   async_hooks.triggerAsyncId();
+     *
+     * }).listen(port, () => {
+     *   // Even though all callbacks passed to .listen() are wrapped in a nextTick()
+     *   // the callback itself exists because the call to the server's .listen()
+     *   // was made. So the return value would be the ID of the server.
+     *   async_hooks.triggerAsyncId();
+     * });
+     * ```
+     *
+     * Promise contexts may not get valid `triggerAsyncId`s by default. See
+     * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
+     * @return The ID of the resource responsible for calling the callback that is currently being executed.
+     */
+    function triggerAsyncId(): number;
+    interface HookCallbacks {
+        /**
+         * The [`init` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource).
+         */
+        init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
+        /**
+         * The [`before` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#beforeasyncid).
+         */
+        before?(asyncId: number): void;
+        /**
+         * The [`after` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#afterasyncid).
+         */
+        after?(asyncId: number): void;
+        /**
+         * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promiseresolveasyncid).
+         */
+        promiseResolve?(asyncId: number): void;
+        /**
+         * The [`destroy` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#destroyasyncid).
+         */
+        destroy?(asyncId: number): void;
+        /**
+         * Whether the hook should track `Promise`s. Cannot be `false` if
+         * `promiseResolve` is set.
+         * @default true
+         */
+        trackPromises?: boolean | undefined;
+    }
+    interface AsyncHook {
+        /**
+         * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
+         */
+        enable(): this;
+        /**
+         * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
+         */
+        disable(): this;
+    }
+    /**
+     * Registers functions to be called for different lifetime events of each async
+     * operation.
+     *
+     * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
+     * respective asynchronous event during a resource's lifetime.
+     *
+     * All callbacks are optional. For example, if only resource cleanup needs to
+     * be tracked, then only the `destroy` callback needs to be passed. The
+     * specifics of all functions that can be passed to `callbacks` is in the
+     * [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) section.
+     *
+     * ```js
+     * import { createHook } from 'node:async_hooks';
+     *
+     * const asyncHook = createHook({
+     *   init(asyncId, type, triggerAsyncId, resource) { },
+     *   destroy(asyncId) { },
+     * });
+     * ```
+     *
+     * The callbacks will be inherited via the prototype chain:
+     *
+     * ```js
+     * class MyAsyncCallbacks {
+     *   init(asyncId, type, triggerAsyncId, resource) { }
+     *   destroy(asyncId) {}
+     * }
+     *
+     * class MyAddedCallbacks extends MyAsyncCallbacks {
+     *   before(asyncId) { }
+     *   after(asyncId) { }
+     * }
+     *
+     * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
+     * ```
+     *
+     * Because promises are asynchronous resources whose lifecycle is tracked
+     * via the async hooks mechanism, the `init()`, `before()`, `after()`, and
+     * `destroy()` callbacks _must not_ be async functions that return promises.
+     * @since v8.1.0
+     * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) to register
+     * @returns Instance used for disabling and enabling hooks
+     */
+    function createHook(options: HookCallbacks): AsyncHook;
+    interface AsyncResourceOptions {
+        /**
+         * The ID of the execution context that created this async event.
+         * @default executionAsyncId()
+         */
+        triggerAsyncId?: number | undefined;
+        /**
+         * Disables automatic `emitDestroy` when the object is garbage collected.
+         * This usually does not need to be set (even if `emitDestroy` is called
+         * manually), unless the resource's `asyncId` is retrieved and the
+         * sensitive API's `emitDestroy` is called with it.
+         * @default false
+         */
+        requireManualDestroy?: boolean | undefined;
+    }
+    /**
+     * The class `AsyncResource` is designed to be extended by the embedder's async
+     * resources. Using this, users can easily trigger the lifetime events of their
+     * own resources.
+     *
+     * The `init` hook will trigger when an `AsyncResource` is instantiated.
+     *
+     * The following is an overview of the `AsyncResource` API.
+     *
+     * ```js
+     * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
+     *
+     * // AsyncResource() is meant to be extended. Instantiating a
+     * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+     * // async_hook.executionAsyncId() is used.
+     * const asyncResource = new AsyncResource(
+     *   type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
+     * );
+     *
+     * // Run a function in the execution context of the resource. This will
+     * // * establish the context of the resource
+     * // * trigger the AsyncHooks before callbacks
+     * // * call the provided function `fn` with the supplied arguments
+     * // * trigger the AsyncHooks after callbacks
+     * // * restore the original execution context
+     * asyncResource.runInAsyncScope(fn, thisArg, ...args);
+     *
+     * // Call AsyncHooks destroy callbacks.
+     * asyncResource.emitDestroy();
+     *
+     * // Return the unique ID assigned to the AsyncResource instance.
+     * asyncResource.asyncId();
+     *
+     * // Return the trigger ID for the AsyncResource instance.
+     * asyncResource.triggerAsyncId();
+     * ```
+     */
+    class AsyncResource {
+        /**
+         * AsyncResource() is meant to be extended. Instantiating a
+         * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
+         * async_hook.executionAsyncId() is used.
+         * @param type The type of async event.
+         * @param triggerAsyncId The ID of the execution context that created
+         *   this async event (default: `executionAsyncId()`), or an
+         *   AsyncResourceOptions object (since v9.3.0)
+         */
+        constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
+        /**
+         * Binds the given function to the current execution context.
+         * @since v14.8.0, v12.19.0
+         * @param fn The function to bind to the current execution context.
+         * @param type An optional name to associate with the underlying `AsyncResource`.
+         */
+        static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
+            fn: Func,
+            type?: string,
+            thisArg?: ThisArg,
+        ): Func;
+        /**
+         * Binds the given function to execute to this `AsyncResource`'s scope.
+         * @since v14.8.0, v12.19.0
+         * @param fn The function to bind to the current `AsyncResource`.
+         */
+        bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+        /**
+         * Call the provided function with the provided arguments in the execution context
+         * of the async resource. This will establish the context, trigger the AsyncHooks
+         * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
+         * then restore the original execution context.
+         * @since v9.6.0
+         * @param fn The function to call in the execution context of this async resource.
+         * @param thisArg The receiver to be used for the function call.
+         * @param args Optional arguments to pass to the function.
+         */
+        runInAsyncScope<This, Result>(
+            fn: (this: This, ...args: any[]) => Result,
+            thisArg?: This,
+            ...args: any[]
+        ): Result;
+        /**
+         * Call all `destroy` hooks. This should only ever be called once. An error will
+         * be thrown if it is called more than once. This **must** be manually called. If
+         * the resource is left to be collected by the GC then the `destroy` hooks will
+         * never be called.
+         * @return A reference to `asyncResource`.
+         */
+        emitDestroy(): this;
+        /**
+         * @return The unique `asyncId` assigned to the resource.
+         */
+        asyncId(): number;
+        /**
+         * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
+         */
+        triggerAsyncId(): number;
+    }
+    interface AsyncLocalStorageOptions {
+        /**
+         * The default value to be used when no store is provided.
+         */
+        defaultValue?: any;
+        /**
+         * A name for the `AsyncLocalStorage` value.
+         */
+        name?: string | undefined;
+    }
+    /**
+     * This class creates stores that stay coherent through asynchronous operations.
+     *
+     * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory
+     * safe implementation that involves significant optimizations that are non-obvious
+     * to implement.
+     *
+     * The following example uses `AsyncLocalStorage` to build a simple logger
+     * that assigns IDs to incoming HTTP requests and includes them in messages
+     * logged within each request.
+     *
+     * ```js
+     * import http from 'node:http';
+     * import { AsyncLocalStorage } from 'node:async_hooks';
+     *
+     * const asyncLocalStorage = new AsyncLocalStorage();
+     *
+     * function logWithId(msg) {
+     *   const id = asyncLocalStorage.getStore();
+     *   console.log(`${id !== undefined ? id : '-'}:`, msg);
+     * }
+     *
+     * let idSeq = 0;
+     * http.createServer((req, res) => {
+     *   asyncLocalStorage.run(idSeq++, () => {
+     *     logWithId('start');
+     *     // Imagine any chain of async operations here
+     *     setImmediate(() => {
+     *       logWithId('finish');
+     *       res.end();
+     *     });
+     *   });
+     * }).listen(8080);
+     *
+     * http.get('http://localhost:8080');
+     * http.get('http://localhost:8080');
+     * // Prints:
+     * //   0: start
+     * //   0: finish
+     * //   1: start
+     * //   1: finish
+     * ```
+     *
+     * Each instance of `AsyncLocalStorage` maintains an independent storage context.
+     * Multiple instances can safely exist simultaneously without risk of interfering
+     * with each other's data.
+     * @since v13.10.0, v12.17.0
+     */
+    class AsyncLocalStorage<T> {
+        /**
+         * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a
+         * `run()` call or after an `enterWith()` call.
+         */
+        constructor(options?: AsyncLocalStorageOptions);
+        /**
+         * Binds the given function to the current execution context.
+         * @since v19.8.0
+         * @param fn The function to bind to the current execution context.
+         * @return A new function that calls `fn` within the captured execution context.
+         */
+        static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
+        /**
+         * Captures the current execution context and returns a function that accepts a
+         * function as an argument. Whenever the returned function is called, it
+         * calls the function passed to it within the captured context.
+         *
+         * ```js
+         * const asyncLocalStorage = new AsyncLocalStorage();
+         * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
+         * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
+         * console.log(result);  // returns 123
+         * ```
+         *
+         * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
+         * async context tracking purposes, for example:
+         *
+         * ```js
+         * class Foo {
+         *   #runInAsyncScope = AsyncLocalStorage.snapshot();
+         *
+         *   get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
+         * }
+         *
+         * const foo = asyncLocalStorage.run(123, () => new Foo());
+         * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
+         * ```
+         * @since v19.8.0
+         * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
+         */
+        static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
+        /**
+         * Disables the instance of `AsyncLocalStorage`. All subsequent calls
+         * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
+         *
+         * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
+         * instance will be exited.
+         *
+         * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores
+         * provided by the `asyncLocalStorage`, as those objects are garbage collected
+         * along with the corresponding async resources.
+         *
+         * Use this method when the `asyncLocalStorage` is not in use anymore
+         * in the current process.
+         * @since v13.10.0, v12.17.0
+         * @experimental
+         */
+        disable(): void;
+        /**
+         * Returns the current store.
+         * If called outside of an asynchronous context initialized by
+         * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
+         * returns `undefined`.
+         * @since v13.10.0, v12.17.0
+         */
+        getStore(): T | undefined;
+        /**
+         * The name of the `AsyncLocalStorage` instance if provided.
+         * @since v24.0.0
+         */
+        readonly name: string;
+        /**
+         * Runs a function synchronously within a context and returns its
+         * return value. The store is not accessible outside of the callback function.
+         * The store is accessible to any asynchronous operations created within the
+         * callback.
+         *
+         * The optional `args` are passed to the callback function.
+         *
+         * If the callback function throws an error, the error is thrown by `run()` too.
+         * The stacktrace is not impacted by this call and the context is exited.
+         *
+         * Example:
+         *
+         * ```js
+         * const store = { id: 2 };
+         * try {
+         *   asyncLocalStorage.run(store, () => {
+         *     asyncLocalStorage.getStore(); // Returns the store object
+         *     setTimeout(() => {
+         *       asyncLocalStorage.getStore(); // Returns the store object
+         *     }, 200);
+         *     throw new Error();
+         *   });
+         * } catch (e) {
+         *   asyncLocalStorage.getStore(); // Returns undefined
+         *   // The error will be caught here
+         * }
+         * ```
+         * @since v13.10.0, v12.17.0
+         */
+        run<R>(store: T, callback: () => R): R;
+        run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
+        /**
+         * Runs a function synchronously outside of a context and returns its
+         * return value. The store is not accessible within the callback function or
+         * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
+         *
+         * The optional `args` are passed to the callback function.
+         *
+         * If the callback function throws an error, the error is thrown by `exit()` too.
+         * The stacktrace is not impacted by this call and the context is re-entered.
+         *
+         * Example:
+         *
+         * ```js
+         * // Within a call to run
+         * try {
+         *   asyncLocalStorage.getStore(); // Returns the store object or value
+         *   asyncLocalStorage.exit(() => {
+         *     asyncLocalStorage.getStore(); // Returns undefined
+         *     throw new Error();
+         *   });
+         * } catch (e) {
+         *   asyncLocalStorage.getStore(); // Returns the same object or value
+         *   // The error will be caught here
+         * }
+         * ```
+         * @since v13.10.0, v12.17.0
+         * @experimental
+         */
+        exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
+        /**
+         * Transitions into the context for the remainder of the current
+         * synchronous execution and then persists the store through any following
+         * asynchronous calls.
+         *
+         * Example:
+         *
+         * ```js
+         * const store = { id: 1 };
+         * // Replaces previous store with the given store object
+         * asyncLocalStorage.enterWith(store);
+         * asyncLocalStorage.getStore(); // Returns the store object
+         * someAsyncOperation(() => {
+         *   asyncLocalStorage.getStore(); // Returns the same object
+         * });
+         * ```
+         *
+         * This transition will continue for the _entire_ synchronous execution.
+         * This means that if, for example, the context is entered within an event
+         * handler subsequent event handlers will also run within that context unless
+         * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
+         * to use the latter method.
+         *
+         * ```js
+         * const store = { id: 1 };
+         *
+         * emitter.on('my-event', () => {
+         *   asyncLocalStorage.enterWith(store);
+         * });
+         * emitter.on('my-event', () => {
+         *   asyncLocalStorage.getStore(); // Returns the same object
+         * });
+         *
+         * asyncLocalStorage.getStore(); // Returns undefined
+         * emitter.emit('my-event');
+         * asyncLocalStorage.getStore(); // Returns the same object
+         * ```
+         * @since v13.11.0, v12.17.0
+         * @experimental
+         */
+        enterWith(store: T): void;
+    }
+    /**
+     * @since v17.2.0, v16.14.0
+     * @return A map of provider types to the corresponding numeric id.
+     * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
+     */
+    namespace asyncWrapProviders {
+        const NONE: number;
+        const DIRHANDLE: number;
+        const DNSCHANNEL: number;
+        const ELDHISTOGRAM: number;
+        const FILEHANDLE: number;
+        const FILEHANDLECLOSEREQ: number;
+        const FIXEDSIZEBLOBCOPY: number;
+        const FSEVENTWRAP: number;
+        const FSREQCALLBACK: number;
+        const FSREQPROMISE: number;
+        const GETADDRINFOREQWRAP: number;
+        const GETNAMEINFOREQWRAP: number;
+        const HEAPSNAPSHOT: number;
+        const HTTP2SESSION: number;
+        const HTTP2STREAM: number;
+        const HTTP2PING: number;
+        const HTTP2SETTINGS: number;
+        const HTTPINCOMINGMESSAGE: number;
+        const HTTPCLIENTREQUEST: number;
+        const JSSTREAM: number;
+        const JSUDPWRAP: number;
+        const MESSAGEPORT: number;
+        const PIPECONNECTWRAP: number;
+        const PIPESERVERWRAP: number;
+        const PIPEWRAP: number;
+        const PROCESSWRAP: number;
+        const PROMISE: number;
+        const QUERYWRAP: number;
+        const SHUTDOWNWRAP: number;
+        const SIGNALWRAP: number;
+        const STATWATCHER: number;
+        const STREAMPIPE: number;
+        const TCPCONNECTWRAP: number;
+        const TCPSERVERWRAP: number;
+        const TCPWRAP: number;
+        const TTYWRAP: number;
+        const UDPSENDWRAP: number;
+        const UDPWRAP: number;
+        const SIGINTWATCHDOG: number;
+        const WORKER: number;
+        const WORKERHEAPSNAPSHOT: number;
+        const WRITEWRAP: number;
+        const ZLIB: number;
+        const CHECKPRIMEREQUEST: number;
+        const PBKDF2REQUEST: number;
+        const KEYPAIRGENREQUEST: number;
+        const KEYGENREQUEST: number;
+        const KEYEXPORTREQUEST: number;
+        const CIPHERREQUEST: number;
+        const DERIVEBITSREQUEST: number;
+        const HASHREQUEST: number;
+        const RANDOMBYTESREQUEST: number;
+        const RANDOMPRIMEREQUEST: number;
+        const SCRYPTREQUEST: number;
+        const SIGNREQUEST: number;
+        const TLSWRAP: number;
+        const VERIFYREQUEST: number;
+    }
+}
+declare module "async_hooks" {
+    export * from "node:async_hooks";
+}

+ 466 - 0
node_modules/@types/node/buffer.buffer.d.ts

@@ -0,0 +1,466 @@
+declare module "node:buffer" {
+    type ImplicitArrayBuffer<T extends WithImplicitCoercion<ArrayBufferLike>> = T extends
+        { valueOf(): infer V extends ArrayBufferLike } ? V : T;
+    global {
+        interface BufferConstructor {
+            // see buffer.d.ts for implementation shared with all TypeScript versions
+
+            /**
+             * Allocates a new buffer containing the given {str}.
+             *
+             * @param str String to store in buffer.
+             * @param encoding encoding to use, optional.  Default is 'utf8'
+             * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
+             */
+            new(str: string, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
+            /**
+             * Allocates a new buffer of {size} octets.
+             *
+             * @param size count of octets to allocate.
+             * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
+             */
+            new(size: number): Buffer<ArrayBuffer>;
+            /**
+             * Allocates a new buffer containing the given {array} of octets.
+             *
+             * @param array The octets to store.
+             * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
+             */
+            new(array: ArrayLike<number>): Buffer<ArrayBuffer>;
+            /**
+             * Produces a Buffer backed by the same allocated memory as
+             * the given {ArrayBuffer}/{SharedArrayBuffer}.
+             *
+             * @param arrayBuffer The ArrayBuffer with which to share memory.
+             * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
+             */
+            new<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(arrayBuffer: TArrayBuffer): Buffer<TArrayBuffer>;
+            /**
+             * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
+             * Array entries outside that range will be truncated to fit into it.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
+             * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
+             * ```
+             *
+             * If `array` is an `Array`-like object (that is, one with a `length` property of
+             * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
+             * a `Uint8Array`. This means all other `TypedArray` variants get treated as an
+             * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
+             * `Buffer.copyBytesFrom()`.
+             *
+             * A `TypeError` will be thrown if `array` is not an `Array` or another type
+             * appropriate for `Buffer.from()` variants.
+             *
+             * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
+             * `Buffer` pool like `Buffer.allocUnsafe()` does.
+             * @since v5.10.0
+             */
+            from(array: WithImplicitCoercion<ArrayLike<number>>): Buffer<ArrayBuffer>;
+            /**
+             * This creates a view of the `ArrayBuffer` without copying the underlying
+             * memory. For example, when passed a reference to the `.buffer` property of a
+             * `TypedArray` instance, the newly created `Buffer` will share the same
+             * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const arr = new Uint16Array(2);
+             *
+             * arr[0] = 5000;
+             * arr[1] = 4000;
+             *
+             * // Shares memory with `arr`.
+             * const buf = Buffer.from(arr.buffer);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 88 13 a0 0f>
+             *
+             * // Changing the original Uint16Array changes the Buffer also.
+             * arr[1] = 6000;
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 88 13 70 17>
+             * ```
+             *
+             * The optional `byteOffset` and `length` arguments specify a memory range within
+             * the `arrayBuffer` that will be shared by the `Buffer`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const ab = new ArrayBuffer(10);
+             * const buf = Buffer.from(ab, 0, 2);
+             *
+             * console.log(buf.length);
+             * // Prints: 2
+             * ```
+             *
+             * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
+             * `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
+             * variants.
+             *
+             * It is important to remember that a backing `ArrayBuffer` can cover a range
+             * of memory that extends beyond the bounds of a `TypedArray` view. A new
+             * `Buffer` created using the `buffer` property of a `TypedArray` may extend
+             * beyond the range of the `TypedArray`:
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
+             * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
+             * console.log(arrA.buffer === arrB.buffer); // true
+             *
+             * const buf = Buffer.from(arrB.buffer);
+             * console.log(buf);
+             * // Prints: <Buffer 63 64 65 66>
+             * ```
+             * @since v5.10.0
+             * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
+             * `.buffer` property of a `TypedArray`.
+             * @param byteOffset Index of first byte to expose. **Default:** `0`.
+             * @param length Number of bytes to expose. **Default:**
+             * `arrayBuffer.byteLength - byteOffset`.
+             */
+            from<TArrayBuffer extends WithImplicitCoercion<ArrayBufferLike>>(
+                arrayBuffer: TArrayBuffer,
+                byteOffset?: number,
+                length?: number,
+            ): Buffer<ImplicitArrayBuffer<TArrayBuffer>>;
+            /**
+             * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
+             * the character encoding to be used when converting `string` into bytes.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from('this is a tést');
+             * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
+             *
+             * console.log(buf1.toString());
+             * // Prints: this is a tést
+             * console.log(buf2.toString());
+             * // Prints: this is a tést
+             * console.log(buf1.toString('latin1'));
+             * // Prints: this is a tést
+             * ```
+             *
+             * A `TypeError` will be thrown if `string` is not a string or another type
+             * appropriate for `Buffer.from()` variants.
+             *
+             * `Buffer.from(string)` may also use the internal `Buffer` pool like
+             * `Buffer.allocUnsafe()` does.
+             * @since v5.10.0
+             * @param string A string to encode.
+             * @param encoding The encoding of `string`. **Default:** `'utf8'`.
+             */
+            from(string: WithImplicitCoercion<string>, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
+            from(arrayOrString: WithImplicitCoercion<ArrayLike<number> | string>): Buffer<ArrayBuffer>;
+            /**
+             * Creates a new Buffer using the passed {data}
+             * @param values to create a new Buffer
+             */
+            of(...items: number[]): Buffer<ArrayBuffer>;
+            /**
+             * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
+             *
+             * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
+             *
+             * If `totalLength` is not provided, it is calculated from the `Buffer` instances
+             * in `list` by adding their lengths.
+             *
+             * If `totalLength` is provided, it must be an unsigned integer. If the
+             * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
+             * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
+             * less than `totalLength`, the remaining space is filled with zeros.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Create a single `Buffer` from a list of three `Buffer` instances.
+             *
+             * const buf1 = Buffer.alloc(10);
+             * const buf2 = Buffer.alloc(14);
+             * const buf3 = Buffer.alloc(18);
+             * const totalLength = buf1.length + buf2.length + buf3.length;
+             *
+             * console.log(totalLength);
+             * // Prints: 42
+             *
+             * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
+             *
+             * console.log(bufA);
+             * // Prints: <Buffer 00 00 00 00 ...>
+             * console.log(bufA.length);
+             * // Prints: 42
+             * ```
+             *
+             * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
+             * @since v0.7.11
+             * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
+             * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
+             */
+            concat(list: readonly Uint8Array[], totalLength?: number): Buffer<ArrayBuffer>;
+            /**
+             * Copies the underlying memory of `view` into a new `Buffer`.
+             *
+             * ```js
+             * const u16 = new Uint16Array([0, 0xffff]);
+             * const buf = Buffer.copyBytesFrom(u16, 1, 1);
+             * u16[1] = 0;
+             * console.log(buf.length); // 2
+             * console.log(buf[0]); // 255
+             * console.log(buf[1]); // 255
+             * ```
+             * @since v19.8.0
+             * @param view The {TypedArray} to copy.
+             * @param [offset=0] The starting offset within `view`.
+             * @param [length=view.length - offset] The number of elements from `view` to copy.
+             */
+            copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer<ArrayBuffer>;
+            /**
+             * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.alloc(5);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 00 00 00 00 00>
+             * ```
+             *
+             * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+             *
+             * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.alloc(5, 'a');
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 61 61 61 61 61>
+             * ```
+             *
+             * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
+             * initialized by calling `buf.fill(fill, encoding)`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
+             * ```
+             *
+             * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
+             * contents will never contain sensitive data from previous allocations, including
+             * data that might not have been allocated for `Buffer`s.
+             *
+             * A `TypeError` will be thrown if `size` is not a number.
+             * @since v5.10.0
+             * @param size The desired length of the new `Buffer`.
+             * @param [fill=0] A value to pre-fill the new `Buffer` with.
+             * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
+             */
+            alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
+            /**
+             * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
+             *
+             * The underlying memory for `Buffer` instances created in this way is _not_
+             * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(10);
+             *
+             * console.log(buf);
+             * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
+             *
+             * buf.fill(0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
+             * ```
+             *
+             * A `TypeError` will be thrown if `size` is not a number.
+             *
+             * The `Buffer` module pre-allocates an internal `Buffer` instance of
+             * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
+             * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
+             *
+             * Use of this pre-allocated internal memory pool is a key difference between
+             * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
+             * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
+             * than or equal to half `Buffer.poolSize`. The
+             * difference is subtle but can be important when an application requires the
+             * additional performance that `Buffer.allocUnsafe()` provides.
+             * @since v5.10.0
+             * @param size The desired length of the new `Buffer`.
+             */
+            allocUnsafe(size: number): Buffer<ArrayBuffer>;
+            /**
+             * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
+             * `size` is 0.
+             *
+             * The underlying memory for `Buffer` instances created in this way is _not_
+             * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
+             * such `Buffer` instances with zeroes.
+             *
+             * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
+             * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
+             * allows applications to avoid the garbage collection overhead of creating many
+             * individually allocated `Buffer` instances. This approach improves both
+             * performance and memory usage by eliminating the need to track and clean up as
+             * many individual `ArrayBuffer` objects.
+             *
+             * However, in the case where a developer may need to retain a small chunk of
+             * memory from a pool for an indeterminate amount of time, it may be appropriate
+             * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
+             * then copying out the relevant bits.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Need to keep around a few small chunks of memory.
+             * const store = [];
+             *
+             * socket.on('readable', () => {
+             *   let data;
+             *   while (null !== (data = readable.read())) {
+             *     // Allocate for retained data.
+             *     const sb = Buffer.allocUnsafeSlow(10);
+             *
+             *     // Copy the data into the new allocation.
+             *     data.copy(sb, 0, 0, 10);
+             *
+             *     store.push(sb);
+             *   }
+             * });
+             * ```
+             *
+             * A `TypeError` will be thrown if `size` is not a number.
+             * @since v5.12.0
+             * @param size The desired length of the new `Buffer`.
+             */
+            allocUnsafeSlow(size: number): Buffer<ArrayBuffer>;
+        }
+        interface Buffer<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends Uint8Array<TArrayBuffer> {
+            // see buffer.d.ts for implementation shared with all TypeScript versions
+
+            /**
+             * Returns a new `Buffer` that references the same memory as the original, but
+             * offset and cropped by the `start` and `end` indices.
+             *
+             * This method is not compatible with the `Uint8Array.prototype.slice()`,
+             * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('buffer');
+             *
+             * const copiedBuf = Uint8Array.prototype.slice.call(buf);
+             * copiedBuf[0]++;
+             * console.log(copiedBuf.toString());
+             * // Prints: cuffer
+             *
+             * console.log(buf.toString());
+             * // Prints: buffer
+             *
+             * // With buf.slice(), the original buffer is modified.
+             * const notReallyCopiedBuf = buf.slice();
+             * notReallyCopiedBuf[0]++;
+             * console.log(notReallyCopiedBuf.toString());
+             * // Prints: cuffer
+             * console.log(buf.toString());
+             * // Also prints: cuffer (!)
+             * ```
+             * @since v0.3.0
+             * @deprecated Use `subarray` instead.
+             * @param [start=0] Where the new `Buffer` will start.
+             * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+             */
+            slice(start?: number, end?: number): Buffer<ArrayBuffer>;
+            /**
+             * Returns a new `Buffer` that references the same memory as the original, but
+             * offset and cropped by the `start` and `end` indices.
+             *
+             * Specifying `end` greater than `buf.length` will return the same result as
+             * that of `end` equal to `buf.length`.
+             *
+             * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
+             *
+             * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
+             * // from the original `Buffer`.
+             *
+             * const buf1 = Buffer.allocUnsafe(26);
+             *
+             * for (let i = 0; i < 26; i++) {
+             *   // 97 is the decimal ASCII value for 'a'.
+             *   buf1[i] = i + 97;
+             * }
+             *
+             * const buf2 = buf1.subarray(0, 3);
+             *
+             * console.log(buf2.toString('ascii', 0, buf2.length));
+             * // Prints: abc
+             *
+             * buf1[0] = 33;
+             *
+             * console.log(buf2.toString('ascii', 0, buf2.length));
+             * // Prints: !bc
+             * ```
+             *
+             * Specifying negative indexes causes the slice to be generated relative to the
+             * end of `buf` rather than the beginning.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('buffer');
+             *
+             * console.log(buf.subarray(-6, -1).toString());
+             * // Prints: buffe
+             * // (Equivalent to buf.subarray(0, 5).)
+             *
+             * console.log(buf.subarray(-6, -2).toString());
+             * // Prints: buff
+             * // (Equivalent to buf.subarray(0, 4).)
+             *
+             * console.log(buf.subarray(-5, -2).toString());
+             * // Prints: uff
+             * // (Equivalent to buf.subarray(1, 4).)
+             * ```
+             * @since v3.0.0
+             * @param [start=0] Where the new `Buffer` will start.
+             * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
+             */
+            subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
+        }
+        // TODO: remove globals in future version
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedBuffer = Buffer<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type AllowSharedBuffer = Buffer<ArrayBufferLike>;
+    }
+}

+ 1765 - 0
node_modules/@types/node/buffer.d.ts

@@ -0,0 +1,1765 @@
+declare module "node:buffer" {
+    import { ReadableStream } from "node:stream/web";
+    /**
+     * This function returns `true` if `input` contains only valid UTF-8-encoded data,
+     * including the case in which `input` is empty.
+     *
+     * Throws if the `input` is a detached array buffer.
+     * @since v19.4.0, v18.14.0
+     * @param input The input to validate.
+     */
+    export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean;
+    /**
+     * This function returns `true` if `input` contains only valid ASCII-encoded data,
+     * including the case in which `input` is empty.
+     *
+     * Throws if the `input` is a detached array buffer.
+     * @since v19.6.0, v18.15.0
+     * @param input The input to validate.
+     */
+    export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean;
+    export let INSPECT_MAX_BYTES: number;
+    export const kMaxLength: number;
+    export const kStringMaxLength: number;
+    export const constants: {
+        MAX_LENGTH: number;
+        MAX_STRING_LENGTH: number;
+    };
+    export type TranscodeEncoding =
+        | "ascii"
+        | "utf8"
+        | "utf-8"
+        | "utf16le"
+        | "utf-16le"
+        | "ucs2"
+        | "ucs-2"
+        | "latin1"
+        | "binary";
+    /**
+     * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
+     * encoding to another. Returns a new `Buffer` instance.
+     *
+     * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
+     * conversion from `fromEnc` to `toEnc` is not permitted.
+     *
+     * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
+     *
+     * The transcoding process will use substitution characters if a given byte
+     * sequence cannot be adequately represented in the target encoding. For instance:
+     *
+     * ```js
+     * import { Buffer, transcode } from 'node:buffer';
+     *
+     * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii');
+     * console.log(newBuf.toString('ascii'));
+     * // Prints: '?'
+     * ```
+     *
+     * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced
+     * with `?` in the transcoded `Buffer`.
+     * @since v7.1.0
+     * @param source A `Buffer` or `Uint8Array` instance.
+     * @param fromEnc The current encoding.
+     * @param toEnc To target encoding.
+     */
+    export function transcode(
+        source: Uint8Array,
+        fromEnc: TranscodeEncoding,
+        toEnc: TranscodeEncoding,
+    ): NonSharedBuffer;
+    /**
+     * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
+     * a prior call to `URL.createObjectURL()`.
+     * @since v16.7.0
+     * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
+     */
+    export function resolveObjectURL(id: string): Blob | undefined;
+    export { type AllowSharedBuffer, Buffer, type NonSharedBuffer };
+    /** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */
+    // TODO: remove in future major
+    export interface BlobOptions extends BlobPropertyBag {}
+    /** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */
+    export interface FileOptions extends FilePropertyBag {}
+    export type WithImplicitCoercion<T> =
+        | T
+        | { valueOf(): T }
+        | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never);
+    global {
+        namespace NodeJS {
+            export { BufferEncoding };
+        }
+        // Buffer class
+        type BufferEncoding =
+            | "ascii"
+            | "utf8"
+            | "utf-8"
+            | "utf16le"
+            | "utf-16le"
+            | "ucs2"
+            | "ucs-2"
+            | "base64"
+            | "base64url"
+            | "latin1"
+            | "binary"
+            | "hex";
+        /**
+         * Raw data is stored in instances of the Buffer class.
+         * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap.  A Buffer cannot be resized.
+         * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
+         */
+        interface BufferConstructor {
+            // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
+            // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
+
+            /**
+             * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * Buffer.isBuffer(Buffer.alloc(10)); // true
+             * Buffer.isBuffer(Buffer.from('foo')); // true
+             * Buffer.isBuffer('a string'); // false
+             * Buffer.isBuffer([]); // false
+             * Buffer.isBuffer(new Uint8Array(1024)); // false
+             * ```
+             * @since v0.1.101
+             */
+            isBuffer(obj: any): obj is Buffer;
+            /**
+             * Returns `true` if `encoding` is the name of a supported character encoding,
+             * or `false` otherwise.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * console.log(Buffer.isEncoding('utf8'));
+             * // Prints: true
+             *
+             * console.log(Buffer.isEncoding('hex'));
+             * // Prints: true
+             *
+             * console.log(Buffer.isEncoding('utf/8'));
+             * // Prints: false
+             *
+             * console.log(Buffer.isEncoding(''));
+             * // Prints: false
+             * ```
+             * @since v0.9.1
+             * @param encoding A character encoding name to check.
+             */
+            isEncoding(encoding: string): encoding is BufferEncoding;
+            /**
+             * Returns the byte length of a string when encoded using `encoding`.
+             * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
+             * for the encoding that is used to convert the string into bytes.
+             *
+             * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
+             * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
+             * return value might be greater than the length of a `Buffer` created from the
+             * string.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const str = '\u00bd + \u00bc = \u00be';
+             *
+             * console.log(`${str}: ${str.length} characters, ` +
+             *             `${Buffer.byteLength(str, 'utf8')} bytes`);
+             * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
+             * ```
+             *
+             * When `string` is a
+             * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
+             * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
+             * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
+             * @since v0.1.90
+             * @param string A value to calculate the length of.
+             * @param [encoding='utf8'] If `string` is a string, this is its encoding.
+             * @return The number of bytes contained within `string`.
+             */
+            byteLength(
+                string: string | NodeJS.ArrayBufferView | ArrayBufferLike,
+                encoding?: BufferEncoding,
+            ): number;
+            /**
+             * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from('1234');
+             * const buf2 = Buffer.from('0123');
+             * const arr = [buf1, buf2];
+             *
+             * console.log(arr.sort(Buffer.compare));
+             * // Prints: [ <Buffer 30 31 32 33>, <Buffer 31 32 33 34> ]
+             * // (This result is equal to: [buf2, buf1].)
+             * ```
+             * @since v0.11.13
+             * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
+             */
+            compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
+            /**
+             * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
+             * for pooling. This value may be modified.
+             * @since v0.11.3
+             */
+            poolSize: number;
+        }
+        interface Buffer {
+            // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
+            // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
+
+            /**
+             * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
+             * not contain enough space to fit the entire string, only part of `string` will be
+             * written. However, partially encoded characters will not be written.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.alloc(256);
+             *
+             * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
+             *
+             * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
+             * // Prints: 12 bytes: ½ + ¼ = ¾
+             *
+             * const buffer = Buffer.alloc(10);
+             *
+             * const length = buffer.write('abcd', 8);
+             *
+             * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
+             * // Prints: 2 bytes : ab
+             * ```
+             * @since v0.1.90
+             * @param string String to write to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write `string`.
+             * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
+             * @param [encoding='utf8'] The character encoding of `string`.
+             * @return Number of bytes written.
+             */
+            write(string: string, encoding?: BufferEncoding): number;
+            write(string: string, offset: number, encoding?: BufferEncoding): number;
+            write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
+            /**
+             * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
+             *
+             * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
+             * then each invalid byte is replaced with the replacement character `U+FFFD`.
+             *
+             * The maximum length of a string instance (in UTF-16 code units) is available
+             * as {@link constants.MAX_STRING_LENGTH}.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.allocUnsafe(26);
+             *
+             * for (let i = 0; i < 26; i++) {
+             *   // 97 is the decimal ASCII value for 'a'.
+             *   buf1[i] = i + 97;
+             * }
+             *
+             * console.log(buf1.toString('utf8'));
+             * // Prints: abcdefghijklmnopqrstuvwxyz
+             * console.log(buf1.toString('utf8', 0, 5));
+             * // Prints: abcde
+             *
+             * const buf2 = Buffer.from('tést');
+             *
+             * console.log(buf2.toString('hex'));
+             * // Prints: 74c3a97374
+             * console.log(buf2.toString('utf8', 0, 3));
+             * // Prints: té
+             * console.log(buf2.toString(undefined, 0, 3));
+             * // Prints: té
+             * ```
+             * @since v0.1.90
+             * @param [encoding='utf8'] The character encoding to use.
+             * @param [start=0] The byte offset to start decoding at.
+             * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
+             */
+            toString(encoding?: BufferEncoding, start?: number, end?: number): string;
+            /**
+             * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
+             * this function when stringifying a `Buffer` instance.
+             *
+             * `Buffer.from()` accepts objects in the format returned from this method.
+             * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
+             * const json = JSON.stringify(buf);
+             *
+             * console.log(json);
+             * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
+             *
+             * const copy = JSON.parse(json, (key, value) => {
+             *   return value &#x26;&#x26; value.type === 'Buffer' ?
+             *     Buffer.from(value) :
+             *     value;
+             * });
+             *
+             * console.log(copy);
+             * // Prints: <Buffer 01 02 03 04 05>
+             * ```
+             * @since v0.9.2
+             */
+            toJSON(): {
+                type: "Buffer";
+                data: number[];
+            };
+            /**
+             * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from('ABC');
+             * const buf2 = Buffer.from('414243', 'hex');
+             * const buf3 = Buffer.from('ABCD');
+             *
+             * console.log(buf1.equals(buf2));
+             * // Prints: true
+             * console.log(buf1.equals(buf3));
+             * // Prints: false
+             * ```
+             * @since v0.11.13
+             * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+             */
+            equals(otherBuffer: Uint8Array): boolean;
+            /**
+             * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
+             * Comparison is based on the actual sequence of bytes in each `Buffer`.
+             *
+             * * `0` is returned if `target` is the same as `buf`
+             * * `1` is returned if `target` should come _before_`buf` when sorted.
+             * * `-1` is returned if `target` should come _after_`buf` when sorted.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from('ABC');
+             * const buf2 = Buffer.from('BCD');
+             * const buf3 = Buffer.from('ABCD');
+             *
+             * console.log(buf1.compare(buf1));
+             * // Prints: 0
+             * console.log(buf1.compare(buf2));
+             * // Prints: -1
+             * console.log(buf1.compare(buf3));
+             * // Prints: -1
+             * console.log(buf2.compare(buf1));
+             * // Prints: 1
+             * console.log(buf2.compare(buf3));
+             * // Prints: 1
+             * console.log([buf1, buf2, buf3].sort(Buffer.compare));
+             * // Prints: [ <Buffer 41 42 43>, <Buffer 41 42 43 44>, <Buffer 42 43 44> ]
+             * // (This result is equal to: [buf1, buf3, buf2].)
+             * ```
+             *
+             * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
+             * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
+             *
+             * console.log(buf1.compare(buf2, 5, 9, 0, 4));
+             * // Prints: 0
+             * console.log(buf1.compare(buf2, 0, 6, 4));
+             * // Prints: -1
+             * console.log(buf1.compare(buf2, 5, 6, 5));
+             * // Prints: 1
+             * ```
+             *
+             * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
+             * @since v0.11.13
+             * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
+             * @param [targetStart=0] The offset within `target` at which to begin comparison.
+             * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
+             * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
+             * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
+             */
+            compare(
+                target: Uint8Array,
+                targetStart?: number,
+                targetEnd?: number,
+                sourceStart?: number,
+                sourceEnd?: number,
+            ): -1 | 0 | 1;
+            /**
+             * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
+             *
+             * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
+             * for all TypedArrays, including Node.js `Buffer`s, although it takes
+             * different function arguments.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Create two `Buffer` instances.
+             * const buf1 = Buffer.allocUnsafe(26);
+             * const buf2 = Buffer.allocUnsafe(26).fill('!');
+             *
+             * for (let i = 0; i < 26; i++) {
+             *   // 97 is the decimal ASCII value for 'a'.
+             *   buf1[i] = i + 97;
+             * }
+             *
+             * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
+             * buf1.copy(buf2, 8, 16, 20);
+             * // This is equivalent to:
+             * // buf2.set(buf1.subarray(16, 20), 8);
+             *
+             * console.log(buf2.toString('ascii', 0, 25));
+             * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
+             * ```
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Create a `Buffer` and copy data from one region to an overlapping region
+             * // within the same `Buffer`.
+             *
+             * const buf = Buffer.allocUnsafe(26);
+             *
+             * for (let i = 0; i < 26; i++) {
+             *   // 97 is the decimal ASCII value for 'a'.
+             *   buf[i] = i + 97;
+             * }
+             *
+             * buf.copy(buf, 0, 4, 10);
+             *
+             * console.log(buf.toString());
+             * // Prints: efghijghijklmnopqrstuvwxyz
+             * ```
+             * @since v0.1.90
+             * @param target A `Buffer` or {@link Uint8Array} to copy into.
+             * @param [targetStart=0] The offset within `target` at which to begin writing.
+             * @param [sourceStart=0] The offset within `buf` from which to begin copying.
+             * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
+             * @return The number of bytes copied.
+             */
+            copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian.
+             *
+             * `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeBigInt64BE(0x0102030405060708n, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+             * ```
+             * @since v12.0.0, v10.20.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeBigInt64BE(value: bigint, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian.
+             *
+             * `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeBigInt64LE(0x0102030405060708n, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+             * ```
+             * @since v12.0.0, v10.20.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeBigInt64LE(value: bigint, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian.
+             *
+             * This function is also available under the `writeBigUint64BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer de ca fa fe ca ce fa de>
+             * ```
+             * @since v12.0.0, v10.20.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeBigUInt64BE(value: bigint, offset?: number): number;
+            /**
+             * @alias Buffer.writeBigUInt64BE
+             * @since v14.10.0, v12.19.0
+             */
+            writeBigUint64BE(value: bigint, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer de fa ce ca fe fa ca de>
+             * ```
+             *
+             * This function is also available under the `writeBigUint64LE` alias.
+             * @since v12.0.0, v10.20.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeBigUInt64LE(value: bigint, offset?: number): number;
+            /**
+             * @alias Buffer.writeBigUInt64LE
+             * @since v14.10.0, v12.19.0
+             */
+            writeBigUint64LE(value: bigint, offset?: number): number;
+            /**
+             * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+             * when `value` is anything other than an unsigned integer.
+             *
+             * This function is also available under the `writeUintLE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(6);
+             *
+             * buf.writeUIntLE(0x1234567890ab, 0, 6);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer ab 90 78 56 34 12>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUIntLE(value: number, offset: number, byteLength: number): number;
+            /**
+             * @alias Buffer.writeUIntLE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUintLE(value: number, offset: number, byteLength: number): number;
+            /**
+             * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+             * when `value` is anything other than an unsigned integer.
+             *
+             * This function is also available under the `writeUintBE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(6);
+             *
+             * buf.writeUIntBE(0x1234567890ab, 0, 6);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 12 34 56 78 90 ab>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUIntBE(value: number, offset: number, byteLength: number): number;
+            /**
+             * @alias Buffer.writeUIntBE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUintBE(value: number, offset: number, byteLength: number): number;
+            /**
+             * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
+             * when `value` is anything other than a signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(6);
+             *
+             * buf.writeIntLE(0x1234567890ab, 0, 6);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer ab 90 78 56 34 12>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeIntLE(value: number, offset: number, byteLength: number): number;
+            /**
+             * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
+             * signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(6);
+             *
+             * buf.writeIntBE(0x1234567890ab, 0, 6);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 12 34 56 78 90 ab>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeIntBE(value: number, offset: number, byteLength: number): number;
+            /**
+             * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
+             *
+             * This function is also available under the `readBigUint64BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+             *
+             * console.log(buf.readBigUInt64BE(0));
+             * // Prints: 4294967295n
+             * ```
+             * @since v12.0.0, v10.20.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+             */
+            readBigUInt64BE(offset?: number): bigint;
+            /**
+             * @alias Buffer.readBigUInt64BE
+             * @since v14.10.0, v12.19.0
+             */
+            readBigUint64BE(offset?: number): bigint;
+            /**
+             * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
+             *
+             * This function is also available under the `readBigUint64LE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
+             *
+             * console.log(buf.readBigUInt64LE(0));
+             * // Prints: 18446744069414584320n
+             * ```
+             * @since v12.0.0, v10.20.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+             */
+            readBigUInt64LE(offset?: number): bigint;
+            /**
+             * @alias Buffer.readBigUInt64LE
+             * @since v14.10.0, v12.19.0
+             */
+            readBigUint64LE(offset?: number): bigint;
+            /**
+             * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed
+             * values.
+             * @since v12.0.0, v10.20.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+             */
+            readBigInt64BE(offset?: number): bigint;
+            /**
+             * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed
+             * values.
+             * @since v12.0.0, v10.20.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
+             */
+            readBigInt64LE(offset?: number): bigint;
+            /**
+             * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting
+             * up to 48 bits of accuracy.
+             *
+             * This function is also available under the `readUintLE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+             *
+             * console.log(buf.readUIntLE(0, 6).toString(16));
+             * // Prints: ab9078563412
+             * ```
+             * @since v0.11.15
+             * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+             */
+            readUIntLE(offset: number, byteLength: number): number;
+            /**
+             * @alias Buffer.readUIntLE
+             * @since v14.9.0, v12.19.0
+             */
+            readUintLE(offset: number, byteLength: number): number;
+            /**
+             * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting
+             * up to 48 bits of accuracy.
+             *
+             * This function is also available under the `readUintBE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+             *
+             * console.log(buf.readUIntBE(0, 6).toString(16));
+             * // Prints: 1234567890ab
+             * console.log(buf.readUIntBE(1, 6).toString(16));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.11.15
+             * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+             */
+            readUIntBE(offset: number, byteLength: number): number;
+            /**
+             * @alias Buffer.readUIntBE
+             * @since v14.9.0, v12.19.0
+             */
+            readUintBE(offset: number, byteLength: number): number;
+            /**
+             * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value
+             * supporting up to 48 bits of accuracy.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+             *
+             * console.log(buf.readIntLE(0, 6).toString(16));
+             * // Prints: -546f87a9cbee
+             * ```
+             * @since v0.11.15
+             * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+             */
+            readIntLE(offset: number, byteLength: number): number;
+            /**
+             * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value
+             * supporting up to 48 bits of accuracy.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
+             *
+             * console.log(buf.readIntBE(0, 6).toString(16));
+             * // Prints: 1234567890ab
+             * console.log(buf.readIntBE(1, 6).toString(16));
+             * // Throws ERR_OUT_OF_RANGE.
+             * console.log(buf.readIntBE(1, 0).toString(16));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.11.15
+             * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
+             * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
+             */
+            readIntBE(offset: number, byteLength: number): number;
+            /**
+             * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
+             *
+             * This function is also available under the `readUint8` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([1, -2]);
+             *
+             * console.log(buf.readUInt8(0));
+             * // Prints: 1
+             * console.log(buf.readUInt8(1));
+             * // Prints: 254
+             * console.log(buf.readUInt8(2));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+             */
+            readUInt8(offset?: number): number;
+            /**
+             * @alias Buffer.readUInt8
+             * @since v14.9.0, v12.19.0
+             */
+            readUint8(offset?: number): number;
+            /**
+             * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
+             *
+             * This function is also available under the `readUint16LE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56]);
+             *
+             * console.log(buf.readUInt16LE(0).toString(16));
+             * // Prints: 3412
+             * console.log(buf.readUInt16LE(1).toString(16));
+             * // Prints: 5634
+             * console.log(buf.readUInt16LE(2).toString(16));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+             */
+            readUInt16LE(offset?: number): number;
+            /**
+             * @alias Buffer.readUInt16LE
+             * @since v14.9.0, v12.19.0
+             */
+            readUint16LE(offset?: number): number;
+            /**
+             * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
+             *
+             * This function is also available under the `readUint16BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56]);
+             *
+             * console.log(buf.readUInt16BE(0).toString(16));
+             * // Prints: 1234
+             * console.log(buf.readUInt16BE(1).toString(16));
+             * // Prints: 3456
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+             */
+            readUInt16BE(offset?: number): number;
+            /**
+             * @alias Buffer.readUInt16BE
+             * @since v14.9.0, v12.19.0
+             */
+            readUint16BE(offset?: number): number;
+            /**
+             * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
+             *
+             * This function is also available under the `readUint32LE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+             *
+             * console.log(buf.readUInt32LE(0).toString(16));
+             * // Prints: 78563412
+             * console.log(buf.readUInt32LE(1).toString(16));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readUInt32LE(offset?: number): number;
+            /**
+             * @alias Buffer.readUInt32LE
+             * @since v14.9.0, v12.19.0
+             */
+            readUint32LE(offset?: number): number;
+            /**
+             * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
+             *
+             * This function is also available under the `readUint32BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
+             *
+             * console.log(buf.readUInt32BE(0).toString(16));
+             * // Prints: 12345678
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readUInt32BE(offset?: number): number;
+            /**
+             * @alias Buffer.readUInt32BE
+             * @since v14.9.0, v12.19.0
+             */
+            readUint32BE(offset?: number): number;
+            /**
+             * Reads a signed 8-bit integer from `buf` at the specified `offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed values.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([-1, 5]);
+             *
+             * console.log(buf.readInt8(0));
+             * // Prints: -1
+             * console.log(buf.readInt8(1));
+             * // Prints: 5
+             * console.log(buf.readInt8(2));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.0
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
+             */
+            readInt8(offset?: number): number;
+            /**
+             * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed values.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0, 5]);
+             *
+             * console.log(buf.readInt16LE(0));
+             * // Prints: 1280
+             * console.log(buf.readInt16LE(1));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+             */
+            readInt16LE(offset?: number): number;
+            /**
+             * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed values.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0, 5]);
+             *
+             * console.log(buf.readInt16BE(0));
+             * // Prints: 5
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
+             */
+            readInt16BE(offset?: number): number;
+            /**
+             * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed values.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0, 0, 0, 5]);
+             *
+             * console.log(buf.readInt32LE(0));
+             * // Prints: 83886080
+             * console.log(buf.readInt32LE(1));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readInt32LE(offset?: number): number;
+            /**
+             * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
+             *
+             * Integers read from a `Buffer` are interpreted as two's complement signed values.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([0, 0, 0, 5]);
+             *
+             * console.log(buf.readInt32BE(0));
+             * // Prints: 5
+             * ```
+             * @since v0.5.5
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readInt32BE(offset?: number): number;
+            /**
+             * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([1, 2, 3, 4]);
+             *
+             * console.log(buf.readFloatLE(0));
+             * // Prints: 1.539989614439558e-36
+             * console.log(buf.readFloatLE(1));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.11.15
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readFloatLE(offset?: number): number;
+            /**
+             * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([1, 2, 3, 4]);
+             *
+             * console.log(buf.readFloatBE(0));
+             * // Prints: 2.387939260590663e-38
+             * ```
+             * @since v0.11.15
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
+             */
+            readFloatBE(offset?: number): number;
+            /**
+             * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+             *
+             * console.log(buf.readDoubleLE(0));
+             * // Prints: 5.447603722011605e-270
+             * console.log(buf.readDoubleLE(1));
+             * // Throws ERR_OUT_OF_RANGE.
+             * ```
+             * @since v0.11.15
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+             */
+            readDoubleLE(offset?: number): number;
+            /**
+             * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
+             *
+             * console.log(buf.readDoubleBE(0));
+             * // Prints: 8.20788039913184e-304
+             * ```
+             * @since v0.11.15
+             * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
+             */
+            readDoubleBE(offset?: number): number;
+            reverse(): this;
+            /**
+             * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
+             * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+             *
+             * buf1.swap16();
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 02 01 04 03 06 05 08 07>
+             *
+             * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+             *
+             * buf2.swap16();
+             * // Throws ERR_INVALID_BUFFER_SIZE.
+             * ```
+             *
+             * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
+             * between UTF-16 little-endian and UTF-16 big-endian:
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
+             * buf.swap16(); // Convert to big-endian UTF-16 text.
+             * ```
+             * @since v5.10.0
+             * @return A reference to `buf`.
+             */
+            swap16(): this;
+            /**
+             * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
+             * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+             *
+             * buf1.swap32();
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 04 03 02 01 08 07 06 05>
+             *
+             * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+             *
+             * buf2.swap32();
+             * // Throws ERR_INVALID_BUFFER_SIZE.
+             * ```
+             * @since v5.10.0
+             * @return A reference to `buf`.
+             */
+            swap32(): this;
+            /**
+             * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
+             * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 01 02 03 04 05 06 07 08>
+             *
+             * buf1.swap64();
+             *
+             * console.log(buf1);
+             * // Prints: <Buffer 08 07 06 05 04 03 02 01>
+             *
+             * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
+             *
+             * buf2.swap64();
+             * // Throws ERR_INVALID_BUFFER_SIZE.
+             * ```
+             * @since v6.3.0
+             * @return A reference to `buf`.
+             */
+            swap64(): this;
+            /**
+             * Writes `value` to `buf` at the specified `offset`. `value` must be a
+             * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
+             * other than an unsigned 8-bit integer.
+             *
+             * This function is also available under the `writeUint8` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeUInt8(0x3, 0);
+             * buf.writeUInt8(0x4, 1);
+             * buf.writeUInt8(0x23, 2);
+             * buf.writeUInt8(0x42, 3);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 03 04 23 42>
+             * ```
+             * @since v0.5.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUInt8(value: number, offset?: number): number;
+            /**
+             * @alias Buffer.writeUInt8
+             * @since v14.9.0, v12.19.0
+             */
+            writeUint8(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
+             * anything other than an unsigned 16-bit integer.
+             *
+             * This function is also available under the `writeUint16LE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeUInt16LE(0xdead, 0);
+             * buf.writeUInt16LE(0xbeef, 2);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer ad de ef be>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUInt16LE(value: number, offset?: number): number;
+            /**
+             * @alias Buffer.writeUInt16LE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUint16LE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
+             * unsigned 16-bit integer.
+             *
+             * This function is also available under the `writeUint16BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeUInt16BE(0xdead, 0);
+             * buf.writeUInt16BE(0xbeef, 2);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer de ad be ef>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUInt16BE(value: number, offset?: number): number;
+            /**
+             * @alias Buffer.writeUInt16BE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUint16BE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
+             * anything other than an unsigned 32-bit integer.
+             *
+             * This function is also available under the `writeUint32LE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeUInt32LE(0xfeedface, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer ce fa ed fe>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUInt32LE(value: number, offset?: number): number;
+            /**
+             * @alias Buffer.writeUInt32LE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUint32LE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
+             * unsigned 32-bit integer.
+             *
+             * This function is also available under the `writeUint32BE` alias.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeUInt32BE(0xfeedface, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer fe ed fa ce>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeUInt32BE(value: number, offset?: number): number;
+            /**
+             * @alias Buffer.writeUInt32BE
+             * @since v14.9.0, v12.19.0
+             */
+            writeUint32BE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
+             * signed 8-bit integer. Behavior is undefined when `value` is anything other than
+             * a signed 8-bit integer.
+             *
+             * `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(2);
+             *
+             * buf.writeInt8(2, 0);
+             * buf.writeInt8(-2, 1);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 02 fe>
+             * ```
+             * @since v0.5.0
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeInt8(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian.  The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+             * anything other than a signed 16-bit integer.
+             *
+             * The `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(2);
+             *
+             * buf.writeInt16LE(0x0304, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 04 03>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeInt16LE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian.  The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
+             * anything other than a signed 16-bit integer.
+             *
+             * The `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(2);
+             *
+             * buf.writeInt16BE(0x0102, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 01 02>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeInt16BE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+             * anything other than a signed 32-bit integer.
+             *
+             * The `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeInt32LE(0x05060708, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 08 07 06 05>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeInt32LE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
+             * anything other than a signed 32-bit integer.
+             *
+             * The `value` is interpreted and written as a two's complement signed integer.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeInt32BE(0x01020304, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 01 02 03 04>
+             * ```
+             * @since v0.5.5
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeInt32BE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
+             * undefined when `value` is anything other than a JavaScript number.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeFloatLE(0xcafebabe, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer bb fe 4a 4f>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeFloatLE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
+             * undefined when `value` is anything other than a JavaScript number.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(4);
+             *
+             * buf.writeFloatBE(0xcafebabe, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 4f 4a fe bb>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeFloatBE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
+             * other than a JavaScript number.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeDoubleLE(123.456, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 77 be 9f 1a 2f dd 5e 40>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeDoubleLE(value: number, offset?: number): number;
+            /**
+             * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
+             * other than a JavaScript number.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(8);
+             *
+             * buf.writeDoubleBE(123.456, 0);
+             *
+             * console.log(buf);
+             * // Prints: <Buffer 40 5e dd 2f 1a 9f be 77>
+             * ```
+             * @since v0.11.15
+             * @param value Number to be written to `buf`.
+             * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
+             * @return `offset` plus the number of bytes written.
+             */
+            writeDoubleBE(value: number, offset?: number): number;
+            /**
+             * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
+             * the entire `buf` will be filled:
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Fill a `Buffer` with the ASCII character 'h'.
+             *
+             * const b = Buffer.allocUnsafe(50).fill('h');
+             *
+             * console.log(b.toString());
+             * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+             *
+             * // Fill a buffer with empty string
+             * const c = Buffer.allocUnsafe(5).fill('');
+             *
+             * console.log(c.fill(''));
+             * // Prints: <Buffer 00 00 00 00 00>
+             * ```
+             *
+             * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
+             * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
+             * filled with `value &#x26; 255`.
+             *
+             * If the final write of a `fill()` operation falls on a multi-byte character,
+             * then only the bytes of that character that fit into `buf` are written:
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
+             *
+             * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
+             * // Prints: <Buffer c8 a2 c8 a2 c8>
+             * ```
+             *
+             * If `value` contains invalid characters, it is truncated; if no valid
+             * fill data remains, an exception is thrown:
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.allocUnsafe(5);
+             *
+             * console.log(buf.fill('a'));
+             * // Prints: <Buffer 61 61 61 61 61>
+             * console.log(buf.fill('aazz', 'hex'));
+             * // Prints: <Buffer aa aa aa aa aa>
+             * console.log(buf.fill('zz', 'hex'));
+             * // Throws an exception.
+             * ```
+             * @since v0.5.0
+             * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`.
+             * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
+             * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
+             * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
+             * @return A reference to `buf`.
+             */
+            fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
+            fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this;
+            fill(value: string | Uint8Array | number, encoding: BufferEncoding): this;
+            /**
+             * If `value` is:
+             *
+             * * a string, `value` is interpreted according to the character encoding in `encoding`.
+             * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
+             * To compare a partial `Buffer`, use `buf.subarray`.
+             * * a number, `value` will be interpreted as an unsigned 8-bit integer
+             * value between `0` and `255`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('this is a buffer');
+             *
+             * console.log(buf.indexOf('this'));
+             * // Prints: 0
+             * console.log(buf.indexOf('is'));
+             * // Prints: 2
+             * console.log(buf.indexOf(Buffer.from('a buffer')));
+             * // Prints: 8
+             * console.log(buf.indexOf(97));
+             * // Prints: 8 (97 is the decimal ASCII value for 'a')
+             * console.log(buf.indexOf(Buffer.from('a buffer example')));
+             * // Prints: -1
+             * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
+             * // Prints: 8
+             *
+             * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+             *
+             * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
+             * // Prints: 4
+             * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
+             * // Prints: 6
+             * ```
+             *
+             * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+             * an integer between 0 and 255.
+             *
+             * If `byteOffset` is not a number, it will be coerced to a number. If the result
+             * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
+             * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const b = Buffer.from('abcdef');
+             *
+             * // Passing a value that's a number, but not a valid byte.
+             * // Prints: 2, equivalent to searching for 99 or 'c'.
+             * console.log(b.indexOf(99.9));
+             * console.log(b.indexOf(256 + 99));
+             *
+             * // Passing a byteOffset that coerces to NaN or 0.
+             * // Prints: 1, searching the whole buffer.
+             * console.log(b.indexOf('b', undefined));
+             * console.log(b.indexOf('b', {}));
+             * console.log(b.indexOf('b', null));
+             * console.log(b.indexOf('b', []));
+             * ```
+             *
+             * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
+             * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
+             * @since v1.5.0
+             * @param value What to search for.
+             * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+             * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+             * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+             */
+            indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+            indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
+            /**
+             * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
+             * rather than the first occurrence.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('this buffer is a buffer');
+             *
+             * console.log(buf.lastIndexOf('this'));
+             * // Prints: 0
+             * console.log(buf.lastIndexOf('buffer'));
+             * // Prints: 17
+             * console.log(buf.lastIndexOf(Buffer.from('buffer')));
+             * // Prints: 17
+             * console.log(buf.lastIndexOf(97));
+             * // Prints: 15 (97 is the decimal ASCII value for 'a')
+             * console.log(buf.lastIndexOf(Buffer.from('yolo')));
+             * // Prints: -1
+             * console.log(buf.lastIndexOf('buffer', 5));
+             * // Prints: 5
+             * console.log(buf.lastIndexOf('buffer', 4));
+             * // Prints: -1
+             *
+             * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
+             *
+             * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
+             * // Prints: 6
+             * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
+             * // Prints: 4
+             * ```
+             *
+             * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
+             * an integer between 0 and 255.
+             *
+             * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
+             * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
+             * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const b = Buffer.from('abcdef');
+             *
+             * // Passing a value that's a number, but not a valid byte.
+             * // Prints: 2, equivalent to searching for 99 or 'c'.
+             * console.log(b.lastIndexOf(99.9));
+             * console.log(b.lastIndexOf(256 + 99));
+             *
+             * // Passing a byteOffset that coerces to NaN.
+             * // Prints: 1, searching the whole buffer.
+             * console.log(b.lastIndexOf('b', undefined));
+             * console.log(b.lastIndexOf('b', {}));
+             *
+             * // Passing a byteOffset that coerces to 0.
+             * // Prints: -1, equivalent to passing 0.
+             * console.log(b.lastIndexOf('b', null));
+             * console.log(b.lastIndexOf('b', []));
+             * ```
+             *
+             * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
+             * @since v6.0.0
+             * @param value What to search for.
+             * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+             * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
+             * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
+             */
+            lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
+            lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
+            /**
+             * Equivalent to `buf.indexOf() !== -1`.
+             *
+             * ```js
+             * import { Buffer } from 'node:buffer';
+             *
+             * const buf = Buffer.from('this is a buffer');
+             *
+             * console.log(buf.includes('this'));
+             * // Prints: true
+             * console.log(buf.includes('is'));
+             * // Prints: true
+             * console.log(buf.includes(Buffer.from('a buffer')));
+             * // Prints: true
+             * console.log(buf.includes(97));
+             * // Prints: true (97 is the decimal ASCII value for 'a')
+             * console.log(buf.includes(Buffer.from('a buffer example')));
+             * // Prints: false
+             * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
+             * // Prints: true
+             * console.log(buf.includes('this', 4));
+             * // Prints: false
+             * ```
+             * @since v5.3.0
+             * @param value What to search for.
+             * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
+             * @param [encoding='utf8'] If `value` is a string, this is its encoding.
+             * @return `true` if `value` was found in `buf`, `false` otherwise.
+             */
+            includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
+            includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
+        }
+        var Buffer: BufferConstructor;
+    }
+    // #region web types
+    export type BlobPart = NodeJS.BufferSource | Blob | string;
+    export interface BlobPropertyBag {
+        endings?: "native" | "transparent";
+        type?: string;
+    }
+    export interface FilePropertyBag extends BlobPropertyBag {
+        lastModified?: number;
+    }
+    export interface Blob {
+        readonly size: number;
+        readonly type: string;
+        arrayBuffer(): Promise<ArrayBuffer>;
+        bytes(): Promise<NodeJS.NonSharedUint8Array>;
+        slice(start?: number, end?: number, contentType?: string): Blob;
+        stream(): ReadableStream<NodeJS.NonSharedUint8Array>;
+        text(): Promise<string>;
+    }
+    export var Blob: {
+        prototype: Blob;
+        new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+    };
+    export interface File extends Blob {
+        readonly lastModified: number;
+        readonly name: string;
+        readonly webkitRelativePath: string;
+    }
+    export var File: {
+        prototype: File;
+        new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+    };
+    export import atob = globalThis.atob;
+    export import btoa = globalThis.btoa;
+    // #endregion
+}
+declare module "buffer" {
+    export * from "node:buffer";
+}

+ 1366 - 0
node_modules/@types/node/child_process.d.ts

@@ -0,0 +1,1366 @@
+declare module "node:child_process" {
+    import { NonSharedBuffer } from "node:buffer";
+    import * as dgram from "node:dgram";
+    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+    import * as net from "node:net";
+    import { Readable, Stream, Writable } from "node:stream";
+    import { URL } from "node:url";
+    type Serializable = string | object | number | boolean | bigint;
+    type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
+    interface ChildProcessEventMap {
+        "close": [code: number | null, signal: NodeJS.Signals | null];
+        "disconnect": [];
+        "error": [err: Error];
+        "exit": [code: number | null, signal: NodeJS.Signals | null];
+        "message": [message: Serializable, sendHandle: SendHandle];
+        "spawn": [];
+    }
+    /**
+     * Instances of the `ChildProcess` represent spawned child processes.
+     *
+     * Instances of `ChildProcess` are not intended to be created directly. Rather,
+     * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
+     * instances of `ChildProcess`.
+     * @since v2.2.0
+     */
+    class ChildProcess implements EventEmitter {
+        /**
+         * A `Writable Stream` that represents the child process's `stdin`.
+         *
+         * If a child process waits to read all of its input, the child will not continue
+         * until this stream has been closed via `end()`.
+         *
+         * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
+         * then this will be `null`.
+         *
+         * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
+         * refer to the same value.
+         *
+         * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
+         * @since v0.1.90
+         */
+        stdin: Writable | null;
+        /**
+         * A `Readable Stream` that represents the child process's `stdout`.
+         *
+         * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
+         * then this will be `null`.
+         *
+         * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
+         * refer to the same value.
+         *
+         * ```js
+         * import { spawn } from 'node:child_process';
+         *
+         * const subprocess = spawn('ls');
+         *
+         * subprocess.stdout.on('data', (data) => {
+         *   console.log(`Received chunk ${data}`);
+         * });
+         * ```
+         *
+         * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
+         * @since v0.1.90
+         */
+        stdout: Readable | null;
+        /**
+         * A `Readable Stream` that represents the child process's `stderr`.
+         *
+         * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
+         * then this will be `null`.
+         *
+         * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
+         * refer to the same value.
+         *
+         * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
+         * @since v0.1.90
+         */
+        stderr: Readable | null;
+        /**
+         * The `subprocess.channel` property is a reference to the child's IPC channel. If
+         * no IPC channel exists, this property is `undefined`.
+         * @since v7.1.0
+         */
+        readonly channel?: Control | null;
+        /**
+         * A sparse array of pipes to the child process, corresponding with positions in
+         * the `stdio` option passed to {@link spawn} that have been set
+         * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`,
+         * respectively.
+         *
+         * In the following example, only the child's fd `1` (stdout) is configured as a
+         * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
+         * in the array are `null`.
+         *
+         * ```js
+         * import assert from 'node:assert';
+         * import fs from 'node:fs';
+         * import child_process from 'node:child_process';
+         *
+         * const subprocess = child_process.spawn('ls', {
+         *   stdio: [
+         *     0, // Use parent's stdin for child.
+         *     'pipe', // Pipe child's stdout to parent.
+         *     fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
+         *   ],
+         * });
+         *
+         * assert.strictEqual(subprocess.stdio[0], null);
+         * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
+         *
+         * assert(subprocess.stdout);
+         * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
+         *
+         * assert.strictEqual(subprocess.stdio[2], null);
+         * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
+         * ```
+         *
+         * The `subprocess.stdio` property can be `undefined` if the child process could
+         * not be successfully spawned.
+         * @since v0.7.10
+         */
+        readonly stdio: [
+            Writable | null,
+            // stdin
+            Readable | null,
+            // stdout
+            Readable | null,
+            // stderr
+            Readable | Writable | null | undefined,
+            // extra
+            Readable | Writable | null | undefined, // extra
+        ];
+        /**
+         * The `subprocess.killed` property indicates whether the child process
+         * successfully received a signal from `subprocess.kill()`. The `killed` property
+         * does not indicate that the child process has been terminated.
+         * @since v0.5.10
+         */
+        readonly killed: boolean;
+        /**
+         * Returns the process identifier (PID) of the child process. If the child process
+         * fails to spawn due to errors, then the value is `undefined` and `error` is
+         * emitted.
+         *
+         * ```js
+         * import { spawn } from 'node:child_process';
+         * const grep = spawn('grep', ['ssh']);
+         *
+         * console.log(`Spawned child pid: ${grep.pid}`);
+         * grep.stdin.end();
+         * ```
+         * @since v0.1.90
+         */
+        readonly pid?: number | undefined;
+        /**
+         * The `subprocess.connected` property indicates whether it is still possible to
+         * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages.
+         * @since v0.7.2
+         */
+        readonly connected: boolean;
+        /**
+         * The `subprocess.exitCode` property indicates the exit code of the child process.
+         * If the child process is still running, the field will be `null`.
+         *
+         * When the child process is terminated by a signal, `subprocess.exitCode` will be
+         * `null` and `subprocess.signalCode` will be set. To get the corresponding
+         * POSIX exit code, use
+         * `util.convertProcessSignalToExitCode(subprocess.signalCode)`.
+         */
+        readonly exitCode: number | null;
+        /**
+         * The `subprocess.signalCode` property indicates the signal received by
+         * the child process if any, else `null`.
+         */
+        readonly signalCode: NodeJS.Signals | null;
+        /**
+         * The `subprocess.spawnargs` property represents the full list of command-line
+         * arguments the child process was launched with.
+         */
+        readonly spawnargs: string[];
+        /**
+         * The `subprocess.spawnfile` property indicates the executable file name of
+         * the child process that is launched.
+         *
+         * For {@link fork}, its value will be equal to `process.execPath`.
+         * For {@link spawn}, its value will be the name of
+         * the executable file.
+         * For {@link exec},  its value will be the name of the shell
+         * in which the child process is launched.
+         */
+        readonly spawnfile: string;
+        /**
+         * The `subprocess.kill()` method sends a signal to the child process. If no
+         * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
+         * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
+         *
+         * ```js
+         * import { spawn } from 'node:child_process';
+         * const grep = spawn('grep', ['ssh']);
+         *
+         * grep.on('close', (code, signal) => {
+         *   console.log(
+         *     `child process terminated due to receipt of signal ${signal}`);
+         * });
+         *
+         * // Send SIGHUP to process.
+         * grep.kill('SIGHUP');
+         * ```
+         *
+         * The `ChildProcess` object may emit an `'error'` event if the signal
+         * cannot be delivered. Sending a signal to a child process that has already exited
+         * is not an error but may have unforeseen consequences. Specifically, if the
+         * process identifier (PID) has been reassigned to another process, the signal will
+         * be delivered to that process instead which can have unexpected results.
+         *
+         * While the function is called `kill`, the signal delivered to the child process
+         * may not actually terminate the process.
+         *
+         * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
+         *
+         * On Windows, where POSIX signals do not exist, the `signal` argument will be
+         * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`).
+         * See `Signal Events` for more details.
+         *
+         * On Linux, child processes of child processes will not be terminated
+         * when attempting to kill their parent. This is likely to happen when running a
+         * new process in a shell or with the use of the `shell` option of `ChildProcess`:
+         *
+         * ```js
+         * 'use strict';
+         * import { spawn } from 'node:child_process';
+         *
+         * const subprocess = spawn(
+         *   'sh',
+         *   [
+         *     '-c',
+         *     `node -e "setInterval(() => {
+         *       console.log(process.pid, 'is alive')
+         *     }, 500);"`,
+         *   ], {
+         *     stdio: ['inherit', 'inherit', 'inherit'],
+         *   },
+         * );
+         *
+         * setTimeout(() => {
+         *   subprocess.kill(); // Does not terminate the Node.js process in the shell.
+         * }, 2000);
+         * ```
+         * @since v0.1.90
+         */
+        kill(signal?: NodeJS.Signals | number): boolean;
+        /**
+         * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
+         * @since v20.5.0
+         */
+        [Symbol.dispose](): void;
+        /**
+         * When an IPC channel has been established between the parent and child (
+         * i.e. when using {@link fork}), the `subprocess.send()` method can
+         * be used to send messages to the child process. When the child process is a
+         * Node.js instance, these messages can be received via the `'message'` event.
+         *
+         * The message goes through serialization and parsing. The resulting
+         * message might not be the same as what is originally sent.
+         *
+         * For example, in the parent script:
+         *
+         * ```js
+         * import cp from 'node:child_process';
+         * const n = cp.fork(`${__dirname}/sub.js`);
+         *
+         * n.on('message', (m) => {
+         *   console.log('PARENT got message:', m);
+         * });
+         *
+         * // Causes the child to print: CHILD got message: { hello: 'world' }
+         * n.send({ hello: 'world' });
+         * ```
+         *
+         * And then the child script, `'sub.js'` might look like this:
+         *
+         * ```js
+         * process.on('message', (m) => {
+         *   console.log('CHILD got message:', m);
+         * });
+         *
+         * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
+         * process.send({ foo: 'bar', baz: NaN });
+         * ```
+         *
+         * Child Node.js processes will have a `process.send()` method of their own
+         * that allows the child to send messages back to the parent.
+         *
+         * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
+         * containing a `NODE_` prefix in the `cmd` property are reserved for use within
+         * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js.
+         * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice.
+         *
+         * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
+         * for passing a TCP server or socket object to the child process. The child will
+         * receive the object as the second argument passed to the callback function
+         * registered on the `'message'` event. Any data that is received and buffered in
+         * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows.
+         *
+         * The optional `callback` is a function that is invoked after the message is
+         * sent but before the child may have received it. The function is called with a
+         * single argument: `null` on success, or an `Error` object on failure.
+         *
+         * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can
+         * happen, for instance, when the child process has already exited.
+         *
+         * `subprocess.send()` will return `false` if the channel has closed or when the
+         * backlog of unsent messages exceeds a threshold that makes it unwise to send
+         * more. Otherwise, the method returns `true`. The `callback` function can be
+         * used to implement flow control.
+         *
+         * #### Example: sending a server object
+         *
+         * The `sendHandle` argument can be used, for instance, to pass the handle of
+         * a TCP server object to the child process as illustrated in the example below:
+         *
+         * ```js
+         * import { createServer } from 'node:net';
+         * import { fork } from 'node:child_process';
+         * const subprocess = fork('subprocess.js');
+         *
+         * // Open up the server object and send the handle.
+         * const server = createServer();
+         * server.on('connection', (socket) => {
+         *   socket.end('handled by parent');
+         * });
+         * server.listen(1337, () => {
+         *   subprocess.send('server', server);
+         * });
+         * ```
+         *
+         * The child would then receive the server object as:
+         *
+         * ```js
+         * process.on('message', (m, server) => {
+         *   if (m === 'server') {
+         *     server.on('connection', (socket) => {
+         *       socket.end('handled by child');
+         *     });
+         *   }
+         * });
+         * ```
+         *
+         * Once the server is now shared between the parent and child, some connections
+         * can be handled by the parent and some by the child.
+         *
+         * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of
+         * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only
+         * supported on Unix platforms.
+         *
+         * #### Example: sending a socket object
+         *
+         * Similarly, the `sendHandler` argument can be used to pass the handle of a
+         * socket to the child process. The example below spawns two children that each
+         * handle connections with "normal" or "special" priority:
+         *
+         * ```js
+         * import { createServer } from 'node:net';
+         * import { fork } from 'node:child_process';
+         * const normal = fork('subprocess.js', ['normal']);
+         * const special = fork('subprocess.js', ['special']);
+         *
+         * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
+         * // the sockets from being read before they are sent to the child process.
+         * const server = createServer({ pauseOnConnect: true });
+         * server.on('connection', (socket) => {
+         *
+         *   // If this is special priority...
+         *   if (socket.remoteAddress === '74.125.127.100') {
+         *     special.send('socket', socket);
+         *     return;
+         *   }
+         *   // This is normal priority.
+         *   normal.send('socket', socket);
+         * });
+         * server.listen(1337);
+         * ```
+         *
+         * The `subprocess.js` would receive the socket handle as the second argument
+         * passed to the event callback function:
+         *
+         * ```js
+         * process.on('message', (m, socket) => {
+         *   if (m === 'socket') {
+         *     if (socket) {
+         *       // Check that the client socket exists.
+         *       // It is possible for the socket to be closed between the time it is
+         *       // sent and the time it is received in the child process.
+         *       socket.end(`Request handled with ${process.argv[2]} priority`);
+         *     }
+         *   }
+         * });
+         * ```
+         *
+         * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
+         * The parent cannot track when the socket is destroyed.
+         *
+         * Any `'message'` handlers in the subprocess should verify that `socket` exists,
+         * as the connection may have been closed during the time it takes to send the
+         * connection to the child.
+         * @since v0.5.9
+         * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v25.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v25.x/api/dgram.html#class-dgramsocket) object.
+         * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
+         */
+        send(message: Serializable, callback?: (error: Error | null) => void): boolean;
+        send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
+        send(
+            message: Serializable,
+            sendHandle?: SendHandle,
+            options?: MessageOptions,
+            callback?: (error: Error | null) => void,
+        ): boolean;
+        /**
+         * Closes the IPC channel between parent and child, allowing the child to exit
+         * gracefully once there are no other connections keeping it alive. After calling
+         * this method the `subprocess.connected` and `process.connected` properties in
+         * both the parent and child (respectively) will be set to `false`, and it will be
+         * no longer possible to pass messages between the processes.
+         *
+         * The `'disconnect'` event will be emitted when there are no messages in the
+         * process of being received. This will most often be triggered immediately after
+         * calling `subprocess.disconnect()`.
+         *
+         * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
+         * within the child process to close the IPC channel as well.
+         * @since v0.7.2
+         */
+        disconnect(): void;
+        /**
+         * By default, the parent will wait for the detached child to exit. To prevent the
+         * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not
+         * include the child in its reference count, allowing the parent to exit
+         * independently of the child, unless there is an established IPC channel between
+         * the child and the parent.
+         *
+         * ```js
+         * import { spawn } from 'node:child_process';
+         *
+         * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+         *   detached: true,
+         *   stdio: 'ignore',
+         * });
+         *
+         * subprocess.unref();
+         * ```
+         * @since v0.7.10
+         */
+        unref(): void;
+        /**
+         * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
+         * restore the removed reference count for the child process, forcing the parent
+         * to wait for the child to exit before exiting itself.
+         *
+         * ```js
+         * import { spawn } from 'node:child_process';
+         *
+         * const subprocess = spawn(process.argv[0], ['child_program.js'], {
+         *   detached: true,
+         *   stdio: 'ignore',
+         * });
+         *
+         * subprocess.unref();
+         * subprocess.ref();
+         * ```
+         * @since v0.7.10
+         */
+        ref(): void;
+    }
+    interface ChildProcess extends InternalEventEmitter<ChildProcessEventMap> {}
+    // return this object when stdio option is undefined or not specified
+    interface ChildProcessWithoutNullStreams extends ChildProcess {
+        stdin: Writable;
+        stdout: Readable;
+        stderr: Readable;
+        readonly stdio: [
+            Writable,
+            Readable,
+            Readable,
+            // stderr
+            Readable | Writable | null | undefined,
+            // extra, no modification
+            Readable | Writable | null | undefined, // extra, no modification
+        ];
+    }
+    // return this object when stdio option is a tuple of 3
+    interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable>
+        extends ChildProcess
+    {
+        stdin: I;
+        stdout: O;
+        stderr: E;
+        readonly stdio: [
+            I,
+            O,
+            E,
+            Readable | Writable | null | undefined,
+            // extra, no modification
+            Readable | Writable | null | undefined, // extra, no modification
+        ];
+    }
+    interface Control extends EventEmitter {
+        ref(): void;
+        unref(): void;
+    }
+    interface MessageOptions {
+        keepOpen?: boolean | undefined;
+    }
+    type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
+    type StdioOptions = IOType | Array<IOType | "ipc" | Stream | number | null | undefined>;
+    type SerializationType = "json" | "advanced";
+    interface MessagingOptions extends Abortable {
+        /**
+         * Specify the kind of serialization used for sending messages between processes.
+         * @default 'json'
+         */
+        serialization?: SerializationType | undefined;
+        /**
+         * The signal value to be used when the spawned process will be killed by the abort signal.
+         * @default 'SIGTERM'
+         */
+        killSignal?: NodeJS.Signals | number | undefined;
+        /**
+         * In milliseconds the maximum amount of time the process is allowed to run.
+         */
+        timeout?: number | undefined;
+    }
+    interface ProcessEnvOptions {
+        uid?: number | undefined;
+        gid?: number | undefined;
+        cwd?: string | URL | undefined;
+        env?: NodeJS.ProcessEnv | undefined;
+    }
+    interface CommonOptions extends ProcessEnvOptions {
+        /**
+         * @default false
+         */
+        windowsHide?: boolean | undefined;
+        /**
+         * @default 0
+         */
+        timeout?: number | undefined;
+    }
+    interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
+        argv0?: string | undefined;
+        /**
+         * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+         * If passed as an array, the first element is used for `stdin`, the second for
+         * `stdout`, and the third for `stderr`. A fourth element can be used to
+         * specify the `stdio` behavior beyond the standard streams. See
+         * {@link ChildProcess.stdio} for more information.
+         *
+         * @default 'pipe'
+         */
+        stdio?: StdioOptions | undefined;
+        shell?: boolean | string | undefined;
+        windowsVerbatimArguments?: boolean | undefined;
+    }
+    interface SpawnOptions extends CommonSpawnOptions {
+        detached?: boolean | undefined;
+    }
+    interface SpawnOptionsWithoutStdio extends SpawnOptions {
+        stdio?: StdioPipeNamed | StdioPipe[] | undefined;
+    }
+    type StdioNull = "inherit" | "ignore" | Stream;
+    type StdioPipeNamed = "pipe" | "overlapped";
+    type StdioPipe = undefined | null | StdioPipeNamed;
+    interface SpawnOptionsWithStdioTuple<
+        Stdin extends StdioNull | StdioPipe,
+        Stdout extends StdioNull | StdioPipe,
+        Stderr extends StdioNull | StdioPipe,
+    > extends SpawnOptions {
+        stdio: [Stdin, Stdout, Stderr];
+    }
+    /**
+     * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults
+     * to an empty array.
+     *
+     * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+     * **function. Any input containing shell metacharacters may be used to trigger**
+     * **arbitrary command execution.**
+     *
+     * A third argument may be used to specify additional options, with these defaults:
+     *
+     * ```js
+     * const defaults = {
+     *   cwd: undefined,
+     *   env: process.env,
+     * };
+     * ```
+     *
+     * Use `cwd` to specify the working directory from which the process is spawned.
+     * If not given, the default is to inherit the current working directory. If given,
+     * but the path does not exist, the child process emits an `ENOENT` error
+     * and exits immediately. `ENOENT` is also emitted when the command
+     * does not exist.
+     *
+     * Use `env` to specify environment variables that will be visible to the new
+     * process, the default is `process.env`.
+     *
+     * `undefined` values in `env` will be ignored.
+     *
+     * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
+     * exit code:
+     *
+     * ```js
+     * import { spawn } from 'node:child_process';
+     * import { once } from 'node:events';
+     * const ls = spawn('ls', ['-lh', '/usr']);
+     *
+     * ls.stdout.on('data', (data) => {
+     *   console.log(`stdout: ${data}`);
+     * });
+     *
+     * ls.stderr.on('data', (data) => {
+     *   console.error(`stderr: ${data}`);
+     * });
+     *
+     * const [code] = await once(ls, 'close');
+     * console.log(`child process exited with code ${code}`);
+     * ```
+     *
+     * Example: A very elaborate way to run `ps ax | grep ssh`
+     *
+     * ```js
+     * import { spawn } from 'node:child_process';
+     * const ps = spawn('ps', ['ax']);
+     * const grep = spawn('grep', ['ssh']);
+     *
+     * ps.stdout.on('data', (data) => {
+     *   grep.stdin.write(data);
+     * });
+     *
+     * ps.stderr.on('data', (data) => {
+     *   console.error(`ps stderr: ${data}`);
+     * });
+     *
+     * ps.on('close', (code) => {
+     *   if (code !== 0) {
+     *     console.log(`ps process exited with code ${code}`);
+     *   }
+     *   grep.stdin.end();
+     * });
+     *
+     * grep.stdout.on('data', (data) => {
+     *   console.log(data.toString());
+     * });
+     *
+     * grep.stderr.on('data', (data) => {
+     *   console.error(`grep stderr: ${data}`);
+     * });
+     *
+     * grep.on('close', (code) => {
+     *   if (code !== 0) {
+     *     console.log(`grep process exited with code ${code}`);
+     *   }
+     * });
+     * ```
+     *
+     * Example of checking for failed `spawn`:
+     *
+     * ```js
+     * import { spawn } from 'node:child_process';
+     * const subprocess = spawn('bad_command');
+     *
+     * subprocess.on('error', (err) => {
+     *   console.error('Failed to start subprocess.');
+     * });
+     * ```
+     *
+     * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
+     * title while others (Windows, SunOS) will use `command`.
+     *
+     * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve
+     * it with the `process.argv0` property instead.
+     *
+     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+     * the error passed to the callback will be an `AbortError`:
+     *
+     * ```js
+     * import { spawn } from 'node:child_process';
+     * const controller = new AbortController();
+     * const { signal } = controller;
+     * const grep = spawn('grep', ['ssh'], { signal });
+     * grep.on('error', (err) => {
+     *   // This will be called with err being an AbortError if the controller aborts
+     * });
+     * controller.abort(); // Stops the child process
+     * ```
+     * @since v0.1.90
+     * @param command The command to run.
+     * @param args List of string arguments.
+     */
+    function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
+    ): ChildProcessByStdio<Writable, Readable, Readable>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
+    ): ChildProcessByStdio<Writable, Readable, null>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
+    ): ChildProcessByStdio<Writable, null, Readable>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
+    ): ChildProcessByStdio<null, Readable, Readable>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
+    ): ChildProcessByStdio<Writable, null, null>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
+    ): ChildProcessByStdio<null, Readable, null>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
+    ): ChildProcessByStdio<null, null, Readable>;
+    function spawn(
+        command: string,
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
+    ): ChildProcessByStdio<null, null, null>;
+    function spawn(command: string, options: SpawnOptions): ChildProcess;
+    // overloads of spawn with 'args'
+    function spawn(
+        command: string,
+        args?: readonly string[],
+        options?: SpawnOptionsWithoutStdio,
+    ): ChildProcessWithoutNullStreams;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
+    ): ChildProcessByStdio<Writable, Readable, Readable>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
+    ): ChildProcessByStdio<Writable, Readable, null>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
+    ): ChildProcessByStdio<Writable, null, Readable>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
+    ): ChildProcessByStdio<null, Readable, Readable>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
+    ): ChildProcessByStdio<Writable, null, null>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
+    ): ChildProcessByStdio<null, Readable, null>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
+    ): ChildProcessByStdio<null, null, Readable>;
+    function spawn(
+        command: string,
+        args: readonly string[],
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
+    ): ChildProcessByStdio<null, null, null>;
+    function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess;
+    interface ExecOptions extends CommonOptions {
+        shell?: string | undefined;
+        signal?: AbortSignal | undefined;
+        maxBuffer?: number | undefined;
+        killSignal?: NodeJS.Signals | number | undefined;
+        encoding?: string | null | undefined;
+    }
+    interface ExecOptionsWithStringEncoding extends ExecOptions {
+        encoding?: BufferEncoding | undefined;
+    }
+    interface ExecOptionsWithBufferEncoding extends ExecOptions {
+        encoding: "buffer" | null; // specify `null`.
+    }
+    // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
+    interface ExecException extends Error {
+        cmd?: string;
+        killed?: boolean;
+        code?: number;
+        signal?: NodeJS.Signals;
+        stdout?: string;
+        stderr?: string;
+    }
+    /**
+     * Spawns a shell then executes the `command` within that shell, buffering any
+     * generated output. The `command` string passed to the exec function is processed
+     * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
+     * need to be dealt with accordingly:
+     *
+     * ```js
+     * import { exec } from 'node:child_process';
+     *
+     * exec('"/path/to/test file/test.sh" arg1 arg2');
+     * // Double quotes are used so that the space in the path is not interpreted as
+     * // a delimiter of multiple arguments.
+     *
+     * exec('echo "The \\$HOME variable is $HOME"');
+     * // The $HOME variable is escaped in the first instance, but not in the second.
+     * ```
+     *
+     * **Never pass unsanitized user input to this function. Any input containing shell**
+     * **metacharacters may be used to trigger arbitrary command execution.**
+     *
+     * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The
+     * `error.code` property will be
+     * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the
+     * process.
+     *
+     * The `stdout` and `stderr` arguments passed to the callback will contain the
+     * stdout and stderr output of the child process. By default, Node.js will decode
+     * the output as UTF-8 and pass strings to the callback. The `encoding` option
+     * can be used to specify the character encoding used to decode the stdout and
+     * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+     * encoding, `Buffer` objects will be passed to the callback instead.
+     *
+     * ```js
+     * import { exec } from 'node:child_process';
+     * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
+     *   if (error) {
+     *     console.error(`exec error: ${error}`);
+     *     return;
+     *   }
+     *   console.log(`stdout: ${stdout}`);
+     *   console.error(`stderr: ${stderr}`);
+     * });
+     * ```
+     *
+     * If `timeout` is greater than `0`, the parent will send the signal
+     * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
+     * child runs longer than `timeout` milliseconds.
+     *
+     * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
+     * the existing process and uses a shell to execute the command.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
+     * case of an error (including any error resulting in an exit code other than 0), a
+     * rejected promise is returned, with the same `error` object given in the
+     * callback, but with two additional properties `stdout` and `stderr`.
+     *
+     * ```js
+     * import util from 'node:util';
+     * import child_process from 'node:child_process';
+     * const exec = util.promisify(child_process.exec);
+     *
+     * async function lsExample() {
+     *   const { stdout, stderr } = await exec('ls');
+     *   console.log('stdout:', stdout);
+     *   console.error('stderr:', stderr);
+     * }
+     * lsExample();
+     * ```
+     *
+     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+     * the error passed to the callback will be an `AbortError`:
+     *
+     * ```js
+     * import { exec } from 'node:child_process';
+     * const controller = new AbortController();
+     * const { signal } = controller;
+     * const child = exec('grep ssh', { signal }, (error) => {
+     *   console.error(error); // an AbortError
+     * });
+     * controller.abort();
+     * ```
+     * @since v0.1.90
+     * @param command The command to run, with space-separated arguments.
+     * @param callback called with the output when process terminates.
+     */
+    function exec(
+        command: string,
+        callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+    function exec(
+        command: string,
+        options: ExecOptionsWithBufferEncoding,
+        callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+    ): ChildProcess;
+    // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
+    function exec(
+        command: string,
+        options: ExecOptionsWithStringEncoding,
+        callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    // fallback if nothing else matches. Worst case is always `string | Buffer`.
+    function exec(
+        command: string,
+        options: ExecOptions | undefined | null,
+        callback?: (
+            error: ExecException | null,
+            stdout: string | NonSharedBuffer,
+            stderr: string | NonSharedBuffer,
+        ) => void,
+    ): ChildProcess;
+    interface PromiseWithChild<T> extends Promise<T> {
+        child: ChildProcess;
+    }
+    namespace exec {
+        function __promisify__(command: string): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            command: string,
+            options: ExecOptionsWithBufferEncoding,
+        ): PromiseWithChild<{
+            stdout: NonSharedBuffer;
+            stderr: NonSharedBuffer;
+        }>;
+        function __promisify__(
+            command: string,
+            options: ExecOptionsWithStringEncoding,
+        ): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            command: string,
+            options: ExecOptions | undefined | null,
+        ): PromiseWithChild<{
+            stdout: string | NonSharedBuffer;
+            stderr: string | NonSharedBuffer;
+        }>;
+    }
+    interface ExecFileOptions extends CommonOptions, Abortable {
+        maxBuffer?: number | undefined;
+        killSignal?: NodeJS.Signals | number | undefined;
+        windowsVerbatimArguments?: boolean | undefined;
+        shell?: boolean | string | undefined;
+        signal?: AbortSignal | undefined;
+        encoding?: string | null | undefined;
+    }
+    interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
+        encoding?: BufferEncoding | undefined;
+    }
+    interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
+        encoding: "buffer" | null;
+    }
+    /** @deprecated Use `ExecFileOptions` instead. */
+    interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
+    // TODO: execFile exceptions can take many forms... this accurately describes none of them
+    type ExecFileException =
+        & Omit<ExecException, "code">
+        & Omit<NodeJS.ErrnoException, "code">
+        & { code?: string | number | null };
+    /**
+     * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
+     * executable `file` is spawned directly as a new process making it slightly more
+     * efficient than {@link exec}.
+     *
+     * The same options as {@link exec} are supported. Since a shell is
+     * not spawned, behaviors such as I/O redirection and file globbing are not
+     * supported.
+     *
+     * ```js
+     * import { execFile } from 'node:child_process';
+     * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
+     *   if (error) {
+     *     throw error;
+     *   }
+     *   console.log(stdout);
+     * });
+     * ```
+     *
+     * The `stdout` and `stderr` arguments passed to the callback will contain the
+     * stdout and stderr output of the child process. By default, Node.js will decode
+     * the output as UTF-8 and pass strings to the callback. The `encoding` option
+     * can be used to specify the character encoding used to decode the stdout and
+     * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
+     * encoding, `Buffer` objects will be passed to the callback instead.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
+     * case of an error (including any error resulting in an exit code other than 0), a
+     * rejected promise is returned, with the same `error` object given in the
+     * callback, but with two additional properties `stdout` and `stderr`.
+     *
+     * ```js
+     * import util from 'node:util';
+     * import child_process from 'node:child_process';
+     * const execFile = util.promisify(child_process.execFile);
+     * async function getVersion() {
+     *   const { stdout } = await execFile('node', ['--version']);
+     *   console.log(stdout);
+     * }
+     * getVersion();
+     * ```
+     *
+     * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+     * **function. Any input containing shell metacharacters may be used to trigger**
+     * **arbitrary command execution.**
+     *
+     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+     * the error passed to the callback will be an `AbortError`:
+     *
+     * ```js
+     * import { execFile } from 'node:child_process';
+     * const controller = new AbortController();
+     * const { signal } = controller;
+     * const child = execFile('node', ['--version'], { signal }, (error) => {
+     *   console.error(error); // an AbortError
+     * });
+     * controller.abort();
+     * ```
+     * @since v0.1.91
+     * @param file The name or path of the executable file to run.
+     * @param args List of string arguments.
+     * @param callback Called with the output when process terminates.
+     */
+    // no `options` definitely means stdout/stderr are `string`.
+    function execFile(
+        file: string,
+        callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    function execFile(
+        file: string,
+        args: readonly string[] | undefined | null,
+        callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
+    function execFile(
+        file: string,
+        options: ExecFileOptionsWithBufferEncoding,
+        callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+    ): ChildProcess;
+    function execFile(
+        file: string,
+        args: readonly string[] | undefined | null,
+        options: ExecFileOptionsWithBufferEncoding,
+        callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
+    ): ChildProcess;
+    // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
+    function execFile(
+        file: string,
+        options: ExecFileOptionsWithStringEncoding,
+        callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    function execFile(
+        file: string,
+        args: readonly string[] | undefined | null,
+        options: ExecFileOptionsWithStringEncoding,
+        callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
+    ): ChildProcess;
+    // fallback if nothing else matches. Worst case is always `string | Buffer`.
+    function execFile(
+        file: string,
+        options: ExecFileOptions | undefined | null,
+        callback:
+            | ((
+                error: ExecFileException | null,
+                stdout: string | NonSharedBuffer,
+                stderr: string | NonSharedBuffer,
+            ) => void)
+            | undefined
+            | null,
+    ): ChildProcess;
+    function execFile(
+        file: string,
+        args: readonly string[] | undefined | null,
+        options: ExecFileOptions | undefined | null,
+        callback:
+            | ((
+                error: ExecFileException | null,
+                stdout: string | NonSharedBuffer,
+                stderr: string | NonSharedBuffer,
+            ) => void)
+            | undefined
+            | null,
+    ): ChildProcess;
+    namespace execFile {
+        function __promisify__(file: string): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            file: string,
+            args: readonly string[] | undefined | null,
+        ): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            file: string,
+            options: ExecFileOptionsWithBufferEncoding,
+        ): PromiseWithChild<{
+            stdout: NonSharedBuffer;
+            stderr: NonSharedBuffer;
+        }>;
+        function __promisify__(
+            file: string,
+            args: readonly string[] | undefined | null,
+            options: ExecFileOptionsWithBufferEncoding,
+        ): PromiseWithChild<{
+            stdout: NonSharedBuffer;
+            stderr: NonSharedBuffer;
+        }>;
+        function __promisify__(
+            file: string,
+            options: ExecFileOptionsWithStringEncoding,
+        ): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            file: string,
+            args: readonly string[] | undefined | null,
+            options: ExecFileOptionsWithStringEncoding,
+        ): PromiseWithChild<{
+            stdout: string;
+            stderr: string;
+        }>;
+        function __promisify__(
+            file: string,
+            options: ExecFileOptions | undefined | null,
+        ): PromiseWithChild<{
+            stdout: string | NonSharedBuffer;
+            stderr: string | NonSharedBuffer;
+        }>;
+        function __promisify__(
+            file: string,
+            args: readonly string[] | undefined | null,
+            options: ExecFileOptions | undefined | null,
+        ): PromiseWithChild<{
+            stdout: string | NonSharedBuffer;
+            stderr: string | NonSharedBuffer;
+        }>;
+    }
+    interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
+        execPath?: string | undefined;
+        execArgv?: string[] | undefined;
+        silent?: boolean | undefined;
+        /**
+         * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
+         * If passed as an array, the first element is used for `stdin`, the second for
+         * `stdout`, and the third for `stderr`. A fourth element can be used to
+         * specify the `stdio` behavior beyond the standard streams. See
+         * {@link ChildProcess.stdio} for more information.
+         *
+         * @default 'pipe'
+         */
+        stdio?: StdioOptions | undefined;
+        detached?: boolean | undefined;
+        windowsVerbatimArguments?: boolean | undefined;
+    }
+    /**
+     * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
+     * Like {@link spawn}, a `ChildProcess` object is returned. The
+     * returned `ChildProcess` will have an additional communication channel
+     * built-in that allows messages to be passed back and forth between the parent and
+     * child. See `subprocess.send()` for details.
+     *
+     * Keep in mind that spawned Node.js child processes are
+     * independent of the parent with exception of the IPC communication channel
+     * that is established between the two. Each process has its own memory, with
+     * their own V8 instances. Because of the additional resource allocations
+     * required, spawning a large number of child Node.js processes is not
+     * recommended.
+     *
+     * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative
+     * execution path to be used.
+     *
+     * Node.js processes launched with a custom `execPath` will communicate with the
+     * parent process using the file descriptor (fd) identified using the
+     * environment variable `NODE_CHANNEL_FD` on the child process.
+     *
+     * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
+     * current process.
+     *
+     * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set.
+     *
+     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
+     * the error passed to the callback will be an `AbortError`:
+     *
+     * ```js
+     * if (process.argv[2] === 'child') {
+     *   setTimeout(() => {
+     *     console.log(`Hello from ${process.argv[2]}!`);
+     *   }, 1_000);
+     * } else {
+     *   import { fork } from 'node:child_process';
+     *   const controller = new AbortController();
+     *   const { signal } = controller;
+     *   const child = fork(__filename, ['child'], { signal });
+     *   child.on('error', (err) => {
+     *     // This will be called with err being an AbortError if the controller aborts
+     *   });
+     *   controller.abort(); // Stops the child process
+     * }
+     * ```
+     * @since v0.5.0
+     * @param modulePath The module to run in the child.
+     * @param args List of string arguments.
+     */
+    function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess;
+    function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess;
+    interface SpawnSyncOptions extends CommonSpawnOptions {
+        input?: string | NodeJS.ArrayBufferView | undefined;
+        maxBuffer?: number | undefined;
+        encoding?: BufferEncoding | "buffer" | null | undefined;
+    }
+    interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
+        encoding: BufferEncoding;
+    }
+    interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
+        encoding?: "buffer" | null | undefined;
+    }
+    interface SpawnSyncReturns<T> {
+        pid: number;
+        output: Array<T | null>;
+        stdout: T;
+        stderr: T;
+        status: number | null;
+        signal: NodeJS.Signals | null;
+        error?: Error;
+    }
+    /**
+     * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
+     * until the child process has fully closed. When a timeout has been encountered
+     * and `killSignal` is sent, the method won't return until the process has
+     * completely exited. If the process intercepts and handles the `SIGTERM` signal
+     * and doesn't exit, the parent process will wait until the child process has
+     * exited.
+     *
+     * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+     * **function. Any input containing shell metacharacters may be used to trigger**
+     * **arbitrary command execution.**
+     * @since v0.11.12
+     * @param command The command to run.
+     * @param args List of string arguments.
+     */
+    function spawnSync(command: string): SpawnSyncReturns<NonSharedBuffer>;
+    function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
+    function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<NonSharedBuffer>;
+    function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | NonSharedBuffer>;
+    function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<NonSharedBuffer>;
+    function spawnSync(
+        command: string,
+        args: readonly string[],
+        options: SpawnSyncOptionsWithStringEncoding,
+    ): SpawnSyncReturns<string>;
+    function spawnSync(
+        command: string,
+        args: readonly string[],
+        options: SpawnSyncOptionsWithBufferEncoding,
+    ): SpawnSyncReturns<NonSharedBuffer>;
+    function spawnSync(
+        command: string,
+        args?: readonly string[],
+        options?: SpawnSyncOptions,
+    ): SpawnSyncReturns<string | NonSharedBuffer>;
+    interface CommonExecOptions extends CommonOptions {
+        input?: string | NodeJS.ArrayBufferView | undefined;
+        /**
+         * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
+         * If passed as an array, the first element is used for `stdin`, the second for
+         * `stdout`, and the third for `stderr`. A fourth element can be used to
+         * specify the `stdio` behavior beyond the standard streams. See
+         * {@link ChildProcess.stdio} for more information.
+         *
+         * @default 'pipe'
+         */
+        stdio?: StdioOptions | undefined;
+        killSignal?: NodeJS.Signals | number | undefined;
+        maxBuffer?: number | undefined;
+        encoding?: BufferEncoding | "buffer" | null | undefined;
+    }
+    interface ExecSyncOptions extends CommonExecOptions {
+        shell?: string | undefined;
+    }
+    interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
+        encoding: BufferEncoding;
+    }
+    interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
+        encoding?: "buffer" | null | undefined;
+    }
+    /**
+     * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
+     * until the child process has fully closed. When a timeout has been encountered
+     * and `killSignal` is sent, the method won't return until the process has
+     * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process
+     * has exited.
+     *
+     * If the process times out or has a non-zero exit code, this method will throw.
+     * The `Error` object will contain the entire result from {@link spawnSync}.
+     *
+     * **Never pass unsanitized user input to this function. Any input containing shell**
+     * **metacharacters may be used to trigger arbitrary command execution.**
+     * @since v0.11.12
+     * @param command The command to run.
+     * @return The stdout from the command.
+     */
+    function execSync(command: string): NonSharedBuffer;
+    function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
+    function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
+    function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
+    interface ExecFileSyncOptions extends CommonExecOptions {
+        shell?: boolean | string | undefined;
+    }
+    interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
+        encoding: BufferEncoding;
+    }
+    interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
+        encoding?: "buffer" | null | undefined; // specify `null`.
+    }
+    /**
+     * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
+     * return until the child process has fully closed. When a timeout has been
+     * encountered and `killSignal` is sent, the method won't return until the process
+     * has completely exited.
+     *
+     * If the child process intercepts and handles the `SIGTERM` signal and
+     * does not exit, the parent process will still wait until the child process has
+     * exited.
+     *
+     * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
+     *
+     * **If the `shell` option is enabled, do not pass unsanitized user input to this**
+     * **function. Any input containing shell metacharacters may be used to trigger**
+     * **arbitrary command execution.**
+     * @since v0.11.12
+     * @param file The name or path of the executable file to run.
+     * @param args List of string arguments.
+     * @return The stdout from the command.
+     */
+    function execFileSync(file: string): NonSharedBuffer;
+    function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
+    function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
+    function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
+    function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
+    function execFileSync(
+        file: string,
+        args: readonly string[],
+        options: ExecFileSyncOptionsWithStringEncoding,
+    ): string;
+    function execFileSync(
+        file: string,
+        args: readonly string[],
+        options: ExecFileSyncOptionsWithBufferEncoding,
+    ): NonSharedBuffer;
+    function execFileSync(
+        file: string,
+        args?: readonly string[],
+        options?: ExecFileSyncOptions,
+    ): string | NonSharedBuffer;
+}
+declare module "child_process" {
+    export * from "node:child_process";
+}

+ 432 - 0
node_modules/@types/node/cluster.d.ts

@@ -0,0 +1,432 @@
+declare module "node:cluster" {
+    import * as child_process from "node:child_process";
+    import { EventEmitter, InternalEventEmitter } from "node:events";
+    class Worker implements EventEmitter {
+        constructor(options?: cluster.WorkerOptions);
+        /**
+         * Each new worker is given its own unique id, this id is stored in the `id`.
+         *
+         * While a worker is alive, this is the key that indexes it in `cluster.workers`.
+         * @since v0.8.0
+         */
+        id: number;
+        /**
+         * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
+         * from this function is stored as `.process`. In a worker, the global `process` is stored.
+         *
+         * See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options).
+         *
+         * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
+         * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
+         * accidental disconnection.
+         * @since v0.7.0
+         */
+        process: child_process.ChildProcess;
+        /**
+         * Send a message to a worker or primary, optionally with a handle.
+         *
+         * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
+         *
+         * In a worker, this sends a message to the primary. It is identical to `process.send()`.
+         *
+         * This example will echo back all messages from the primary:
+         *
+         * ```js
+         * if (cluster.isPrimary) {
+         *   const worker = cluster.fork();
+         *   worker.send('hi there');
+         *
+         * } else if (cluster.isWorker) {
+         *   process.on('message', (msg) => {
+         *     process.send(msg);
+         *   });
+         * }
+         * ```
+         * @since v0.7.0
+         * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
+         */
+        send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean;
+        send(
+            message: child_process.Serializable,
+            sendHandle: child_process.SendHandle,
+            callback?: (error: Error | null) => void,
+        ): boolean;
+        send(
+            message: child_process.Serializable,
+            sendHandle: child_process.SendHandle,
+            options?: child_process.MessageOptions,
+            callback?: (error: Error | null) => void,
+        ): boolean;
+        /**
+         * This function will kill the worker. In the primary worker, it does this by
+         * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`.
+         *
+         * The `kill()` function kills the worker process without waiting for a graceful
+         * disconnect, it has the same behavior as `worker.process.kill()`.
+         *
+         * This method is aliased as `worker.destroy()` for backwards compatibility.
+         *
+         * In a worker, `process.kill()` exists, but it is not this function;
+         * it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal).
+         * @since v0.9.12
+         * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
+         */
+        kill(signal?: string): void;
+        destroy(signal?: string): void;
+        /**
+         * In a worker, this function will close all servers, wait for the `'close'` event
+         * on those servers, and then disconnect the IPC channel.
+         *
+         * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself.
+         *
+         * Causes `.exitedAfterDisconnect` to be set.
+         *
+         * After a server is closed, it will no longer accept new connections,
+         * but connections may be accepted by any other listening worker. Existing
+         * connections will be allowed to close as usual. When no more connections exist,
+         * see `server.close()`, the IPC channel to the worker will close allowing it
+         * to die gracefully.
+         *
+         * The above applies _only_ to server connections, client connections are not
+         * automatically closed by workers, and disconnect does not wait for them to close
+         * before exiting.
+         *
+         * In a worker, `process.disconnect` exists, but it is not this function;
+         * it is `disconnect()`.
+         *
+         * Because long living server connections may block workers from disconnecting, it
+         * may be useful to send a message, so application specific actions may be taken to
+         * close them. It also may be useful to implement a timeout, killing a worker if
+         * the `'disconnect'` event has not been emitted after some time.
+         *
+         * ```js
+         * import net from 'node:net';
+         *
+         * if (cluster.isPrimary) {
+         *   const worker = cluster.fork();
+         *   let timeout;
+         *
+         *   worker.on('listening', (address) => {
+         *     worker.send('shutdown');
+         *     worker.disconnect();
+         *     timeout = setTimeout(() => {
+         *       worker.kill();
+         *     }, 2000);
+         *   });
+         *
+         *   worker.on('disconnect', () => {
+         *     clearTimeout(timeout);
+         *   });
+         *
+         * } else if (cluster.isWorker) {
+         *   const server = net.createServer((socket) => {
+         *     // Connections never end
+         *   });
+         *
+         *   server.listen(8000);
+         *
+         *   process.on('message', (msg) => {
+         *     if (msg === 'shutdown') {
+         *       // Initiate graceful close of any connections to server
+         *     }
+         *   });
+         * }
+         * ```
+         * @since v0.7.7
+         * @return A reference to `worker`.
+         */
+        disconnect(): this;
+        /**
+         * This function returns `true` if the worker is connected to its primary via its
+         * IPC channel, `false` otherwise. A worker is connected to its primary after it
+         * has been created. It is disconnected after the `'disconnect'` event is emitted.
+         * @since v0.11.14
+         */
+        isConnected(): boolean;
+        /**
+         * This function returns `true` if the worker's process has terminated (either
+         * because of exiting or being signaled). Otherwise, it returns `false`.
+         *
+         * ```js
+         * import cluster from 'node:cluster';
+         * import http from 'node:http';
+         * import { availableParallelism } from 'node:os';
+         * import process from 'node:process';
+         *
+         * const numCPUs = availableParallelism();
+         *
+         * if (cluster.isPrimary) {
+         *   console.log(`Primary ${process.pid} is running`);
+         *
+         *   // Fork workers.
+         *   for (let i = 0; i < numCPUs; i++) {
+         *     cluster.fork();
+         *   }
+         *
+         *   cluster.on('fork', (worker) => {
+         *     console.log('worker is dead:', worker.isDead());
+         *   });
+         *
+         *   cluster.on('exit', (worker, code, signal) => {
+         *     console.log('worker is dead:', worker.isDead());
+         *   });
+         * } else {
+         *   // Workers can share any TCP connection. In this case, it is an HTTP server.
+         *   http.createServer((req, res) => {
+         *     res.writeHead(200);
+         *     res.end(`Current process\n ${process.pid}`);
+         *     process.kill(process.pid);
+         *   }).listen(8000);
+         * }
+         * ```
+         * @since v0.11.14
+         */
+        isDead(): boolean;
+        /**
+         * This property is `true` if the worker exited due to `.disconnect()`.
+         * If the worker exited any other way, it is `false`. If the
+         * worker has not exited, it is `undefined`.
+         *
+         * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
+         * voluntary and accidental exit, the primary may choose not to respawn a worker
+         * based on this value.
+         *
+         * ```js
+         * cluster.on('exit', (worker, code, signal) => {
+         *   if (worker.exitedAfterDisconnect === true) {
+         *     console.log('Oh, it was just voluntary – no need to worry');
+         *   }
+         * });
+         *
+         * // kill worker
+         * worker.kill();
+         * ```
+         * @since v6.0.0
+         */
+        exitedAfterDisconnect: boolean;
+    }
+    interface Worker extends InternalEventEmitter<cluster.WorkerEventMap> {}
+    type _Worker = Worker;
+    namespace cluster {
+        interface Worker extends _Worker {}
+        interface WorkerOptions {
+            id?: number | undefined;
+            process?: child_process.ChildProcess | undefined;
+            state?: string | undefined;
+        }
+        interface WorkerEventMap {
+            "disconnect": [];
+            "error": [error: Error];
+            "exit": [code: number, signal: string];
+            "listening": [address: Address];
+            "message": [message: any, handle: child_process.SendHandle];
+            "online": [];
+        }
+        interface ClusterSettings {
+            /**
+             * List of string arguments passed to the Node.js executable.
+             * @default process.execArgv
+             */
+            execArgv?: string[] | undefined;
+            /**
+             * File path to worker file.
+             * @default process.argv[1]
+             */
+            exec?: string | undefined;
+            /**
+             * String arguments passed to worker.
+             * @default process.argv.slice(2)
+             */
+            args?: readonly string[] | undefined;
+            /**
+             * Whether or not to send output to parent's stdio.
+             * @default false
+             */
+            silent?: boolean | undefined;
+            /**
+             * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
+             * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s
+             * [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio).
+             */
+            stdio?: any[] | undefined;
+            /**
+             * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
+             */
+            uid?: number | undefined;
+            /**
+             * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
+             */
+            gid?: number | undefined;
+            /**
+             * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
+             * By default each worker gets its own port, incremented from the primary's `process.debugPort`.
+             */
+            inspectPort?: number | (() => number) | undefined;
+            /**
+             * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
+             * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details.
+             * @default false
+             */
+            serialization?: "json" | "advanced" | undefined;
+            /**
+             * Current working directory of the worker process.
+             * @default undefined (inherits from parent process)
+             */
+            cwd?: string | undefined;
+            /**
+             * Hide the forked processes console window that would normally be created on Windows systems.
+             * @default false
+             */
+            windowsHide?: boolean | undefined;
+        }
+        interface Address {
+            address: string;
+            port: number;
+            /**
+             * The `addressType` is one of:
+             *
+             * * `4` (TCPv4)
+             * * `6` (TCPv6)
+             * * `-1` (Unix domain socket)
+             * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
+             */
+            addressType: 4 | 6 | -1 | "udp4" | "udp6";
+        }
+        interface ClusterEventMap {
+            "disconnect": [worker: Worker];
+            "exit": [worker: Worker, code: number, signal: string];
+            "fork": [worker: Worker];
+            "listening": [worker: Worker, address: Address];
+            "message": [worker: Worker, message: any, handle: child_process.SendHandle];
+            "online": [worker: Worker];
+            "setup": [settings: ClusterSettings];
+        }
+        interface Cluster extends InternalEventEmitter<ClusterEventMap> {
+            /**
+             * A `Worker` object contains all public information and method about a worker.
+             * In the primary it can be obtained using `cluster.workers`. In a worker
+             * it can be obtained using `cluster.worker`.
+             * @since v0.7.0
+             */
+            Worker: typeof Worker;
+            disconnect(callback?: () => void): void;
+            /**
+             * Spawn a new worker process.
+             *
+             * This can only be called from the primary process.
+             * @param env Key/value pairs to add to worker process environment.
+             * @since v0.6.0
+             */
+            fork(env?: any): Worker;
+            /** @deprecated since v16.0.0 - use isPrimary. */
+            readonly isMaster: boolean;
+            /**
+             * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
+             * is undefined, then `isPrimary` is `true`.
+             * @since v16.0.0
+             */
+            readonly isPrimary: boolean;
+            /**
+             * True if the process is not a primary (it is the negation of `cluster.isPrimary`).
+             * @since v0.6.0
+             */
+            readonly isWorker: boolean;
+            /**
+             * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
+             * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
+             * is called, whichever comes first.
+             *
+             * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
+             * IOCP handles without incurring a large performance hit.
+             *
+             * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
+             * @since v0.11.2
+             */
+            schedulingPolicy: number;
+            /**
+             * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
+             * (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain
+             * the settings, including the default values.
+             *
+             * This object is not intended to be changed or set manually.
+             * @since v0.7.1
+             */
+            readonly settings: ClusterSettings;
+            /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */
+            setupMaster(settings?: ClusterSettings): void;
+            /**
+             * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
+             *
+             * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)
+             * and have no effect on workers that are already running.
+             *
+             * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
+             * [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv).
+             *
+             * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
+             * `cluster.setupPrimary()` is called.
+             *
+             * ```js
+             * import cluster from 'node:cluster';
+             *
+             * cluster.setupPrimary({
+             *   exec: 'worker.js',
+             *   args: ['--use', 'https'],
+             *   silent: true,
+             * });
+             * cluster.fork(); // https worker
+             * cluster.setupPrimary({
+             *   exec: 'worker.js',
+             *   args: ['--use', 'http'],
+             * });
+             * cluster.fork(); // http worker
+             * ```
+             *
+             * This can only be called from the primary process.
+             * @since v16.0.0
+             */
+            setupPrimary(settings?: ClusterSettings): void;
+            /**
+             * A reference to the current worker object. Not available in the primary process.
+             *
+             * ```js
+             * import cluster from 'node:cluster';
+             *
+             * if (cluster.isPrimary) {
+             *   console.log('I am primary');
+             *   cluster.fork();
+             *   cluster.fork();
+             * } else if (cluster.isWorker) {
+             *   console.log(`I am worker #${cluster.worker.id}`);
+             * }
+             * ```
+             * @since v0.7.0
+             */
+            readonly worker?: Worker;
+            /**
+             * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
+             *
+             * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
+             * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
+             *
+             * ```js
+             * import cluster from 'node:cluster';
+             *
+             * for (const worker of Object.values(cluster.workers)) {
+             *   worker.send('big announcement to all workers');
+             * }
+             * ```
+             * @since v0.7.0
+             */
+            readonly workers?: NodeJS.Dict<Worker>;
+            readonly SCHED_NONE: number;
+            readonly SCHED_RR: number;
+        }
+    }
+    var cluster: cluster.Cluster;
+    export = cluster;
+}
+declare module "cluster" {
+    import cluster = require("node:cluster");
+    export = cluster;
+}

+ 21 - 0
node_modules/@types/node/compatibility/iterators.d.ts

@@ -0,0 +1,21 @@
+// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
+// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
+// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
+// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
+// if lib.esnext.iterator is loaded.
+// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
+
+// Placeholders for TS <5.6
+interface IteratorObject<T, TReturn, TNext> {}
+interface AsyncIteratorObject<T, TReturn, TNext> {}
+
+declare namespace NodeJS {
+    // Populate iterator methods for TS <5.6
+    interface Iterator<T, TReturn, TNext> extends globalThis.Iterator<T, TReturn, TNext> {}
+    interface AsyncIterator<T, TReturn, TNext> extends globalThis.AsyncIterator<T, TReturn, TNext> {}
+
+    // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
+    type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
+        globalThis.Iterator<any, infer TReturn> ? TReturn
+        : any;
+}

+ 93 - 0
node_modules/@types/node/console.d.ts

@@ -0,0 +1,93 @@
+declare module "node:console" {
+    import { InspectOptions } from "node:util";
+    namespace console {
+        interface ConsoleOptions {
+            stdout: NodeJS.WritableStream;
+            stderr?: NodeJS.WritableStream | undefined;
+            /**
+             * Ignore errors when writing to the underlying streams.
+             * @default true
+             */
+            ignoreErrors?: boolean | undefined;
+            /**
+             * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
+             * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
+             * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
+             * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
+             * @default 'auto'
+             */
+            colorMode?: boolean | "auto" | undefined;
+            /**
+             * Specifies options that are passed along to
+             * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
+             */
+            inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
+            /**
+             * Set group indentation.
+             * @default 2
+             */
+            groupIndentation?: number | undefined;
+        }
+        interface Console {
+            readonly Console: {
+                prototype: Console;
+                new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
+                new(options: ConsoleOptions): Console;
+            };
+            assert(condition?: unknown, ...data: any[]): void;
+            clear(): void;
+            count(label?: string): void;
+            countReset(label?: string): void;
+            debug(...data: any[]): void;
+            dir(item?: any, options?: InspectOptions): void;
+            dirxml(...data: any[]): void;
+            error(...data: any[]): void;
+            group(...data: any[]): void;
+            groupCollapsed(...data: any[]): void;
+            groupEnd(): void;
+            info(...data: any[]): void;
+            log(...data: any[]): void;
+            table(tabularData?: any, properties?: string[]): void;
+            time(label?: string): void;
+            timeEnd(label?: string): void;
+            timeLog(label?: string, ...data: any[]): void;
+            trace(...data: any[]): void;
+            warn(...data: any[]): void;
+            /**
+             * This method does not display anything unless used in the inspector. The `console.profile()`
+             * method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
+             * is called. The profile is then added to the Profile panel of the inspector.
+             *
+             * ```js
+             * console.profile('MyLabel');
+             * // Some code
+             * console.profileEnd('MyLabel');
+             * // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
+             * ```
+             * @since v8.0.0
+             */
+            profile(label?: string): void;
+            /**
+             * This method does not display anything unless used in the inspector. Stops the current
+             * JavaScript CPU profiling session if one has been started and prints the report to the
+             * Profiles panel of the inspector. See {@link profile} for an example.
+             *
+             * If this method is called without a label, the most recently started profile is stopped.
+             * @since v8.0.0
+             */
+            profileEnd(label?: string): void;
+            /**
+             * This method does not display anything unless used in the inspector. The `console.timeStamp()`
+             * method adds an event with the label `'label'` to the Timeline panel of the inspector.
+             * @since v8.0.0
+             */
+            timeStamp(label?: string): void;
+        }
+    }
+    var console: console.Console;
+    export = console;
+}
+declare module "console" {
+    import console = require("node:console");
+    export = console;
+}

+ 14 - 0
node_modules/@types/node/constants.d.ts

@@ -0,0 +1,14 @@
+declare module "node:constants" {
+    const constants:
+        & typeof import("node:os").constants.dlopen
+        & typeof import("node:os").constants.errno
+        & typeof import("node:os").constants.priority
+        & typeof import("node:os").constants.signals
+        & typeof import("node:fs").constants
+        & typeof import("node:crypto").constants;
+    export = constants;
+}
+declare module "constants" {
+    import constants = require("node:constants");
+    export = constants;
+}

+ 4047 - 0
node_modules/@types/node/crypto.d.ts

@@ -0,0 +1,4047 @@
+declare module "node:crypto" {
+    import { NonSharedBuffer } from "node:buffer";
+    import * as stream from "node:stream";
+    import { PeerCertificate } from "node:tls";
+    /**
+     * SPKAC is a Certificate Signing Request mechanism originally implemented by
+     * Netscape and was specified formally as part of HTML5's `keygen` element.
+     *
+     * `<keygen>` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
+     * should not use this element anymore.
+     *
+     * The `node:crypto` module provides the `Certificate` class for working with SPKAC
+     * data. The most common usage is handling output generated by the HTML5 `<keygen>` element. Node.js uses [OpenSSL's SPKAC
+     * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
+     * @since v0.11.8
+     */
+    class Certificate {
+        /**
+         * ```js
+         * const { Certificate } = await import('node:crypto');
+         * const spkac = getSpkacSomehow();
+         * const challenge = Certificate.exportChallenge(spkac);
+         * console.log(challenge.toString('utf8'));
+         * // Prints: the challenge as a UTF8 string
+         * ```
+         * @since v9.0.0
+         * @param encoding The `encoding` of the `spkac` string.
+         * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
+         */
+        static exportChallenge(spkac: BinaryLike): NonSharedBuffer;
+        /**
+         * ```js
+         * const { Certificate } = await import('node:crypto');
+         * const spkac = getSpkacSomehow();
+         * const publicKey = Certificate.exportPublicKey(spkac);
+         * console.log(publicKey);
+         * // Prints: the public key as <Buffer ...>
+         * ```
+         * @since v9.0.0
+         * @param encoding The `encoding` of the `spkac` string.
+         * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
+         */
+        static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
+        /**
+         * ```js
+         * import { Buffer } from 'node:buffer';
+         * const { Certificate } = await import('node:crypto');
+         *
+         * const spkac = getSpkacSomehow();
+         * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
+         * // Prints: true or false
+         * ```
+         * @since v9.0.0
+         * @param encoding The `encoding` of the `spkac` string.
+         * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
+         */
+        static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+        /**
+         * @deprecated
+         * @param spkac
+         * @returns The challenge component of the `spkac` data structure,
+         * which includes a public key and a challenge.
+         */
+        exportChallenge(spkac: BinaryLike): NonSharedBuffer;
+        /**
+         * @deprecated
+         * @param spkac
+         * @param encoding The encoding of the spkac string.
+         * @returns The public key component of the `spkac` data structure,
+         * which includes a public key and a challenge.
+         */
+        exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
+        /**
+         * @deprecated
+         * @param spkac
+         * @returns `true` if the given `spkac` data structure is valid,
+         * `false` otherwise.
+         */
+        verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
+    }
+    namespace constants {
+        // https://nodejs.org/dist/latest-v25.x/docs/api/crypto.html#crypto-constants
+        const OPENSSL_VERSION_NUMBER: number;
+        /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
+        const SSL_OP_ALL: number;
+        /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */
+        const SSL_OP_ALLOW_NO_DHE_KEX: number;
+        /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+        const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
+        /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
+        const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
+        /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */
+        const SSL_OP_CISCO_ANYCONNECT: number;
+        /** Instructs OpenSSL to turn on cookie exchange. */
+        const SSL_OP_COOKIE_EXCHANGE: number;
+        /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
+        const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
+        /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
+        const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
+        /** Allows initial connection to servers that do not support RI. */
+        const SSL_OP_LEGACY_SERVER_CONNECT: number;
+        /** Instructs OpenSSL to disable support for SSL/TLS compression. */
+        const SSL_OP_NO_COMPRESSION: number;
+        /** Instructs OpenSSL to disable encrypt-then-MAC. */
+        const SSL_OP_NO_ENCRYPT_THEN_MAC: number;
+        const SSL_OP_NO_QUERY_MTU: number;
+        /** Instructs OpenSSL to disable renegotiation. */
+        const SSL_OP_NO_RENEGOTIATION: number;
+        /** Instructs OpenSSL to always start a new session when performing renegotiation. */
+        const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
+        /** Instructs OpenSSL to turn off SSL v2 */
+        const SSL_OP_NO_SSLv2: number;
+        /** Instructs OpenSSL to turn off SSL v3 */
+        const SSL_OP_NO_SSLv3: number;
+        /** Instructs OpenSSL to disable use of RFC4507bis tickets. */
+        const SSL_OP_NO_TICKET: number;
+        /** Instructs OpenSSL to turn off TLS v1 */
+        const SSL_OP_NO_TLSv1: number;
+        /** Instructs OpenSSL to turn off TLS v1.1 */
+        const SSL_OP_NO_TLSv1_1: number;
+        /** Instructs OpenSSL to turn off TLS v1.2 */
+        const SSL_OP_NO_TLSv1_2: number;
+        /** Instructs OpenSSL to turn off TLS v1.3 */
+        const SSL_OP_NO_TLSv1_3: number;
+        /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */
+        const SSL_OP_PRIORITIZE_CHACHA: number;
+        /** Instructs OpenSSL to disable version rollback attack detection. */
+        const SSL_OP_TLS_ROLLBACK_BUG: number;
+        const ENGINE_METHOD_RSA: number;
+        const ENGINE_METHOD_DSA: number;
+        const ENGINE_METHOD_DH: number;
+        const ENGINE_METHOD_RAND: number;
+        const ENGINE_METHOD_EC: number;
+        const ENGINE_METHOD_CIPHERS: number;
+        const ENGINE_METHOD_DIGESTS: number;
+        const ENGINE_METHOD_PKEY_METHS: number;
+        const ENGINE_METHOD_PKEY_ASN1_METHS: number;
+        const ENGINE_METHOD_ALL: number;
+        const ENGINE_METHOD_NONE: number;
+        const DH_CHECK_P_NOT_SAFE_PRIME: number;
+        const DH_CHECK_P_NOT_PRIME: number;
+        const DH_UNABLE_TO_CHECK_GENERATOR: number;
+        const DH_NOT_SUITABLE_GENERATOR: number;
+        const RSA_PKCS1_PADDING: number;
+        const RSA_SSLV23_PADDING: number;
+        const RSA_NO_PADDING: number;
+        const RSA_PKCS1_OAEP_PADDING: number;
+        const RSA_X931_PADDING: number;
+        const RSA_PKCS1_PSS_PADDING: number;
+        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
+        const RSA_PSS_SALTLEN_DIGEST: number;
+        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
+        const RSA_PSS_SALTLEN_MAX_SIGN: number;
+        /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
+        const RSA_PSS_SALTLEN_AUTO: number;
+        const POINT_CONVERSION_COMPRESSED: number;
+        const POINT_CONVERSION_UNCOMPRESSED: number;
+        const POINT_CONVERSION_HYBRID: number;
+        /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
+        const defaultCoreCipherList: string;
+        /** Specifies the active default cipher list used by the current Node.js process  (colon-separated values). */
+        const defaultCipherList: string;
+    }
+    interface HashOptions extends stream.TransformOptions {
+        /**
+         * For XOF hash functions such as `shake256`, the
+         * outputLength option can be used to specify the desired output length in bytes.
+         */
+        outputLength?: number | undefined;
+    }
+    /** @deprecated since v10.0.0 */
+    const fips: boolean;
+    /**
+     * Creates and returns a `Hash` object that can be used to generate hash digests
+     * using the given `algorithm`. Optional `options` argument controls stream
+     * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
+     * can be used to specify the desired output length in bytes.
+     *
+     * The `algorithm` is dependent on the available algorithms supported by the
+     * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+     * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+     * display the available digest algorithms.
+     *
+     * Example: generating the sha256 sum of a file
+     *
+     * ```js
+     * import {
+     *   createReadStream,
+     * } from 'node:fs';
+     * import { argv } from 'node:process';
+     * const {
+     *   createHash,
+     * } = await import('node:crypto');
+     *
+     * const filename = argv[2];
+     *
+     * const hash = createHash('sha256');
+     *
+     * const input = createReadStream(filename);
+     * input.on('readable', () => {
+     *   // Only one element is going to be produced by the
+     *   // hash stream.
+     *   const data = input.read();
+     *   if (data)
+     *     hash.update(data);
+     *   else {
+     *     console.log(`${hash.digest('hex')} ${filename}`);
+     *   }
+     * });
+     * ```
+     * @since v0.1.92
+     * @param options `stream.transform` options
+     */
+    function createHash(algorithm: string, options?: HashOptions): Hash;
+    /**
+     * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
+     * Optional `options` argument controls stream behavior.
+     *
+     * The `algorithm` is dependent on the available algorithms supported by the
+     * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+     * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+     * display the available digest algorithms.
+     *
+     * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is
+     * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was
+     * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not
+     * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256).
+     *
+     * Example: generating the sha256 HMAC of a file
+     *
+     * ```js
+     * import {
+     *   createReadStream,
+     * } from 'node:fs';
+     * import { argv } from 'node:process';
+     * const {
+     *   createHmac,
+     * } = await import('node:crypto');
+     *
+     * const filename = argv[2];
+     *
+     * const hmac = createHmac('sha256', 'a secret');
+     *
+     * const input = createReadStream(filename);
+     * input.on('readable', () => {
+     *   // Only one element is going to be produced by the
+     *   // hash stream.
+     *   const data = input.read();
+     *   if (data)
+     *     hmac.update(data);
+     *   else {
+     *     console.log(`${hmac.digest('hex')} ${filename}`);
+     *   }
+     * });
+     * ```
+     * @since v0.1.94
+     * @param options `stream.transform` options
+     */
+    function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
+    // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
+    type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
+    type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
+    type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
+    type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
+    type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
+    /**
+     * The `Hash` class is a utility for creating hash digests of data. It can be
+     * used in one of two ways:
+     *
+     * * As a `stream` that is both readable and writable, where data is written
+     * to produce a computed hash digest on the readable side, or
+     * * Using the `hash.update()` and `hash.digest()` methods to produce the
+     * computed hash.
+     *
+     * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword.
+     *
+     * Example: Using `Hash` objects as streams:
+     *
+     * ```js
+     * const {
+     *   createHash,
+     * } = await import('node:crypto');
+     *
+     * const hash = createHash('sha256');
+     *
+     * hash.on('readable', () => {
+     *   // Only one element is going to be produced by the
+     *   // hash stream.
+     *   const data = hash.read();
+     *   if (data) {
+     *     console.log(data.toString('hex'));
+     *     // Prints:
+     *     //   6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+     *   }
+     * });
+     *
+     * hash.write('some data to hash');
+     * hash.end();
+     * ```
+     *
+     * Example: Using `Hash` and piped streams:
+     *
+     * ```js
+     * import { createReadStream } from 'node:fs';
+     * import { stdout } from 'node:process';
+     * const { createHash } = await import('node:crypto');
+     *
+     * const hash = createHash('sha256');
+     *
+     * const input = createReadStream('test.js');
+     * input.pipe(hash).setEncoding('hex').pipe(stdout);
+     * ```
+     *
+     * Example: Using the `hash.update()` and `hash.digest()` methods:
+     *
+     * ```js
+     * const {
+     *   createHash,
+     * } = await import('node:crypto');
+     *
+     * const hash = createHash('sha256');
+     *
+     * hash.update('some data to hash');
+     * console.log(hash.digest('hex'));
+     * // Prints:
+     * //   6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50
+     * ```
+     * @since v0.1.92
+     */
+    class Hash extends stream.Transform {
+        private constructor();
+        /**
+         * Creates a new `Hash` object that contains a deep copy of the internal state
+         * of the current `Hash` object.
+         *
+         * The optional `options` argument controls stream behavior. For XOF hash
+         * functions such as `'shake256'`, the `outputLength` option can be used to
+         * specify the desired output length in bytes.
+         *
+         * An error is thrown when an attempt is made to copy the `Hash` object after
+         * its `hash.digest()` method has been called.
+         *
+         * ```js
+         * // Calculate a rolling hash.
+         * const {
+         *   createHash,
+         * } = await import('node:crypto');
+         *
+         * const hash = createHash('sha256');
+         *
+         * hash.update('one');
+         * console.log(hash.copy().digest('hex'));
+         *
+         * hash.update('two');
+         * console.log(hash.copy().digest('hex'));
+         *
+         * hash.update('three');
+         * console.log(hash.copy().digest('hex'));
+         *
+         * // Etc.
+         * ```
+         * @since v13.1.0
+         * @param options `stream.transform` options
+         */
+        copy(options?: HashOptions): Hash;
+        /**
+         * Updates the hash content with the given `data`, the encoding of which
+         * is given in `inputEncoding`.
+         * If `encoding` is not provided, and the `data` is a string, an
+         * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+         *
+         * This can be called many times with new data as it is streamed.
+         * @since v0.1.92
+         * @param inputEncoding The `encoding` of the `data` string.
+         */
+        update(data: BinaryLike): Hash;
+        update(data: string, inputEncoding: Encoding): Hash;
+        /**
+         * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
+         * If `encoding` is provided a string will be returned; otherwise
+         * a `Buffer` is returned.
+         *
+         * The `Hash` object can not be used again after `hash.digest()` method has been
+         * called. Multiple calls will cause an error to be thrown.
+         * @since v0.1.92
+         * @param encoding The `encoding` of the return value.
+         */
+        digest(): NonSharedBuffer;
+        digest(encoding: BinaryToTextEncoding): string;
+    }
+    /**
+     * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
+     * be used in one of two ways:
+     *
+     * * As a `stream` that is both readable and writable, where data is written
+     * to produce a computed HMAC digest on the readable side, or
+     * * Using the `hmac.update()` and `hmac.digest()` methods to produce the
+     * computed HMAC digest.
+     *
+     * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword.
+     *
+     * Example: Using `Hmac` objects as streams:
+     *
+     * ```js
+     * const {
+     *   createHmac,
+     * } = await import('node:crypto');
+     *
+     * const hmac = createHmac('sha256', 'a secret');
+     *
+     * hmac.on('readable', () => {
+     *   // Only one element is going to be produced by the
+     *   // hash stream.
+     *   const data = hmac.read();
+     *   if (data) {
+     *     console.log(data.toString('hex'));
+     *     // Prints:
+     *     //   7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+     *   }
+     * });
+     *
+     * hmac.write('some data to hash');
+     * hmac.end();
+     * ```
+     *
+     * Example: Using `Hmac` and piped streams:
+     *
+     * ```js
+     * import { createReadStream } from 'node:fs';
+     * import { stdout } from 'node:process';
+     * const {
+     *   createHmac,
+     * } = await import('node:crypto');
+     *
+     * const hmac = createHmac('sha256', 'a secret');
+     *
+     * const input = createReadStream('test.js');
+     * input.pipe(hmac).pipe(stdout);
+     * ```
+     *
+     * Example: Using the `hmac.update()` and `hmac.digest()` methods:
+     *
+     * ```js
+     * const {
+     *   createHmac,
+     * } = await import('node:crypto');
+     *
+     * const hmac = createHmac('sha256', 'a secret');
+     *
+     * hmac.update('some data to hash');
+     * console.log(hmac.digest('hex'));
+     * // Prints:
+     * //   7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
+     * ```
+     * @since v0.1.94
+     */
+    class Hmac extends stream.Transform {
+        private constructor();
+        /**
+         * Updates the `Hmac` content with the given `data`, the encoding of which
+         * is given in `inputEncoding`.
+         * If `encoding` is not provided, and the `data` is a string, an
+         * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+         *
+         * This can be called many times with new data as it is streamed.
+         * @since v0.1.94
+         * @param inputEncoding The `encoding` of the `data` string.
+         */
+        update(data: BinaryLike): Hmac;
+        update(data: string, inputEncoding: Encoding): Hmac;
+        /**
+         * Calculates the HMAC digest of all of the data passed using `hmac.update()`.
+         * If `encoding` is
+         * provided a string is returned; otherwise a `Buffer` is returned;
+         *
+         * The `Hmac` object can not be used again after `hmac.digest()` has been
+         * called. Multiple calls to `hmac.digest()` will result in an error being thrown.
+         * @since v0.1.94
+         * @param encoding The `encoding` of the return value.
+         */
+        digest(): NonSharedBuffer;
+        digest(encoding: BinaryToTextEncoding): string;
+    }
+    type KeyFormat = "pem" | "der" | "jwk";
+    type KeyObjectType = "secret" | "public" | "private";
+    type PublicKeyExportType = "pkcs1" | "spki";
+    type PrivateKeyExportType = "pkcs1" | "pkcs8" | "sec1";
+    type KeyExportOptions =
+        | SymmetricKeyExportOptions
+        | PublicKeyExportOptions
+        | PrivateKeyExportOptions
+        | JwkKeyExportOptions;
+    interface SymmetricKeyExportOptions {
+        format?: "buffer" | undefined;
+    }
+    interface PublicKeyExportOptions<T extends PublicKeyExportType = PublicKeyExportType> {
+        type: T;
+        format: Exclude<KeyFormat, "jwk">;
+    }
+    interface PrivateKeyExportOptions<T extends PrivateKeyExportType = PrivateKeyExportType> {
+        type: T;
+        format: Exclude<KeyFormat, "jwk">;
+        cipher?: string | undefined;
+        passphrase?: string | Buffer | undefined;
+    }
+    interface JwkKeyExportOptions {
+        format: "jwk";
+    }
+    interface KeyPairExportOptions<
+        TPublic extends PublicKeyExportType = PublicKeyExportType,
+        TPrivate extends PrivateKeyExportType = PrivateKeyExportType,
+    > {
+        publicKeyEncoding?: PublicKeyExportOptions<TPublic> | JwkKeyExportOptions | undefined;
+        privateKeyEncoding?: PrivateKeyExportOptions<TPrivate> | JwkKeyExportOptions | undefined;
+    }
+    type KeyExportResult<T, Default> = T extends { format: infer F extends KeyFormat }
+        ? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F]
+        : Default;
+    interface KeyPairExportResult<T extends KeyPairExportOptions> {
+        publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>;
+        privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>;
+    }
+    type KeyPairExportCallback<T extends KeyPairExportOptions> = (
+        err: Error | null,
+        publicKey: KeyExportResult<T["publicKeyEncoding"], KeyObject>,
+        privateKey: KeyExportResult<T["privateKeyEncoding"], KeyObject>,
+    ) => void;
+    type MLDSAKeyType = `ml-dsa-${44 | 65 | 87}`;
+    type MLKEMKeyType = `ml-kem-${1024 | 512 | 768}`;
+    type SLHDSAKeyType = `slh-dsa-${"sha2" | "shake"}-${128 | 192 | 256}${"f" | "s"}`;
+    type AsymmetricKeyType =
+        | "dh"
+        | "dsa"
+        | "ec"
+        | "ed25519"
+        | "ed448"
+        | MLDSAKeyType
+        | MLKEMKeyType
+        | "rsa-pss"
+        | "rsa"
+        | SLHDSAKeyType
+        | "x25519"
+        | "x448";
+    interface AsymmetricKeyDetails {
+        /**
+         * Key size in bits (RSA, DSA).
+         */
+        modulusLength?: number;
+        /**
+         * Public exponent (RSA).
+         */
+        publicExponent?: bigint;
+        /**
+         * Name of the message digest (RSA-PSS).
+         */
+        hashAlgorithm?: string;
+        /**
+         * Name of the message digest used by MGF1 (RSA-PSS).
+         */
+        mgf1HashAlgorithm?: string;
+        /**
+         * Minimal salt length in bytes (RSA-PSS).
+         */
+        saltLength?: number;
+        /**
+         * Size of q in bits (DSA).
+         */
+        divisorLength?: number;
+        /**
+         * Name of the curve (EC).
+         */
+        namedCurve?: string;
+    }
+    /**
+     * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
+     * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject`
+     * objects are not to be created directly using the `new`keyword.
+     *
+     * Most applications should consider using the new `KeyObject` API instead of
+     * passing keys as strings or `Buffer`s due to improved security features.
+     *
+     * `KeyObject` instances can be passed to other threads via `postMessage()`.
+     * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to
+     * be listed in the `transferList` argument.
+     * @since v11.6.0
+     */
+    class KeyObject {
+        private constructor();
+        /**
+         * Example: Converting a `CryptoKey` instance to a `KeyObject`:
+         *
+         * ```js
+         * const { KeyObject } = await import('node:crypto');
+         * const { subtle } = globalThis.crypto;
+         *
+         * const key = await subtle.generateKey({
+         *   name: 'HMAC',
+         *   hash: 'SHA-256',
+         *   length: 256,
+         * }, true, ['sign', 'verify']);
+         *
+         * const keyObject = KeyObject.from(key);
+         * console.log(keyObject.symmetricKeySize);
+         * // Prints: 32 (symmetric key size in bytes)
+         * ```
+         * @since v15.0.0
+         */
+        static from(key: webcrypto.CryptoKey): KeyObject;
+        /**
+         * For asymmetric keys, this property represents the type of the key. See the
+         * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+         *
+         * This property is `undefined` for unrecognized `KeyObject` types and symmetric
+         * keys.
+         * @since v11.6.0
+         */
+        asymmetricKeyType?: AsymmetricKeyType;
+        /**
+         * This property exists only on asymmetric keys. Depending on the type of the key,
+         * this object contains information about the key. None of the information obtained
+         * through this property can be used to uniquely identify a key or to compromise
+         * the security of the key.
+         *
+         * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence,
+         * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be
+         * set.
+         *
+         * Other key details might be exposed via this API using additional attributes.
+         * @since v15.7.0
+         */
+        asymmetricKeyDetails?: AsymmetricKeyDetails;
+        /**
+         * For symmetric keys, the following encoding options can be used:
+         *
+         * For public keys, the following encoding options can be used:
+         *
+         * For private keys, the following encoding options can be used:
+         *
+         * The result type depends on the selected encoding format, when PEM the
+         * result is a string, when DER it will be a buffer containing the data
+         * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object.
+         *
+         * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are
+         * ignored.
+         *
+         * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of
+         * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be
+         * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for
+         * encrypted private keys. Since PKCS#8 defines its own
+         * encryption mechanism, PEM-level encryption is not supported when encrypting
+         * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for
+         * PKCS#1 and SEC1 encryption.
+         * @since v11.6.0
+         */
+        export<T extends KeyExportOptions = {}>(options?: T): KeyExportResult<T, NonSharedBuffer>;
+        /**
+         * Returns `true` or `false` depending on whether the keys have exactly the same
+         * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack).
+         * @since v17.7.0, v16.15.0
+         * @param otherKeyObject A `KeyObject` with which to compare `keyObject`.
+         */
+        equals(otherKeyObject: KeyObject): boolean;
+        /**
+         * For secret keys, this property represents the size of the key in bytes. This
+         * property is `undefined` for asymmetric keys.
+         * @since v11.6.0
+         */
+        symmetricKeySize?: number;
+        /**
+         * Converts a `KeyObject` instance to a `CryptoKey`.
+         * @since 22.10.0
+         */
+        toCryptoKey(
+            algorithm:
+                | webcrypto.AlgorithmIdentifier
+                | webcrypto.RsaHashedImportParams
+                | webcrypto.EcKeyImportParams
+                | webcrypto.HmacImportParams,
+            extractable: boolean,
+            keyUsages: readonly webcrypto.KeyUsage[],
+        ): webcrypto.CryptoKey;
+        /**
+         * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
+         * or `'private'` for private (asymmetric) keys.
+         * @since v11.6.0
+         */
+        type: KeyObjectType;
+    }
+    type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
+    type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
+    type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
+    type CipherChaCha20Poly1305Types = "chacha20-poly1305";
+    type BinaryLike = string | NodeJS.ArrayBufferView;
+    type CipherKey = BinaryLike | KeyObject;
+    interface CipherCCMOptions extends stream.TransformOptions {
+        authTagLength: number;
+    }
+    interface CipherGCMOptions extends stream.TransformOptions {
+        authTagLength?: number | undefined;
+    }
+    interface CipherOCBOptions extends stream.TransformOptions {
+        authTagLength: number;
+    }
+    interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
+        /** @default 16 */
+        authTagLength?: number | undefined;
+    }
+    /**
+     * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
+     * initialization vector (`iv`).
+     *
+     * The `options` argument controls stream behavior and is optional except when a
+     * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
+     * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication
+     * tag that will be returned by `getAuthTag()` and defaults to 16 bytes.
+     * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+     *
+     * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+     * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+     * display the available cipher algorithms.
+     *
+     * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+     * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+     * a `KeyObject` of type `secret`. If the cipher does not need
+     * an initialization vector, `iv` may be `null`.
+     *
+     * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * Initialization vectors should be unpredictable and unique; ideally, they will be
+     * cryptographically random. They do not have to be secret: IVs are typically just
+     * added to ciphertext messages unencrypted. It may sound contradictory that
+     * something has to be unpredictable and unique, but does not have to be secret;
+     * remember that an attacker must not be able to predict ahead of time what a
+     * given IV will be.
+     * @since v0.1.94
+     * @param options `stream.transform` options
+     */
+    function createCipheriv(
+        algorithm: CipherCCMTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options: CipherCCMOptions,
+    ): CipherCCM;
+    function createCipheriv(
+        algorithm: CipherOCBTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options: CipherOCBOptions,
+    ): CipherOCB;
+    function createCipheriv(
+        algorithm: CipherGCMTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options?: CipherGCMOptions,
+    ): CipherGCM;
+    function createCipheriv(
+        algorithm: CipherChaCha20Poly1305Types,
+        key: CipherKey,
+        iv: BinaryLike,
+        options?: CipherChaCha20Poly1305Options,
+    ): CipherChaCha20Poly1305;
+    function createCipheriv(
+        algorithm: string,
+        key: CipherKey,
+        iv: BinaryLike | null,
+        options?: stream.TransformOptions,
+    ): Cipheriv;
+    /**
+     * Instances of the `Cipheriv` class are used to encrypt data. The class can be
+     * used in one of two ways:
+     *
+     * * As a `stream` that is both readable and writable, where plain unencrypted
+     * data is written to produce encrypted data on the readable side, or
+     * * Using the `cipher.update()` and `cipher.final()` methods to produce
+     * the encrypted data.
+     *
+     * The {@link createCipheriv} method is
+     * used to create `Cipheriv` instances. `Cipheriv` objects are not to be created
+     * directly using the `new` keyword.
+     *
+     * Example: Using `Cipheriv` objects as streams:
+     *
+     * ```js
+     * const {
+     *   scrypt,
+     *   randomFill,
+     *   createCipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     *
+     * // First, we'll generate the key. The key length is dependent on the algorithm.
+     * // In this case for aes192, it is 24 bytes (192 bits).
+     * scrypt(password, 'salt', 24, (err, key) => {
+     *   if (err) throw err;
+     *   // Then, we'll generate a random initialization vector
+     *   randomFill(new Uint8Array(16), (err, iv) => {
+     *     if (err) throw err;
+     *
+     *     // Once we have the key and iv, we can create and use the cipher...
+     *     const cipher = createCipheriv(algorithm, key, iv);
+     *
+     *     let encrypted = '';
+     *     cipher.setEncoding('hex');
+     *
+     *     cipher.on('data', (chunk) => encrypted += chunk);
+     *     cipher.on('end', () => console.log(encrypted));
+     *
+     *     cipher.write('some clear text data');
+     *     cipher.end();
+     *   });
+     * });
+     * ```
+     *
+     * Example: Using `Cipheriv` and piped streams:
+     *
+     * ```js
+     * import {
+     *   createReadStream,
+     *   createWriteStream,
+     * } from 'node:fs';
+     *
+     * import {
+     *   pipeline,
+     * } from 'node:stream';
+     *
+     * const {
+     *   scrypt,
+     *   randomFill,
+     *   createCipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     *
+     * // First, we'll generate the key. The key length is dependent on the algorithm.
+     * // In this case for aes192, it is 24 bytes (192 bits).
+     * scrypt(password, 'salt', 24, (err, key) => {
+     *   if (err) throw err;
+     *   // Then, we'll generate a random initialization vector
+     *   randomFill(new Uint8Array(16), (err, iv) => {
+     *     if (err) throw err;
+     *
+     *     const cipher = createCipheriv(algorithm, key, iv);
+     *
+     *     const input = createReadStream('test.js');
+     *     const output = createWriteStream('test.enc');
+     *
+     *     pipeline(input, cipher, output, (err) => {
+     *       if (err) throw err;
+     *     });
+     *   });
+     * });
+     * ```
+     *
+     * Example: Using the `cipher.update()` and `cipher.final()` methods:
+     *
+     * ```js
+     * const {
+     *   scrypt,
+     *   randomFill,
+     *   createCipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     *
+     * // First, we'll generate the key. The key length is dependent on the algorithm.
+     * // In this case for aes192, it is 24 bytes (192 bits).
+     * scrypt(password, 'salt', 24, (err, key) => {
+     *   if (err) throw err;
+     *   // Then, we'll generate a random initialization vector
+     *   randomFill(new Uint8Array(16), (err, iv) => {
+     *     if (err) throw err;
+     *
+     *     const cipher = createCipheriv(algorithm, key, iv);
+     *
+     *     let encrypted = cipher.update('some clear text data', 'utf8', 'hex');
+     *     encrypted += cipher.final('hex');
+     *     console.log(encrypted);
+     *   });
+     * });
+     * ```
+     * @since v0.1.94
+     */
+    class Cipheriv extends stream.Transform {
+        private constructor();
+        /**
+         * Updates the cipher with `data`. If the `inputEncoding` argument is given,
+         * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`,
+         * `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
+         *
+         * The `outputEncoding` specifies the output format of the enciphered
+         * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
+         *
+         * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being
+         * thrown.
+         * @since v0.1.94
+         * @param inputEncoding The `encoding` of the data.
+         * @param outputEncoding The `encoding` of the return value.
+         */
+        update(data: BinaryLike): NonSharedBuffer;
+        update(data: string, inputEncoding: Encoding): NonSharedBuffer;
+        update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+        update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+        /**
+         * Once the `cipher.final()` method has been called, the `Cipheriv` object can no
+         * longer be used to encrypt data. Attempts to call `cipher.final()` more than
+         * once will result in an error being thrown.
+         * @since v0.1.94
+         * @param outputEncoding The `encoding` of the return value.
+         * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+         */
+        final(): NonSharedBuffer;
+        final(outputEncoding: BufferEncoding): string;
+        /**
+         * When using block encryption algorithms, the `Cipheriv` class will automatically
+         * add padding to the input data to the appropriate block size. To disable the
+         * default padding call `cipher.setAutoPadding(false)`.
+         *
+         * When `autoPadding` is `false`, the length of the entire input data must be a
+         * multiple of the cipher's block size or `cipher.final()` will throw an error.
+         * Disabling automatic padding is useful for non-standard padding, for instance
+         * using `0x0` instead of PKCS padding.
+         *
+         * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
+         * @since v0.7.1
+         * @param [autoPadding=true]
+         * @return for method chaining.
+         */
+        setAutoPadding(autoPadding?: boolean): this;
+    }
+    interface CipherCCM extends Cipheriv {
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options: {
+                plaintextLength: number;
+            },
+        ): this;
+        getAuthTag(): NonSharedBuffer;
+    }
+    interface CipherGCM extends Cipheriv {
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options?: {
+                plaintextLength: number;
+            },
+        ): this;
+        getAuthTag(): NonSharedBuffer;
+    }
+    interface CipherOCB extends Cipheriv {
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options?: {
+                plaintextLength: number;
+            },
+        ): this;
+        getAuthTag(): NonSharedBuffer;
+    }
+    interface CipherChaCha20Poly1305 extends Cipheriv {
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options: {
+                plaintextLength: number;
+            },
+        ): this;
+        getAuthTag(): NonSharedBuffer;
+    }
+    /**
+     * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
+     *
+     * The `options` argument controls stream behavior and is optional except when a
+     * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
+     * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags
+     * to those with the specified length.
+     * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
+     *
+     * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On
+     * recent OpenSSL releases, `openssl list -cipher-algorithms` will
+     * display the available cipher algorithms.
+     *
+     * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
+     * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
+     * a `KeyObject` of type `secret`. If the cipher does not need
+     * an initialization vector, `iv` may be `null`.
+     *
+     * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * Initialization vectors should be unpredictable and unique; ideally, they will be
+     * cryptographically random. They do not have to be secret: IVs are typically just
+     * added to ciphertext messages unencrypted. It may sound contradictory that
+     * something has to be unpredictable and unique, but does not have to be secret;
+     * remember that an attacker must not be able to predict ahead of time what a given
+     * IV will be.
+     * @since v0.1.94
+     * @param options `stream.transform` options
+     */
+    function createDecipheriv(
+        algorithm: CipherCCMTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options: CipherCCMOptions,
+    ): DecipherCCM;
+    function createDecipheriv(
+        algorithm: CipherOCBTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options: CipherOCBOptions,
+    ): DecipherOCB;
+    function createDecipheriv(
+        algorithm: CipherGCMTypes,
+        key: CipherKey,
+        iv: BinaryLike,
+        options?: CipherGCMOptions,
+    ): DecipherGCM;
+    function createDecipheriv(
+        algorithm: CipherChaCha20Poly1305Types,
+        key: CipherKey,
+        iv: BinaryLike,
+        options?: CipherChaCha20Poly1305Options,
+    ): DecipherChaCha20Poly1305;
+    function createDecipheriv(
+        algorithm: string,
+        key: CipherKey,
+        iv: BinaryLike | null,
+        options?: stream.TransformOptions,
+    ): Decipheriv;
+    /**
+     * Instances of the `Decipheriv` class are used to decrypt data. The class can be
+     * used in one of two ways:
+     *
+     * * As a `stream` that is both readable and writable, where plain encrypted
+     * data is written to produce unencrypted data on the readable side, or
+     * * Using the `decipher.update()` and `decipher.final()` methods to
+     * produce the unencrypted data.
+     *
+     * The {@link createDecipheriv} method is
+     * used to create `Decipheriv` instances. `Decipheriv` objects are not to be created
+     * directly using the `new` keyword.
+     *
+     * Example: Using `Decipheriv` objects as streams:
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const {
+     *   scryptSync,
+     *   createDecipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     * // Key length is dependent on the algorithm. In this case for aes192, it is
+     * // 24 bytes (192 bits).
+     * // Use the async `crypto.scrypt()` instead.
+     * const key = scryptSync(password, 'salt', 24);
+     * // The IV is usually passed along with the ciphertext.
+     * const iv = Buffer.alloc(16, 0); // Initialization vector.
+     *
+     * const decipher = createDecipheriv(algorithm, key, iv);
+     *
+     * let decrypted = '';
+     * decipher.on('readable', () => {
+     *   let chunk;
+     *   while (null !== (chunk = decipher.read())) {
+     *     decrypted += chunk.toString('utf8');
+     *   }
+     * });
+     * decipher.on('end', () => {
+     *   console.log(decrypted);
+     *   // Prints: some clear text data
+     * });
+     *
+     * // Encrypted with same algorithm, key and iv.
+     * const encrypted =
+     *   'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+     * decipher.write(encrypted, 'hex');
+     * decipher.end();
+     * ```
+     *
+     * Example: Using `Decipheriv` and piped streams:
+     *
+     * ```js
+     * import {
+     *   createReadStream,
+     *   createWriteStream,
+     * } from 'node:fs';
+     * import { Buffer } from 'node:buffer';
+     * const {
+     *   scryptSync,
+     *   createDecipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     * // Use the async `crypto.scrypt()` instead.
+     * const key = scryptSync(password, 'salt', 24);
+     * // The IV is usually passed along with the ciphertext.
+     * const iv = Buffer.alloc(16, 0); // Initialization vector.
+     *
+     * const decipher = createDecipheriv(algorithm, key, iv);
+     *
+     * const input = createReadStream('test.enc');
+     * const output = createWriteStream('test.js');
+     *
+     * input.pipe(decipher).pipe(output);
+     * ```
+     *
+     * Example: Using the `decipher.update()` and `decipher.final()` methods:
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const {
+     *   scryptSync,
+     *   createDecipheriv,
+     * } = await import('node:crypto');
+     *
+     * const algorithm = 'aes-192-cbc';
+     * const password = 'Password used to generate key';
+     * // Use the async `crypto.scrypt()` instead.
+     * const key = scryptSync(password, 'salt', 24);
+     * // The IV is usually passed along with the ciphertext.
+     * const iv = Buffer.alloc(16, 0); // Initialization vector.
+     *
+     * const decipher = createDecipheriv(algorithm, key, iv);
+     *
+     * // Encrypted using same algorithm, key and iv.
+     * const encrypted =
+     *   'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa';
+     * let decrypted = decipher.update(encrypted, 'hex', 'utf8');
+     * decrypted += decipher.final('utf8');
+     * console.log(decrypted);
+     * // Prints: some clear text data
+     * ```
+     * @since v0.1.94
+     */
+    class Decipheriv extends stream.Transform {
+        private constructor();
+        /**
+         * Updates the decipher with `data`. If the `inputEncoding` argument is given,
+         * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
+         * ignored.
+         *
+         * The `outputEncoding` specifies the output format of the enciphered
+         * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned.
+         *
+         * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
+         * being thrown.
+         * @since v0.1.94
+         * @param inputEncoding The `encoding` of the `data` string.
+         * @param outputEncoding The `encoding` of the return value.
+         */
+        update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
+        update(data: string, inputEncoding: Encoding): NonSharedBuffer;
+        update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
+        update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
+        /**
+         * Once the `decipher.final()` method has been called, the `Decipheriv` object can
+         * no longer be used to decrypt data. Attempts to call `decipher.final()` more
+         * than once will result in an error being thrown.
+         * @since v0.1.94
+         * @param outputEncoding The `encoding` of the return value.
+         * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
+         */
+        final(): NonSharedBuffer;
+        final(outputEncoding: BufferEncoding): string;
+        /**
+         * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
+         * removing padding.
+         *
+         * Turning auto padding off will only work if the input data's length is a
+         * multiple of the ciphers block size.
+         *
+         * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
+         * @since v0.7.1
+         * @param [autoPadding=true]
+         * @return for method chaining.
+         */
+        setAutoPadding(auto_padding?: boolean): this;
+    }
+    interface DecipherCCM extends Decipheriv {
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options: {
+                plaintextLength: number;
+            },
+        ): this;
+    }
+    interface DecipherGCM extends Decipheriv {
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options?: {
+                plaintextLength: number;
+            },
+        ): this;
+    }
+    interface DecipherOCB extends Decipheriv {
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options?: {
+                plaintextLength: number;
+            },
+        ): this;
+    }
+    interface DecipherChaCha20Poly1305 extends Decipheriv {
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
+        setAAD(
+            buffer: NodeJS.ArrayBufferView,
+            options: {
+                plaintextLength: number;
+            },
+        ): this;
+    }
+    interface PrivateKeyInput {
+        key: string | Buffer;
+        format?: KeyFormat | undefined;
+        type?: PrivateKeyExportType | undefined;
+        passphrase?: string | Buffer | undefined;
+        encoding?: string | undefined;
+    }
+    interface PublicKeyInput {
+        key: string | Buffer;
+        format?: KeyFormat | undefined;
+        type?: PublicKeyExportType | undefined;
+        encoding?: string | undefined;
+    }
+    /**
+     * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
+     *
+     * ```js
+     * const {
+     *   generateKey,
+     * } = await import('node:crypto');
+     *
+     * generateKey('hmac', { length: 512 }, (err, key) => {
+     *   if (err) throw err;
+     *   console.log(key.export().toString('hex'));  // 46e..........620
+     * });
+     * ```
+     *
+     * The size of a generated HMAC key should not exceed the block size of the
+     * underlying hash function. See {@link createHmac} for more information.
+     * @since v15.0.0
+     * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+     */
+    function generateKey(
+        type: "hmac" | "aes",
+        options: {
+            length: number;
+        },
+        callback: (err: Error | null, key: KeyObject) => void,
+    ): void;
+    /**
+     * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
+     *
+     * ```js
+     * const {
+     *   generateKeySync,
+     * } = await import('node:crypto');
+     *
+     * const key = generateKeySync('hmac', { length: 512 });
+     * console.log(key.export().toString('hex'));  // e89..........41e
+     * ```
+     *
+     * The size of a generated HMAC key should not exceed the block size of the
+     * underlying hash function. See {@link createHmac} for more information.
+     * @since v15.0.0
+     * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
+     */
+    function generateKeySync(
+        type: "hmac" | "aes",
+        options: {
+            length: number;
+        },
+    ): KeyObject;
+    interface JsonWebKeyInput {
+        key: webcrypto.JsonWebKey;
+        format: "jwk";
+    }
+    /**
+     * Creates and returns a new key object containing a private key. If `key` is a
+     * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above.
+     *
+     * If the private key is encrypted, a `passphrase` must be specified. The length
+     * of the passphrase is limited to 1024 bytes.
+     * @since v11.6.0
+     */
+    function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
+    /**
+     * Creates and returns a new key object containing a public key. If `key` is a
+     * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key;
+     * otherwise, `key` must be an object with the properties described above.
+     *
+     * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
+     *
+     * Because public keys can be derived from private keys, a private key may be
+     * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
+     * returned `KeyObject` will be `'public'` and that the private key cannot be
+     * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned
+     * and it will be impossible to extract the private key from the returned object.
+     * @since v11.6.0
+     */
+    function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject;
+    /**
+     * Creates and returns a new key object containing a secret key for symmetric
+     * encryption or `Hmac`.
+     * @since v11.6.0
+     * @param encoding The string encoding when `key` is a string.
+     */
+    function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
+    function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
+    /**
+     * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
+     * Optional `options` argument controls the `stream.Writable` behavior.
+     *
+     * In some cases, a `Sign` instance can be created using the name of a signature
+     * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+     * the corresponding digest algorithm. This does not work for all signature
+     * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+     * algorithm names.
+     * @since v0.1.92
+     * @param options `stream.Writable` options
+     */
+    // TODO: signing algorithm type
+    function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
+    type DSAEncoding = "der" | "ieee-p1363";
+    interface SigningOptions {
+        /**
+         * @see crypto.constants.RSA_PKCS1_PADDING
+         */
+        padding?: number | undefined;
+        saltLength?: number | undefined;
+        dsaEncoding?: DSAEncoding | undefined;
+        context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined;
+    }
+    interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
+    interface SignKeyObjectInput extends SigningOptions {
+        key: KeyObject;
+    }
+    interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+    interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
+    interface VerifyKeyObjectInput extends SigningOptions {
+        key: KeyObject;
+    }
+    interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
+    type KeyLike = string | Buffer | KeyObject;
+    /**
+     * The `Sign` class is a utility for generating signatures. It can be used in one
+     * of two ways:
+     *
+     * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or
+     * * Using the `sign.update()` and `sign.sign()` methods to produce the
+     * signature.
+     *
+     * The {@link createSign} method is used to create `Sign` instances. The
+     * argument is the string name of the hash function to use. `Sign` objects are not
+     * to be created directly using the `new` keyword.
+     *
+     * Example: Using `Sign` and `Verify` objects as streams:
+     *
+     * ```js
+     * const {
+     *   generateKeyPairSync,
+     *   createSign,
+     *   createVerify,
+     * } = await import('node:crypto');
+     *
+     * const { privateKey, publicKey } = generateKeyPairSync('ec', {
+     *   namedCurve: 'sect239k1',
+     * });
+     *
+     * const sign = createSign('SHA256');
+     * sign.write('some data to sign');
+     * sign.end();
+     * const signature = sign.sign(privateKey, 'hex');
+     *
+     * const verify = createVerify('SHA256');
+     * verify.write('some data to sign');
+     * verify.end();
+     * console.log(verify.verify(publicKey, signature, 'hex'));
+     * // Prints: true
+     * ```
+     *
+     * Example: Using the `sign.update()` and `verify.update()` methods:
+     *
+     * ```js
+     * const {
+     *   generateKeyPairSync,
+     *   createSign,
+     *   createVerify,
+     * } = await import('node:crypto');
+     *
+     * const { privateKey, publicKey } = generateKeyPairSync('rsa', {
+     *   modulusLength: 2048,
+     * });
+     *
+     * const sign = createSign('SHA256');
+     * sign.update('some data to sign');
+     * sign.end();
+     * const signature = sign.sign(privateKey);
+     *
+     * const verify = createVerify('SHA256');
+     * verify.update('some data to sign');
+     * verify.end();
+     * console.log(verify.verify(publicKey, signature));
+     * // Prints: true
+     * ```
+     * @since v0.1.92
+     */
+    class Sign extends stream.Writable {
+        private constructor();
+        /**
+         * Updates the `Sign` content with the given `data`, the encoding of which
+         * is given in `inputEncoding`.
+         * If `encoding` is not provided, and the `data` is a string, an
+         * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
+         *
+         * This can be called many times with new data as it is streamed.
+         * @since v0.1.92
+         * @param inputEncoding The `encoding` of the `data` string.
+         */
+        update(data: BinaryLike): this;
+        update(data: string, inputEncoding: Encoding): this;
+        /**
+         * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
+         *
+         * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+         * object, the following additional properties can be passed:
+         *
+         * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
+         *
+         * The `Sign` object can not be again used after `sign.sign()` method has been
+         * called. Multiple calls to `sign.sign()` will result in an error being thrown.
+         * @since v0.1.92
+         */
+        sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
+        sign(
+            privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
+            outputFormat: BinaryToTextEncoding,
+        ): string;
+    }
+    /**
+     * Creates and returns a `Verify` object that uses the given algorithm.
+     * Use {@link getHashes} to obtain an array of names of the available
+     * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior.
+     *
+     * In some cases, a `Verify` instance can be created using the name of a signature
+     * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
+     * the corresponding digest algorithm. This does not work for all signature
+     * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest
+     * algorithm names.
+     * @since v0.1.92
+     * @param options `stream.Writable` options
+     */
+    function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
+    /**
+     * The `Verify` class is a utility for verifying signatures. It can be used in one
+     * of two ways:
+     *
+     * * As a writable `stream` where written data is used to validate against the
+     * supplied signature, or
+     * * Using the `verify.update()` and `verify.verify()` methods to verify
+     * the signature.
+     *
+     * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword.
+     *
+     * See `Sign` for examples.
+     * @since v0.1.92
+     */
+    class Verify extends stream.Writable {
+        private constructor();
+        /**
+         * Updates the `Verify` content with the given `data`, the encoding of which
+         * is given in `inputEncoding`.
+         * If `inputEncoding` is not provided, and the `data` is a string, an
+         * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
+         *
+         * This can be called many times with new data as it is streamed.
+         * @since v0.1.92
+         * @param inputEncoding The `encoding` of the `data` string.
+         */
+        update(data: BinaryLike): Verify;
+        update(data: string, inputEncoding: Encoding): Verify;
+        /**
+         * Verifies the provided data using the given `object` and `signature`.
+         *
+         * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an
+         * object, the following additional properties can be passed:
+         *
+         * The `signature` argument is the previously calculated signature for the data, in
+         * the `signatureEncoding`.
+         * If a `signatureEncoding` is specified, the `signature` is expected to be a
+         * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * The `verify` object can not be used again after `verify.verify()` has been
+         * called. Multiple calls to `verify.verify()` will result in an error being
+         * thrown.
+         *
+         * Because public keys can be derived from private keys, a private key may
+         * be passed instead of a public key.
+         * @since v0.1.92
+         */
+        verify(
+            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+            signature: NodeJS.ArrayBufferView,
+        ): boolean;
+        verify(
+            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+            signature: string,
+            signature_format?: BinaryToTextEncoding,
+        ): boolean;
+    }
+    /**
+     * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
+     * optional specific `generator`.
+     *
+     * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used.
+     *
+     * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
+     * a `Buffer`, `TypedArray`, or `DataView` is expected.
+     *
+     * If `generatorEncoding` is specified, `generator` is expected to be a string;
+     * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
+     * @since v0.11.12
+     * @param primeEncoding The `encoding` of the `prime` string.
+     * @param [generator=2]
+     * @param generatorEncoding The `encoding` of the `generator` string.
+     */
+    function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman;
+    function createDiffieHellman(
+        prime: ArrayBuffer | NodeJS.ArrayBufferView,
+        generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
+    ): DiffieHellman;
+    function createDiffieHellman(
+        prime: ArrayBuffer | NodeJS.ArrayBufferView,
+        generator: string,
+        generatorEncoding: BinaryToTextEncoding,
+    ): DiffieHellman;
+    function createDiffieHellman(
+        prime: string,
+        primeEncoding: BinaryToTextEncoding,
+        generator?: number | ArrayBuffer | NodeJS.ArrayBufferView,
+    ): DiffieHellman;
+    function createDiffieHellman(
+        prime: string,
+        primeEncoding: BinaryToTextEncoding,
+        generator: string,
+        generatorEncoding: BinaryToTextEncoding,
+    ): DiffieHellman;
+    /**
+     * The `DiffieHellman` class is a utility for creating Diffie-Hellman key
+     * exchanges.
+     *
+     * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function.
+     *
+     * ```js
+     * import assert from 'node:assert';
+     *
+     * const {
+     *   createDiffieHellman,
+     * } = await import('node:crypto');
+     *
+     * // Generate Alice's keys...
+     * const alice = createDiffieHellman(2048);
+     * const aliceKey = alice.generateKeys();
+     *
+     * // Generate Bob's keys...
+     * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator());
+     * const bobKey = bob.generateKeys();
+     *
+     * // Exchange and generate the secret...
+     * const aliceSecret = alice.computeSecret(bobKey);
+     * const bobSecret = bob.computeSecret(aliceKey);
+     *
+     * // OK
+     * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+     * ```
+     * @since v0.5.0
+     */
+    class DiffieHellman {
+        private constructor();
+        /**
+         * Generates private and public Diffie-Hellman key values unless they have been
+         * generated or computed already, and returns
+         * the public key in the specified `encoding`. This key should be
+         * transferred to the other party.
+         * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+         *
+         * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
+         * once a private key has been generated or set, calling this function only updates
+         * the public key but does not generate a new private key.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the return value.
+         */
+        generateKeys(): NonSharedBuffer;
+        generateKeys(encoding: BinaryToTextEncoding): string;
+        /**
+         * Computes the shared secret using `otherPublicKey` as the other
+         * party's public key and returns the computed shared secret. The supplied
+         * key is interpreted using the specified `inputEncoding`, and secret is
+         * encoded using specified `outputEncoding`.
+         * If the `inputEncoding` is not
+         * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
+         * @since v0.5.0
+         * @param inputEncoding The `encoding` of an `otherPublicKey` string.
+         * @param outputEncoding The `encoding` of the return value.
+         */
+        computeSecret(
+            otherPublicKey: NodeJS.ArrayBufferView,
+            inputEncoding?: null,
+            outputEncoding?: null,
+        ): NonSharedBuffer;
+        computeSecret(
+            otherPublicKey: string,
+            inputEncoding: BinaryToTextEncoding,
+            outputEncoding?: null,
+        ): NonSharedBuffer;
+        computeSecret(
+            otherPublicKey: NodeJS.ArrayBufferView,
+            inputEncoding: null,
+            outputEncoding: BinaryToTextEncoding,
+        ): string;
+        computeSecret(
+            otherPublicKey: string,
+            inputEncoding: BinaryToTextEncoding,
+            outputEncoding: BinaryToTextEncoding,
+        ): string;
+        /**
+         * Returns the Diffie-Hellman prime in the specified `encoding`.
+         * If `encoding` is provided a string is
+         * returned; otherwise a `Buffer` is returned.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the return value.
+         */
+        getPrime(): NonSharedBuffer;
+        getPrime(encoding: BinaryToTextEncoding): string;
+        /**
+         * Returns the Diffie-Hellman generator in the specified `encoding`.
+         * If `encoding` is provided a string is
+         * returned; otherwise a `Buffer` is returned.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the return value.
+         */
+        getGenerator(): NonSharedBuffer;
+        getGenerator(encoding: BinaryToTextEncoding): string;
+        /**
+         * Returns the Diffie-Hellman public key in the specified `encoding`.
+         * If `encoding` is provided a
+         * string is returned; otherwise a `Buffer` is returned.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the return value.
+         */
+        getPublicKey(): NonSharedBuffer;
+        getPublicKey(encoding: BinaryToTextEncoding): string;
+        /**
+         * Returns the Diffie-Hellman private key in the specified `encoding`.
+         * If `encoding` is provided a
+         * string is returned; otherwise a `Buffer` is returned.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the return value.
+         */
+        getPrivateKey(): NonSharedBuffer;
+        getPrivateKey(encoding: BinaryToTextEncoding): string;
+        /**
+         * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
+         * to be a string. If no `encoding` is provided, `publicKey` is expected
+         * to be a `Buffer`, `TypedArray`, or `DataView`.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the `publicKey` string.
+         */
+        setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
+        setPublicKey(publicKey: string, encoding: BufferEncoding): void;
+        /**
+         * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
+         * to be a string. If no `encoding` is provided, `privateKey` is expected
+         * to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
+         * used to manually provide the public key or to automatically derive it.
+         * @since v0.5.0
+         * @param encoding The `encoding` of the `privateKey` string.
+         */
+        setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+        setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
+        /**
+         * A bit field containing any warnings and/or errors resulting from a check
+         * performed during initialization of the `DiffieHellman` object.
+         *
+         * The following values are valid for this property (as defined in `node:constants` module):
+         *
+         * * `DH_CHECK_P_NOT_SAFE_PRIME`
+         * * `DH_CHECK_P_NOT_PRIME`
+         * * `DH_UNABLE_TO_CHECK_GENERATOR`
+         * * `DH_NOT_SUITABLE_GENERATOR`
+         * @since v0.11.12
+         */
+        verifyError: number;
+    }
+    /**
+     * The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
+     * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
+     * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
+     *
+     * ```js
+     * const { createDiffieHellmanGroup } = await import('node:crypto');
+     * const dh = createDiffieHellmanGroup('modp1');
+     * ```
+     * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
+     * ```bash
+     * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
+     * modp1  #  768 bits
+     * modp2  # 1024 bits
+     * modp5  # 1536 bits
+     * modp14 # 2048 bits
+     * modp15 # etc.
+     * modp16
+     * modp17
+     * modp18
+     * ```
+     * @since v0.7.5
+     */
+    const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
+    interface DiffieHellmanGroupConstructor {
+        new(name: string): DiffieHellmanGroup;
+        (name: string): DiffieHellmanGroup;
+        readonly prototype: DiffieHellmanGroup;
+    }
+    type DiffieHellmanGroup = Omit<DiffieHellman, "setPublicKey" | "setPrivateKey">;
+    /**
+     * Creates a predefined `DiffieHellmanGroup` key exchange object. The
+     * supported groups are listed in the documentation for `DiffieHellmanGroup`.
+     *
+     * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
+     * the keys (with `diffieHellman.setPublicKey()`, for example). The
+     * advantage of using this method is that the parties do not have to
+     * generate nor exchange a group modulus beforehand, saving both processor
+     * and communication time.
+     *
+     * Example (obtaining a shared secret):
+     *
+     * ```js
+     * const {
+     *   getDiffieHellman,
+     * } = await import('node:crypto');
+     * const alice = getDiffieHellman('modp14');
+     * const bob = getDiffieHellman('modp14');
+     *
+     * alice.generateKeys();
+     * bob.generateKeys();
+     *
+     * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
+     * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
+     *
+     * // aliceSecret and bobSecret should be the same
+     * console.log(aliceSecret === bobSecret);
+     * ```
+     * @since v0.7.5
+     */
+    function getDiffieHellman(groupName: string): DiffieHellmanGroup;
+    /**
+     * An alias for {@link getDiffieHellman}
+     * @since v0.9.3
+     */
+    function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
+    /**
+     * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
+     * implementation. A selected HMAC digest algorithm specified by `digest` is
+     * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
+     *
+     * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set;
+     * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be
+     * thrown if any of the input arguments specify invalid values or types.
+     *
+     * The `iterations` argument must be a number set as high as possible. The
+     * higher the number of iterations, the more secure the derived key will be,
+     * but will take a longer amount of time to complete.
+     *
+     * The `salt` should be as unique as possible. It is recommended that a salt is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * ```js
+     * const {
+     *   pbkdf2,
+     * } = await import('node:crypto');
+     *
+     * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
+     *   if (err) throw err;
+     *   console.log(derivedKey.toString('hex'));  // '3745e48...08d59ae'
+     * });
+     * ```
+     *
+     * An array of supported digest functions can be retrieved using {@link getHashes}.
+     *
+     * This API uses libuv's threadpool, which can have surprising and
+     * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+     * @since v0.5.5
+     */
+    function pbkdf2(
+        password: BinaryLike,
+        salt: BinaryLike,
+        iterations: number,
+        keylen: number,
+        digest: string,
+        callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
+     * implementation. A selected HMAC digest algorithm specified by `digest` is
+     * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
+     *
+     * If an error occurs an `Error` will be thrown, otherwise the derived key will be
+     * returned as a `Buffer`.
+     *
+     * The `iterations` argument must be a number set as high as possible. The
+     * higher the number of iterations, the more secure the derived key will be,
+     * but will take a longer amount of time to complete.
+     *
+     * The `salt` should be as unique as possible. It is recommended that a salt is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * ```js
+     * const {
+     *   pbkdf2Sync,
+     * } = await import('node:crypto');
+     *
+     * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
+     * console.log(key.toString('hex'));  // '3745e48...08d59ae'
+     * ```
+     *
+     * An array of supported digest functions can be retrieved using {@link getHashes}.
+     * @since v0.9.3
+     */
+    function pbkdf2Sync(
+        password: BinaryLike,
+        salt: BinaryLike,
+        iterations: number,
+        keylen: number,
+        digest: string,
+    ): NonSharedBuffer;
+    /**
+     * Generates cryptographically strong pseudorandom data. The `size` argument
+     * is a number indicating the number of bytes to generate.
+     *
+     * If a `callback` function is provided, the bytes are generated asynchronously
+     * and the `callback` function is invoked with two arguments: `err` and `buf`.
+     * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes.
+     *
+     * ```js
+     * // Asynchronous
+     * const {
+     *   randomBytes,
+     * } = await import('node:crypto');
+     *
+     * randomBytes(256, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
+     * });
+     * ```
+     *
+     * If the `callback` function is not provided, the random bytes are generated
+     * synchronously and returned as a `Buffer`. An error will be thrown if
+     * there is a problem generating the bytes.
+     *
+     * ```js
+     * // Synchronous
+     * const {
+     *   randomBytes,
+     * } = await import('node:crypto');
+     *
+     * const buf = randomBytes(256);
+     * console.log(
+     *   `${buf.length} bytes of random data: ${buf.toString('hex')}`);
+     * ```
+     *
+     * The `crypto.randomBytes()` method will not complete until there is
+     * sufficient entropy available.
+     * This should normally never take longer than a few milliseconds. The only time
+     * when generating the random bytes may conceivably block for a longer period of
+     * time is right after boot, when the whole system is still low on entropy.
+     *
+     * This API uses libuv's threadpool, which can have surprising and
+     * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+     *
+     * The asynchronous version of `crypto.randomBytes()` is carried out in a single
+     * threadpool request. To minimize threadpool task length variation, partition
+     * large `randomBytes` requests when doing so as part of fulfilling a client
+     * request.
+     * @since v0.5.8
+     * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
+     * @return if the `callback` function is not provided.
+     */
+    function randomBytes(size: number): NonSharedBuffer;
+    function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
+    function pseudoRandomBytes(size: number): NonSharedBuffer;
+    function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
+    /**
+     * Return a random integer `n` such that `min <= n < max`.  This
+     * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
+     *
+     * The range (`max - min`) must be less than 2**48. `min` and `max` must
+     * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
+     *
+     * If the `callback` function is not provided, the random integer is
+     * generated synchronously.
+     *
+     * ```js
+     * // Asynchronous
+     * const {
+     *   randomInt,
+     * } = await import('node:crypto');
+     *
+     * randomInt(3, (err, n) => {
+     *   if (err) throw err;
+     *   console.log(`Random number chosen from (0, 1, 2): ${n}`);
+     * });
+     * ```
+     *
+     * ```js
+     * // Synchronous
+     * const {
+     *   randomInt,
+     * } = await import('node:crypto');
+     *
+     * const n = randomInt(3);
+     * console.log(`Random number chosen from (0, 1, 2): ${n}`);
+     * ```
+     *
+     * ```js
+     * // With `min` argument
+     * const {
+     *   randomInt,
+     * } = await import('node:crypto');
+     *
+     * const n = randomInt(1, 7);
+     * console.log(`The dice rolled: ${n}`);
+     * ```
+     * @since v14.10.0, v12.19.0
+     * @param [min=0] Start of random range (inclusive).
+     * @param max End of random range (exclusive).
+     * @param callback `function(err, n) {}`.
+     */
+    function randomInt(max: number): number;
+    function randomInt(min: number, max: number): number;
+    function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
+    function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
+    /**
+     * Synchronous version of {@link randomFill}.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const { randomFillSync } = await import('node:crypto');
+     *
+     * const buf = Buffer.alloc(10);
+     * console.log(randomFillSync(buf).toString('hex'));
+     *
+     * randomFillSync(buf, 5);
+     * console.log(buf.toString('hex'));
+     *
+     * // The above is equivalent to the following:
+     * randomFillSync(buf, 5, 5);
+     * console.log(buf.toString('hex'));
+     * ```
+     *
+     * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const { randomFillSync } = await import('node:crypto');
+     *
+     * const a = new Uint32Array(10);
+     * console.log(Buffer.from(randomFillSync(a).buffer,
+     *                         a.byteOffset, a.byteLength).toString('hex'));
+     *
+     * const b = new DataView(new ArrayBuffer(10));
+     * console.log(Buffer.from(randomFillSync(b).buffer,
+     *                         b.byteOffset, b.byteLength).toString('hex'));
+     *
+     * const c = new ArrayBuffer(10);
+     * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
+     * ```
+     * @since v7.10.0, v6.13.0
+     * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+     * @param [offset=0]
+     * @param [size=buffer.length - offset]
+     * @return The object passed as `buffer` argument.
+     */
+    function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
+    /**
+     * This function is similar to {@link randomBytes} but requires the first
+     * argument to be a `Buffer` that will be filled. It also
+     * requires that a callback is passed in.
+     *
+     * If the `callback` function is not provided, an error will be thrown.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const { randomFill } = await import('node:crypto');
+     *
+     * const buf = Buffer.alloc(10);
+     * randomFill(buf, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(buf.toString('hex'));
+     * });
+     *
+     * randomFill(buf, 5, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(buf.toString('hex'));
+     * });
+     *
+     * // The above is equivalent to the following:
+     * randomFill(buf, 5, 5, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(buf.toString('hex'));
+     * });
+     * ```
+     *
+     * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`.
+     *
+     * While this includes instances of `Float32Array` and `Float64Array`, this
+     * function should not be used to generate random floating-point numbers. The
+     * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
+     * contains finite numbers only, they are not drawn from a uniform random
+     * distribution and have no meaningful lower or upper bounds.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const { randomFill } = await import('node:crypto');
+     *
+     * const a = new Uint32Array(10);
+     * randomFill(a, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+     *     .toString('hex'));
+     * });
+     *
+     * const b = new DataView(new ArrayBuffer(10));
+     * randomFill(b, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
+     *     .toString('hex'));
+     * });
+     *
+     * const c = new ArrayBuffer(10);
+     * randomFill(c, (err, buf) => {
+     *   if (err) throw err;
+     *   console.log(Buffer.from(buf).toString('hex'));
+     * });
+     * ```
+     *
+     * This API uses libuv's threadpool, which can have surprising and
+     * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
+     *
+     * The asynchronous version of `crypto.randomFill()` is carried out in a single
+     * threadpool request. To minimize threadpool task length variation, partition
+     * large `randomFill` requests when doing so as part of fulfilling a client
+     * request.
+     * @since v7.10.0, v6.13.0
+     * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
+     * @param [offset=0]
+     * @param [size=buffer.length - offset]
+     * @param callback `function(err, buf) {}`.
+     */
+    function randomFill<T extends NodeJS.ArrayBufferView>(
+        buffer: T,
+        callback: (err: Error | null, buf: T) => void,
+    ): void;
+    function randomFill<T extends NodeJS.ArrayBufferView>(
+        buffer: T,
+        offset: number,
+        callback: (err: Error | null, buf: T) => void,
+    ): void;
+    function randomFill<T extends NodeJS.ArrayBufferView>(
+        buffer: T,
+        offset: number,
+        size: number,
+        callback: (err: Error | null, buf: T) => void,
+    ): void;
+    interface ScryptOptions {
+        cost?: number | undefined;
+        blockSize?: number | undefined;
+        parallelization?: number | undefined;
+        N?: number | undefined;
+        r?: number | undefined;
+        p?: number | undefined;
+        maxmem?: number | undefined;
+    }
+    /**
+     * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+     * key derivation function that is designed to be expensive computationally and
+     * memory-wise in order to make brute-force attacks unrewarding.
+     *
+     * The `salt` should be as unique as possible. It is recommended that a salt is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the
+     * callback as a `Buffer`.
+     *
+     * An exception is thrown when any of the input arguments specify invalid values
+     * or types.
+     *
+     * ```js
+     * const {
+     *   scrypt,
+     * } = await import('node:crypto');
+     *
+     * // Using the factory defaults.
+     * scrypt('password', 'salt', 64, (err, derivedKey) => {
+     *   if (err) throw err;
+     *   console.log(derivedKey.toString('hex'));  // '3745e48...08d59ae'
+     * });
+     * // Using a custom N parameter. Must be a power of two.
+     * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
+     *   if (err) throw err;
+     *   console.log(derivedKey.toString('hex'));  // '3745e48...aa39b34'
+     * });
+     * ```
+     * @since v10.5.0
+     */
+    function scrypt(
+        password: BinaryLike,
+        salt: BinaryLike,
+        keylen: number,
+        callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+    ): void;
+    function scrypt(
+        password: BinaryLike,
+        salt: BinaryLike,
+        keylen: number,
+        options: ScryptOptions,
+        callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
+     * key derivation function that is designed to be expensive computationally and
+     * memory-wise in order to make brute-force attacks unrewarding.
+     *
+     * The `salt` should be as unique as possible. It is recommended that a salt is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
+     *
+     * An exception is thrown when key derivation fails, otherwise the derived key is
+     * returned as a `Buffer`.
+     *
+     * An exception is thrown when any of the input arguments specify invalid values
+     * or types.
+     *
+     * ```js
+     * const {
+     *   scryptSync,
+     * } = await import('node:crypto');
+     * // Using the factory defaults.
+     *
+     * const key1 = scryptSync('password', 'salt', 64);
+     * console.log(key1.toString('hex'));  // '3745e48...08d59ae'
+     * // Using a custom N parameter. Must be a power of two.
+     * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
+     * console.log(key2.toString('hex'));  // '3745e48...aa39b34'
+     * ```
+     * @since v10.5.0
+     */
+    function scryptSync(
+        password: BinaryLike,
+        salt: BinaryLike,
+        keylen: number,
+        options?: ScryptOptions,
+    ): NonSharedBuffer;
+    interface RsaPublicKey {
+        key: KeyLike;
+        padding?: number | undefined;
+    }
+    interface RsaPrivateKey {
+        key: KeyLike;
+        passphrase?: string | undefined;
+        /**
+         * @default 'sha1'
+         */
+        oaepHash?: string | undefined;
+        oaepLabel?: NodeJS.TypedArray | undefined;
+        padding?: number | undefined;
+    }
+    /**
+     * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
+     * the corresponding private key, for example using {@link privateDecrypt}.
+     *
+     * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
+     * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
+     *
+     * Because RSA public keys can be derived from private keys, a private key may
+     * be passed instead of a public key.
+     * @since v0.11.14
+     */
+    function publicEncrypt(
+        key: RsaPublicKey | RsaPrivateKey | KeyLike,
+        buffer: NodeJS.ArrayBufferView | string,
+    ): NonSharedBuffer;
+    /**
+     * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
+     * the corresponding private key, for example using {@link privateEncrypt}.
+     *
+     * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
+     * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
+     *
+     * Because RSA public keys can be derived from private keys, a private key may
+     * be passed instead of a public key.
+     * @since v1.1.0
+     */
+    function publicDecrypt(
+        key: RsaPublicKey | RsaPrivateKey | KeyLike,
+        buffer: NodeJS.ArrayBufferView | string,
+    ): NonSharedBuffer;
+    /**
+     * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
+     * the corresponding public key, for example using {@link publicEncrypt}.
+     *
+     * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+     * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
+     * @since v0.11.14
+     */
+    function privateDecrypt(
+        privateKey: RsaPrivateKey | KeyLike,
+        buffer: NodeJS.ArrayBufferView | string,
+    ): NonSharedBuffer;
+    /**
+     * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
+     * the corresponding public key, for example using {@link publicDecrypt}.
+     *
+     * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
+     * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
+     * @since v1.1.0
+     */
+    function privateEncrypt(
+        privateKey: RsaPrivateKey | KeyLike,
+        buffer: NodeJS.ArrayBufferView | string,
+    ): NonSharedBuffer;
+    /**
+     * ```js
+     * const {
+     *   getCiphers,
+     * } = await import('node:crypto');
+     *
+     * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...]
+     * ```
+     * @since v0.9.3
+     * @return An array with the names of the supported cipher algorithms.
+     */
+    function getCiphers(): string[];
+    /**
+     * ```js
+     * const {
+     *   getCurves,
+     * } = await import('node:crypto');
+     *
+     * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...]
+     * ```
+     * @since v2.3.0
+     * @return An array with the names of the supported elliptic curves.
+     */
+    function getCurves(): string[];
+    /**
+     * @since v10.0.0
+     * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}.
+     */
+    function getFips(): 1 | 0;
+    /**
+     * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build.
+     * Throws an error if FIPS mode is not available.
+     * @since v10.0.0
+     * @param bool `true` to enable FIPS mode.
+     */
+    function setFips(bool: boolean): void;
+    /**
+     * ```js
+     * const {
+     *   getHashes,
+     * } = await import('node:crypto');
+     *
+     * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...]
+     * ```
+     * @since v0.9.3
+     * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms.
+     */
+    function getHashes(): string[];
+    /**
+     * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH)
+     * key exchanges.
+     *
+     * Instances of the `ECDH` class can be created using the {@link createECDH} function.
+     *
+     * ```js
+     * import assert from 'node:assert';
+     *
+     * const {
+     *   createECDH,
+     * } = await import('node:crypto');
+     *
+     * // Generate Alice's keys...
+     * const alice = createECDH('secp521r1');
+     * const aliceKey = alice.generateKeys();
+     *
+     * // Generate Bob's keys...
+     * const bob = createECDH('secp521r1');
+     * const bobKey = bob.generateKeys();
+     *
+     * // Exchange and generate the secret...
+     * const aliceSecret = alice.computeSecret(bobKey);
+     * const bobSecret = bob.computeSecret(aliceKey);
+     *
+     * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex'));
+     * // OK
+     * ```
+     * @since v0.11.14
+     */
+    class ECDH {
+        private constructor();
+        /**
+         * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the
+         * format specified by `format`. The `format` argument specifies point encoding
+         * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is
+         * interpreted using the specified `inputEncoding`, and the returned key is encoded
+         * using the specified `outputEncoding`.
+         *
+         * Use {@link getCurves} to obtain a list of available curve names.
+         * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
+         * the name and description of each available elliptic curve.
+         *
+         * If `format` is not specified the point will be returned in `'uncompressed'` format.
+         *
+         * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * Example (uncompressing a key):
+         *
+         * ```js
+         * const {
+         *   createECDH,
+         *   ECDH,
+         * } = await import('node:crypto');
+         *
+         * const ecdh = createECDH('secp256k1');
+         * ecdh.generateKeys();
+         *
+         * const compressedKey = ecdh.getPublicKey('hex', 'compressed');
+         *
+         * const uncompressedKey = ECDH.convertKey(compressedKey,
+         *                                         'secp256k1',
+         *                                         'hex',
+         *                                         'hex',
+         *                                         'uncompressed');
+         *
+         * // The converted key and the uncompressed public key should be the same
+         * console.log(uncompressedKey === ecdh.getPublicKey('hex'));
+         * ```
+         * @since v10.0.0
+         * @param inputEncoding The `encoding` of the `key` string.
+         * @param outputEncoding The `encoding` of the return value.
+         * @param [format='uncompressed']
+         */
+        static convertKey(
+            key: BinaryLike,
+            curve: string,
+            inputEncoding?: BinaryToTextEncoding,
+            outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
+            format?: "uncompressed" | "compressed" | "hybrid",
+        ): NonSharedBuffer | string;
+        /**
+         * Generates private and public EC Diffie-Hellman key values, and returns
+         * the public key in the specified `format` and `encoding`. This key should be
+         * transferred to the other party.
+         *
+         * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
+         *
+         * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
+         * @since v0.11.14
+         * @param encoding The `encoding` of the return value.
+         * @param [format='uncompressed']
+         */
+        generateKeys(): NonSharedBuffer;
+        generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+        /**
+         * Computes the shared secret using `otherPublicKey` as the other
+         * party's public key and returns the computed shared secret. The supplied
+         * key is interpreted using specified `inputEncoding`, and the returned secret
+         * is encoded using the specified `outputEncoding`.
+         * If the `inputEncoding` is not
+         * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
+         *
+         * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is
+         * usually supplied from a remote user over an insecure network,
+         * be sure to handle this exception accordingly.
+         * @since v0.11.14
+         * @param inputEncoding The `encoding` of the `otherPublicKey` string.
+         * @param outputEncoding The `encoding` of the return value.
+         */
+        computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer;
+        computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
+        computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
+        computeSecret(
+            otherPublicKey: string,
+            inputEncoding: BinaryToTextEncoding,
+            outputEncoding: BinaryToTextEncoding,
+        ): string;
+        /**
+         * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+         * returned.
+         * @since v0.11.14
+         * @param encoding The `encoding` of the return value.
+         * @return The EC Diffie-Hellman in the specified `encoding`.
+         */
+        getPrivateKey(): NonSharedBuffer;
+        getPrivateKey(encoding: BinaryToTextEncoding): string;
+        /**
+         * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
+         *
+         * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
+         * returned.
+         * @since v0.11.14
+         * @param encoding The `encoding` of the return value.
+         * @param [format='uncompressed']
+         * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
+         */
+        getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
+        getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
+        /**
+         * Sets the EC Diffie-Hellman private key.
+         * If `encoding` is provided, `privateKey` is expected
+         * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
+         *
+         * If `privateKey` is not valid for the curve specified when the `ECDH` object was
+         * created, an error is thrown. Upon setting the private key, the associated
+         * public point (key) is also generated and set in the `ECDH` object.
+         * @since v0.11.14
+         * @param encoding The `encoding` of the `privateKey` string.
+         */
+        setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
+        setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
+    }
+    /**
+     * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
+     * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent
+     * OpenSSL releases, `openssl ecparam -list_curves` will also display the name
+     * and description of each available elliptic curve.
+     * @since v0.11.14
+     */
+    function createECDH(curveName: string): ECDH;
+    /**
+     * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
+     * algorithm.
+     *
+     * This function does not leak timing information that
+     * would allow an attacker to guess one of the values. This is suitable for
+     * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
+     *
+     * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
+     * must have the same byte length. An error is thrown if `a` and `b` have
+     * different byte lengths.
+     *
+     * If at least one of `a` and `b` is a `TypedArray` with more than one byte per
+     * entry, such as `Uint16Array`, the result will be computed using the platform
+     * byte order.
+     *
+     * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754**
+     * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point**
+     * **numbers `x` and `y` are equal.**
+     *
+     * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
+     * is timing-safe. Care should be taken to ensure that the surrounding code does
+     * not introduce timing vulnerabilities.
+     * @since v6.6.0
+     */
+    function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
+    interface DHKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+        /**
+         * The prime parameter
+         */
+        prime?: Buffer | undefined;
+        /**
+         * Prime length in bits
+         */
+        primeLength?: number | undefined;
+        /**
+         * Custom generator
+         * @default 2
+         */
+        generator?: number | undefined;
+        /**
+         * Diffie-Hellman group name
+         * @see {@link getDiffieHellman}
+         */
+        groupName?: string | undefined;
+    }
+    interface DSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+        /**
+         * Key size in bits
+         */
+        modulusLength: number;
+        /**
+         * Size of q in bits
+         */
+        divisorLength: number;
+    }
+    interface ECKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8" | "sec1"> {
+        /**
+         * Name of the curve to use
+         */
+        namedCurve: string;
+        /**
+         * Must be `'named'` or `'explicit'`
+         * @default 'named'
+         */
+        paramEncoding?: "explicit" | "named" | undefined;
+    }
+    interface ED25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface ED448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface MLDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface MLKEMKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface RSAPSSKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {
+        /**
+         * Key size in bits
+         */
+        modulusLength: number;
+        /**
+         * Public exponent
+         * @default 0x10001
+         */
+        publicExponent?: number | undefined;
+        /**
+         * Name of the message digest
+         */
+        hashAlgorithm?: string | undefined;
+        /**
+         * Name of the message digest used by MGF1
+         */
+        mgf1HashAlgorithm?: string | undefined;
+        /**
+         * Minimal salt length in bytes
+         */
+        saltLength?: string | undefined;
+    }
+    interface RSAKeyPairOptions extends KeyPairExportOptions<"pkcs1" | "spki", "pkcs1" | "pkcs8"> {
+        /**
+         * Key size in bits
+         */
+        modulusLength: number;
+        /**
+         * Public exponent
+         * @default 0x10001
+         */
+        publicExponent?: number | undefined;
+    }
+    interface SLHDSAKeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface X25519KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    interface X448KeyPairOptions extends KeyPairExportOptions<"spki", "pkcs8"> {}
+    /**
+     * Generates a new asymmetric key pair of the given `type`. See the
+     * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+     *
+     * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+     * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+     * the respective part of the key is returned as a `KeyObject`.
+     *
+     * When encoding public keys, it is recommended to use `'spki'`. When encoding
+     * private keys, it is recommended to use `'pkcs8'` with a strong passphrase,
+     * and to keep the passphrase confidential.
+     *
+     * ```js
+     * const {
+     *   generateKeyPairSync,
+     * } = await import('node:crypto');
+     *
+     * const {
+     *   publicKey,
+     *   privateKey,
+     * } = generateKeyPairSync('rsa', {
+     *   modulusLength: 4096,
+     *   publicKeyEncoding: {
+     *     type: 'spki',
+     *     format: 'pem',
+     *   },
+     *   privateKeyEncoding: {
+     *     type: 'pkcs8',
+     *     format: 'pem',
+     *     cipher: 'aes-256-cbc',
+     *     passphrase: 'top secret',
+     *   },
+     * });
+     * ```
+     *
+     * The return value `{ publicKey, privateKey }` represents the generated key pair.
+     * When PEM encoding was selected, the respective key will be a string, otherwise
+     * it will be a buffer containing the data encoded as DER.
+     * @since v10.12.0
+     * @param type The asymmetric key type to generate. See the
+     * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+     */
+    function generateKeyPairSync<T extends DHKeyPairOptions>(
+        type: "dh",
+        options: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends DSAKeyPairOptions>(
+        type: "dsa",
+        options: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends ECKeyPairOptions>(
+        type: "ec",
+        options: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends ED25519KeyPairOptions = {}>(
+        type: "ed25519",
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends ED448KeyPairOptions = {}>(
+        type: "ed448",
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends MLDSAKeyPairOptions = {}>(
+        type: MLDSAKeyType,
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends MLKEMKeyPairOptions = {}>(
+        type: MLKEMKeyType,
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends RSAPSSKeyPairOptions>(
+        type: "rsa-pss",
+        options: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends RSAKeyPairOptions>(
+        type: "rsa",
+        options: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends SLHDSAKeyPairOptions = {}>(
+        type: SLHDSAKeyType,
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends X25519KeyPairOptions = {}>(
+        type: "x25519",
+        options?: T,
+    ): KeyPairExportResult<T>;
+    function generateKeyPairSync<T extends X448KeyPairOptions = {}>(
+        type: "x448",
+        options?: T,
+    ): KeyPairExportResult<T>;
+    /**
+     * Generates a new asymmetric key pair of the given `type`. See the
+     * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+     *
+     * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
+     * behaves as if `keyObject.export()` had been called on its result. Otherwise,
+     * the respective part of the key is returned as a `KeyObject`.
+     *
+     * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage:
+     *
+     * ```js
+     * const {
+     *   generateKeyPair,
+     * } = await import('node:crypto');
+     *
+     * generateKeyPair('rsa', {
+     *   modulusLength: 4096,
+     *   publicKeyEncoding: {
+     *     type: 'spki',
+     *     format: 'pem',
+     *   },
+     *   privateKeyEncoding: {
+     *     type: 'pkcs8',
+     *     format: 'pem',
+     *     cipher: 'aes-256-cbc',
+     *     passphrase: 'top secret',
+     *   },
+     * }, (err, publicKey, privateKey) => {
+     *   // Handle errors and use the generated key pair.
+     * });
+     * ```
+     *
+     * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+     * @since v10.12.0
+     * @param type The asymmetric key type to generate. See the
+     * supported [asymmetric key types](https://nodejs.org/docs/latest-v25.x/api/crypto.html#asymmetric-key-types).
+     */
+    function generateKeyPair<T extends DHKeyPairOptions>(
+        type: "dh",
+        options: T,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends DSAKeyPairOptions>(
+        type: "dsa",
+        options: T,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends ECKeyPairOptions>(
+        type: "ec",
+        options: T,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends ED25519KeyPairOptions = {}>(
+        type: "ed25519",
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends ED448KeyPairOptions = {}>(
+        type: "ed448",
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends MLDSAKeyPairOptions = {}>(
+        type: MLDSAKeyType,
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends MLKEMKeyPairOptions = {}>(
+        type: MLKEMKeyType,
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends RSAPSSKeyPairOptions>(
+        type: "rsa-pss",
+        options: T,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends RSAKeyPairOptions>(
+        type: "rsa",
+        options: T,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends SLHDSAKeyPairOptions = {}>(
+        type: SLHDSAKeyType,
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends X25519KeyPairOptions = {}>(
+        type: "x25519",
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    function generateKeyPair<T extends X448KeyPairOptions = {}>(
+        type: "x448",
+        options: T | undefined,
+        callback: KeyPairExportCallback<T>,
+    ): void;
+    namespace generateKeyPair {
+        function __promisify__<T extends DHKeyPairOptions>(
+            type: "dh",
+            options: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends DSAKeyPairOptions>(
+            type: "dsa",
+            options: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends ECKeyPairOptions>(
+            type: "ec",
+            options: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends ED25519KeyPairOptions = {}>(
+            type: "ed25519",
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends ED448KeyPairOptions = {}>(
+            type: "ed448",
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends MLDSAKeyPairOptions = {}>(
+            type: MLDSAKeyType,
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends MLKEMKeyPairOptions = {}>(
+            type: MLKEMKeyType,
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends RSAPSSKeyPairOptions>(
+            type: "rsa-pss",
+            options: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends RSAKeyPairOptions>(
+            type: "rsa",
+            options: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends SLHDSAKeyPairOptions = {}>(
+            type: SLHDSAKeyType,
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends X25519KeyPairOptions = {}>(
+            type: "x25519",
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+        function __promisify__<T extends X448KeyPairOptions = {}>(
+            type: "x448",
+            options?: T,
+        ): Promise<KeyPairExportResult<T>>;
+    }
+    /**
+     * Calculates and returns the signature for `data` using the given private key and
+     * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
+     * dependent upon the key type.
+     *
+     * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
+     * ML-DSA.
+     *
+     * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+     * passed to {@link createPrivateKey}. If it is an object, the following
+     * additional properties can be passed:
+     *
+     * If the `callback` function is provided this function uses libuv's threadpool.
+     * @since v12.0.0
+     */
+    function sign(
+        algorithm: string | null | undefined,
+        data: NodeJS.ArrayBufferView,
+        key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
+    ): NonSharedBuffer;
+    function sign(
+        algorithm: string | null | undefined,
+        data: NodeJS.ArrayBufferView,
+        key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
+        callback: (error: Error | null, data: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Verifies the given signature for `data` using the given key and algorithm. If
+     * `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
+     * key type.
+     *
+     * `algorithm` is required to be `null` or `undefined` for Ed25519, Ed448, and
+     * ML-DSA.
+     *
+     * If `key` is not a `KeyObject`, this function behaves as if `key` had been
+     * passed to {@link createPublicKey}. If it is an object, the following
+     * additional properties can be passed:
+     *
+     * The `signature` argument is the previously calculated signature for the `data`.
+     *
+     * Because public keys can be derived from private keys, a private key or a public
+     * key may be passed for `key`.
+     *
+     * If the `callback` function is provided this function uses libuv's threadpool.
+     * @since v12.0.0
+     */
+    function verify(
+        algorithm: string | null | undefined,
+        data: NodeJS.ArrayBufferView,
+        key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+        signature: NodeJS.ArrayBufferView,
+    ): boolean;
+    function verify(
+        algorithm: string | null | undefined,
+        data: NodeJS.ArrayBufferView,
+        key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
+        signature: NodeJS.ArrayBufferView,
+        callback: (error: Error | null, result: boolean) => void,
+    ): void;
+    /**
+     * Key decapsulation using a KEM algorithm with a private key.
+     *
+     * Supported key types and their KEM algorithms are:
+     *
+     * * `'rsa'` RSA Secret Value Encapsulation
+     * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256)
+     * * `'x25519'` DHKEM(X25519, HKDF-SHA256)
+     * * `'x448'` DHKEM(X448, HKDF-SHA512)
+     * * `'ml-kem-512'` ML-KEM
+     * * `'ml-kem-768'` ML-KEM
+     * * `'ml-kem-1024'` ML-KEM
+     *
+     * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been
+     * passed to `crypto.createPrivateKey()`.
+     *
+     * If the `callback` function is provided this function uses libuv's threadpool.
+     * @since v24.7.0
+     */
+    function decapsulate(
+        key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
+        ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
+    ): NonSharedBuffer;
+    function decapsulate(
+        key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
+        ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
+        callback: (err: Error, sharedKey: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`.
+     * Both keys must have the same `asymmetricKeyType` and must support either the DH or
+     * ECDH operation.
+     *
+     * If the `callback` function is provided this function uses libuv's threadpool.
+     * @since v13.9.0, v12.17.0
+     */
+    function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer;
+    function diffieHellman(
+        options: { privateKey: KeyObject; publicKey: KeyObject },
+        callback: (err: Error | null, secret: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Key encapsulation using a KEM algorithm with a public key.
+     *
+     * Supported key types and their KEM algorithms are:
+     *
+     * * `'rsa'` RSA Secret Value Encapsulation
+     * * `'ec'` DHKEM(P-256, HKDF-SHA256), DHKEM(P-384, HKDF-SHA256), DHKEM(P-521, HKDF-SHA256)
+     * * `'x25519'` DHKEM(X25519, HKDF-SHA256)
+     * * `'x448'` DHKEM(X448, HKDF-SHA512)
+     * * `'ml-kem-512'` ML-KEM
+     * * `'ml-kem-768'` ML-KEM
+     * * `'ml-kem-1024'` ML-KEM
+     *
+     * If `key` is not a {@link KeyObject}, this function behaves as if `key` had been
+     * passed to `crypto.createPublicKey()`.
+     *
+     * If the `callback` function is provided this function uses libuv's threadpool.
+     * @since v24.7.0
+     */
+    function encapsulate(
+        key: KeyLike | PublicKeyInput | JsonWebKeyInput,
+    ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer };
+    function encapsulate(
+        key: KeyLike | PublicKeyInput | JsonWebKeyInput,
+        callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void,
+    ): void;
+    interface OneShotDigestOptions {
+        /**
+         * Encoding used to encode the returned digest.
+         * @default 'hex'
+         */
+        outputEncoding?: BinaryToTextEncoding | "buffer" | undefined;
+        /**
+         * For XOF hash functions such as 'shake256', the outputLength option
+         * can be used to specify the desired output length in bytes.
+         */
+        outputLength?: number | undefined;
+    }
+    interface OneShotDigestOptionsWithStringEncoding extends OneShotDigestOptions {
+        outputEncoding?: BinaryToTextEncoding | undefined;
+    }
+    interface OneShotDigestOptionsWithBufferEncoding extends OneShotDigestOptions {
+        outputEncoding: "buffer";
+    }
+    /**
+     * A utility for creating one-shot hash digests of data. It can be faster than
+     * the object-based `crypto.createHash()` when hashing a smaller amount of data
+     * (<= 5MB) that's readily available. If the data can be big or if it is streamed,
+     * it's still recommended to use `crypto.createHash()` instead.
+     *
+     * The `algorithm` is dependent on the available algorithms supported by the
+     * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
+     * On recent releases of OpenSSL, `openssl list -digest-algorithms` will
+     * display the available digest algorithms.
+     *
+     * If `options` is a string, then it specifies the `outputEncoding`.
+     *
+     * Example:
+     *
+     * ```js
+     * import crypto from 'node:crypto';
+     * import { Buffer } from 'node:buffer';
+     *
+     * // Hashing a string and return the result as a hex-encoded string.
+     * const string = 'Node.js';
+     * // 10b3493287f831e81a438811a1ffba01f8cec4b7
+     * console.log(crypto.hash('sha1', string));
+     *
+     * // Encode a base64-encoded string into a Buffer, hash it and return
+     * // the result as a buffer.
+     * const base64 = 'Tm9kZS5qcw==';
+     * // <Buffer 10 b3 49 32 87 f8 31 e8 1a 43 88 11 a1 ff ba 01 f8 ce c4 b7>
+     * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer'));
+     * ```
+     * @since v21.7.0, v20.12.0
+     * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different
+     * input encoding is desired for a string input, user could encode the string
+     * into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing
+     * the encoded `TypedArray` into this API instead.
+     */
+    function hash(
+        algorithm: string,
+        data: BinaryLike,
+        options?: OneShotDigestOptionsWithStringEncoding | BinaryToTextEncoding,
+    ): string;
+    function hash(
+        algorithm: string,
+        data: BinaryLike,
+        options: OneShotDigestOptionsWithBufferEncoding | "buffer",
+    ): NonSharedBuffer;
+    function hash(
+        algorithm: string,
+        data: BinaryLike,
+        options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
+    ): string | NonSharedBuffer;
+    type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
+    interface CipherInfoOptions {
+        /**
+         * A test key length.
+         */
+        keyLength?: number | undefined;
+        /**
+         * A test IV length.
+         */
+        ivLength?: number | undefined;
+    }
+    interface CipherInfo {
+        /**
+         * The name of the cipher.
+         */
+        name: string;
+        /**
+         * The nid of the cipher.
+         */
+        nid: number;
+        /**
+         * The block size of the cipher in bytes.
+         * This property is omitted when mode is 'stream'.
+         */
+        blockSize?: number | undefined;
+        /**
+         * The expected or default initialization vector length in bytes.
+         * This property is omitted if the cipher does not use an initialization vector.
+         */
+        ivLength?: number | undefined;
+        /**
+         * The expected or default key length in bytes.
+         */
+        keyLength: number;
+        /**
+         * The cipher mode.
+         */
+        mode: CipherMode;
+    }
+    /**
+     * Returns information about a given cipher.
+     *
+     * Some ciphers accept variable length keys and initialization vectors. By default,
+     * the `crypto.getCipherInfo()` method will return the default values for these
+     * ciphers. To test if a given key length or iv length is acceptable for given
+     * cipher, use the `keyLength` and `ivLength` options. If the given values are
+     * unacceptable, `undefined` will be returned.
+     * @since v15.0.0
+     * @param nameOrNid The name or nid of the cipher to query.
+     */
+    function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
+    /**
+     * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+     *
+     * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set;
+     * otherwise `err` will be `null`. The successfully generated `derivedKey` will
+     * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
+     * of the input arguments specify invalid values or types.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const {
+     *   hkdf,
+     * } = await import('node:crypto');
+     *
+     * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => {
+     *   if (err) throw err;
+     *   console.log(Buffer.from(derivedKey).toString('hex'));  // '24156e2...5391653'
+     * });
+     * ```
+     * @since v15.0.0
+     * @param digest The digest algorithm to use.
+     * @param ikm The input keying material. Must be provided but can be zero-length.
+     * @param salt The salt value. Must be provided but can be zero-length.
+     * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+     * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+     * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+     */
+    function hkdf(
+        digest: string,
+        irm: BinaryLike | KeyObject,
+        salt: BinaryLike,
+        info: BinaryLike,
+        keylen: number,
+        callback: (err: Error | null, derivedKey: ArrayBuffer) => void,
+    ): void;
+    /**
+     * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
+     * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
+     *
+     * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
+     *
+     * An error will be thrown if any of the input arguments specify invalid values or
+     * types, or if the derived key cannot be generated.
+     *
+     * ```js
+     * import { Buffer } from 'node:buffer';
+     * const {
+     *   hkdfSync,
+     * } = await import('node:crypto');
+     *
+     * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64);
+     * console.log(Buffer.from(derivedKey).toString('hex'));  // '24156e2...5391653'
+     * ```
+     * @since v15.0.0
+     * @param digest The digest algorithm to use.
+     * @param ikm The input keying material. Must be provided but can be zero-length.
+     * @param salt The salt value. Must be provided but can be zero-length.
+     * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes.
+     * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512`
+     * generates 64-byte hashes, making the maximum HKDF output 16320 bytes).
+     */
+    function hkdfSync(
+        digest: string,
+        ikm: BinaryLike | KeyObject,
+        salt: BinaryLike,
+        info: BinaryLike,
+        keylen: number,
+    ): ArrayBuffer;
+    interface SecureHeapUsage {
+        /**
+         * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag.
+         */
+        total: number;
+        /**
+         * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag.
+         */
+        min: number;
+        /**
+         * The total number of bytes currently allocated from the secure heap.
+         */
+        used: number;
+        /**
+         * The calculated ratio of `used` to `total` allocated bytes.
+         */
+        utilization: number;
+    }
+    /**
+     * @since v15.6.0
+     */
+    function secureHeapUsed(): SecureHeapUsage;
+    interface RandomUUIDOptions {
+        /**
+         * By default, to improve performance,
+         * Node.js will pre-emptively generate and persistently cache enough
+         * random data to generate up to 128 random UUIDs. To generate a UUID
+         * without using the cache, set `disableEntropyCache` to `true`.
+         *
+         * @default `false`
+         */
+        disableEntropyCache?: boolean | undefined;
+    }
+    type UUID = `${string}-${string}-${string}-${string}-${string}`;
+    /**
+     * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a
+     * cryptographic pseudorandom number generator.
+     * @since v15.6.0, v14.17.0
+     */
+    function randomUUID(options?: RandomUUIDOptions): UUID;
+    interface X509CheckOptions {
+        /**
+         * @default 'always'
+         */
+        subject?: "always" | "default" | "never" | undefined;
+        /**
+         * @default true
+         */
+        wildcards?: boolean | undefined;
+        /**
+         * @default true
+         */
+        partialWildcards?: boolean | undefined;
+        /**
+         * @default false
+         */
+        multiLabelWildcards?: boolean | undefined;
+        /**
+         * @default false
+         */
+        singleLabelSubdomains?: boolean | undefined;
+    }
+    /**
+     * Encapsulates an X509 certificate and provides read-only access to
+     * its information.
+     *
+     * ```js
+     * const { X509Certificate } = await import('node:crypto');
+     *
+     * const x509 = new X509Certificate('{... pem encoded cert ...}');
+     *
+     * console.log(x509.subject);
+     * ```
+     * @since v15.6.0
+     */
+    class X509Certificate {
+        /**
+         * Will be \`true\` if this is a Certificate Authority (CA) certificate.
+         * @since v15.6.0
+         */
+        readonly ca: boolean;
+        /**
+         * The SHA-1 fingerprint of this certificate.
+         *
+         * Because SHA-1 is cryptographically broken and because the security of SHA-1 is
+         * significantly worse than that of algorithms that are commonly used to sign
+         * certificates, consider using `x509.fingerprint256` instead.
+         * @since v15.6.0
+         */
+        readonly fingerprint: string;
+        /**
+         * The SHA-256 fingerprint of this certificate.
+         * @since v15.6.0
+         */
+        readonly fingerprint256: string;
+        /**
+         * The SHA-512 fingerprint of this certificate.
+         *
+         * Because computing the SHA-256 fingerprint is usually faster and because it is
+         * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be
+         * a better choice. While SHA-512 presumably provides a higher level of security in
+         * general, the security of SHA-256 matches that of most algorithms that are
+         * commonly used to sign certificates.
+         * @since v17.2.0, v16.14.0
+         */
+        readonly fingerprint512: string;
+        /**
+         * The complete subject of this certificate.
+         * @since v15.6.0
+         */
+        readonly subject: string;
+        /**
+         * The subject alternative name specified for this certificate.
+         *
+         * This is a comma-separated list of subject alternative names. Each entry begins
+         * with a string identifying the kind of the subject alternative name followed by
+         * a colon and the value associated with the entry.
+         *
+         * Earlier versions of Node.js incorrectly assumed that it is safe to split this
+         * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However,
+         * both malicious and legitimate certificates can contain subject alternative names
+         * that include this sequence when represented as a string.
+         *
+         * After the prefix denoting the type of the entry, the remainder of each entry
+         * might be enclosed in quotes to indicate that the value is a JSON string literal.
+         * For backward compatibility, Node.js only uses JSON string literals within this
+         * property when necessary to avoid ambiguity. Third-party code should be prepared
+         * to handle both possible entry formats.
+         * @since v15.6.0
+         */
+        readonly subjectAltName: string | undefined;
+        /**
+         * A textual representation of the certificate's authority information access
+         * extension.
+         *
+         * This is a line feed separated list of access descriptions. Each line begins with
+         * the access method and the kind of the access location, followed by a colon and
+         * the value associated with the access location.
+         *
+         * After the prefix denoting the access method and the kind of the access location,
+         * the remainder of each line might be enclosed in quotes to indicate that the
+         * value is a JSON string literal. For backward compatibility, Node.js only uses
+         * JSON string literals within this property when necessary to avoid ambiguity.
+         * Third-party code should be prepared to handle both possible entry formats.
+         * @since v15.6.0
+         */
+        readonly infoAccess: string | undefined;
+        /**
+         * An array detailing the key usages for this certificate.
+         * @since v15.6.0
+         */
+        readonly keyUsage: string[];
+        /**
+         * The issuer identification included in this certificate.
+         * @since v15.6.0
+         */
+        readonly issuer: string;
+        /**
+         * The issuer certificate or `undefined` if the issuer certificate is not
+         * available.
+         * @since v15.9.0
+         */
+        readonly issuerCertificate: X509Certificate | undefined;
+        /**
+         * The public key `KeyObject` for this certificate.
+         * @since v15.6.0
+         */
+        readonly publicKey: KeyObject;
+        /**
+         * A `Buffer` containing the DER encoding of this certificate.
+         * @since v15.6.0
+         */
+        readonly raw: NonSharedBuffer;
+        /**
+         * The serial number of this certificate.
+         *
+         * Serial numbers are assigned by certificate authorities and do not uniquely
+         * identify certificates. Consider using `x509.fingerprint256` as a unique
+         * identifier instead.
+         * @since v15.6.0
+         */
+        readonly serialNumber: string;
+        /**
+         * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL.
+         * @since v24.9.0
+         */
+        readonly signatureAlgorithm: string | undefined;
+        /**
+         * The OID of the algorithm used to sign the certificate.
+         * @since v24.9.0
+         */
+        readonly signatureAlgorithmOid: string;
+        /**
+         * The date/time from which this certificate is considered valid.
+         * @since v15.6.0
+         */
+        readonly validFrom: string;
+        /**
+         * The date/time from which this certificate is valid, encapsulated in a `Date` object.
+         * @since v22.10.0
+         */
+        readonly validFromDate: Date;
+        /**
+         * The date/time until which this certificate is considered valid.
+         * @since v15.6.0
+         */
+        readonly validTo: string;
+        /**
+         * The date/time until which this certificate is valid, encapsulated in a `Date` object.
+         * @since v22.10.0
+         */
+        readonly validToDate: Date;
+        constructor(buffer: BinaryLike);
+        /**
+         * Checks whether the certificate matches the given email address.
+         *
+         * If the `'subject'` option is undefined or set to `'default'`, the certificate
+         * subject is only considered if the subject alternative name extension either does
+         * not exist or does not contain any email addresses.
+         *
+         * If the `'subject'` option is set to `'always'` and if the subject alternative
+         * name extension either does not exist or does not contain a matching email
+         * address, the certificate subject is considered.
+         *
+         * If the `'subject'` option is set to `'never'`, the certificate subject is never
+         * considered, even if the certificate contains no subject alternative names.
+         * @since v15.6.0
+         * @return Returns `email` if the certificate matches, `undefined` if it does not.
+         */
+        checkEmail(email: string, options?: Pick<X509CheckOptions, "subject">): string | undefined;
+        /**
+         * Checks whether the certificate matches the given host name.
+         *
+         * If the certificate matches the given host name, the matching subject name is
+         * returned. The returned name might be an exact match (e.g., `foo.example.com`)
+         * or it might contain wildcards (e.g., `*.example.com`). Because host name
+         * comparisons are case-insensitive, the returned subject name might also differ
+         * from the given `name` in capitalization.
+         *
+         * If the `'subject'` option is undefined or set to `'default'`, the certificate
+         * subject is only considered if the subject alternative name extension either does
+         * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS").
+         *
+         * If the `'subject'` option is set to `'always'` and if the subject alternative
+         * name extension either does not exist or does not contain a matching DNS name,
+         * the certificate subject is considered.
+         *
+         * If the `'subject'` option is set to `'never'`, the certificate subject is never
+         * considered, even if the certificate contains no subject alternative names.
+         * @since v15.6.0
+         * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`.
+         */
+        checkHost(name: string, options?: X509CheckOptions): string | undefined;
+        /**
+         * Checks whether the certificate matches the given IP address (IPv4 or IPv6).
+         *
+         * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they
+         * must match the given `ip` address exactly. Other subject alternative names as
+         * well as the subject field of the certificate are ignored.
+         * @since v15.6.0
+         * @return Returns `ip` if the certificate matches, `undefined` if it does not.
+         */
+        checkIP(ip: string): string | undefined;
+        /**
+         * Checks whether this certificate was potentially issued by the given `otherCert`
+         * by comparing the certificate metadata.
+         *
+         * This is useful for pruning a list of possible issuer certificates which have been
+         * selected using a more rudimentary filtering routine, i.e. just based on subject
+         * and issuer names.
+         *
+         * Finally, to verify that this certificate's signature was produced by a private key
+         * corresponding to `otherCert`'s public key use `x509.verify(publicKey)`
+         * with `otherCert`'s public key represented as a `KeyObject`
+         * like so
+         *
+         * ```js
+         * if (!x509.verify(otherCert.publicKey)) {
+         *   throw new Error('otherCert did not issue x509');
+         * }
+         * ```
+         * @since v15.6.0
+         */
+        checkIssued(otherCert: X509Certificate): boolean;
+        /**
+         * Checks whether the public key for this certificate is consistent with
+         * the given private key.
+         * @since v15.6.0
+         * @param privateKey A private key.
+         */
+        checkPrivateKey(privateKey: KeyObject): boolean;
+        /**
+         * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded
+         * certificate.
+         * @since v15.6.0
+         */
+        toJSON(): string;
+        /**
+         * Returns information about this certificate using the legacy `certificate object` encoding.
+         * @since v15.6.0
+         */
+        toLegacyObject(): PeerCertificate;
+        /**
+         * Returns the PEM-encoded certificate.
+         * @since v15.6.0
+         */
+        toString(): string;
+        /**
+         * Verifies that this certificate was signed by the given public key.
+         * Does not perform any other validation checks on the certificate.
+         * @since v15.6.0
+         * @param publicKey A public key.
+         */
+        verify(publicKey: KeyObject): boolean;
+    }
+    type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
+    interface GeneratePrimeOptions {
+        add?: LargeNumberLike | undefined;
+        rem?: LargeNumberLike | undefined;
+        /**
+         * @default false
+         */
+        safe?: boolean | undefined;
+        bigint?: boolean | undefined;
+    }
+    interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
+        bigint: true;
+    }
+    interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
+        bigint?: false | undefined;
+    }
+    /**
+     * Generates a pseudorandom prime of `size` bits.
+     *
+     * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
+     *
+     * The `options.add` and `options.rem` parameters can be used to enforce additional
+     * requirements, e.g., for Diffie-Hellman:
+     *
+     * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+     * condition that `prime % add = rem`.
+     * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+     * satisfy the condition that `prime % add = 1`.
+     * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+     * will instead satisfy the condition that `prime % add = 3`. This is necessary
+     * because `prime % add = 1` for `options.add > 2` would contradict the condition
+     * enforced by `options.safe`.
+     * * `options.rem` is ignored if `options.add` is not given.
+     *
+     * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+     * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
+     *
+     * By default, the prime is encoded as a big-endian sequence of octets
+     * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+     * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+     * @since v15.8.0
+     * @param size The size (in bits) of the prime to generate.
+     */
+    function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
+    function generatePrime(
+        size: number,
+        options: GeneratePrimeOptionsBigInt,
+        callback: (err: Error | null, prime: bigint) => void,
+    ): void;
+    function generatePrime(
+        size: number,
+        options: GeneratePrimeOptionsArrayBuffer,
+        callback: (err: Error | null, prime: ArrayBuffer) => void,
+    ): void;
+    function generatePrime(
+        size: number,
+        options: GeneratePrimeOptions,
+        callback: (err: Error | null, prime: ArrayBuffer | bigint) => void,
+    ): void;
+    /**
+     * Generates a pseudorandom prime of `size` bits.
+     *
+     * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
+     *
+     * The `options.add` and `options.rem` parameters can be used to enforce additional
+     * requirements, e.g., for Diffie-Hellman:
+     *
+     * * If `options.add` and `options.rem` are both set, the prime will satisfy the
+     * condition that `prime % add = rem`.
+     * * If only `options.add` is set and `options.safe` is not `true`, the prime will
+     * satisfy the condition that `prime % add = 1`.
+     * * If only `options.add` is set and `options.safe` is set to `true`, the prime
+     * will instead satisfy the condition that `prime % add = 3`. This is necessary
+     * because `prime % add = 1` for `options.add > 2` would contradict the condition
+     * enforced by `options.safe`.
+     * * `options.rem` is ignored if `options.add` is not given.
+     *
+     * Both `options.add` and `options.rem` must be encoded as big-endian sequences
+     * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
+     *
+     * By default, the prime is encoded as a big-endian sequence of octets
+     * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
+     * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
+     * @since v15.8.0
+     * @param size The size (in bits) of the prime to generate.
+     */
+    function generatePrimeSync(size: number): ArrayBuffer;
+    function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint;
+    function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer;
+    function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint;
+    interface CheckPrimeOptions {
+        /**
+         * The number of Miller-Rabin probabilistic primality iterations to perform.
+         * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input.
+         * Care must be used when selecting a number of checks.
+         * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details.
+         *
+         * @default 0
+         */
+        checks?: number | undefined;
+    }
+    /**
+     * Checks the primality of the `candidate`.
+     * @since v15.8.0
+     * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+     */
+    function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void;
+    function checkPrime(
+        value: LargeNumberLike,
+        options: CheckPrimeOptions,
+        callback: (err: Error | null, result: boolean) => void,
+    ): void;
+    /**
+     * Checks the primality of the `candidate`.
+     * @since v15.8.0
+     * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
+     * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
+     */
+    function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
+    /**
+     * Load and set the `engine` for some or all OpenSSL functions (selected by flags).
+     *
+     * `engine` could be either an id or a path to the engine's shared library.
+     *
+     * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
+     *
+     * * `crypto.constants.ENGINE_METHOD_RSA`
+     * * `crypto.constants.ENGINE_METHOD_DSA`
+     * * `crypto.constants.ENGINE_METHOD_DH`
+     * * `crypto.constants.ENGINE_METHOD_RAND`
+     * * `crypto.constants.ENGINE_METHOD_EC`
+     * * `crypto.constants.ENGINE_METHOD_CIPHERS`
+     * * `crypto.constants.ENGINE_METHOD_DIGESTS`
+     * * `crypto.constants.ENGINE_METHOD_PKEY_METHS`
+     * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
+     * * `crypto.constants.ENGINE_METHOD_ALL`
+     * * `crypto.constants.ENGINE_METHOD_NONE`
+     * @since v0.11.11
+     * @param flags
+     */
+    function setEngine(engine: string, flags?: number): void;
+    /**
+     * A convenient alias for {@link webcrypto.getRandomValues}. This
+     * implementation is not compliant with the Web Crypto spec, to write
+     * web-compatible code use {@link webcrypto.getRandomValues} instead.
+     * @since v17.4.0
+     * @return Returns `typedArray`.
+     */
+    function getRandomValues<
+        T extends Exclude<
+            NodeJS.NonSharedTypedArray,
+            NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array
+        >,
+    >(typedArray: T): T;
+    type Argon2Algorithm = "argon2d" | "argon2i" | "argon2id";
+    interface Argon2Parameters {
+        /**
+         * REQUIRED, this is the password for password hashing applications of Argon2.
+         */
+        message: string | ArrayBuffer | NodeJS.ArrayBufferView;
+        /**
+         * REQUIRED, must be at least 8 bytes long. This is the salt for password hashing applications of Argon2.
+         */
+        nonce: string | ArrayBuffer | NodeJS.ArrayBufferView;
+        /**
+         * REQUIRED, degree of parallelism determines how many computational chains (lanes)
+         * can be run. Must be greater than 1 and less than `2**24-1`.
+         */
+        parallelism: number;
+        /**
+         * REQUIRED, the length of the key to generate. Must be greater than 4 and
+         * less than `2**32-1`.
+         */
+        tagLength: number;
+        /**
+         * REQUIRED, memory cost in 1KiB blocks. Must be greater than
+         * `8 * parallelism` and less than `2**32-1`. The actual number of blocks is rounded
+         * down to the nearest multiple of `4 * parallelism`.
+         */
+        memory: number;
+        /**
+         * REQUIRED, number of passes (iterations). Must be greater than 1 and less
+         * than `2**32-1`.
+         */
+        passes: number;
+        /**
+         * OPTIONAL, Random additional input,
+         * similar to the salt, that should **NOT** be stored with the derived key. This is known as pepper in
+         * password hashing applications. If used, must have a length not greater than `2**32-1` bytes.
+         */
+        secret?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
+        /**
+         * OPTIONAL, Additional data to
+         * be added to the hash, functionally equivalent to salt or secret, but meant for
+         * non-random data. If used, must have a length not greater than `2**32-1` bytes.
+         */
+        associatedData?: string | ArrayBuffer | NodeJS.ArrayBufferView | undefined;
+    }
+    /**
+     * Provides an asynchronous [Argon2](https://www.rfc-editor.org/rfc/rfc9106.html) implementation. Argon2 is a password-based
+     * key derivation function that is designed to be expensive computationally and
+     * memory-wise in order to make brute-force attacks unrewarding.
+     *
+     * The `nonce` should be as unique as possible. It is recommended that a nonce is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
+     * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
+     *
+     * The `callback` function is called with two arguments: `err` and `derivedKey`.
+     * `err` is an exception object when key derivation fails, otherwise `err` is
+     * `null`. `derivedKey` is passed to the callback as a `Buffer`.
+     *
+     * An exception is thrown when any of the input arguments specify invalid values
+     * or types.
+     *
+     * ```js
+     * const { argon2, randomBytes } = await import('node:crypto');
+     *
+     * const parameters = {
+     *   message: 'password',
+     *   nonce: randomBytes(16),
+     *   parallelism: 4,
+     *   tagLength: 64,
+     *   memory: 65536,
+     *   passes: 3,
+     * };
+     *
+     * argon2('argon2id', parameters, (err, derivedKey) => {
+     *   if (err) throw err;
+     *   console.log(derivedKey.toString('hex'));  // 'af91dad...9520f15'
+     * });
+     * ```
+     * @since v24.7.0
+     * @param algorithm Variant of Argon2, one of `"argon2d"`, `"argon2i"` or `"argon2id"`.
+     * @experimental
+     */
+    function argon2(
+        algorithm: Argon2Algorithm,
+        parameters: Argon2Parameters,
+        callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based
+     * key derivation function that is designed to be expensive computationally and
+     * memory-wise in order to make brute-force attacks unrewarding.
+     *
+     * The `nonce` should be as unique as possible. It is recommended that a nonce is
+     * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
+     *
+     * When passing strings for `message`, `nonce`, `secret` or `associatedData`, please
+     * consider [caveats when using strings as inputs to cryptographic APIs](https://nodejs.org/docs/latest-v25.x/api/crypto.html#using-strings-as-inputs-to-cryptographic-apis).
+     *
+     * An exception is thrown when key derivation fails, otherwise the derived key is
+     * returned as a `Buffer`.
+     *
+     * An exception is thrown when any of the input arguments specify invalid values
+     * or types.
+     *
+     * ```js
+     * const { argon2Sync, randomBytes } = await import('node:crypto');
+     *
+     * const parameters = {
+     *   message: 'password',
+     *   nonce: randomBytes(16),
+     *   parallelism: 4,
+     *   tagLength: 64,
+     *   memory: 65536,
+     *   passes: 3,
+     * };
+     *
+     * const derivedKey = argon2Sync('argon2id', parameters);
+     * console.log(derivedKey.toString('hex'));  // 'af91dad...9520f15'
+     * ```
+     * @since v24.7.0
+     * @experimental
+     */
+    function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer;
+    /**
+     * A convenient alias for `crypto.webcrypto.subtle`.
+     * @since v17.4.0
+     */
+    const subtle: webcrypto.SubtleCrypto;
+    /**
+     * An implementation of the Web Crypto API standard.
+     *
+     * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details.
+     * @since v15.0.0
+     */
+    const webcrypto: webcrypto.Crypto;
+    namespace webcrypto {
+        type AlgorithmIdentifier = Algorithm | string;
+        type BigInteger = NodeJS.NonSharedUint8Array;
+        type KeyFormat = "jwk" | "pkcs8" | "raw" | "raw-public" | "raw-secret" | "raw-seed" | "spki";
+        type KeyType = "private" | "public" | "secret";
+        type KeyUsage =
+            | "decapsulateBits"
+            | "decapsulateKey"
+            | "decrypt"
+            | "deriveBits"
+            | "deriveKey"
+            | "encapsulateBits"
+            | "encapsulateKey"
+            | "encrypt"
+            | "sign"
+            | "unwrapKey"
+            | "verify"
+            | "wrapKey";
+        type HashAlgorithmIdentifier = AlgorithmIdentifier;
+        type NamedCurve = string;
+        interface AeadParams extends Algorithm {
+            additionalData?: NodeJS.BufferSource;
+            iv: NodeJS.BufferSource;
+            tagLength: number;
+        }
+        interface AesCbcParams extends Algorithm {
+            iv: NodeJS.BufferSource;
+        }
+        interface AesCtrParams extends Algorithm {
+            counter: NodeJS.BufferSource;
+            length: number;
+        }
+        interface AesDerivedKeyParams extends Algorithm {
+            length: number;
+        }
+        interface AesKeyAlgorithm extends KeyAlgorithm {
+            length: number;
+        }
+        interface AesKeyGenParams extends Algorithm {
+            length: number;
+        }
+        interface Algorithm {
+            name: string;
+        }
+        interface Argon2Params extends Algorithm {
+            associatedData?: NodeJS.BufferSource;
+            memory: number;
+            nonce: NodeJS.BufferSource;
+            parallelism: number;
+            passes: number;
+            secretValue?: NodeJS.BufferSource;
+            version?: number;
+        }
+        interface CShakeParams extends Algorithm {
+            customization?: NodeJS.BufferSource;
+            functionName?: NodeJS.BufferSource;
+            length: number;
+        }
+        interface ContextParams extends Algorithm {
+            context?: NodeJS.BufferSource;
+        }
+        interface EcKeyAlgorithm extends KeyAlgorithm {
+            namedCurve: NamedCurve;
+        }
+        interface EcKeyGenParams extends Algorithm {
+            namedCurve: NamedCurve;
+        }
+        interface EcKeyImportParams extends Algorithm {
+            namedCurve: NamedCurve;
+        }
+        interface EcdhKeyDeriveParams extends Algorithm {
+            public: CryptoKey;
+        }
+        interface EcdsaParams extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+        }
+        interface HkdfParams extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+            info: NodeJS.BufferSource;
+            salt: NodeJS.BufferSource;
+        }
+        interface HmacImportParams extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+            length?: number;
+        }
+        interface HmacKeyAlgorithm extends KeyAlgorithm {
+            hash: KeyAlgorithm;
+            length: number;
+        }
+        interface HmacKeyGenParams extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+            length?: number;
+        }
+        interface JsonWebKey {
+            alg?: string;
+            crv?: string;
+            d?: string;
+            dp?: string;
+            dq?: string;
+            e?: string;
+            ext?: boolean;
+            k?: string;
+            key_ops?: string[];
+            kty?: string;
+            n?: string;
+            oth?: RsaOtherPrimesInfo[];
+            p?: string;
+            q?: string;
+            qi?: string;
+            use?: string;
+            x?: string;
+            y?: string;
+        }
+        interface KeyAlgorithm {
+            name: string;
+        }
+        interface KmacImportParams extends Algorithm {
+            length?: number;
+        }
+        interface KmacKeyAlgorithm extends KeyAlgorithm {
+            length: number;
+        }
+        interface KmacKeyGenParams extends Algorithm {
+            length?: number;
+        }
+        interface KmacParams extends Algorithm {
+            customization?: NodeJS.BufferSource;
+            length: number;
+        }
+        interface Pbkdf2Params extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+            iterations: number;
+            salt: NodeJS.BufferSource;
+        }
+        interface RsaHashedImportParams extends Algorithm {
+            hash: HashAlgorithmIdentifier;
+        }
+        interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+            hash: KeyAlgorithm;
+        }
+        interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+            hash: HashAlgorithmIdentifier;
+        }
+        interface RsaKeyAlgorithm extends KeyAlgorithm {
+            modulusLength: number;
+            publicExponent: BigInteger;
+        }
+        interface RsaKeyGenParams extends Algorithm {
+            modulusLength: number;
+            publicExponent: BigInteger;
+        }
+        interface RsaOaepParams extends Algorithm {
+            label?: NodeJS.BufferSource;
+        }
+        interface RsaOtherPrimesInfo {
+            d?: string;
+            r?: string;
+            t?: string;
+        }
+        interface RsaPssParams extends Algorithm {
+            saltLength: number;
+        }
+        interface Crypto {
+            readonly subtle: SubtleCrypto;
+            getRandomValues<
+                T extends Exclude<
+                    NodeJS.NonSharedTypedArray,
+                    NodeJS.NonSharedFloat16Array | NodeJS.NonSharedFloat32Array | NodeJS.NonSharedFloat64Array
+                >,
+            >(
+                typedArray: T,
+            ): T;
+            randomUUID(): UUID;
+        }
+        interface CryptoKey {
+            readonly algorithm: KeyAlgorithm;
+            readonly extractable: boolean;
+            readonly type: KeyType;
+            readonly usages: KeyUsage[];
+        }
+        interface CryptoKeyPair {
+            privateKey: CryptoKey;
+            publicKey: CryptoKey;
+        }
+        interface EncapsulatedBits {
+            sharedKey: ArrayBuffer;
+            ciphertext: ArrayBuffer;
+        }
+        interface EncapsulatedKey {
+            sharedKey: CryptoKey;
+            ciphertext: ArrayBuffer;
+        }
+        interface SubtleCrypto {
+            decapsulateBits(
+                decapsulationAlgorithm: AlgorithmIdentifier,
+                decapsulationKey: CryptoKey,
+                ciphertext: NodeJS.BufferSource,
+            ): Promise<ArrayBuffer>;
+            decapsulateKey(
+                decapsulationAlgorithm: AlgorithmIdentifier,
+                decapsulationKey: CryptoKey,
+                ciphertext: NodeJS.BufferSource,
+                sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams,
+                extractable: boolean,
+                usages: KeyUsage[],
+            ): Promise<CryptoKey>;
+            decrypt(
+                algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
+                key: CryptoKey,
+                data: NodeJS.BufferSource,
+            ): Promise<ArrayBuffer>;
+            deriveBits(
+                algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
+                baseKey: CryptoKey,
+                length?: number | null,
+            ): Promise<ArrayBuffer>;
+            deriveKey(
+                algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
+                baseKey: CryptoKey,
+                derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams,
+                extractable: boolean,
+                keyUsages: readonly KeyUsage[],
+            ): Promise<CryptoKey>;
+            digest(algorithm: AlgorithmIdentifier | CShakeParams, data: NodeJS.BufferSource): Promise<ArrayBuffer>;
+            encapsulateBits(
+                encapsulationAlgorithm: AlgorithmIdentifier,
+                encapsulationKey: CryptoKey,
+            ): Promise<EncapsulatedBits>;
+            encapsulateKey(
+                encapsulationAlgorithm: AlgorithmIdentifier,
+                encapsulationKey: CryptoKey,
+                sharedKeyAlgorithm: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | KmacImportParams,
+                extractable: boolean,
+                usages: KeyUsage[],
+            ): Promise<EncapsulatedKey>;
+            encrypt(
+                algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
+                key: CryptoKey,
+                data: NodeJS.BufferSource,
+            ): Promise<ArrayBuffer>;
+            exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
+            exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
+            exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
+            generateKey(
+                algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKeyPair>;
+            generateKey(
+                algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKey>;
+            generateKey(
+                algorithm: AlgorithmIdentifier,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKeyPair | CryptoKey>;
+            getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise<CryptoKey>;
+            importKey(
+                format: "jwk",
+                keyData: JsonWebKey,
+                algorithm:
+                    | AlgorithmIdentifier
+                    | RsaHashedImportParams
+                    | EcKeyImportParams
+                    | HmacImportParams
+                    | AesKeyAlgorithm
+                    | KmacImportParams,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKey>;
+            importKey(
+                format: Exclude<KeyFormat, "jwk">,
+                keyData: NodeJS.BufferSource,
+                algorithm:
+                    | AlgorithmIdentifier
+                    | RsaHashedImportParams
+                    | EcKeyImportParams
+                    | HmacImportParams
+                    | AesKeyAlgorithm
+                    | KmacImportParams,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKey>;
+            sign(
+                algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
+                key: CryptoKey,
+                data: NodeJS.BufferSource,
+            ): Promise<ArrayBuffer>;
+            unwrapKey(
+                format: KeyFormat,
+                wrappedKey: NodeJS.BufferSource,
+                unwrappingKey: CryptoKey,
+                unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
+                unwrappedKeyAlgorithm:
+                    | AlgorithmIdentifier
+                    | RsaHashedImportParams
+                    | EcKeyImportParams
+                    | HmacImportParams
+                    | AesKeyAlgorithm
+                    | KmacImportParams,
+                extractable: boolean,
+                keyUsages: KeyUsage[],
+            ): Promise<CryptoKey>;
+            verify(
+                algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
+                key: CryptoKey,
+                signature: NodeJS.BufferSource,
+                data: NodeJS.BufferSource,
+            ): Promise<boolean>;
+            wrapKey(
+                format: KeyFormat,
+                key: CryptoKey,
+                wrappingKey: CryptoKey,
+                wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AeadParams,
+            ): Promise<ArrayBuffer>;
+        }
+    }
+}
+declare module "crypto" {
+    export * from "node:crypto";
+}

+ 537 - 0
node_modules/@types/node/dgram.d.ts

@@ -0,0 +1,537 @@
+declare module "node:dgram" {
+    import { NonSharedBuffer } from "node:buffer";
+    import * as dns from "node:dns";
+    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+    import { AddressInfo, BlockList } from "node:net";
+    interface RemoteInfo {
+        address: string;
+        family: "IPv4" | "IPv6";
+        port: number;
+        size: number;
+    }
+    interface BindOptions {
+        port?: number | undefined;
+        address?: string | undefined;
+        exclusive?: boolean | undefined;
+        fd?: number | undefined;
+    }
+    type SocketType = "udp4" | "udp6";
+    interface SocketOptions extends Abortable {
+        type: SocketType;
+        reuseAddr?: boolean | undefined;
+        reusePort?: boolean | undefined;
+        /**
+         * @default false
+         */
+        ipv6Only?: boolean | undefined;
+        recvBufferSize?: number | undefined;
+        sendBufferSize?: number | undefined;
+        lookup?:
+            | ((
+                hostname: string,
+                options: dns.LookupOneOptions,
+                callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
+            ) => void)
+            | undefined;
+        receiveBlockList?: BlockList | undefined;
+        sendBlockList?: BlockList | undefined;
+    }
+    /**
+     * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
+     * messages. When `address` and `port` are not passed to `socket.bind()` the
+     * method will bind the socket to the "all interfaces" address on a random port
+     * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
+     * and port can be retrieved using `socket.address().address` and `socket.address().port`.
+     *
+     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket:
+     *
+     * ```js
+     * const controller = new AbortController();
+     * const { signal } = controller;
+     * const server = dgram.createSocket({ type: 'udp4', signal });
+     * server.on('message', (msg, rinfo) => {
+     *   console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+     * });
+     * // Later, when you want to close the server.
+     * controller.abort();
+     * ```
+     * @since v0.11.13
+     * @param options Available options are:
+     * @param callback Attached as a listener for `'message'` events. Optional.
+     */
+    function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
+    function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
+    interface SocketEventMap {
+        "close": [];
+        "connect": [];
+        "error": [err: Error];
+        "listening": [];
+        "message": [msg: NonSharedBuffer, rinfo: RemoteInfo];
+    }
+    /**
+     * Encapsulates the datagram functionality.
+     *
+     * New instances of `dgram.Socket` are created using {@link createSocket}.
+     * The `new` keyword is not to be used to create `dgram.Socket` instances.
+     * @since v0.1.99
+     */
+    class Socket implements EventEmitter {
+        /**
+         * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not
+         * specified, the operating system will choose
+         * one interface and will add membership to it. To add membership to every
+         * available interface, call `addMembership` multiple times, once per interface.
+         *
+         * When called on an unbound socket, this method will implicitly bind to a random
+         * port, listening on all interfaces.
+         *
+         * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
+         *
+         * ```js
+         * import cluster from 'node:cluster';
+         * import dgram from 'node:dgram';
+         *
+         * if (cluster.isPrimary) {
+         *   cluster.fork(); // Works ok.
+         *   cluster.fork(); // Fails with EADDRINUSE.
+         * } else {
+         *   const s = dgram.createSocket('udp4');
+         *   s.bind(1234, () => {
+         *     s.addMembership('224.0.0.114');
+         *   });
+         * }
+         * ```
+         * @since v0.6.9
+         */
+        addMembership(multicastAddress: string, multicastInterface?: string): void;
+        /**
+         * Returns an object containing the address information for a socket.
+         * For UDP sockets, this object will contain `address`, `family`, and `port` properties.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         * @since v0.1.99
+         */
+        address(): AddressInfo;
+        /**
+         * For UDP sockets, causes the `dgram.Socket` to listen for datagram
+         * messages on a named `port` and optional `address`. If `port` is not
+         * specified or is `0`, the operating system will attempt to bind to a
+         * random port. If `address` is not specified, the operating system will
+         * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is
+         * called.
+         *
+         * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very
+         * useful.
+         *
+         * A bound datagram socket keeps the Node.js process running to receive
+         * datagram messages.
+         *
+         * If binding fails, an `'error'` event is generated. In rare case (e.g.
+         * attempting to bind with a closed socket), an `Error` may be thrown.
+         *
+         * Example of a UDP server listening on port 41234:
+         *
+         * ```js
+         * import dgram from 'node:dgram';
+         *
+         * const server = dgram.createSocket('udp4');
+         *
+         * server.on('error', (err) => {
+         *   console.error(`server error:\n${err.stack}`);
+         *   server.close();
+         * });
+         *
+         * server.on('message', (msg, rinfo) => {
+         *   console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
+         * });
+         *
+         * server.on('listening', () => {
+         *   const address = server.address();
+         *   console.log(`server listening ${address.address}:${address.port}`);
+         * });
+         *
+         * server.bind(41234);
+         * // Prints: server listening 0.0.0.0:41234
+         * ```
+         * @since v0.1.99
+         * @param callback with no parameters. Called when binding is complete.
+         */
+        bind(port?: number, address?: string, callback?: () => void): this;
+        bind(port?: number, callback?: () => void): this;
+        bind(callback?: () => void): this;
+        bind(options: BindOptions, callback?: () => void): this;
+        /**
+         * Close the underlying socket and stop listening for data on it. If a callback is
+         * provided, it is added as a listener for the `'close'` event.
+         * @since v0.1.99
+         * @param callback Called when the socket has been closed.
+         */
+        close(callback?: () => void): this;
+        /**
+         * Associates the `dgram.Socket` to a remote address and port. Every
+         * message sent by this handle is automatically sent to that destination. Also,
+         * the socket will only receive messages from that remote peer.
+         * Trying to call `connect()` on an already connected socket will result
+         * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
+         * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
+         * will be used by default. Once the connection is complete, a `'connect'` event
+         * is emitted and the optional `callback` function is called. In case of failure,
+         * the `callback` is called or, failing this, an `'error'` event is emitted.
+         * @since v12.0.0
+         * @param callback Called when the connection is completed or on error.
+         */
+        connect(port: number, address?: string, callback?: () => void): void;
+        connect(port: number, callback: () => void): void;
+        /**
+         * A synchronous function that disassociates a connected `dgram.Socket` from
+         * its remote address. Trying to call `disconnect()` on an unbound or already
+         * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
+         * @since v12.0.0
+         */
+        disconnect(): void;
+        /**
+         * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
+         * kernel when the socket is closed or the process terminates, so most apps will
+         * never have reason to call this.
+         *
+         * If `multicastInterface` is not specified, the operating system will attempt to
+         * drop membership on all valid interfaces.
+         * @since v0.6.9
+         */
+        dropMembership(multicastAddress: string, multicastInterface?: string): void;
+        /**
+         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+         * @since v8.7.0
+         * @return the `SO_RCVBUF` socket receive buffer size in bytes.
+         */
+        getRecvBufferSize(): number;
+        /**
+         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+         * @since v8.7.0
+         * @return the `SO_SNDBUF` socket send buffer size in bytes.
+         */
+        getSendBufferSize(): number;
+        /**
+         * @since v18.8.0, v16.19.0
+         * @return Number of bytes queued for sending.
+         */
+        getSendQueueSize(): number;
+        /**
+         * @since v18.8.0, v16.19.0
+         * @return Number of send requests currently in the queue awaiting to be processed.
+         */
+        getSendQueueCount(): number;
+        /**
+         * By default, binding a socket will cause it to block the Node.js process from
+         * exiting as long as the socket is open. The `socket.unref()` method can be used
+         * to exclude the socket from the reference counting that keeps the Node.js
+         * process active. The `socket.ref()` method adds the socket back to the reference
+         * counting and restores the default behavior.
+         *
+         * Calling `socket.ref()` multiples times will have no additional effect.
+         *
+         * The `socket.ref()` method returns a reference to the socket so calls can be
+         * chained.
+         * @since v0.9.1
+         */
+        ref(): this;
+        /**
+         * Returns an object containing the `address`, `family`, and `port` of the remote
+         * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
+         * if the socket is not connected.
+         * @since v12.0.0
+         */
+        remoteAddress(): AddressInfo;
+        /**
+         * Broadcasts a datagram on the socket.
+         * For connectionless sockets, the destination `port` and `address` must be
+         * specified. Connected sockets, on the other hand, will use their associated
+         * remote endpoint, so the `port` and `address` arguments must not be set.
+         *
+         * The `msg` argument contains the message to be sent.
+         * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
+         * any `TypedArray` or a `DataView`,
+         * the `offset` and `length` specify the offset within the `Buffer` where the
+         * message begins and the number of bytes in the message, respectively.
+         * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that
+         * contain multi-byte characters, `offset` and `length` will be calculated with
+         * respect to `byte length` and not the character position.
+         * If `msg` is an array, `offset` and `length` must not be specified.
+         *
+         * The `address` argument is a string. If the value of `address` is a host name,
+         * DNS will be used to resolve the address of the host. If `address` is not
+         * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default.
+         *
+         * If the socket has not been previously bound with a call to `bind`, the socket
+         * is assigned a random port number and is bound to the "all interfaces" address
+         * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
+         *
+         * An optional `callback` function may be specified to as a way of reporting
+         * DNS errors or for determining when it is safe to reuse the `buf` object.
+         * DNS lookups delay the time to send for at least one tick of the
+         * Node.js event loop.
+         *
+         * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be
+         * passed as the first argument to the `callback`. If a `callback` is not given,
+         * the error is emitted as an `'error'` event on the `socket` object.
+         *
+         * Offset and length are optional but both _must_ be set if either are used.
+         * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
+         * or a `DataView`.
+         *
+         * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
+         *
+         * Example of sending a UDP packet to a port on `localhost`;
+         *
+         * ```js
+         * import dgram from 'node:dgram';
+         * import { Buffer } from 'node:buffer';
+         *
+         * const message = Buffer.from('Some bytes');
+         * const client = dgram.createSocket('udp4');
+         * client.send(message, 41234, 'localhost', (err) => {
+         *   client.close();
+         * });
+         * ```
+         *
+         * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
+         *
+         * ```js
+         * import dgram from 'node:dgram';
+         * import { Buffer } from 'node:buffer';
+         *
+         * const buf1 = Buffer.from('Some ');
+         * const buf2 = Buffer.from('bytes');
+         * const client = dgram.createSocket('udp4');
+         * client.send([buf1, buf2], 41234, (err) => {
+         *   client.close();
+         * });
+         * ```
+         *
+         * Sending multiple buffers might be faster or slower depending on the
+         * application and operating system. Run benchmarks to
+         * determine the optimal strategy on a case-by-case basis. Generally speaking,
+         * however, sending multiple buffers is faster.
+         *
+         * Example of sending a UDP packet using a socket connected to a port on `localhost`:
+         *
+         * ```js
+         * import dgram from 'node:dgram';
+         * import { Buffer } from 'node:buffer';
+         *
+         * const message = Buffer.from('Some bytes');
+         * const client = dgram.createSocket('udp4');
+         * client.connect(41234, 'localhost', (err) => {
+         *   client.send(message, (err) => {
+         *     client.close();
+         *   });
+         * });
+         * ```
+         * @since v0.1.99
+         * @param msg Message to be sent.
+         * @param offset Offset in the buffer where the message starts.
+         * @param length Number of bytes in the message.
+         * @param port Destination port.
+         * @param address Destination host name or IP address.
+         * @param callback Called when the message has been sent.
+         */
+        send(
+            msg: string | NodeJS.ArrayBufferView | readonly any[],
+            port?: number,
+            address?: string,
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        send(
+            msg: string | NodeJS.ArrayBufferView | readonly any[],
+            port?: number,
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        send(
+            msg: string | NodeJS.ArrayBufferView | readonly any[],
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        send(
+            msg: string | NodeJS.ArrayBufferView,
+            offset: number,
+            length: number,
+            port?: number,
+            address?: string,
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        send(
+            msg: string | NodeJS.ArrayBufferView,
+            offset: number,
+            length: number,
+            port?: number,
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        send(
+            msg: string | NodeJS.ArrayBufferView,
+            offset: number,
+            length: number,
+            callback?: (error: Error | null, bytes: number) => void,
+        ): void;
+        /**
+         * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
+         * packets may be sent to a local interface's broadcast address.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         * @since v0.6.9
+         */
+        setBroadcast(flag: boolean): void;
+        /**
+         * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
+         * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
+         * _with a scope index is written as `'IP%scope'` where scope is an interface name_
+         * _or interface number._
+         *
+         * Sets the default outgoing multicast interface of the socket to a chosen
+         * interface or back to system interface selection. The `multicastInterface` must
+         * be a valid string representation of an IP from the socket's family.
+         *
+         * For IPv4 sockets, this should be the IP configured for the desired physical
+         * interface. All packets sent to multicast on the socket will be sent on the
+         * interface determined by the most recent successful use of this call.
+         *
+         * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
+         * interface as in the examples that follow. In IPv6, individual `send` calls can
+         * also use explicit scope in addresses, so only packets sent to a multicast
+         * address without specifying an explicit scope are affected by the most recent
+         * successful use of this call.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         *
+         * #### Example: IPv6 outgoing multicast interface
+         *
+         * On most systems, where scope format uses the interface name:
+         *
+         * ```js
+         * const socket = dgram.createSocket('udp6');
+         *
+         * socket.bind(1234, () => {
+         *   socket.setMulticastInterface('::%eth1');
+         * });
+         * ```
+         *
+         * On Windows, where scope format uses an interface number:
+         *
+         * ```js
+         * const socket = dgram.createSocket('udp6');
+         *
+         * socket.bind(1234, () => {
+         *   socket.setMulticastInterface('::%2');
+         * });
+         * ```
+         *
+         * #### Example: IPv4 outgoing multicast interface
+         *
+         * All systems use an IP of the host on the desired physical interface:
+         *
+         * ```js
+         * const socket = dgram.createSocket('udp4');
+         *
+         * socket.bind(1234, () => {
+         *   socket.setMulticastInterface('10.0.0.2');
+         * });
+         * ```
+         * @since v8.6.0
+         */
+        setMulticastInterface(multicastInterface: string): void;
+        /**
+         * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
+         * multicast packets will also be received on the local interface.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         * @since v0.3.8
+         */
+        setMulticastLoopback(flag: boolean): boolean;
+        /**
+         * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
+         * "Time to Live", in this context it specifies the number of IP hops that a
+         * packet is allowed to travel through, specifically for multicast traffic. Each
+         * router or gateway that forwards a packet decrements the TTL. If the TTL is
+         * decremented to 0 by a router, it will not be forwarded.
+         *
+         * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         * @since v0.3.8
+         */
+        setMulticastTTL(ttl: number): number;
+        /**
+         * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
+         * in bytes.
+         *
+         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+         * @since v8.7.0
+         */
+        setRecvBufferSize(size: number): void;
+        /**
+         * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
+         * in bytes.
+         *
+         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
+         * @since v8.7.0
+         */
+        setSendBufferSize(size: number): void;
+        /**
+         * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
+         * in this context it specifies the number of IP hops that a packet is allowed to
+         * travel through. Each router or gateway that forwards a packet decrements the
+         * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
+         * Changing TTL values is typically done for network probes or when multicasting.
+         *
+         * The `ttl` argument may be between 1 and 255\. The default on most systems
+         * is 64.
+         *
+         * This method throws `EBADF` if called on an unbound socket.
+         * @since v0.1.101
+         */
+        setTTL(ttl: number): number;
+        /**
+         * By default, binding a socket will cause it to block the Node.js process from
+         * exiting as long as the socket is open. The `socket.unref()` method can be used
+         * to exclude the socket from the reference counting that keeps the Node.js
+         * process active, allowing the process to exit even if the socket is still
+         * listening.
+         *
+         * Calling `socket.unref()` multiple times will have no additional effect.
+         *
+         * The `socket.unref()` method returns a reference to the socket so calls can be
+         * chained.
+         * @since v0.9.1
+         */
+        unref(): this;
+        /**
+         * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket
+         * option. If the `multicastInterface` argument
+         * is not specified, the operating system will choose one interface and will add
+         * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface.
+         *
+         * When called on an unbound socket, this method will implicitly bind to a random
+         * port, listening on all interfaces.
+         * @since v13.1.0, v12.16.0
+         */
+        addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+        /**
+         * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is
+         * automatically called by the kernel when the
+         * socket is closed or the process terminates, so most apps will never have
+         * reason to call this.
+         *
+         * If `multicastInterface` is not specified, the operating system will attempt to
+         * drop membership on all valid interfaces.
+         * @since v13.1.0, v12.16.0
+         */
+        dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
+        /**
+         * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
+         * @since v20.5.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    interface Socket extends InternalEventEmitter<SocketEventMap> {}
+}
+declare module "dgram" {
+    export * from "node:dgram";
+}

+ 552 - 0
node_modules/@types/node/diagnostics_channel.d.ts

@@ -0,0 +1,552 @@
+declare module "node:diagnostics_channel" {
+    import { AsyncLocalStorage } from "node:async_hooks";
+    /**
+     * Check if there are active subscribers to the named channel. This is helpful if
+     * the message you want to send might be expensive to prepare.
+     *
+     * This API is optional but helpful when trying to publish messages from very
+     * performance-sensitive code.
+     *
+     * ```js
+     * import diagnostics_channel from 'node:diagnostics_channel';
+     *
+     * if (diagnostics_channel.hasSubscribers('my-channel')) {
+     *   // There are subscribers, prepare and publish message
+     * }
+     * ```
+     * @since v15.1.0, v14.17.0
+     * @param name The channel name
+     * @return If there are active subscribers
+     */
+    function hasSubscribers(name: string | symbol): boolean;
+    /**
+     * This is the primary entry-point for anyone wanting to publish to a named
+     * channel. It produces a channel object which is optimized to reduce overhead at
+     * publish time as much as possible.
+     *
+     * ```js
+     * import diagnostics_channel from 'node:diagnostics_channel';
+     *
+     * const channel = diagnostics_channel.channel('my-channel');
+     * ```
+     * @since v15.1.0, v14.17.0
+     * @param name The channel name
+     * @return The named channel object
+     */
+    function channel(name: string | symbol): Channel;
+    type ChannelListener = (message: unknown, name: string | symbol) => void;
+    /**
+     * Register a message handler to subscribe to this channel. This message handler
+     * will be run synchronously whenever a message is published to the channel. Any
+     * errors thrown in the message handler will trigger an `'uncaughtException'`.
+     *
+     * ```js
+     * import diagnostics_channel from 'node:diagnostics_channel';
+     *
+     * diagnostics_channel.subscribe('my-channel', (message, name) => {
+     *   // Received data
+     * });
+     * ```
+     * @since v18.7.0, v16.17.0
+     * @param name The channel name
+     * @param onMessage The handler to receive channel messages
+     */
+    function subscribe(name: string | symbol, onMessage: ChannelListener): void;
+    /**
+     * Remove a message handler previously registered to this channel with {@link subscribe}.
+     *
+     * ```js
+     * import diagnostics_channel from 'node:diagnostics_channel';
+     *
+     * function onMessage(message, name) {
+     *   // Received data
+     * }
+     *
+     * diagnostics_channel.subscribe('my-channel', onMessage);
+     *
+     * diagnostics_channel.unsubscribe('my-channel', onMessage);
+     * ```
+     * @since v18.7.0, v16.17.0
+     * @param name The channel name
+     * @param onMessage The previous subscribed handler to remove
+     * @return `true` if the handler was found, `false` otherwise.
+     */
+    function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
+    /**
+     * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing
+     * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`.
+     *
+     * ```js
+     * import diagnostics_channel from 'node:diagnostics_channel';
+     *
+     * const channelsByName = diagnostics_channel.tracingChannel('my-channel');
+     *
+     * // or...
+     *
+     * const channelsByCollection = diagnostics_channel.tracingChannel({
+     *   start: diagnostics_channel.channel('tracing:my-channel:start'),
+     *   end: diagnostics_channel.channel('tracing:my-channel:end'),
+     *   asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'),
+     *   asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'),
+     *   error: diagnostics_channel.channel('tracing:my-channel:error'),
+     * });
+     * ```
+     * @since v19.9.0
+     * @experimental
+     * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels`
+     * @return Collection of channels to trace with
+     */
+    function tracingChannel<
+        StoreType = unknown,
+        ContextType extends object = StoreType extends object ? StoreType : object,
+    >(
+        nameOrChannels: string | TracingChannelCollection<StoreType, ContextType>,
+    ): TracingChannel<StoreType, ContextType>;
+    /**
+     * The class `Channel` represents an individual named channel within the data
+     * pipeline. It is used to track subscribers and to publish messages when there
+     * are subscribers present. It exists as a separate object to avoid channel
+     * lookups at publish time, enabling very fast publish speeds and allowing
+     * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
+     * with `new Channel(name)` is not supported.
+     * @since v15.1.0, v14.17.0
+     */
+    class Channel<StoreType = unknown, ContextType = StoreType> {
+        readonly name: string | symbol;
+        /**
+         * Check if there are active subscribers to this channel. This is helpful if
+         * the message you want to send might be expensive to prepare.
+         *
+         * This API is optional but helpful when trying to publish messages from very
+         * performance-sensitive code.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * if (channel.hasSubscribers) {
+         *   // There are subscribers, prepare and publish message
+         * }
+         * ```
+         * @since v15.1.0, v14.17.0
+         */
+        readonly hasSubscribers: boolean;
+        private constructor(name: string | symbol);
+        /**
+         * Publish a message to any subscribers to the channel. This will trigger
+         * message handlers synchronously so they will execute within the same context.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * channel.publish({
+         *   some: 'message',
+         * });
+         * ```
+         * @since v15.1.0, v14.17.0
+         * @param message The message to send to the channel subscribers
+         */
+        publish(message: unknown): void;
+        /**
+         * Register a message handler to subscribe to this channel. This message handler
+         * will be run synchronously whenever a message is published to the channel. Any
+         * errors thrown in the message handler will trigger an `'uncaughtException'`.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * channel.subscribe((message, name) => {
+         *   // Received data
+         * });
+         * ```
+         * @since v15.1.0, v14.17.0
+         * @param onMessage The handler to receive channel messages
+         */
+        subscribe(onMessage: ChannelListener): void;
+        /**
+         * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * function onMessage(message, name) {
+         *   // Received data
+         * }
+         *
+         * channel.subscribe(onMessage);
+         *
+         * channel.unsubscribe(onMessage);
+         * ```
+         * @since v15.1.0, v14.17.0
+         * @param onMessage The previous subscribed handler to remove
+         * @return `true` if the handler was found, `false` otherwise.
+         */
+        unsubscribe(onMessage: ChannelListener): void;
+        /**
+         * When `channel.runStores(context, ...)` is called, the given context data
+         * will be applied to any store bound to the channel. If the store has already been
+         * bound the previous `transform` function will be replaced with the new one.
+         * The `transform` function may be omitted to set the given context data as the
+         * context directly.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         * import { AsyncLocalStorage } from 'node:async_hooks';
+         *
+         * const store = new AsyncLocalStorage();
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * channel.bindStore(store, (data) => {
+         *   return { data };
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param store The store to which to bind the context data
+         * @param transform Transform context data before setting the store context
+         */
+        bindStore(store: AsyncLocalStorage<StoreType>, transform?: (context: ContextType) => StoreType): void;
+        /**
+         * Remove a message handler previously registered to this channel with `channel.bindStore(store)`.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         * import { AsyncLocalStorage } from 'node:async_hooks';
+         *
+         * const store = new AsyncLocalStorage();
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * channel.bindStore(store);
+         * channel.unbindStore(store);
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param store The store to unbind from the channel.
+         * @return `true` if the store was found, `false` otherwise.
+         */
+        unbindStore(store: AsyncLocalStorage<StoreType>): boolean;
+        /**
+         * Applies the given data to any AsyncLocalStorage instances bound to the channel
+         * for the duration of the given function, then publishes to the channel within
+         * the scope of that data is applied to the stores.
+         *
+         * If a transform function was given to `channel.bindStore(store)` it will be
+         * applied to transform the message data before it becomes the context value for
+         * the store. The prior storage context is accessible from within the transform
+         * function in cases where context linking is required.
+         *
+         * The context applied to the store should be accessible in any async code which
+         * continues from execution which began during the given function, however
+         * there are some situations in which `context loss` may occur.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         * import { AsyncLocalStorage } from 'node:async_hooks';
+         *
+         * const store = new AsyncLocalStorage();
+         *
+         * const channel = diagnostics_channel.channel('my-channel');
+         *
+         * channel.bindStore(store, (message) => {
+         *   const parent = store.getStore();
+         *   return new Span(message, parent);
+         * });
+         * channel.runStores({ some: 'message' }, () => {
+         *   store.getStore(); // Span({ some: 'message' })
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param context Message to send to subscribers and bind to stores
+         * @param fn Handler to run within the entered storage context
+         * @param thisArg The receiver to be used for the function call.
+         * @param args Optional arguments to pass to the function.
+         */
+        runStores<ThisArg = any, Args extends any[] = any[], Result = any>(
+            context: ContextType,
+            fn: (this: ThisArg, ...args: Args) => Result,
+            thisArg?: ThisArg,
+            ...args: Args
+        ): Result;
+    }
+    interface TracingChannelSubscribers<ContextType extends object> {
+        start: (message: ContextType) => void;
+        end: (
+            message: ContextType & {
+                error?: unknown;
+                result?: unknown;
+            },
+        ) => void;
+        asyncStart: (
+            message: ContextType & {
+                error?: unknown;
+                result?: unknown;
+            },
+        ) => void;
+        asyncEnd: (
+            message: ContextType & {
+                error?: unknown;
+                result?: unknown;
+            },
+        ) => void;
+        error: (
+            message: ContextType & {
+                error: unknown;
+            },
+        ) => void;
+    }
+    interface TracingChannelCollection<StoreType = unknown, ContextType = StoreType> {
+        start: Channel<StoreType, ContextType>;
+        end: Channel<StoreType, ContextType>;
+        asyncStart: Channel<StoreType, ContextType>;
+        asyncEnd: Channel<StoreType, ContextType>;
+        error: Channel<StoreType, ContextType>;
+    }
+    /**
+     * The class `TracingChannel` is a collection of `TracingChannel Channels` which
+     * together express a single traceable action. It is used to formalize and
+     * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a
+     * single `TracingChannel` at the top-level of the file rather than creating them
+     * dynamically.
+     * @since v19.9.0
+     * @experimental
+     */
+    class TracingChannel<StoreType = unknown, ContextType extends object = {}> implements TracingChannelCollection {
+        start: Channel<StoreType, ContextType>;
+        end: Channel<StoreType, ContextType>;
+        asyncStart: Channel<StoreType, ContextType>;
+        asyncEnd: Channel<StoreType, ContextType>;
+        error: Channel<StoreType, ContextType>;
+        /**
+         * Helper to subscribe a collection of functions to the corresponding channels.
+         * This is the same as calling `channel.subscribe(onMessage)` on each channel
+         * individually.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * channels.subscribe({
+         *   start(message) {
+         *     // Handle start message
+         *   },
+         *   end(message) {
+         *     // Handle end message
+         *   },
+         *   asyncStart(message) {
+         *     // Handle asyncStart message
+         *   },
+         *   asyncEnd(message) {
+         *     // Handle asyncEnd message
+         *   },
+         *   error(message) {
+         *     // Handle error message
+         *   },
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param subscribers Set of `TracingChannel Channels` subscribers
+         */
+        subscribe(subscribers: TracingChannelSubscribers<ContextType>): void;
+        /**
+         * Helper to unsubscribe a collection of functions from the corresponding channels.
+         * This is the same as calling `channel.unsubscribe(onMessage)` on each channel
+         * individually.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * channels.unsubscribe({
+         *   start(message) {
+         *     // Handle start message
+         *   },
+         *   end(message) {
+         *     // Handle end message
+         *   },
+         *   asyncStart(message) {
+         *     // Handle asyncStart message
+         *   },
+         *   asyncEnd(message) {
+         *     // Handle asyncEnd message
+         *   },
+         *   error(message) {
+         *     // Handle error message
+         *   },
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param subscribers Set of `TracingChannel Channels` subscribers
+         * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise.
+         */
+        unsubscribe(subscribers: TracingChannelSubscribers<ContextType>): void;
+        /**
+         * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error.
+         * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
+         * events should have any bound stores set to match this trace context.
+         *
+         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
+         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * channels.traceSync(() => {
+         *   // Do something
+         * }, {
+         *   some: 'thing',
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param fn Function to wrap a trace around
+         * @param context Shared object to correlate events through
+         * @param thisArg The receiver to be used for the function call
+         * @param args Optional arguments to pass to the function
+         * @return The return value of the given function
+         */
+        traceSync<ThisArg = any, Args extends any[] = any[], Result = any>(
+            fn: (this: ThisArg, ...args: Args) => Result,
+            context?: ContextType,
+            thisArg?: ThisArg,
+            ...args: Args
+        ): Result;
+        /**
+         * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the
+         * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also
+         * produce an `error event` if the given function throws an error or the
+         * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
+         * events should have any bound stores set to match this trace context.
+         *
+         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
+         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * channels.tracePromise(async () => {
+         *   // Do something
+         * }, {
+         *   some: 'thing',
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param fn Promise-returning function to wrap a trace around
+         * @param context Shared object to correlate trace events through
+         * @param thisArg The receiver to be used for the function call
+         * @param args Optional arguments to pass to the function
+         * @return Chained from promise returned by the given function
+         */
+        tracePromise<ThisArg = any, Args extends any[] = any[], Result = any>(
+            fn: (this: ThisArg, ...args: Args) => Promise<Result>,
+            context?: ContextType,
+            thisArg?: ThisArg,
+            ...args: Args
+        ): Promise<Result>;
+        /**
+         * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the
+         * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or
+         * the returned
+         * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
+         * events should have any bound stores set to match this trace context.
+         *
+         * The `position` will be -1 by default to indicate the final argument should
+         * be used as the callback.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * channels.traceCallback((arg1, callback) => {
+         *   // Do something
+         *   callback(null, 'result');
+         * }, 1, {
+         *   some: 'thing',
+         * }, thisArg, arg1, callback);
+         * ```
+         *
+         * The callback will also be run with `channel.runStores(context, ...)` which
+         * enables context loss recovery in some cases.
+         *
+         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
+         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
+         *
+         * ```js
+         * import diagnostics_channel from 'node:diagnostics_channel';
+         * import { AsyncLocalStorage } from 'node:async_hooks';
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         * const myStore = new AsyncLocalStorage();
+         *
+         * // The start channel sets the initial store data to something
+         * // and stores that store data value on the trace context object
+         * channels.start.bindStore(myStore, (data) => {
+         *   const span = new Span(data);
+         *   data.span = span;
+         *   return span;
+         * });
+         *
+         * // Then asyncStart can restore from that data it stored previously
+         * channels.asyncStart.bindStore(myStore, (data) => {
+         *   return data.span;
+         * });
+         * ```
+         * @since v19.9.0
+         * @experimental
+         * @param fn callback using function to wrap a trace around
+         * @param position Zero-indexed argument position of expected callback
+         * @param context Shared object to correlate trace events through
+         * @param thisArg The receiver to be used for the function call
+         * @param args Optional arguments to pass to the function
+         * @return The return value of the given function
+         */
+        traceCallback<ThisArg = any, Args extends any[] = any[], Result = any>(
+            fn: (this: ThisArg, ...args: Args) => Result,
+            position?: number,
+            context?: ContextType,
+            thisArg?: ThisArg,
+            ...args: Args
+        ): Result;
+        /**
+         * `true` if any of the individual channels has a subscriber, `false` if not.
+         *
+         * This is a helper method available on a {@link TracingChannel} instance to check
+         * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers.
+         * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise.
+         *
+         * ```js
+         * const diagnostics_channel = require('node:diagnostics_channel');
+         *
+         * const channels = diagnostics_channel.tracingChannel('my-channel');
+         *
+         * if (channels.hasSubscribers) {
+         *   // Do something
+         * }
+         * ```
+         * @since v22.0.0, v20.13.0
+         */
+        readonly hasSubscribers: boolean;
+    }
+}
+declare module "diagnostics_channel" {
+    export * from "node:diagnostics_channel";
+}

+ 876 - 0
node_modules/@types/node/dns.d.ts

@@ -0,0 +1,876 @@
+declare module "node:dns" {
+    // Supported getaddrinfo flags.
+    /**
+     * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
+     * only returned if the current system has at least one IPv4 address configured.
+     */
+    const ADDRCONFIG: number;
+    /**
+     * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
+     * on some operating systems (e.g. FreeBSD 10.1).
+     */
+    const V4MAPPED: number;
+    /**
+     * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
+     * well as IPv4 mapped IPv6 addresses.
+     */
+    const ALL: number;
+    interface LookupOptions {
+        /**
+         * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
+         * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
+         * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
+         * @default 0
+         */
+        family?: number | "IPv4" | "IPv6" | undefined;
+        /**
+         * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
+         * passed by bitwise `OR`ing their values.
+         */
+        hints?: number | undefined;
+        /**
+         * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
+         * @default false
+         */
+        all?: boolean | undefined;
+        /**
+         * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
+         * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
+         * addresses before IPv4 addresses. Default value is configurable using
+         * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
+         * @default `verbatim` (addresses are not reordered)
+         * @since v22.1.0
+         */
+        order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
+        /**
+         * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
+         * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
+         * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
+         * @default true (addresses are not reordered)
+         * @deprecated Please use `order` option
+         */
+        verbatim?: boolean | undefined;
+    }
+    interface LookupOneOptions extends LookupOptions {
+        all?: false | undefined;
+    }
+    interface LookupAllOptions extends LookupOptions {
+        all: true;
+    }
+    interface LookupAddress {
+        /**
+         * A string representation of an IPv4 or IPv6 address.
+         */
+        address: string;
+        /**
+         * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
+         * bug in the name resolution service used by the operating system.
+         */
+        family: number;
+    }
+    /**
+     * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+     * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+     * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
+     * IPv4 and IPv6 addresses are both returned if found.
+     *
+     * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the
+     * properties `address` and `family`.
+     *
+     * On error, `err` is an `Error` object, where `err.code` is the error code.
+     * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+     * the host name does not exist but also when the lookup fails in other ways
+     * such as no available file descriptors.
+     *
+     * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
+     * The implementation uses an operating system facility that can associate names
+     * with addresses and vice versa. This implementation can have subtle but
+     * important consequences on the behavior of any Node.js program. Please take some
+     * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
+     * before using `dns.lookup()`.
+     *
+     * Example usage:
+     *
+     * ```js
+     * import dns from 'node:dns';
+     * const options = {
+     *   family: 6,
+     *   hints: dns.ADDRCONFIG | dns.V4MAPPED,
+     * };
+     * dns.lookup('example.com', options, (err, address, family) =>
+     *   console.log('address: %j family: IPv%s', address, family));
+     * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+     *
+     * // When options.all is true, the result will be an Array.
+     * options.all = true;
+     * dns.lookup('example.com', options, (err, addresses) =>
+     *   console.log('addresses: %j', addresses));
+     * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+     * ```
+     *
+     * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
+     * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
+     * @since v0.1.90
+     */
+    function lookup(
+        hostname: string,
+        family: number,
+        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
+    ): void;
+    function lookup(
+        hostname: string,
+        options: LookupOneOptions,
+        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
+    ): void;
+    function lookup(
+        hostname: string,
+        options: LookupAllOptions,
+        callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
+    ): void;
+    function lookup(
+        hostname: string,
+        options: LookupOptions,
+        callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
+    ): void;
+    function lookup(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
+    ): void;
+    namespace lookup {
+        function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+        function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
+        function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+    }
+    /**
+     * Resolves the given `address` and `port` into a host name and service using
+     * the operating system's underlying `getnameinfo` implementation.
+     *
+     * If `address` is not a valid IP address, a `TypeError` will be thrown.
+     * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
+     *
+     * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
+     * where `err.code` is the error code.
+     *
+     * ```js
+     * import dns from 'node:dns';
+     * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
+     *   console.log(hostname, service);
+     *   // Prints: localhost ssh
+     * });
+     * ```
+     *
+     * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
+     * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
+     * @since v0.11.14
+     */
+    function lookupService(
+        address: string,
+        port: number,
+        callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
+    ): void;
+    namespace lookupService {
+        function __promisify__(
+            address: string,
+            port: number,
+        ): Promise<{
+            hostname: string;
+            service: string;
+        }>;
+    }
+    interface ResolveOptions {
+        ttl: boolean;
+    }
+    interface ResolveWithTtlOptions extends ResolveOptions {
+        ttl: true;
+    }
+    interface RecordWithTtl {
+        address: string;
+        ttl: number;
+    }
+    interface AnyARecord extends RecordWithTtl {
+        type: "A";
+    }
+    interface AnyAaaaRecord extends RecordWithTtl {
+        type: "AAAA";
+    }
+    interface CaaRecord {
+        critical: number;
+        issue?: string | undefined;
+        issuewild?: string | undefined;
+        iodef?: string | undefined;
+        contactemail?: string | undefined;
+        contactphone?: string | undefined;
+    }
+    interface AnyCaaRecord extends CaaRecord {
+        type: "CAA";
+    }
+    interface MxRecord {
+        priority: number;
+        exchange: string;
+    }
+    interface AnyMxRecord extends MxRecord {
+        type: "MX";
+    }
+    interface NaptrRecord {
+        flags: string;
+        service: string;
+        regexp: string;
+        replacement: string;
+        order: number;
+        preference: number;
+    }
+    interface AnyNaptrRecord extends NaptrRecord {
+        type: "NAPTR";
+    }
+    interface SoaRecord {
+        nsname: string;
+        hostmaster: string;
+        serial: number;
+        refresh: number;
+        retry: number;
+        expire: number;
+        minttl: number;
+    }
+    interface AnySoaRecord extends SoaRecord {
+        type: "SOA";
+    }
+    interface SrvRecord {
+        priority: number;
+        weight: number;
+        port: number;
+        name: string;
+    }
+    interface AnySrvRecord extends SrvRecord {
+        type: "SRV";
+    }
+    interface TlsaRecord {
+        certUsage: number;
+        selector: number;
+        match: number;
+        data: ArrayBuffer;
+    }
+    interface AnyTlsaRecord extends TlsaRecord {
+        type: "TLSA";
+    }
+    interface AnyTxtRecord {
+        type: "TXT";
+        entries: string[];
+    }
+    interface AnyNsRecord {
+        type: "NS";
+        value: string;
+    }
+    interface AnyPtrRecord {
+        type: "PTR";
+        value: string;
+    }
+    interface AnyCnameRecord {
+        type: "CNAME";
+        value: string;
+    }
+    type AnyRecord =
+        | AnyARecord
+        | AnyAaaaRecord
+        | AnyCaaRecord
+        | AnyCnameRecord
+        | AnyMxRecord
+        | AnyNaptrRecord
+        | AnyNsRecord
+        | AnyPtrRecord
+        | AnySoaRecord
+        | AnySrvRecord
+        | AnyTlsaRecord
+        | AnyTxtRecord;
+    /**
+     * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+     * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource
+     * records. The type and structure of individual results varies based on `rrtype`:
+     *
+     * <omitted>
+     *
+     * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
+     * where `err.code` is one of the `DNS error codes`.
+     * @since v0.1.27
+     * @param hostname Host name to resolve.
+     * @param [rrtype='A'] Resource record type.
+     */
+    function resolve(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "ANY",
+        callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "CAA",
+        callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "MX",
+        callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "NAPTR",
+        callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "SOA",
+        callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "SRV",
+        callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "TLSA",
+        callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: "TXT",
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
+    ): void;
+    function resolve(
+        hostname: string,
+        rrtype: string,
+        callback: (
+            err: NodeJS.ErrnoException | null,
+            addresses:
+                | string[]
+                | CaaRecord[]
+                | MxRecord[]
+                | NaptrRecord[]
+                | SoaRecord
+                | SrvRecord[]
+                | TlsaRecord[]
+                | string[][]
+                | AnyRecord[],
+        ) => void,
+    ): void;
+    namespace resolve {
+        function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
+        function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+        function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
+        function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+        function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+        function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+        function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+        function __promisify__(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
+        function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+        function __promisify__(
+            hostname: string,
+            rrtype: string,
+        ): Promise<
+            | string[]
+            | CaaRecord[]
+            | MxRecord[]
+            | NaptrRecord[]
+            | SoaRecord
+            | SrvRecord[]
+            | TlsaRecord[]
+            | string[][]
+            | AnyRecord[]
+        >;
+    }
+    /**
+     * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
+     * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+     * @since v0.1.16
+     * @param hostname Host name to resolve.
+     */
+    function resolve4(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    function resolve4(
+        hostname: string,
+        options: ResolveWithTtlOptions,
+        callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
+    ): void;
+    function resolve4(
+        hostname: string,
+        options: ResolveOptions,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
+    ): void;
+    namespace resolve4 {
+        function __promisify__(hostname: string): Promise<string[]>;
+        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function
+     * will contain an array of IPv6 addresses.
+     * @since v0.1.16
+     * @param hostname Host name to resolve.
+     */
+    function resolve6(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    function resolve6(
+        hostname: string,
+        options: ResolveWithTtlOptions,
+        callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
+    ): void;
+    function resolve6(
+        hostname: string,
+        options: ResolveOptions,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
+    ): void;
+    namespace resolve6 {
+        function __promisify__(hostname: string): Promise<string[]>;
+        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function
+     * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
+     * @since v0.3.2
+     */
+    function resolveCname(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    namespace resolveCname {
+        function __promisify__(hostname: string): Promise<string[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function
+     * will contain an array of certification authority authorization records
+     * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
+     * @since v15.0.0, v14.17.0
+     */
+    function resolveCaa(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
+    ): void;
+    namespace resolveCaa {
+        function __promisify__(hostname: string): Promise<CaaRecord[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
+     * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+     * @since v0.1.27
+     */
+    function resolveMx(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
+    ): void;
+    namespace resolveMx {
+        function __promisify__(hostname: string): Promise<MxRecord[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of
+     * objects with the following properties:
+     *
+     * * `flags`
+     * * `service`
+     * * `regexp`
+     * * `replacement`
+     * * `order`
+     * * `preference`
+     *
+     * ```js
+     * {
+     *   flags: 's',
+     *   service: 'SIP+D2U',
+     *   regexp: '',
+     *   replacement: '_sip._udp.example.com',
+     *   order: 30,
+     *   preference: 100
+     * }
+     * ```
+     * @since v0.9.12
+     */
+    function resolveNaptr(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
+    ): void;
+    namespace resolveNaptr {
+        function __promisify__(hostname: string): Promise<NaptrRecord[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
+     * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
+     * @since v0.1.90
+     */
+    function resolveNs(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    namespace resolveNs {
+        function __promisify__(hostname: string): Promise<string[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
+     * be an array of strings containing the reply records.
+     * @since v6.0.0
+     */
+    function resolvePtr(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
+    ): void;
+    namespace resolvePtr {
+        function __promisify__(hostname: string): Promise<string[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+     * the `hostname`. The `address` argument passed to the `callback` function will
+     * be an object with the following properties:
+     *
+     * * `nsname`
+     * * `hostmaster`
+     * * `serial`
+     * * `refresh`
+     * * `retry`
+     * * `expire`
+     * * `minttl`
+     *
+     * ```js
+     * {
+     *   nsname: 'ns.example.com',
+     *   hostmaster: 'root.example.com',
+     *   serial: 2013101809,
+     *   refresh: 10000,
+     *   retry: 2400,
+     *   expire: 604800,
+     *   minttl: 3600
+     * }
+     * ```
+     * @since v0.11.10
+     */
+    function resolveSoa(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
+    ): void;
+    namespace resolveSoa {
+        function __promisify__(hostname: string): Promise<SoaRecord>;
+    }
+    /**
+     * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
+     * be an array of objects with the following properties:
+     *
+     * * `priority`
+     * * `weight`
+     * * `port`
+     * * `name`
+     *
+     * ```js
+     * {
+     *   priority: 10,
+     *   weight: 5,
+     *   port: 21223,
+     *   name: 'service.example.com'
+     * }
+     * ```
+     * @since v0.1.27
+     */
+    function resolveSrv(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
+    ): void;
+    namespace resolveSrv {
+        function __promisify__(hostname: string): Promise<SrvRecord[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
+     * the `hostname`. The `records` argument passed to the `callback` function is an
+     * array of objects with these properties:
+     *
+     * * `certUsage`
+     * * `selector`
+     * * `match`
+     * * `data`
+     *
+     * ```js
+     * {
+     *   certUsage: 3,
+     *   selector: 1,
+     *   match: 1,
+     *   data: [ArrayBuffer]
+     * }
+     * ```
+     * @since v23.9.0, v22.15.0
+     */
+    function resolveTlsa(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
+    ): void;
+    namespace resolveTlsa {
+        function __promisify__(hostname: string): Promise<TlsaRecord[]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a
+     * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+     * one record. Depending on the use case, these could be either joined together or
+     * treated separately.
+     * @since v0.1.27
+     */
+    function resolveTxt(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
+    ): void;
+    namespace resolveTxt {
+        function __promisify__(hostname: string): Promise<string[][]>;
+    }
+    /**
+     * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+     * The `ret` argument passed to the `callback` function will be an array containing
+     * various types of records. Each object has a property `type` that indicates the
+     * type of the current record. And depending on the `type`, additional properties
+     * will be present on the object:
+     *
+     * <omitted>
+     *
+     * Here is an example of the `ret` object passed to the callback:
+     *
+     * ```js
+     * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+     *   { type: 'CNAME', value: 'example.com' },
+     *   { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+     *   { type: 'NS', value: 'ns1.example.com' },
+     *   { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+     *   { type: 'SOA',
+     *     nsname: 'ns1.example.com',
+     *     hostmaster: 'admin.example.com',
+     *     serial: 156696742,
+     *     refresh: 900,
+     *     retry: 900,
+     *     expire: 1800,
+     *     minttl: 60 } ]
+     * ```
+     *
+     * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
+     * [RFC 8482](https://tools.ietf.org/html/rfc8482).
+     */
+    function resolveAny(
+        hostname: string,
+        callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
+    ): void;
+    namespace resolveAny {
+        function __promisify__(hostname: string): Promise<AnyRecord[]>;
+    }
+    /**
+     * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+     * array of host names.
+     *
+     * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
+     * one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
+     * @since v0.1.16
+     */
+    function reverse(
+        ip: string,
+        callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
+    ): void;
+    /**
+     * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
+     * The value could be:
+     *
+     * * `ipv4first`: for `order` defaulting to `ipv4first`.
+     * * `ipv6first`: for `order` defaulting to `ipv6first`.
+     * * `verbatim`: for `order` defaulting to `verbatim`.
+     * @since v18.17.0
+     */
+    function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
+    /**
+     * Sets the IP address and port of servers to be used when performing DNS
+     * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+     * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+     *
+     * ```js
+     * dns.setServers([
+     *   '4.4.4.4',
+     *   '[2001:4860:4860::8888]',
+     *   '4.4.4.4:1053',
+     *   '[2001:4860:4860::8888]:1053',
+     * ]);
+     * ```
+     *
+     * An error will be thrown if an invalid address is provided.
+     *
+     * The `dns.setServers()` method must not be called while a DNS query is in
+     * progress.
+     *
+     * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
+     *
+     * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+     * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+     * subsequent servers provided. Fallback DNS servers will only be used if the
+     * earlier ones time out or result in some other error.
+     * @since v0.11.3
+     * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
+     */
+    function setServers(servers: readonly string[]): void;
+    /**
+     * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+     * that are currently configured for DNS resolution. A string will include a port
+     * section if a custom port is used.
+     *
+     * ```js
+     * [
+     *   '4.4.4.4',
+     *   '2001:4860:4860::8888',
+     *   '4.4.4.4:1053',
+     *   '[2001:4860:4860::8888]:1053',
+     * ]
+     * ```
+     * @since v0.11.3
+     */
+    function getServers(): string[];
+    /**
+     * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
+     * The value could be:
+     *
+     * * `ipv4first`: sets default `order` to `ipv4first`.
+     * * `ipv6first`: sets default `order` to `ipv6first`.
+     * * `verbatim`: sets default `order` to `verbatim`.
+     *
+     * The default is `verbatim` and {@link setDefaultResultOrder} have higher
+     * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
+     * [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
+     * thread won't affect the default dns orders in workers.
+     * @since v16.4.0, v14.18.0
+     * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
+     */
+    function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
+    // Error codes
+    const NODATA: "ENODATA";
+    const FORMERR: "EFORMERR";
+    const SERVFAIL: "ESERVFAIL";
+    const NOTFOUND: "ENOTFOUND";
+    const NOTIMP: "ENOTIMP";
+    const REFUSED: "EREFUSED";
+    const BADQUERY: "EBADQUERY";
+    const BADNAME: "EBADNAME";
+    const BADFAMILY: "EBADFAMILY";
+    const BADRESP: "EBADRESP";
+    const CONNREFUSED: "ECONNREFUSED";
+    const TIMEOUT: "ETIMEOUT";
+    const EOF: "EOF";
+    const FILE: "EFILE";
+    const NOMEM: "ENOMEM";
+    const DESTRUCTION: "EDESTRUCTION";
+    const BADSTR: "EBADSTR";
+    const BADFLAGS: "EBADFLAGS";
+    const NONAME: "ENONAME";
+    const BADHINTS: "EBADHINTS";
+    const NOTINITIALIZED: "ENOTINITIALIZED";
+    const LOADIPHLPAPI: "ELOADIPHLPAPI";
+    const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
+    const CANCELLED: "ECANCELLED";
+    interface ResolverOptions {
+        /**
+         * Query timeout in milliseconds, or `-1` to use the default timeout.
+         */
+        timeout?: number | undefined;
+        /**
+         * The number of tries the resolver will try contacting each name server before giving up.
+         * @default 4
+         */
+        tries?: number | undefined;
+        /**
+         * The max retry timeout, in milliseconds.
+         * @default 0
+         */
+        maxTimeout?: number | undefined;
+    }
+    /**
+     * An independent resolver for DNS requests.
+     *
+     * Creating a new resolver uses the default server settings. Setting
+     * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
+     * other resolvers:
+     *
+     * ```js
+     * import { Resolver } from 'node:dns';
+     * const resolver = new Resolver();
+     * resolver.setServers(['4.4.4.4']);
+     *
+     * // This request will use the server at 4.4.4.4, independent of global settings.
+     * resolver.resolve4('example.org', (err, addresses) => {
+     *   // ...
+     * });
+     * ```
+     *
+     * The following methods from the `node:dns` module are available:
+     *
+     * * `resolver.getServers()`
+     * * `resolver.resolve()`
+     * * `resolver.resolve4()`
+     * * `resolver.resolve6()`
+     * * `resolver.resolveAny()`
+     * * `resolver.resolveCaa()`
+     * * `resolver.resolveCname()`
+     * * `resolver.resolveMx()`
+     * * `resolver.resolveNaptr()`
+     * * `resolver.resolveNs()`
+     * * `resolver.resolvePtr()`
+     * * `resolver.resolveSoa()`
+     * * `resolver.resolveSrv()`
+     * * `resolver.resolveTxt()`
+     * * `resolver.reverse()`
+     * * `resolver.setServers()`
+     * @since v8.3.0
+     */
+    class Resolver {
+        constructor(options?: ResolverOptions);
+        /**
+         * Cancel all outstanding DNS queries made by this resolver. The corresponding
+         * callbacks will be called with an error with code `ECANCELLED`.
+         * @since v8.3.0
+         */
+        cancel(): void;
+        getServers: typeof getServers;
+        resolve: typeof resolve;
+        resolve4: typeof resolve4;
+        resolve6: typeof resolve6;
+        resolveAny: typeof resolveAny;
+        resolveCaa: typeof resolveCaa;
+        resolveCname: typeof resolveCname;
+        resolveMx: typeof resolveMx;
+        resolveNaptr: typeof resolveNaptr;
+        resolveNs: typeof resolveNs;
+        resolvePtr: typeof resolvePtr;
+        resolveSoa: typeof resolveSoa;
+        resolveSrv: typeof resolveSrv;
+        resolveTlsa: typeof resolveTlsa;
+        resolveTxt: typeof resolveTxt;
+        reverse: typeof reverse;
+        /**
+         * The resolver instance will send its requests from the specified IP address.
+         * This allows programs to specify outbound interfaces when used on multi-homed
+         * systems.
+         *
+         * If a v4 or v6 address is not specified, it is set to the default and the
+         * operating system will choose a local address automatically.
+         *
+         * The resolver will use the v4 local address when making requests to IPv4 DNS
+         * servers, and the v6 local address when making requests to IPv6 DNS servers.
+         * The `rrtype` of resolution requests has no impact on the local address used.
+         * @since v15.1.0, v14.17.0
+         * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+         * @param [ipv6='::0'] A string representation of an IPv6 address.
+         */
+        setLocalAddress(ipv4?: string, ipv6?: string): void;
+        setServers: typeof setServers;
+    }
+}
+declare module "node:dns" {
+    export * as promises from "node:dns/promises";
+}
+declare module "dns" {
+    export * from "node:dns";
+}

+ 497 - 0
node_modules/@types/node/dns/promises.d.ts

@@ -0,0 +1,497 @@
+declare module "node:dns/promises" {
+    import {
+        AnyRecord,
+        CaaRecord,
+        LookupAddress,
+        LookupAllOptions,
+        LookupOneOptions,
+        LookupOptions,
+        MxRecord,
+        NaptrRecord,
+        RecordWithTtl,
+        ResolveOptions,
+        ResolverOptions,
+        ResolveWithTtlOptions,
+        SoaRecord,
+        SrvRecord,
+        TlsaRecord,
+    } from "node:dns";
+    /**
+     * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
+     * that are currently configured for DNS resolution. A string will include a port
+     * section if a custom port is used.
+     *
+     * ```js
+     * [
+     *   '4.4.4.4',
+     *   '2001:4860:4860::8888',
+     *   '4.4.4.4:1053',
+     *   '[2001:4860:4860::8888]:1053',
+     * ]
+     * ```
+     * @since v10.6.0
+     */
+    function getServers(): string[];
+    /**
+     * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
+     * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
+     * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
+     * and IPv6 addresses are both returned if found.
+     *
+     * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`.
+     *
+     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
+     * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
+     * the host name does not exist but also when the lookup fails in other ways
+     * such as no available file descriptors.
+     *
+     * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS
+     * protocol. The implementation uses an operating system facility that can
+     * associate names with addresses and vice versa. This implementation can have
+     * subtle but important consequences on the behavior of any Node.js program. Please
+     * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before
+     * using `dnsPromises.lookup()`.
+     *
+     * Example usage:
+     *
+     * ```js
+     * import dns from 'node:dns';
+     * const dnsPromises = dns.promises;
+     * const options = {
+     *   family: 6,
+     *   hints: dns.ADDRCONFIG | dns.V4MAPPED,
+     * };
+     *
+     * dnsPromises.lookup('example.com', options).then((result) => {
+     *   console.log('address: %j family: IPv%s', result.address, result.family);
+     *   // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
+     * });
+     *
+     * // When options.all is true, the result will be an Array.
+     * options.all = true;
+     * dnsPromises.lookup('example.com', options).then((result) => {
+     *   console.log('addresses: %j', result);
+     *   // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
+     * });
+     * ```
+     * @since v10.6.0
+     */
+    function lookup(hostname: string, family: number): Promise<LookupAddress>;
+    function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
+    function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
+    function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
+    function lookup(hostname: string): Promise<LookupAddress>;
+    /**
+     * Resolves the given `address` and `port` into a host name and service using
+     * the operating system's underlying `getnameinfo` implementation.
+     *
+     * If `address` is not a valid IP address, a `TypeError` will be thrown.
+     * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
+     *
+     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
+     *
+     * ```js
+     * import dnsPromises from 'node:dns';
+     * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
+     *   console.log(result.hostname, result.service);
+     *   // Prints: localhost ssh
+     * });
+     * ```
+     * @since v10.6.0
+     */
+    function lookupService(
+        address: string,
+        port: number,
+    ): Promise<{
+        hostname: string;
+        service: string;
+    }>;
+    /**
+     * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
+     * of the resource records. When successful, the `Promise` is resolved with an
+     * array of resource records. The type and structure of individual results vary
+     * based on `rrtype`:
+     *
+     * <omitted>
+     *
+     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
+     * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
+     * @since v10.6.0
+     * @param hostname Host name to resolve.
+     * @param [rrtype='A'] Resource record type.
+     */
+    function resolve(hostname: string): Promise<string[]>;
+    function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
+    function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
+    function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
+    function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
+    function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
+    function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
+    function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
+    function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
+    function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
+    function resolve(hostname: string, rrtype: string): Promise<
+        | string[]
+        | CaaRecord[]
+        | MxRecord[]
+        | NaptrRecord[]
+        | SoaRecord
+        | SrvRecord[]
+        | TlsaRecord[]
+        | string[][]
+        | AnyRecord[]
+    >;
+    /**
+     * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
+     * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
+     * @since v10.6.0
+     * @param hostname Host name to resolve.
+     */
+    function resolve4(hostname: string): Promise<string[]>;
+    function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+    function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+    /**
+     * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
+     * addresses.
+     * @since v10.6.0
+     * @param hostname Host name to resolve.
+     */
+    function resolve6(hostname: string): Promise<string[]>;
+    function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
+    function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
+    /**
+     * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
+     * On success, the `Promise` is resolved with an array containing various types of
+     * records. Each object has a property `type` that indicates the type of the
+     * current record. And depending on the `type`, additional properties will be
+     * present on the object:
+     *
+     * <omitted>
+     *
+     * Here is an example of the result object:
+     *
+     * ```js
+     * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
+     *   { type: 'CNAME', value: 'example.com' },
+     *   { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
+     *   { type: 'NS', value: 'ns1.example.com' },
+     *   { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
+     *   { type: 'SOA',
+     *     nsname: 'ns1.example.com',
+     *     hostmaster: 'admin.example.com',
+     *     serial: 156696742,
+     *     refresh: 900,
+     *     retry: 900,
+     *     expire: 1800,
+     *     minttl: 60 } ]
+     * ```
+     * @since v10.6.0
+     */
+    function resolveAny(hostname: string): Promise<AnyRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
+     * the `Promise` is resolved with an array of objects containing available
+     * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
+     * @since v15.0.0, v14.17.0
+     */
+    function resolveCaa(hostname: string): Promise<CaaRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
+     * the `Promise` is resolved with an array of canonical name records available for
+     * the `hostname` (e.g. `['bar.example.com']`).
+     * @since v10.6.0
+     */
+    function resolveCname(hostname: string): Promise<string[]>;
+    /**
+     * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
+     * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
+     * @since v10.6.0
+     */
+    function resolveMx(hostname: string): Promise<MxRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
+     * of objects with the following properties:
+     *
+     * * `flags`
+     * * `service`
+     * * `regexp`
+     * * `replacement`
+     * * `order`
+     * * `preference`
+     *
+     * ```js
+     * {
+     *   flags: 's',
+     *   service: 'SIP+D2U',
+     *   regexp: '',
+     *   replacement: '_sip._udp.example.com',
+     *   order: 30,
+     *   preference: 100
+     * }
+     * ```
+     * @since v10.6.0
+     */
+    function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
+     * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
+     * @since v10.6.0
+     */
+    function resolveNs(hostname: string): Promise<string[]>;
+    /**
+     * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
+     * containing the reply records.
+     * @since v10.6.0
+     */
+    function resolvePtr(hostname: string): Promise<string[]>;
+    /**
+     * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
+     * the `hostname`. On success, the `Promise` is resolved with an object with the
+     * following properties:
+     *
+     * * `nsname`
+     * * `hostmaster`
+     * * `serial`
+     * * `refresh`
+     * * `retry`
+     * * `expire`
+     * * `minttl`
+     *
+     * ```js
+     * {
+     *   nsname: 'ns.example.com',
+     *   hostmaster: 'root.example.com',
+     *   serial: 2013101809,
+     *   refresh: 10000,
+     *   retry: 2400,
+     *   expire: 604800,
+     *   minttl: 3600
+     * }
+     * ```
+     * @since v10.6.0
+     */
+    function resolveSoa(hostname: string): Promise<SoaRecord>;
+    /**
+     * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
+     * the following properties:
+     *
+     * * `priority`
+     * * `weight`
+     * * `port`
+     * * `name`
+     *
+     * ```js
+     * {
+     *   priority: 10,
+     *   weight: 5,
+     *   port: 21223,
+     *   name: 'service.example.com'
+     * }
+     * ```
+     * @since v10.6.0
+     */
+    function resolveSrv(hostname: string): Promise<SrvRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
+     * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
+     * with these properties:
+     *
+     * * `certUsage`
+     * * `selector`
+     * * `match`
+     * * `data`
+     *
+     * ```js
+     * {
+     *   certUsage: 3,
+     *   selector: 1,
+     *   match: 1,
+     *   data: [ArrayBuffer]
+     * }
+     * ```
+     * @since v23.9.0, v22.15.0
+     */
+    function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
+    /**
+     * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
+     * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
+     * one record. Depending on the use case, these could be either joined together or
+     * treated separately.
+     * @since v10.6.0
+     */
+    function resolveTxt(hostname: string): Promise<string[][]>;
+    /**
+     * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
+     * array of host names.
+     *
+     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
+     * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
+     * @since v10.6.0
+     */
+    function reverse(ip: string): Promise<string[]>;
+    /**
+     * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
+     * The value could be:
+     *
+     * * `ipv4first`: for `verbatim` defaulting to `false`.
+     * * `verbatim`: for `verbatim` defaulting to `true`.
+     * @since v20.1.0
+     */
+    function getDefaultResultOrder(): "ipv4first" | "verbatim";
+    /**
+     * Sets the IP address and port of servers to be used when performing DNS
+     * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
+     * addresses. If the port is the IANA default DNS port (53) it can be omitted.
+     *
+     * ```js
+     * dnsPromises.setServers([
+     *   '4.4.4.4',
+     *   '[2001:4860:4860::8888]',
+     *   '4.4.4.4:1053',
+     *   '[2001:4860:4860::8888]:1053',
+     * ]);
+     * ```
+     *
+     * An error will be thrown if an invalid address is provided.
+     *
+     * The `dnsPromises.setServers()` method must not be called while a DNS query is in
+     * progress.
+     *
+     * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
+     * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
+     * subsequent servers provided. Fallback DNS servers will only be used if the
+     * earlier ones time out or result in some other error.
+     * @since v10.6.0
+     * @param servers array of `RFC 5952` formatted addresses
+     */
+    function setServers(servers: readonly string[]): void;
+    /**
+     * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
+     *
+     * * `ipv4first`: sets default `order` to `ipv4first`.
+     * * `ipv6first`: sets default `order` to `ipv6first`.
+     * * `verbatim`: sets default `order` to `verbatim`.
+     *
+     * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
+     * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
+     * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
+     * from the main thread won't affect the default dns orders in workers.
+     * @since v16.4.0, v14.18.0
+     * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
+     */
+    function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
+    // Error codes
+    const NODATA: "ENODATA";
+    const FORMERR: "EFORMERR";
+    const SERVFAIL: "ESERVFAIL";
+    const NOTFOUND: "ENOTFOUND";
+    const NOTIMP: "ENOTIMP";
+    const REFUSED: "EREFUSED";
+    const BADQUERY: "EBADQUERY";
+    const BADNAME: "EBADNAME";
+    const BADFAMILY: "EBADFAMILY";
+    const BADRESP: "EBADRESP";
+    const CONNREFUSED: "ECONNREFUSED";
+    const TIMEOUT: "ETIMEOUT";
+    const EOF: "EOF";
+    const FILE: "EFILE";
+    const NOMEM: "ENOMEM";
+    const DESTRUCTION: "EDESTRUCTION";
+    const BADSTR: "EBADSTR";
+    const BADFLAGS: "EBADFLAGS";
+    const NONAME: "ENONAME";
+    const BADHINTS: "EBADHINTS";
+    const NOTINITIALIZED: "ENOTINITIALIZED";
+    const LOADIPHLPAPI: "ELOADIPHLPAPI";
+    const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
+    const CANCELLED: "ECANCELLED";
+
+    /**
+     * An independent resolver for DNS requests.
+     *
+     * Creating a new resolver uses the default server settings. Setting
+     * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect
+     * other resolvers:
+     *
+     * ```js
+     * import { promises } from 'node:dns';
+     * const resolver = new promises.Resolver();
+     * resolver.setServers(['4.4.4.4']);
+     *
+     * // This request will use the server at 4.4.4.4, independent of global settings.
+     * resolver.resolve4('example.org').then((addresses) => {
+     *   // ...
+     * });
+     *
+     * // Alternatively, the same code can be written using async-await style.
+     * (async function() {
+     *   const addresses = await resolver.resolve4('example.org');
+     * })();
+     * ```
+     *
+     * The following methods from the `dnsPromises` API are available:
+     *
+     * * `resolver.getServers()`
+     * * `resolver.resolve()`
+     * * `resolver.resolve4()`
+     * * `resolver.resolve6()`
+     * * `resolver.resolveAny()`
+     * * `resolver.resolveCaa()`
+     * * `resolver.resolveCname()`
+     * * `resolver.resolveMx()`
+     * * `resolver.resolveNaptr()`
+     * * `resolver.resolveNs()`
+     * * `resolver.resolvePtr()`
+     * * `resolver.resolveSoa()`
+     * * `resolver.resolveSrv()`
+     * * `resolver.resolveTxt()`
+     * * `resolver.reverse()`
+     * * `resolver.setServers()`
+     * @since v10.6.0
+     */
+    class Resolver {
+        constructor(options?: ResolverOptions);
+        /**
+         * Cancel all outstanding DNS queries made by this resolver. The corresponding
+         * callbacks will be called with an error with code `ECANCELLED`.
+         * @since v8.3.0
+         */
+        cancel(): void;
+        getServers: typeof getServers;
+        resolve: typeof resolve;
+        resolve4: typeof resolve4;
+        resolve6: typeof resolve6;
+        resolveAny: typeof resolveAny;
+        resolveCaa: typeof resolveCaa;
+        resolveCname: typeof resolveCname;
+        resolveMx: typeof resolveMx;
+        resolveNaptr: typeof resolveNaptr;
+        resolveNs: typeof resolveNs;
+        resolvePtr: typeof resolvePtr;
+        resolveSoa: typeof resolveSoa;
+        resolveSrv: typeof resolveSrv;
+        resolveTlsa: typeof resolveTlsa;
+        resolveTxt: typeof resolveTxt;
+        reverse: typeof reverse;
+        /**
+         * The resolver instance will send its requests from the specified IP address.
+         * This allows programs to specify outbound interfaces when used on multi-homed
+         * systems.
+         *
+         * If a v4 or v6 address is not specified, it is set to the default and the
+         * operating system will choose a local address automatically.
+         *
+         * The resolver will use the v4 local address when making requests to IPv4 DNS
+         * servers, and the v6 local address when making requests to IPv6 DNS servers.
+         * The `rrtype` of resolution requests has no impact on the local address used.
+         * @since v15.1.0, v14.17.0
+         * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
+         * @param [ipv6='::0'] A string representation of an IPv6 address.
+         */
+        setLocalAddress(ipv4?: string, ipv6?: string): void;
+        setServers: typeof setServers;
+    }
+}
+declare module "dns/promises" {
+    export * from "node:dns/promises";
+}

+ 150 - 0
node_modules/@types/node/domain.d.ts

@@ -0,0 +1,150 @@
+declare module "node:domain" {
+    import { EventEmitter } from "node:events";
+    /**
+     * The `Domain` class encapsulates the functionality of routing errors and
+     * uncaught exceptions to the active `Domain` object.
+     *
+     * To handle the errors that it catches, listen to its `'error'` event.
+     */
+    class Domain extends EventEmitter {
+        /**
+         * An array of event emitters that have been explicitly added to the domain.
+         */
+        members: EventEmitter[];
+        /**
+         * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
+         * pushes the domain onto the domain
+         * stack managed by the domain module (see {@link exit} for details on the
+         * domain stack). The call to `enter()` delimits the beginning of a chain of
+         * asynchronous calls and I/O operations bound to a domain.
+         *
+         * Calling `enter()` changes only the active domain, and does not alter the domain
+         * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+         * single domain.
+         */
+        enter(): void;
+        /**
+         * The `exit()` method exits the current domain, popping it off the domain stack.
+         * Any time execution is going to switch to the context of a different chain of
+         * asynchronous calls, it's important to ensure that the current domain is exited.
+         * The call to `exit()` delimits either the end of or an interruption to the chain
+         * of asynchronous calls and I/O operations bound to a domain.
+         *
+         * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain.
+         *
+         * Calling `exit()` changes only the active domain, and does not alter the domain
+         * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
+         * single domain.
+         */
+        exit(): void;
+        /**
+         * Run the supplied function in the context of the domain, implicitly
+         * binding all event emitters, timers, and low-level requests that are
+         * created in that context. Optionally, arguments can be passed to
+         * the function.
+         *
+         * This is the most basic way to use a domain.
+         *
+         * ```js
+         * import domain from 'node:domain';
+         * import fs from 'node:fs';
+         * const d = domain.create();
+         * d.on('error', (er) => {
+         *   console.error('Caught error!', er);
+         * });
+         * d.run(() => {
+         *   process.nextTick(() => {
+         *     setTimeout(() => { // Simulating some various async stuff
+         *       fs.open('non-existent file', 'r', (er, fd) => {
+         *         if (er) throw er;
+         *         // proceed...
+         *       });
+         *     }, 100);
+         *   });
+         * });
+         * ```
+         *
+         * In this example, the `d.on('error')` handler will be triggered, rather
+         * than crashing the program.
+         */
+        run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
+        /**
+         * Explicitly adds an emitter to the domain. If any event handlers called by
+         * the emitter throw an error, or if the emitter emits an `'error'` event, it
+         * will be routed to the domain's `'error'` event, just like with implicit
+         * binding.
+         *
+         * If the `EventEmitter` was already bound to a domain, it is removed from that
+         * one, and bound to this one instead.
+         * @param emitter emitter to be added to the domain
+         */
+        add(emitter: EventEmitter): void;
+        /**
+         * The opposite of {@link add}. Removes domain handling from the
+         * specified emitter.
+         * @param emitter emitter to be removed from the domain
+         */
+        remove(emitter: EventEmitter): void;
+        /**
+         * The returned function will be a wrapper around the supplied callback
+         * function. When the returned function is called, any errors that are
+         * thrown will be routed to the domain's `'error'` event.
+         *
+         * ```js
+         * const d = domain.create();
+         *
+         * function readSomeFile(filename, cb) {
+         *   fs.readFile(filename, 'utf8', d.bind((er, data) => {
+         *     // If this throws, it will also be passed to the domain.
+         *     return cb(er, data ? JSON.parse(data) : null);
+         *   }));
+         * }
+         *
+         * d.on('error', (er) => {
+         *   // An error occurred somewhere. If we throw it now, it will crash the program
+         *   // with the normal line number and stack message.
+         * });
+         * ```
+         * @param callback The callback function
+         * @return The bound function
+         */
+        bind<T extends Function>(callback: T): T;
+        /**
+         * This method is almost identical to {@link bind}. However, in
+         * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
+         *
+         * In this way, the common `if (err) return callback(err);` pattern can be replaced
+         * with a single error handler in a single place.
+         *
+         * ```js
+         * const d = domain.create();
+         *
+         * function readSomeFile(filename, cb) {
+         *   fs.readFile(filename, 'utf8', d.intercept((data) => {
+         *     // Note, the first argument is never passed to the
+         *     // callback since it is assumed to be the 'Error' argument
+         *     // and thus intercepted by the domain.
+         *
+         *     // If this throws, it will also be passed to the domain
+         *     // so the error-handling logic can be moved to the 'error'
+         *     // event on the domain instead of being repeated throughout
+         *     // the program.
+         *     return cb(null, JSON.parse(data));
+         *   }));
+         * }
+         *
+         * d.on('error', (er) => {
+         *   // An error occurred somewhere. If we throw it now, it will crash the program
+         *   // with the normal line number and stack message.
+         * });
+         * ```
+         * @param callback The callback function
+         * @return The intercepted function
+         */
+        intercept<T extends Function>(callback: T): T;
+    }
+    function create(): Domain;
+}
+declare module "domain" {
+    export * from "node:domain";
+}

+ 1011 - 0
node_modules/@types/node/events.d.ts

@@ -0,0 +1,1011 @@
+declare module "node:events" {
+    import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
+    // #region Event map helpers
+    type EventMap<T> = Record<keyof T, any[]>;
+    type IfEventMap<Events extends EventMap<Events>, True, False> = {} extends Events ? False : True;
+    type Args<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
+        Events,
+        EventName extends keyof Events ? Events[EventName]
+            : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName]
+            : any[],
+        any[]
+    >;
+    type EventNames<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
+        Events,
+        EventName | (keyof Events & (string | symbol)) | keyof EventEmitterEventMap,
+        string | symbol
+    >;
+    type Listener<Events extends EventMap<Events>, EventName extends string | symbol> = IfEventMap<
+        Events,
+        (
+            ...args: EventName extends keyof Events ? Events[EventName]
+                : EventName extends keyof EventEmitterEventMap ? EventEmitterEventMap[EventName]
+                : any[]
+        ) => void,
+        (...args: any[]) => void
+    >;
+    interface EventEmitterEventMap {
+        newListener: [eventName: string | symbol, listener: (...args: any[]) => void];
+        removeListener: [eventName: string | symbol, listener: (...args: any[]) => void];
+    }
+    // #endregion
+    interface EventEmitterOptions {
+        /**
+         * It enables
+         * [automatic capturing of promise rejection](https://nodejs.org/docs/latest-v25.x/api/events.html#capture-rejections-of-promises).
+         * @default false
+         */
+        captureRejections?: boolean | undefined;
+    }
+    /**
+     * The `EventEmitter` class is defined and exposed by the `node:events` module:
+     *
+     * ```js
+     * import { EventEmitter } from 'node:events';
+     * ```
+     *
+     * All `EventEmitter`s emit the event `'newListener'` when new listeners are
+     * added and `'removeListener'` when existing listeners are removed.
+     *
+     * It supports the following option:
+     * @since v0.1.26
+     */
+    class EventEmitter<T extends EventMap<T> = any> {
+        constructor(options?: EventEmitterOptions);
+    }
+    interface EventEmitter<T extends EventMap<T> = any> extends NodeJS.EventEmitter<T> {}
+    global {
+        namespace NodeJS {
+            interface EventEmitter<T extends EventMap<T> = any> {
+                /**
+                 * The `Symbol.for('nodejs.rejection')` method is called in case a
+                 * promise rejection happens when emitting an event and
+                 * `captureRejections` is enabled on the emitter.
+                 * It is possible to use `events.captureRejectionSymbol` in
+                 * place of `Symbol.for('nodejs.rejection')`.
+                 *
+                 * ```js
+                 * import { EventEmitter, captureRejectionSymbol } from 'node:events';
+                 *
+                 * class MyClass extends EventEmitter {
+                 *   constructor() {
+                 *     super({ captureRejections: true });
+                 *   }
+                 *
+                 *   [captureRejectionSymbol](err, event, ...args) {
+                 *     console.log('rejection happened for', event, 'with', err, ...args);
+                 *     this.destroy(err);
+                 *   }
+                 *
+                 *   destroy(err) {
+                 *     // Tear the resource down here.
+                 *   }
+                 * }
+                 * ```
+                 * @since v13.4.0, v12.16.0
+                 */
+                [EventEmitter.captureRejectionSymbol]?(error: Error, event: string | symbol, ...args: any[]): void;
+                /**
+                 * Alias for `emitter.on(eventName, listener)`.
+                 * @since v0.1.26
+                 */
+                addListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * Synchronously calls each of the listeners registered for the event named
+                 * `eventName`, in the order they were registered, passing the supplied arguments
+                 * to each.
+                 *
+                 * Returns `true` if the event had listeners, `false` otherwise.
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * const myEmitter = new EventEmitter();
+                 *
+                 * // First listener
+                 * myEmitter.on('event', function firstListener() {
+                 *   console.log('Helloooo! first listener');
+                 * });
+                 * // Second listener
+                 * myEmitter.on('event', function secondListener(arg1, arg2) {
+                 *   console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
+                 * });
+                 * // Third listener
+                 * myEmitter.on('event', function thirdListener(...args) {
+                 *   const parameters = args.join(', ');
+                 *   console.log(`event with parameters ${parameters} in third listener`);
+                 * });
+                 *
+                 * console.log(myEmitter.listeners('event'));
+                 *
+                 * myEmitter.emit('event', 1, 2, 3, 4, 5);
+                 *
+                 * // Prints:
+                 * // [
+                 * //   [Function: firstListener],
+                 * //   [Function: secondListener],
+                 * //   [Function: thirdListener]
+                 * // ]
+                 * // Helloooo! first listener
+                 * // event with parameters 1, 2 in second listener
+                 * // event with parameters 1, 2, 3, 4, 5 in third listener
+                 * ```
+                 * @since v0.1.26
+                 */
+                emit<E extends string | symbol>(eventName: EventNames<T, E>, ...args: Args<T, E>): boolean;
+                /**
+                 * Returns an array listing the events for which the emitter has registered
+                 * listeners.
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 *
+                 * const myEE = new EventEmitter();
+                 * myEE.on('foo', () => {});
+                 * myEE.on('bar', () => {});
+                 *
+                 * const sym = Symbol('symbol');
+                 * myEE.on(sym, () => {});
+                 *
+                 * console.log(myEE.eventNames());
+                 * // Prints: [ 'foo', 'bar', Symbol(symbol) ]
+                 * ```
+                 * @since v6.0.0
+                 */
+                eventNames(): (string | symbol)[];
+                /**
+                 * Returns the current max listener value for the `EventEmitter` which is either
+                 * set by `emitter.setMaxListeners(n)` or defaults to
+                 * `events.defaultMaxListeners`.
+                 * @since v1.0.0
+                 */
+                getMaxListeners(): number;
+                /**
+                 * Returns the number of listeners listening for the event named `eventName`.
+                 * If `listener` is provided, it will return how many times the listener is found
+                 * in the list of the listeners of the event.
+                 * @since v3.2.0
+                 * @param eventName The name of the event being listened for
+                 * @param listener The event handler function
+                 */
+                listenerCount<E extends string | symbol>(
+                    eventName: EventNames<T, E>,
+                    listener?: Listener<T, E>,
+                ): number;
+                /**
+                 * Returns a copy of the array of listeners for the event named `eventName`.
+                 *
+                 * ```js
+                 * server.on('connection', (stream) => {
+                 *   console.log('someone connected!');
+                 * });
+                 * console.log(util.inspect(server.listeners('connection')));
+                 * // Prints: [ [Function] ]
+                 * ```
+                 * @since v0.1.26
+                 */
+                listeners<E extends string | symbol>(eventName: EventNames<T, E>): Listener<T, E>[];
+                /**
+                 * Alias for `emitter.removeListener()`.
+                 * @since v10.0.0
+                 */
+                off<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * Adds the `listener` function to the end of the listeners array for the
+                 * event named `eventName`. No checks are made to see if the `listener` has
+                 * already been added. Multiple calls passing the same combination of `eventName`
+                 * and `listener` will result in the `listener` being added, and called, multiple
+                 * times.
+                 *
+                 * ```js
+                 * server.on('connection', (stream) => {
+                 *   console.log('someone connected!');
+                 * });
+                 * ```
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 *
+                 * By default, event listeners are invoked in the order they are added. The
+                 * `emitter.prependListener()` method can be used as an alternative to add the
+                 * event listener to the beginning of the listeners array.
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * const myEE = new EventEmitter();
+                 * myEE.on('foo', () => console.log('a'));
+                 * myEE.prependListener('foo', () => console.log('b'));
+                 * myEE.emit('foo');
+                 * // Prints:
+                 * //   b
+                 * //   a
+                 * ```
+                 * @since v0.1.101
+                 * @param eventName The name of the event.
+                 * @param listener The callback function
+                 */
+                on<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * Adds a **one-time** `listener` function for the event named `eventName`. The
+                 * next time `eventName` is triggered, this listener is removed and then invoked.
+                 *
+                 * ```js
+                 * server.once('connection', (stream) => {
+                 *   console.log('Ah, we have our first user!');
+                 * });
+                 * ```
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 *
+                 * By default, event listeners are invoked in the order they are added. The
+                 * `emitter.prependOnceListener()` method can be used as an alternative to add the
+                 * event listener to the beginning of the listeners array.
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * const myEE = new EventEmitter();
+                 * myEE.once('foo', () => console.log('a'));
+                 * myEE.prependOnceListener('foo', () => console.log('b'));
+                 * myEE.emit('foo');
+                 * // Prints:
+                 * //   b
+                 * //   a
+                 * ```
+                 * @since v0.3.0
+                 * @param eventName The name of the event.
+                 * @param listener The callback function
+                 */
+                once<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * Adds the `listener` function to the _beginning_ of the listeners array for the
+                 * event named `eventName`. No checks are made to see if the `listener` has
+                 * already been added. Multiple calls passing the same combination of `eventName`
+                 * and `listener` will result in the `listener` being added, and called, multiple
+                 * times.
+                 *
+                 * ```js
+                 * server.prependListener('connection', (stream) => {
+                 *   console.log('someone connected!');
+                 * });
+                 * ```
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 * @since v6.0.0
+                 * @param eventName The name of the event.
+                 * @param listener The callback function
+                 */
+                prependListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * Adds a **one-time** `listener` function for the event named `eventName` to the
+                 * _beginning_ of the listeners array. The next time `eventName` is triggered, this
+                 * listener is removed, and then invoked.
+                 *
+                 * ```js
+                 * server.prependOnceListener('connection', (stream) => {
+                 *   console.log('Ah, we have our first user!');
+                 * });
+                 * ```
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 * @since v6.0.0
+                 * @param eventName The name of the event.
+                 * @param listener The callback function
+                 */
+                prependOnceListener<E extends string | symbol>(
+                    eventName: EventNames<T, E>,
+                    listener: Listener<T, E>,
+                ): this;
+                /**
+                 * Returns a copy of the array of listeners for the event named `eventName`,
+                 * including any wrappers (such as those created by `.once()`).
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * const emitter = new EventEmitter();
+                 * emitter.once('log', () => console.log('log once'));
+                 *
+                 * // Returns a new Array with a function `onceWrapper` which has a property
+                 * // `listener` which contains the original listener bound above
+                 * const listeners = emitter.rawListeners('log');
+                 * const logFnWrapper = listeners[0];
+                 *
+                 * // Logs "log once" to the console and does not unbind the `once` event
+                 * logFnWrapper.listener();
+                 *
+                 * // Logs "log once" to the console and removes the listener
+                 * logFnWrapper();
+                 *
+                 * emitter.on('log', () => console.log('log persistently'));
+                 * // Will return a new Array with a single function bound by `.on()` above
+                 * const newListeners = emitter.rawListeners('log');
+                 *
+                 * // Logs "log persistently" twice
+                 * newListeners[0]();
+                 * emitter.emit('log');
+                 * ```
+                 * @since v9.4.0
+                 */
+                rawListeners<E extends string | symbol>(eventName: EventNames<T, E>): Listener<T, E>[];
+                /**
+                 * Removes all listeners, or those of the specified `eventName`.
+                 *
+                 * It is bad practice to remove listeners added elsewhere in the code,
+                 * particularly when the `EventEmitter` instance was created by some other
+                 * component or module (e.g. sockets or file streams).
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 * @since v0.1.26
+                 */
+                // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+                removeAllListeners<E extends string | symbol>(eventName?: EventNames<T, E>): this;
+                /**
+                 * Removes the specified `listener` from the listener array for the event named
+                 * `eventName`.
+                 *
+                 * ```js
+                 * const callback = (stream) => {
+                 *   console.log('someone connected!');
+                 * };
+                 * server.on('connection', callback);
+                 * // ...
+                 * server.removeListener('connection', callback);
+                 * ```
+                 *
+                 * `removeListener()` will remove, at most, one instance of a listener from the
+                 * listener array. If any single listener has been added multiple times to the
+                 * listener array for the specified `eventName`, then `removeListener()` must be
+                 * called multiple times to remove each instance.
+                 *
+                 * Once an event is emitted, all listeners attached to it at the
+                 * time of emitting are called in order. This implies that any
+                 * `removeListener()` or `removeAllListeners()` calls _after_ emitting and
+                 * _before_ the last listener finishes execution will not remove them from
+                 * `emit()` in progress. Subsequent events behave as expected.
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * class MyEmitter extends EventEmitter {}
+                 * const myEmitter = new MyEmitter();
+                 *
+                 * const callbackA = () => {
+                 *   console.log('A');
+                 *   myEmitter.removeListener('event', callbackB);
+                 * };
+                 *
+                 * const callbackB = () => {
+                 *   console.log('B');
+                 * };
+                 *
+                 * myEmitter.on('event', callbackA);
+                 *
+                 * myEmitter.on('event', callbackB);
+                 *
+                 * // callbackA removes listener callbackB but it will still be called.
+                 * // Internal listener array at time of emit [callbackA, callbackB]
+                 * myEmitter.emit('event');
+                 * // Prints:
+                 * //   A
+                 * //   B
+                 *
+                 * // callbackB is now removed.
+                 * // Internal listener array [callbackA]
+                 * myEmitter.emit('event');
+                 * // Prints:
+                 * //   A
+                 * ```
+                 *
+                 * Because listeners are managed using an internal array, calling this will
+                 * change the position indexes of any listener registered _after_ the listener
+                 * being removed. This will not impact the order in which listeners are called,
+                 * but it means that any copies of the listener array as returned by
+                 * the `emitter.listeners()` method will need to be recreated.
+                 *
+                 * When a single function has been added as a handler multiple times for a single
+                 * event (as in the example below), `removeListener()` will remove the most
+                 * recently added instance. In the example the `once('ping')`
+                 * listener is removed:
+                 *
+                 * ```js
+                 * import { EventEmitter } from 'node:events';
+                 * const ee = new EventEmitter();
+                 *
+                 * function pong() {
+                 *   console.log('pong');
+                 * }
+                 *
+                 * ee.on('ping', pong);
+                 * ee.once('ping', pong);
+                 * ee.removeListener('ping', pong);
+                 *
+                 * ee.emit('ping');
+                 * ee.emit('ping');
+                 * ```
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 * @since v0.1.26
+                 */
+                removeListener<E extends string | symbol>(eventName: EventNames<T, E>, listener: Listener<T, E>): this;
+                /**
+                 * By default `EventEmitter`s will print a warning if more than `10` listeners are
+                 * added for a particular event. This is a useful default that helps finding
+                 * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
+                 * modified for this specific `EventEmitter` instance. The value can be set to
+                 * `Infinity` (or `0`) to indicate an unlimited number of listeners.
+                 *
+                 * Returns a reference to the `EventEmitter`, so that calls can be chained.
+                 * @since v0.3.5
+                 */
+                setMaxListeners(n: number): this;
+            }
+        }
+    }
+    namespace EventEmitter {
+        export { EventEmitter, EventEmitterEventMap, EventEmitterOptions };
+    }
+    namespace EventEmitter {
+        interface Abortable {
+            signal?: AbortSignal | undefined;
+        }
+        /**
+         * See how to write a custom [rejection handler](https://nodejs.org/docs/latest-v25.x/api/events.html#emittersymbolfornodejsrejectionerr-eventname-args).
+         * @since v13.4.0, v12.16.0
+         */
+        const captureRejectionSymbol: unique symbol;
+        /**
+         * Change the default `captureRejections` option on all new `EventEmitter` objects.
+         * @since v13.4.0, v12.16.0
+         */
+        let captureRejections: boolean;
+        /**
+         * By default, a maximum of `10` listeners can be registered for any single
+         * event. This limit can be changed for individual `EventEmitter` instances
+         * using the `emitter.setMaxListeners(n)` method. To change the default
+         * for _all_ `EventEmitter` instances, the `events.defaultMaxListeners`
+         * property can be used. If this value is not a positive number, a `RangeError`
+         * is thrown.
+         *
+         * Take caution when setting the `events.defaultMaxListeners` because the
+         * change affects _all_ `EventEmitter` instances, including those created before
+         * the change is made. However, calling `emitter.setMaxListeners(n)` still has
+         * precedence over `events.defaultMaxListeners`.
+         *
+         * This is not a hard limit. The `EventEmitter` instance will allow
+         * more listeners to be added but will output a trace warning to stderr indicating
+         * that a "possible EventEmitter memory leak" has been detected. For any single
+         * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`
+         * methods can be used to temporarily avoid this warning:
+         *
+         * `defaultMaxListeners` has no effect on `AbortSignal` instances. While it is
+         * still possible to use `emitter.setMaxListeners(n)` to set a warning limit
+         * for individual `AbortSignal` instances, per default `AbortSignal` instances will not warn.
+         *
+         * ```js
+         * import { EventEmitter } from 'node:events';
+         * const emitter = new EventEmitter();
+         * emitter.setMaxListeners(emitter.getMaxListeners() + 1);
+         * emitter.once('event', () => {
+         *   // do stuff
+         *   emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
+         * });
+         * ```
+         *
+         * The `--trace-warnings` command-line flag can be used to display the
+         * stack trace for such warnings.
+         *
+         * The emitted warning can be inspected with `process.on('warning')` and will
+         * have the additional `emitter`, `type`, and `count` properties, referring to
+         * the event emitter instance, the event's name and the number of attached
+         * listeners, respectively.
+         * Its `name` property is set to `'MaxListenersExceededWarning'`.
+         * @since v0.11.2
+         */
+        let defaultMaxListeners: number;
+        /**
+         * This symbol shall be used to install a listener for only monitoring `'error'`
+         * events. Listeners installed using this symbol are called before the regular
+         * `'error'` listeners are called.
+         *
+         * Installing a listener using this symbol does not change the behavior once an
+         * `'error'` event is emitted. Therefore, the process will still crash if no
+         * regular `'error'` listener is installed.
+         * @since v13.6.0, v12.17.0
+         */
+        const errorMonitor: unique symbol;
+        /**
+         * Listens once to the `abort` event on the provided `signal`.
+         *
+         * Listening to the `abort` event on abort signals is unsafe and may
+         * lead to resource leaks since another third party with the signal can
+         * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
+         * this since it would violate the web standard. Additionally, the original
+         * API makes it easy to forget to remove listeners.
+         *
+         * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
+         * two issues by listening to the event such that `stopImmediatePropagation` does
+         * not prevent the listener from running.
+         *
+         * Returns a disposable so that it may be unsubscribed from more easily.
+         *
+         * ```js
+         * import { addAbortListener } from 'node:events';
+         *
+         * function example(signal) {
+         *   let disposable;
+         *   try {
+         *     signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
+         *     disposable = addAbortListener(signal, (e) => {
+         *       // Do something when signal is aborted.
+         *     });
+         *   } finally {
+         *     disposable?.[Symbol.dispose]();
+         *   }
+         * }
+         * ```
+         * @since v20.5.0
+         * @return Disposable that removes the `abort` listener.
+         */
+        function addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
+        /**
+         * Returns a copy of the array of listeners for the event named `eventName`.
+         *
+         * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
+         * the emitter.
+         *
+         * For `EventTarget`s this is the only way to get the event listeners for the
+         * event target. This is useful for debugging and diagnostic purposes.
+         *
+         * ```js
+         * import { getEventListeners, EventEmitter } from 'node:events';
+         *
+         * {
+         *   const ee = new EventEmitter();
+         *   const listener = () => console.log('Events are fun');
+         *   ee.on('foo', listener);
+         *   console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
+         * }
+         * {
+         *   const et = new EventTarget();
+         *   const listener = () => console.log('Events are fun');
+         *   et.addEventListener('foo', listener);
+         *   console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
+         * }
+         * ```
+         * @since v15.2.0, v14.17.0
+         */
+        function getEventListeners(emitter: EventEmitter, name: string | symbol): ((...args: any[]) => void)[];
+        function getEventListeners(emitter: EventTarget, name: string): ((...args: any[]) => void)[];
+        /**
+         * Returns the currently set max amount of listeners.
+         *
+         * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
+         * the emitter.
+         *
+         * For `EventTarget`s this is the only way to get the max event listeners for the
+         * event target. If the number of event handlers on a single EventTarget exceeds
+         * the max set, the EventTarget will print a warning.
+         *
+         * ```js
+         * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
+         *
+         * {
+         *   const ee = new EventEmitter();
+         *   console.log(getMaxListeners(ee)); // 10
+         *   setMaxListeners(11, ee);
+         *   console.log(getMaxListeners(ee)); // 11
+         * }
+         * {
+         *   const et = new EventTarget();
+         *   console.log(getMaxListeners(et)); // 10
+         *   setMaxListeners(11, et);
+         *   console.log(getMaxListeners(et)); // 11
+         * }
+         * ```
+         * @since v19.9.0
+         */
+        function getMaxListeners(emitter: EventEmitter | EventTarget): number;
+        /**
+         * Returns the number of registered listeners for the event named `eventName`.
+         *
+         * For `EventEmitter`s this behaves exactly the same as calling `.listenerCount`
+         * on the emitter.
+         *
+         * For `EventTarget`s this is the only way to obtain the listener count. This can
+         * be useful for debugging and diagnostic purposes.
+         * @since v0.9.12
+         */
+        function listenerCount(emitter: EventEmitter, eventName: string | symbol): number;
+        function listenerCount(emitter: EventTarget, eventName: string): number;
+        interface OnOptions extends Abortable {
+            /**
+             * Names of events that will end the iteration.
+             */
+            close?: readonly string[] | undefined;
+            /**
+             * The high watermark. The emitter is paused every time the size of events
+             * being buffered is higher than it. Supported only on emitters implementing
+             * `pause()` and `resume()` methods.
+             * @default Number.MAX_SAFE_INTEGER
+             */
+            highWaterMark?: number | undefined;
+            /**
+             * The low watermark. The emitter is resumed every time the size of events
+             * being buffered is lower than it. Supported only on emitters implementing
+             * `pause()` and `resume()` methods.
+             * @default 1
+             */
+            lowWaterMark?: number | undefined;
+        }
+        /**
+         * ```js
+         * import { on, EventEmitter } from 'node:events';
+         * import process from 'node:process';
+         *
+         * const ee = new EventEmitter();
+         *
+         * // Emit later on
+         * process.nextTick(() => {
+         *   ee.emit('foo', 'bar');
+         *   ee.emit('foo', 42);
+         * });
+         *
+         * for await (const event of on(ee, 'foo')) {
+         *   // The execution of this inner block is synchronous and it
+         *   // processes one event at a time (even with await). Do not use
+         *   // if concurrent execution is required.
+         *   console.log(event); // prints ['bar'] [42]
+         * }
+         * // Unreachable here
+         * ```
+         *
+         * Returns an `AsyncIterator` that iterates `eventName` events. It will throw
+         * if the `EventEmitter` emits `'error'`. It removes all listeners when
+         * exiting the loop. The `value` returned by each iteration is an array
+         * composed of the emitted event arguments.
+         *
+         * An `AbortSignal` can be used to cancel waiting on events:
+         *
+         * ```js
+         * import { on, EventEmitter } from 'node:events';
+         * import process from 'node:process';
+         *
+         * const ac = new AbortController();
+         *
+         * (async () => {
+         *   const ee = new EventEmitter();
+         *
+         *   // Emit later on
+         *   process.nextTick(() => {
+         *     ee.emit('foo', 'bar');
+         *     ee.emit('foo', 42);
+         *   });
+         *
+         *   for await (const event of on(ee, 'foo', { signal: ac.signal })) {
+         *     // The execution of this inner block is synchronous and it
+         *     // processes one event at a time (even with await). Do not use
+         *     // if concurrent execution is required.
+         *     console.log(event); // prints ['bar'] [42]
+         *   }
+         *   // Unreachable here
+         * })();
+         *
+         * process.nextTick(() => ac.abort());
+         * ```
+         * @since v13.6.0, v12.16.0
+         * @returns `AsyncIterator` that iterates `eventName` events emitted by the `emitter`
+         */
+        function on(
+            emitter: EventEmitter,
+            eventName: string | symbol,
+            options?: OnOptions,
+        ): NodeJS.AsyncIterator<any[]>;
+        function on(
+            emitter: EventTarget,
+            eventName: string,
+            options?: OnOptions,
+        ): NodeJS.AsyncIterator<any[]>;
+        interface OnceOptions extends Abortable {}
+        /**
+         * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
+         * event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
+         * The `Promise` will resolve with an array of all the arguments emitted to the
+         * given event.
+         *
+         * This method is intentionally generic and works with the web platform
+         * [EventTarget][WHATWG-EventTarget] interface, which has no special
+         * `'error'` event semantics and does not listen to the `'error'` event.
+         *
+         * ```js
+         * import { once, EventEmitter } from 'node:events';
+         * import process from 'node:process';
+         *
+         * const ee = new EventEmitter();
+         *
+         * process.nextTick(() => {
+         *   ee.emit('myevent', 42);
+         * });
+         *
+         * const [value] = await once(ee, 'myevent');
+         * console.log(value);
+         *
+         * const err = new Error('kaboom');
+         * process.nextTick(() => {
+         *   ee.emit('error', err);
+         * });
+         *
+         * try {
+         *   await once(ee, 'myevent');
+         * } catch (err) {
+         *   console.error('error happened', err);
+         * }
+         * ```
+         *
+         * The special handling of the `'error'` event is only used when `events.once()`
+         * is used to wait for another event. If `events.once()` is used to wait for the
+         * '`error'` event itself, then it is treated as any other kind of event without
+         * special handling:
+         *
+         * ```js
+         * import { EventEmitter, once } from 'node:events';
+         *
+         * const ee = new EventEmitter();
+         *
+         * once(ee, 'error')
+         *   .then(([err]) => console.log('ok', err.message))
+         *   .catch((err) => console.error('error', err.message));
+         *
+         * ee.emit('error', new Error('boom'));
+         *
+         * // Prints: ok boom
+         * ```
+         *
+         * An `AbortSignal` can be used to cancel waiting for the event:
+         *
+         * ```js
+         * import { EventEmitter, once } from 'node:events';
+         *
+         * const ee = new EventEmitter();
+         * const ac = new AbortController();
+         *
+         * async function foo(emitter, event, signal) {
+         *   try {
+         *     await once(emitter, event, { signal });
+         *     console.log('event emitted!');
+         *   } catch (error) {
+         *     if (error.name === 'AbortError') {
+         *       console.error('Waiting for the event was canceled!');
+         *     } else {
+         *       console.error('There was an error', error.message);
+         *     }
+         *   }
+         * }
+         *
+         * foo(ee, 'foo', ac.signal);
+         * ac.abort(); // Prints: Waiting for the event was canceled!
+         * ```
+         * @since v11.13.0, v10.16.0
+         */
+        function once(
+            emitter: EventEmitter,
+            eventName: string | symbol,
+            options?: OnceOptions,
+        ): Promise<any[]>;
+        function once(emitter: EventTarget, eventName: string, options?: OnceOptions): Promise<any[]>;
+        /**
+         * ```js
+         * import { setMaxListeners, EventEmitter } from 'node:events';
+         *
+         * const target = new EventTarget();
+         * const emitter = new EventEmitter();
+         *
+         * setMaxListeners(5, target, emitter);
+         * ```
+         * @since v15.4.0
+         * @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
+         * @param eventTargets Zero or more `EventTarget`
+         * or `EventEmitter` instances. If none are specified, `n` is set as the default
+         * max for all newly created `EventTarget` and `EventEmitter` objects.
+         * objects.
+         */
+        function setMaxListeners(n: number, ...eventTargets: ReadonlyArray<EventEmitter | EventTarget>): void;
+        /**
+         * This is the interface from which event-emitting Node.js APIs inherit in the types package.
+         * **It is not intended for consumer use.**
+         *
+         * It provides event-mapped definitions similar to EventEmitter, except that its signatures
+         * are deliberately permissive: they provide type _hinting_, but not rigid type-checking,
+         * for compatibility reasons.
+         *
+         * Classes that inherit directly from EventEmitter in JavaScript can inherit directly from
+         * this interface in the type definitions. Classes that are more than one inheritance level
+         * away from EventEmitter (eg. `net.Socket` > `stream.Duplex` > `EventEmitter`) must instead
+         * copy these method definitions into the derived class. Search "#region InternalEventEmitter"
+         * for examples.
+         * @internal
+         */
+        interface InternalEventEmitter<T extends EventMap<T>> extends EventEmitter {
+            addListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            emit<E extends keyof T>(eventName: E, ...args: T[E]): boolean;
+            emit(eventName: string | symbol, ...args: any[]): boolean;
+            listenerCount<E extends keyof T>(eventName: E, listener?: (...args: T[E]) => void): number;
+            listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+            listeners<E extends keyof T>(eventName: E): ((...args: T[E]) => void)[];
+            listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            off<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            on<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            once<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependOnceListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            rawListeners<E extends keyof T>(eventName: E): ((...args: T[E]) => void)[];
+            rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+            removeAllListeners<E extends keyof T>(eventName?: E): this;
+            removeAllListeners(eventName?: string | symbol): this;
+            removeListener<E extends keyof T>(eventName: E, listener: (...args: T[E]) => void): this;
+            removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        }
+        interface EventEmitterReferencingAsyncResource extends AsyncResource {
+            readonly eventEmitter: EventEmitterAsyncResource;
+        }
+        interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
+            /**
+             * The type of async event.
+             * @default new.target.name
+             */
+            name?: string | undefined;
+        }
+        /**
+         * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that
+         * require manual async tracking. Specifically, all events emitted by instances
+         * of `events.EventEmitterAsyncResource` will run within its [async context](https://nodejs.org/docs/latest-v25.x/api/async_context.html).
+         *
+         * ```js
+         * import { EventEmitterAsyncResource, EventEmitter } from 'node:events';
+         * import { notStrictEqual, strictEqual } from 'node:assert';
+         * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks';
+         *
+         * // Async tracking tooling will identify this as 'Q'.
+         * const ee1 = new EventEmitterAsyncResource({ name: 'Q' });
+         *
+         * // 'foo' listeners will run in the EventEmitters async context.
+         * ee1.on('foo', () => {
+         *   strictEqual(executionAsyncId(), ee1.asyncId);
+         *   strictEqual(triggerAsyncId(), ee1.triggerAsyncId);
+         * });
+         *
+         * const ee2 = new EventEmitter();
+         *
+         * // 'foo' listeners on ordinary EventEmitters that do not track async
+         * // context, however, run in the same async context as the emit().
+         * ee2.on('foo', () => {
+         *   notStrictEqual(executionAsyncId(), ee2.asyncId);
+         *   notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId);
+         * });
+         *
+         * Promise.resolve().then(() => {
+         *   ee1.emit('foo');
+         *   ee2.emit('foo');
+         * });
+         * ```
+         *
+         * The `EventEmitterAsyncResource` class has the same methods and takes the
+         * same options as `EventEmitter` and `AsyncResource` themselves.
+         * @since v17.4.0, v16.14.0
+         */
+        class EventEmitterAsyncResource extends EventEmitter {
+            constructor(options?: EventEmitterAsyncResourceOptions);
+            /**
+             * The unique `asyncId` assigned to the resource.
+             */
+            readonly asyncId: number;
+            /**
+             * The returned `AsyncResource` object has an additional `eventEmitter` property
+             * that provides a reference to this `EventEmitterAsyncResource`.
+             */
+            readonly asyncResource: EventEmitterReferencingAsyncResource;
+            /**
+             * Call all `destroy` hooks. This should only ever be called once. An error will
+             * be thrown if it is called more than once. This **must** be manually called. If
+             * the resource is left to be collected by the GC then the `destroy` hooks will
+             * never be called.
+             */
+            emitDestroy(): void;
+            /**
+             * The same `triggerAsyncId` that is passed to the
+             * `AsyncResource` constructor.
+             */
+            readonly triggerAsyncId: number;
+        }
+        /**
+         * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
+         * that emulates a subset of the `EventEmitter` API.
+         * @since v14.5.0
+         */
+        interface NodeEventTarget extends EventTarget {
+            /**
+             * Node.js-specific extension to the `EventTarget` class that emulates the
+             * equivalent `EventEmitter` API. The only difference between `addListener()` and
+             * `addEventListener()` is that `addListener()` will return a reference to the
+             * `EventTarget`.
+             * @since v14.5.0
+             */
+            addListener(type: string, listener: (arg: any) => void): this;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that dispatches the
+             * `arg` to the list of handlers for `type`.
+             * @since v15.2.0
+             * @returns `true` if event listeners registered for the `type` exist,
+             * otherwise `false`.
+             */
+            emit(type: string, arg: any): boolean;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that returns an array
+             * of event `type` names for which event listeners are registered.
+             * @since 14.5.0
+             */
+            eventNames(): string[];
+            /**
+             * Node.js-specific extension to the `EventTarget` class that returns the number
+             * of event listeners registered for the `type`.
+             * @since v14.5.0
+             */
+            listenerCount(type: string): number;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that sets the number
+             * of max event listeners as `n`.
+             * @since v14.5.0
+             */
+            setMaxListeners(n: number): void;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that returns the number
+             * of max event listeners.
+             * @since v14.5.0
+             */
+            getMaxListeners(): number;
+            /**
+             * Node.js-specific alias for `eventTarget.removeEventListener()`.
+             * @since v14.5.0
+             */
+            off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
+            /**
+             * Node.js-specific alias for `eventTarget.addEventListener()`.
+             * @since v14.5.0
+             */
+            on(type: string, listener: (arg: any) => void): this;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that adds a `once`
+             * listener for the given event `type`. This is equivalent to calling `on`
+             * with the `once` option set to `true`.
+             * @since v14.5.0
+             */
+            once(type: string, listener: (arg: any) => void): this;
+            /**
+             * Node.js-specific extension to the `EventTarget` class. If `type` is specified,
+             * removes all registered listeners for `type`, otherwise removes all registered
+             * listeners.
+             * @since v14.5.0
+             */
+            removeAllListeners(type?: string): this;
+            /**
+             * Node.js-specific extension to the `EventTarget` class that removes the
+             * `listener` for the given `type`. The only difference between `removeListener()`
+             * and `removeEventListener()` is that `removeListener()` will return a reference
+             * to the `EventTarget`.
+             * @since v14.5.0
+             */
+            removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
+        }
+        /** @internal */
+        type InternalEventTargetEventProperties<T> = {
+            [K in keyof T & string as `on${K}`]: ((ev: T[K]) => void) | null;
+        };
+    }
+    export = EventEmitter;
+}
+declare module "events" {
+    import events = require("node:events");
+    export = events;
+}

+ 4658 - 0
node_modules/@types/node/fs.d.ts

@@ -0,0 +1,4658 @@
+declare module "node:fs" {
+    import { NonSharedBuffer } from "node:buffer";
+    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+    import { FileHandle } from "node:fs/promises";
+    import * as stream from "node:stream";
+    import { URL } from "node:url";
+    /**
+     * Valid types for path values in "fs".
+     */
+    type PathLike = string | Buffer | URL;
+    type PathOrFileDescriptor = PathLike | number;
+    type TimeLike = string | number | Date;
+    type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
+    type BufferEncodingOption =
+        | "buffer"
+        | {
+            encoding: "buffer";
+        };
+    interface ObjectEncodingOptions {
+        encoding?: BufferEncoding | null | undefined;
+    }
+    type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null;
+    type OpenMode = number | string;
+    type Mode = number | string;
+    interface StatsBase<T> {
+        isFile(): boolean;
+        isDirectory(): boolean;
+        isBlockDevice(): boolean;
+        isCharacterDevice(): boolean;
+        isSymbolicLink(): boolean;
+        isFIFO(): boolean;
+        isSocket(): boolean;
+        dev: T;
+        ino: T;
+        mode: T;
+        nlink: T;
+        uid: T;
+        gid: T;
+        rdev: T;
+        size: T;
+        blksize: T;
+        blocks: T;
+        atimeMs: T;
+        mtimeMs: T;
+        ctimeMs: T;
+        birthtimeMs: T;
+        atime: Date;
+        mtime: Date;
+        ctime: Date;
+        birthtime: Date;
+    }
+    interface Stats extends StatsBase<number> {}
+    /**
+     * A `fs.Stats` object provides information about a file.
+     *
+     * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and
+     * their synchronous counterparts are of this type.
+     * If `bigint` in the `options` passed to those methods is true, the numeric values
+     * will be `bigint` instead of `number`, and the object will contain additional
+     * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword.
+     *
+     * ```console
+     * Stats {
+     *   dev: 2114,
+     *   ino: 48064969,
+     *   mode: 33188,
+     *   nlink: 1,
+     *   uid: 85,
+     *   gid: 100,
+     *   rdev: 0,
+     *   size: 527,
+     *   blksize: 4096,
+     *   blocks: 8,
+     *   atimeMs: 1318289051000.1,
+     *   mtimeMs: 1318289051000.1,
+     *   ctimeMs: 1318289051000.1,
+     *   birthtimeMs: 1318289051000.1,
+     *   atime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+     * ```
+     *
+     * `bigint` version:
+     *
+     * ```console
+     * BigIntStats {
+     *   dev: 2114n,
+     *   ino: 48064969n,
+     *   mode: 33188n,
+     *   nlink: 1n,
+     *   uid: 85n,
+     *   gid: 100n,
+     *   rdev: 0n,
+     *   size: 527n,
+     *   blksize: 4096n,
+     *   blocks: 8n,
+     *   atimeMs: 1318289051000n,
+     *   mtimeMs: 1318289051000n,
+     *   ctimeMs: 1318289051000n,
+     *   birthtimeMs: 1318289051000n,
+     *   atimeNs: 1318289051000000000n,
+     *   mtimeNs: 1318289051000000000n,
+     *   ctimeNs: 1318289051000000000n,
+     *   birthtimeNs: 1318289051000000000n,
+     *   atime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   mtime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   ctime: Mon, 10 Oct 2011 23:24:11 GMT,
+     *   birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
+     * ```
+     * @since v0.1.21
+     */
+    class Stats {
+        private constructor();
+    }
+    interface StatsFsBase<T> {
+        /** Type of file system. */
+        type: T;
+        /**  Optimal transfer block size. */
+        bsize: T;
+        /**  Total data blocks in file system. */
+        blocks: T;
+        /** Free blocks in file system. */
+        bfree: T;
+        /** Available blocks for unprivileged users */
+        bavail: T;
+        /** Total file nodes in file system. */
+        files: T;
+        /** Free file nodes in file system. */
+        ffree: T;
+    }
+    interface StatsFs extends StatsFsBase<number> {}
+    /**
+     * Provides information about a mounted file system.
+     *
+     * Objects returned from {@link statfs} and its synchronous counterpart are of
+     * this type. If `bigint` in the `options` passed to those methods is `true`, the
+     * numeric values will be `bigint` instead of `number`.
+     *
+     * ```console
+     * StatFs {
+     *   type: 1397114950,
+     *   bsize: 4096,
+     *   blocks: 121938943,
+     *   bfree: 61058895,
+     *   bavail: 61058895,
+     *   files: 999,
+     *   ffree: 1000000
+     * }
+     * ```
+     *
+     * `bigint` version:
+     *
+     * ```console
+     * StatFs {
+     *   type: 1397114950n,
+     *   bsize: 4096n,
+     *   blocks: 121938943n,
+     *   bfree: 61058895n,
+     *   bavail: 61058895n,
+     *   files: 999n,
+     *   ffree: 1000000n
+     * }
+     * ```
+     * @since v19.6.0, v18.15.0
+     */
+    class StatsFs {}
+    interface BigIntStatsFs extends StatsFsBase<bigint> {}
+    interface StatFsOptions {
+        bigint?: boolean | undefined;
+    }
+    /**
+     * A representation of a directory entry, which can be a file or a subdirectory
+     * within the directory, as returned by reading from an `fs.Dir`. The
+     * directory entry is a combination of the file name and file type pairs.
+     *
+     * Additionally, when {@link readdir} or {@link readdirSync} is called with
+     * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s.
+     * @since v10.10.0
+     */
+    class Dirent<Name extends string | Buffer = string> {
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a regular file.
+         * @since v10.10.0
+         */
+        isFile(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a file system
+         * directory.
+         * @since v10.10.0
+         */
+        isDirectory(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a block device.
+         * @since v10.10.0
+         */
+        isBlockDevice(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a character device.
+         * @since v10.10.0
+         */
+        isCharacterDevice(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a symbolic link.
+         * @since v10.10.0
+         */
+        isSymbolicLink(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a first-in-first-out
+         * (FIFO) pipe.
+         * @since v10.10.0
+         */
+        isFIFO(): boolean;
+        /**
+         * Returns `true` if the `fs.Dirent` object describes a socket.
+         * @since v10.10.0
+         */
+        isSocket(): boolean;
+        /**
+         * The file name that this `fs.Dirent` object refers to. The type of this
+         * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}.
+         * @since v10.10.0
+         */
+        name: Name;
+        /**
+         * The path to the parent directory of the file this `fs.Dirent` object refers to.
+         * @since v20.12.0, v18.20.0
+         */
+        parentPath: string;
+    }
+    /**
+     * A class representing a directory stream.
+     *
+     * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
+     *
+     * ```js
+     * import { opendir } from 'node:fs/promises';
+     *
+     * try {
+     *   const dir = await opendir('./');
+     *   for await (const dirent of dir)
+     *     console.log(dirent.name);
+     * } catch (err) {
+     *   console.error(err);
+     * }
+     * ```
+     *
+     * When using the async iterator, the `fs.Dir` object will be automatically
+     * closed after the iterator exits.
+     * @since v12.12.0
+     */
+    class Dir implements AsyncIterable<Dirent> {
+        /**
+         * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
+         * @since v12.12.0
+         */
+        readonly path: string;
+        /**
+         * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
+         */
+        [Symbol.asyncIterator](): NodeJS.AsyncIterator<Dirent>;
+        /**
+         * Asynchronously close the directory's underlying resource handle.
+         * Subsequent reads will result in errors.
+         *
+         * A promise is returned that will be fulfilled after the resource has been
+         * closed.
+         * @since v12.12.0
+         */
+        close(): Promise<void>;
+        close(cb: NoParamCallback): void;
+        /**
+         * Synchronously close the directory's underlying resource handle.
+         * Subsequent reads will result in errors.
+         * @since v12.12.0
+         */
+        closeSync(): void;
+        /**
+         * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`.
+         *
+         * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read.
+         *
+         * Directory entries returned by this function are in no particular order as
+         * provided by the operating system's underlying directory mechanisms.
+         * Entries added or removed while iterating over the directory might not be
+         * included in the iteration results.
+         * @since v12.12.0
+         * @return containing {fs.Dirent|null}
+         */
+        read(): Promise<Dirent | null>;
+        read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
+        /**
+         * Synchronously read the next directory entry as an `fs.Dirent`. See the
+         * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.
+         *
+         * If there are no more directory entries to read, `null` will be returned.
+         *
+         * Directory entries returned by this function are in no particular order as
+         * provided by the operating system's underlying directory mechanisms.
+         * Entries added or removed while iterating over the directory might not be
+         * included in the iteration results.
+         * @since v12.12.0
+         */
+        readSync(): Dirent | null;
+        /**
+         * Calls `dir.close()` if the directory handle is open, and returns a promise that
+         * fulfills when disposal is complete.
+         * @since v24.1.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+        /**
+         * Calls `dir.closeSync()` if the directory handle is open, and returns
+         * `undefined`.
+         * @since v24.1.0
+         */
+        [Symbol.dispose](): void;
+    }
+    /**
+     * Class: fs.StatWatcher
+     * @since v14.3.0, v12.20.0
+     * Extends `EventEmitter`
+     * A successful call to {@link watchFile} method will return a new fs.StatWatcher object.
+     */
+    interface StatWatcher extends EventEmitter {
+        /**
+         * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
+         * no effect.
+         *
+         * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
+         * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+         * called previously.
+         * @since v14.3.0, v12.20.0
+         */
+        ref(): this;
+        /**
+         * When called, the active `fs.StatWatcher` object will not require the Node.js
+         * event loop to remain active. If there is no other activity keeping the
+         * event loop running, the process may exit before the `fs.StatWatcher` object's
+         * callback is invoked. Calling `watcher.unref()` multiple times will have
+         * no effect.
+         * @since v14.3.0, v12.20.0
+         */
+        unref(): this;
+    }
+    interface FSWatcherEventMap {
+        "change": [eventType: string, filename: string | NonSharedBuffer];
+        "close": [];
+        "error": [error: Error];
+    }
+    interface FSWatcher extends InternalEventEmitter<FSWatcherEventMap> {
+        /**
+         * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable.
+         * @since v0.5.8
+         */
+        close(): void;
+        /**
+         * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have
+         * no effect.
+         *
+         * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally
+         * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
+         * called previously.
+         * @since v14.3.0, v12.20.0
+         */
+        ref(): this;
+        /**
+         * When called, the active `fs.FSWatcher` object will not require the Node.js
+         * event loop to remain active. If there is no other activity keeping the
+         * event loop running, the process may exit before the `fs.FSWatcher` object's
+         * callback is invoked. Calling `watcher.unref()` multiple times will have
+         * no effect.
+         * @since v14.3.0, v12.20.0
+         */
+        unref(): this;
+    }
+    interface ReadStreamEventMap extends stream.ReadableEventMap {
+        "close": [];
+        "data": [chunk: string | NonSharedBuffer];
+        "open": [fd: number];
+        "ready": [];
+    }
+    /**
+     * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function.
+     * @since v0.1.93
+     */
+    class ReadStream extends stream.Readable {
+        close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+        /**
+         * The number of bytes that have been read so far.
+         * @since v6.4.0
+         */
+        bytesRead: number;
+        /**
+         * The path to the file the stream is reading from as specified in the first
+         * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a
+         * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`.
+         * @since v0.1.93
+         */
+        path: string | Buffer;
+        /**
+         * This property is `true` if the underlying file has not been opened yet,
+         * i.e. before the `'ready'` event is emitted.
+         * @since v11.2.0, v10.16.0
+         */
+        pending: boolean;
+        // #region InternalEventEmitter
+        addListener<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener: (...args: ReadStreamEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ReadStreamEventMap>(eventName: E, ...args: ReadStreamEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener?: (...args: ReadStreamEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ReadStreamEventMap>(eventName: E, listener: (...args: ReadStreamEventMap[E]) => void): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener: (...args: ReadStreamEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener: (...args: ReadStreamEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener: (...args: ReadStreamEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ReadStreamEventMap>(eventName: E): ((...args: ReadStreamEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ReadStreamEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ReadStreamEventMap>(
+            eventName: E,
+            listener: (...args: ReadStreamEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface Utf8StreamOptions {
+        /**
+         * Appends writes to dest file instead of truncating it.
+         * @default true
+         */
+        append?: boolean | undefined;
+        /**
+         * Which type of data you can send to the write
+         * function, supported values are `'utf8'` or `'buffer'`.
+         * @default 'utf8'
+         */
+        contentMode?: "utf8" | "buffer" | undefined;
+        /**
+         * A path to a file to be written to (mode controlled by the
+         * append option).
+         */
+        dest?: string | undefined;
+        /**
+         * A file descriptor, something that is returned by `fs.open()`
+         * or `fs.openSync()`.
+         */
+        fd?: number | undefined;
+        /**
+         * An object that has the same API as the `fs` module, useful
+         * for mocking, testing, or customizing the behavior of the stream.
+         */
+        fs?: object | undefined;
+        /**
+         * Perform a `fs.fsyncSync()` every time a write is
+         * completed.
+         */
+        fsync?: boolean | undefined;
+        /**
+         * The maximum length of the internal buffer. If a write
+         * operation would cause the buffer to exceed `maxLength`, the data written is
+         * dropped and a drop event is emitted with the dropped data
+         */
+        maxLength?: number | undefined;
+        /**
+         * The maximum number of bytes that can be written;
+         * @default 16384
+         */
+        maxWrite?: number | undefined;
+        /**
+         * The minimum length of the internal buffer that is
+         * required to be full before flushing.
+         */
+        minLength?: number | undefined;
+        /**
+         * Ensure directory for `dest` file exists when true.
+         * @default false
+         */
+        mkdir?: boolean | undefined;
+        /**
+         * Specify the creating file mode (see `fs.open()`).
+         */
+        mode?: number | string | undefined;
+        /**
+         * Calls flush every `periodicFlush` milliseconds.
+         */
+        periodicFlush?: number | undefined;
+        /**
+         * A function that will be called when `write()`,
+         * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error.
+         * If the return value is `true` the operation will be retried, otherwise it
+         * will bubble the error. The `err` is the error that caused this function to
+         * be called, `writeBufferLen` is the length of the buffer that was written,
+         * and `remainingBufferLen` is the length of the remaining buffer that the
+         * stream did not try to write.
+         */
+        retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined;
+        /**
+         * Perform writes synchronously.
+         */
+        sync?: boolean | undefined;
+    }
+    interface Utf8StreamEventMap {
+        "close": [];
+        "drain": [];
+        "drop": [data: string | Buffer];
+        "error": [error: Error];
+        "finish": [];
+        "ready": [];
+        "write": [n: number];
+    }
+    /**
+     * An optimized UTF-8 stream writer that allows for flushing all the internal
+     * buffering on demand. It handles `EAGAIN` errors correctly, allowing for
+     * customization, for example, by dropping content if the disk is busy.
+     * @since v24.6.0
+     * @experimental
+     */
+    class Utf8Stream implements EventEmitter {
+        constructor(options: Utf8StreamOptions);
+        /**
+         * Whether the stream is appending to the file or truncating it.
+         */
+        readonly append: boolean;
+        /**
+         * The type of data that can be written to the stream. Supported
+         * values are `'utf8'` or `'buffer'`.
+         * @default 'utf8'
+         */
+        readonly contentMode: "utf8" | "buffer";
+        /**
+         * Close the stream immediately, without flushing the internal buffer.
+         */
+        destroy(): void;
+        /**
+         * Close the stream gracefully, flushing the internal buffer before closing.
+         */
+        end(): void;
+        /**
+         * The file descriptor that is being written to.
+         */
+        readonly fd: number;
+        /**
+         * The file that is being written to.
+         */
+        readonly file: string;
+        /**
+         * Writes the current buffer to the file if a write was not in progress. Do
+         * nothing if `minLength` is zero or if it is already writing.
+         */
+        flush(callback: (err: Error | null) => void): void;
+        /**
+         * Flushes the buffered data synchronously. This is a costly operation.
+         */
+        flushSync(): void;
+        /**
+         * Whether the stream is performing a `fs.fsyncSync()` after every
+         * write operation.
+         */
+        readonly fsync: boolean;
+        /**
+         * The maximum length of the internal buffer. If a write
+         * operation would cause the buffer to exceed `maxLength`, the data written is
+         * dropped and a drop event is emitted with the dropped data.
+         */
+        readonly maxLength: number;
+        /**
+         * The minimum length of the internal buffer that is required to be
+         * full before flushing.
+         */
+        readonly minLength: number;
+        /**
+         * Whether the stream should ensure that the directory for the
+         * `dest` file exists. If `true`, it will create the directory if it does not
+         * exist.
+         * @default false
+         */
+        readonly mkdir: boolean;
+        /**
+         * The mode of the file that is being written to.
+         */
+        readonly mode: number | string;
+        /**
+         * The number of milliseconds between flushes. If set to `0`, no
+         * periodic flushes will be performed.
+         */
+        readonly periodicFlush: number;
+        /**
+         * Reopen the file in place, useful for log rotation.
+         * @param file A path to a file to be written to (mode
+         * controlled by the append option).
+         */
+        reopen(file: PathLike): void;
+        /**
+         * Whether the stream is writing synchronously or asynchronously.
+         */
+        readonly sync: boolean;
+        /**
+         * When the `options.contentMode` is set to `'utf8'` when the stream is created,
+         * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`,
+         * the `data` argument must be a `Buffer`.
+         * @param data The data to write.
+         */
+        write(data: string | Buffer): boolean;
+        /**
+         * Whether the stream is currently writing data to the file.
+         */
+        readonly writing: boolean;
+        /**
+         * Calls `utf8Stream.destroy()`.
+         */
+        [Symbol.dispose](): void;
+    }
+    interface Utf8Stream extends InternalEventEmitter<Utf8StreamEventMap> {}
+    interface WriteStreamEventMap extends stream.WritableEventMap {
+        "close": [];
+        "open": [fd: number];
+        "ready": [];
+    }
+    /**
+     * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function.
+     * @since v0.1.93
+     */
+    class WriteStream extends stream.Writable {
+        /**
+         * Closes `writeStream`. Optionally accepts a
+         * callback that will be executed once the `writeStream`is closed.
+         * @since v0.9.4
+         */
+        close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
+        /**
+         * The number of bytes written so far. Does not include data that is still queued
+         * for writing.
+         * @since v0.4.7
+         */
+        bytesWritten: number;
+        /**
+         * The path to the file the stream is writing to as specified in the first
+         * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a
+         * `Buffer`.
+         * @since v0.1.93
+         */
+        path: string | Buffer;
+        /**
+         * This property is `true` if the underlying file has not been opened yet,
+         * i.e. before the `'ready'` event is emitted.
+         * @since v11.2.0
+         */
+        pending: boolean;
+        // #region InternalEventEmitter
+        addListener<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof WriteStreamEventMap>(eventName: E, ...args: WriteStreamEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener?: (...args: WriteStreamEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof WriteStreamEventMap>(eventName: E): ((...args: WriteStreamEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof WriteStreamEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof WriteStreamEventMap>(
+            eventName: E,
+            listener: (...args: WriteStreamEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    /**
+     * Asynchronously rename file at `oldPath` to the pathname provided
+     * as `newPath`. In the case that `newPath` already exists, it will
+     * be overwritten. If there is a directory at `newPath`, an error will
+     * be raised instead. No arguments other than a possible exception are
+     * given to the completion callback.
+     *
+     * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
+     *
+     * ```js
+     * import { rename } from 'node:fs';
+     *
+     * rename('oldFile.txt', 'newFile.txt', (err) => {
+     *   if (err) throw err;
+     *   console.log('Rename complete!');
+     * });
+     * ```
+     * @since v0.0.2
+     */
+    function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+    namespace rename {
+        /**
+         * Asynchronous rename(2) - Change the name or location of a file or directory.
+         * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         */
+        function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
+    }
+    /**
+     * Renames the file from `oldPath` to `newPath`. Returns `undefined`.
+     *
+     * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details.
+     * @since v0.1.21
+     */
+    function renameSync(oldPath: PathLike, newPath: PathLike): void;
+    /**
+     * Truncates the file. No arguments other than a possible exception are
+     * given to the completion callback. A file descriptor can also be passed as the
+     * first argument. In this case, `fs.ftruncate()` is called.
+     *
+     * ```js
+     * import { truncate } from 'node:fs';
+     * // Assuming that 'path/file.txt' is a regular file.
+     * truncate('path/file.txt', (err) => {
+     *   if (err) throw err;
+     *   console.log('path/file.txt was truncated');
+     * });
+     * ```
+     *
+     * Passing a file descriptor is deprecated and may result in an error being thrown
+     * in the future.
+     *
+     * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details.
+     * @since v0.8.6
+     * @param [len=0]
+     */
+    function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void;
+    /**
+     * Asynchronous truncate(2) - Truncate a file to a specified length.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function truncate(path: PathLike, callback: NoParamCallback): void;
+    namespace truncate {
+        /**
+         * Asynchronous truncate(2) - Truncate a file to a specified length.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param len If not specified, defaults to `0`.
+         */
+        function __promisify__(path: PathLike, len?: number): Promise<void>;
+    }
+    /**
+     * Truncates the file. Returns `undefined`. A file descriptor can also be
+     * passed as the first argument. In this case, `fs.ftruncateSync()` is called.
+     *
+     * Passing a file descriptor is deprecated and may result in an error being thrown
+     * in the future.
+     * @since v0.8.6
+     * @param [len=0]
+     */
+    function truncateSync(path: PathLike, len?: number): void;
+    /**
+     * Truncates the file descriptor. No arguments other than a possible exception are
+     * given to the completion callback.
+     *
+     * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail.
+     *
+     * If the file referred to by the file descriptor was larger than `len` bytes, only
+     * the first `len` bytes will be retained in the file.
+     *
+     * For example, the following program retains only the first four bytes of the
+     * file:
+     *
+     * ```js
+     * import { open, close, ftruncate } from 'node:fs';
+     *
+     * function closeFd(fd) {
+     *   close(fd, (err) => {
+     *     if (err) throw err;
+     *   });
+     * }
+     *
+     * open('temp.txt', 'r+', (err, fd) => {
+     *   if (err) throw err;
+     *
+     *   try {
+     *     ftruncate(fd, 4, (err) => {
+     *       closeFd(fd);
+     *       if (err) throw err;
+     *     });
+     *   } catch (err) {
+     *     closeFd(fd);
+     *     if (err) throw err;
+     *   }
+     * });
+     * ```
+     *
+     * If the file previously was shorter than `len` bytes, it is extended, and the
+     * extended part is filled with null bytes (`'\0'`):
+     *
+     * If `len` is negative then `0` will be used.
+     * @since v0.8.6
+     * @param [len=0]
+     */
+    function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void;
+    /**
+     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+     * @param fd A file descriptor.
+     */
+    function ftruncate(fd: number, callback: NoParamCallback): void;
+    namespace ftruncate {
+        /**
+         * Asynchronous ftruncate(2) - Truncate a file to a specified length.
+         * @param fd A file descriptor.
+         * @param len If not specified, defaults to `0`.
+         */
+        function __promisify__(fd: number, len?: number): Promise<void>;
+    }
+    /**
+     * Truncates the file descriptor. Returns `undefined`.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link ftruncate}.
+     * @since v0.8.6
+     * @param [len=0]
+     */
+    function ftruncateSync(fd: number, len?: number): void;
+    /**
+     * Asynchronously changes owner and group of a file. No arguments other than a
+     * possible exception are given to the completion callback.
+     *
+     * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+     * @since v0.1.97
+     */
+    function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+    namespace chown {
+        /**
+         * Asynchronous chown(2) - Change ownership of a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+    }
+    /**
+     * Synchronously changes owner and group of a file. Returns `undefined`.
+     * This is the synchronous version of {@link chown}.
+     *
+     * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail.
+     * @since v0.1.97
+     */
+    function chownSync(path: PathLike, uid: number, gid: number): void;
+    /**
+     * Sets the owner of the file. No arguments other than a possible exception are
+     * given to the completion callback.
+     *
+     * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+     * @since v0.4.7
+     */
+    function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
+    namespace fchown {
+        /**
+         * Asynchronous fchown(2) - Change ownership of a file.
+         * @param fd A file descriptor.
+         */
+        function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
+    }
+    /**
+     * Sets the owner of the file. Returns `undefined`.
+     *
+     * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail.
+     * @since v0.4.7
+     * @param uid The file's new owner's user id.
+     * @param gid The file's new group's group id.
+     */
+    function fchownSync(fd: number, uid: number, gid: number): void;
+    /**
+     * Set the owner of the symbolic link. No arguments other than a possible
+     * exception are given to the completion callback.
+     *
+     * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail.
+     */
+    function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
+    namespace lchown {
+        /**
+         * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
+    }
+    /**
+     * Set the owner for the path. Returns `undefined`.
+     *
+     * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details.
+     * @param uid The file's new owner's user id.
+     * @param gid The file's new group's group id.
+     */
+    function lchownSync(path: PathLike, uid: number, gid: number): void;
+    /**
+     * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic
+     * link, then the link is not dereferenced: instead, the timestamps of the
+     * symbolic link itself are changed.
+     *
+     * No arguments other than a possible exception are given to the completion
+     * callback.
+     * @since v14.5.0, v12.19.0
+     */
+    function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+    namespace lutimes {
+        /**
+         * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
+         * with the difference that if the path refers to a symbolic link, then the link is not
+         * dereferenced: instead, the timestamps of the symbolic link itself are changed.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+         */
+        function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+    }
+    /**
+     * Change the file system timestamps of the symbolic link referenced by `path`.
+     * Returns `undefined`, or throws an exception when parameters are incorrect or
+     * the operation fails. This is the synchronous version of {@link lutimes}.
+     * @since v14.5.0, v12.19.0
+     */
+    function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+    /**
+     * Asynchronously changes the permissions of a file. No arguments other than a
+     * possible exception are given to the completion callback.
+     *
+     * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+     *
+     * ```js
+     * import { chmod } from 'node:fs';
+     *
+     * chmod('my_file.txt', 0o775, (err) => {
+     *   if (err) throw err;
+     *   console.log('The permissions for file "my_file.txt" have been changed!');
+     * });
+     * ```
+     * @since v0.1.30
+     */
+    function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+    namespace chmod {
+        /**
+         * Asynchronous chmod(2) - Change permissions of a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+         */
+        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+    }
+    /**
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link chmod}.
+     *
+     * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
+     * @since v0.6.7
+     */
+    function chmodSync(path: PathLike, mode: Mode): void;
+    /**
+     * Sets the permissions on the file. No arguments other than a possible exception
+     * are given to the completion callback.
+     *
+     * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+     * @since v0.4.7
+     */
+    function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
+    namespace fchmod {
+        /**
+         * Asynchronous fchmod(2) - Change permissions of a file.
+         * @param fd A file descriptor.
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+         */
+        function __promisify__(fd: number, mode: Mode): Promise<void>;
+    }
+    /**
+     * Sets the permissions on the file. Returns `undefined`.
+     *
+     * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail.
+     * @since v0.4.7
+     */
+    function fchmodSync(fd: number, mode: Mode): void;
+    /**
+     * Changes the permissions on a symbolic link. No arguments other than a possible
+     * exception are given to the completion callback.
+     *
+     * This method is only implemented on macOS.
+     *
+     * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+     * @deprecated Since v0.4.7
+     */
+    function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
+    /** @deprecated */
+    namespace lchmod {
+        /**
+         * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
+         */
+        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
+    }
+    /**
+     * Changes the permissions on a symbolic link. Returns `undefined`.
+     *
+     * This method is only implemented on macOS.
+     *
+     * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail.
+     * @deprecated Since v0.4.7
+     */
+    function lchmodSync(path: PathLike, mode: Mode): void;
+    /**
+     * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object.
+     *
+     * In case of an error, the `err.code` will be one of `Common System Errors`.
+     *
+     * {@link stat} follows symbolic links. Use {@link lstat} to look at the
+     * links themselves.
+     *
+     * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
+     * Instead, user code should open/read/write the file directly and handle the
+     * error raised if the file is not available.
+     *
+     * To check if a file exists without manipulating it afterwards, {@link access} is recommended.
+     *
+     * For example, given the following directory structure:
+     *
+     * ```text
+     * - txtDir
+     * -- file.txt
+     * - app.js
+     * ```
+     *
+     * The next program will check for the stats of the given paths:
+     *
+     * ```js
+     * import { stat } from 'node:fs';
+     *
+     * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
+     *
+     * for (let i = 0; i < pathsToCheck.length; i++) {
+     *   stat(pathsToCheck[i], (err, stats) => {
+     *     console.log(stats.isDirectory());
+     *     console.log(stats);
+     *   });
+     * }
+     * ```
+     *
+     * The resulting output will resemble:
+     *
+     * ```console
+     * true
+     * Stats {
+     *   dev: 16777220,
+     *   mode: 16877,
+     *   nlink: 3,
+     *   uid: 501,
+     *   gid: 20,
+     *   rdev: 0,
+     *   blksize: 4096,
+     *   ino: 14214262,
+     *   size: 96,
+     *   blocks: 0,
+     *   atimeMs: 1561174653071.963,
+     *   mtimeMs: 1561174614583.3518,
+     *   ctimeMs: 1561174626623.5366,
+     *   birthtimeMs: 1561174126937.2893,
+     *   atime: 2019-06-22T03:37:33.072Z,
+     *   mtime: 2019-06-22T03:36:54.583Z,
+     *   ctime: 2019-06-22T03:37:06.624Z,
+     *   birthtime: 2019-06-22T03:28:46.937Z
+     * }
+     * false
+     * Stats {
+     *   dev: 16777220,
+     *   mode: 33188,
+     *   nlink: 1,
+     *   uid: 501,
+     *   gid: 20,
+     *   rdev: 0,
+     *   blksize: 4096,
+     *   ino: 14214074,
+     *   size: 8,
+     *   blocks: 8,
+     *   atimeMs: 1561174616618.8555,
+     *   mtimeMs: 1561174614584,
+     *   ctimeMs: 1561174614583.8145,
+     *   birthtimeMs: 1561174007710.7478,
+     *   atime: 2019-06-22T03:36:56.619Z,
+     *   mtime: 2019-06-22T03:36:54.584Z,
+     *   ctime: 2019-06-22T03:36:54.584Z,
+     *   birthtime: 2019-06-22T03:26:47.711Z
+     * }
+     * ```
+     * @since v0.0.2
+     */
+    function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+    function stat(
+        path: PathLike,
+        options:
+            | (StatOptions & {
+                bigint?: false | undefined;
+            })
+            | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
+    ): void;
+    function stat(
+        path: PathLike,
+        options: StatOptions & {
+            bigint: true;
+        },
+        callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
+    ): void;
+    function stat(
+        path: PathLike,
+        options: StatOptions | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
+    ): void;
+    namespace stat {
+        /**
+         * Asynchronous stat(2) - Get file status.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?: StatOptions & {
+                bigint?: false | undefined;
+            },
+        ): Promise<Stats>;
+        function __promisify__(
+            path: PathLike,
+            options: StatOptions & {
+                bigint: true;
+            },
+        ): Promise<BigIntStats>;
+        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+    }
+    interface StatSyncFn extends Function {
+        (path: PathLike, options?: undefined): Stats;
+        (
+            path: PathLike,
+            options?: StatSyncOptions & {
+                bigint?: false | undefined;
+                throwIfNoEntry: false;
+            },
+        ): Stats | undefined;
+        (
+            path: PathLike,
+            options: StatSyncOptions & {
+                bigint: true;
+                throwIfNoEntry: false;
+            },
+        ): BigIntStats | undefined;
+        (
+            path: PathLike,
+            options?: StatSyncOptions & {
+                bigint?: false | undefined;
+            },
+        ): Stats;
+        (
+            path: PathLike,
+            options: StatSyncOptions & {
+                bigint: true;
+            },
+        ): BigIntStats;
+        (
+            path: PathLike,
+            options: StatSyncOptions & {
+                bigint: boolean;
+                throwIfNoEntry?: false | undefined;
+            },
+        ): Stats | BigIntStats;
+        (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
+    }
+    /**
+     * Synchronous stat(2) - Get file status.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    const statSync: StatSyncFn;
+    /**
+     * Invokes the callback with the `fs.Stats` for the file descriptor.
+     *
+     * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+     * @since v0.1.95
+     */
+    function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+    function fstat(
+        fd: number,
+        options:
+            | (StatOptions & {
+                bigint?: false | undefined;
+            })
+            | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
+    ): void;
+    function fstat(
+        fd: number,
+        options: StatOptions & {
+            bigint: true;
+        },
+        callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
+    ): void;
+    function fstat(
+        fd: number,
+        options: StatOptions | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
+    ): void;
+    namespace fstat {
+        /**
+         * Asynchronous fstat(2) - Get file status.
+         * @param fd A file descriptor.
+         */
+        function __promisify__(
+            fd: number,
+            options?: StatOptions & {
+                bigint?: false | undefined;
+            },
+        ): Promise<Stats>;
+        function __promisify__(
+            fd: number,
+            options: StatOptions & {
+                bigint: true;
+            },
+        ): Promise<BigIntStats>;
+        function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
+    }
+    /**
+     * Retrieves the `fs.Stats` for the file descriptor.
+     *
+     * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
+     * @since v0.1.95
+     */
+    function fstatSync(
+        fd: number,
+        options?: StatOptions & {
+            bigint?: false | undefined;
+        },
+    ): Stats;
+    function fstatSync(
+        fd: number,
+        options: StatOptions & {
+            bigint: true;
+        },
+    ): BigIntStats;
+    function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
+    /**
+     * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
+     * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
+     * link, then the link itself is stat-ed, not the file that it refers to.
+     *
+     * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details.
+     * @since v0.1.30
+     */
+    function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
+    function lstat(
+        path: PathLike,
+        options:
+            | (StatOptions & {
+                bigint?: false | undefined;
+            })
+            | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void,
+    ): void;
+    function lstat(
+        path: PathLike,
+        options: StatOptions & {
+            bigint: true;
+        },
+        callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void,
+    ): void;
+    function lstat(
+        path: PathLike,
+        options: StatOptions | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void,
+    ): void;
+    namespace lstat {
+        /**
+         * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?: StatOptions & {
+                bigint?: false | undefined;
+            },
+        ): Promise<Stats>;
+        function __promisify__(
+            path: PathLike,
+            options: StatOptions & {
+                bigint: true;
+            },
+        ): Promise<BigIntStats>;
+        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
+    }
+    /**
+     * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+     * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object.
+     *
+     * In case of an error, the `err.code` will be one of `Common System Errors`.
+     * @since v19.6.0, v18.15.0
+     * @param path A path to an existing file or directory on the file system to be queried.
+     */
+    function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
+    function statfs(
+        path: PathLike,
+        options:
+            | (StatFsOptions & {
+                bigint?: false | undefined;
+            })
+            | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void,
+    ): void;
+    function statfs(
+        path: PathLike,
+        options: StatFsOptions & {
+            bigint: true;
+        },
+        callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void,
+    ): void;
+    function statfs(
+        path: PathLike,
+        options: StatFsOptions | undefined,
+        callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void,
+    ): void;
+    namespace statfs {
+        /**
+         * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
+         * @param path A path to an existing file or directory on the file system to be queried.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?: StatFsOptions & {
+                bigint?: false | undefined;
+            },
+        ): Promise<StatsFs>;
+        function __promisify__(
+            path: PathLike,
+            options: StatFsOptions & {
+                bigint: true;
+            },
+        ): Promise<BigIntStatsFs>;
+        function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+    }
+    /**
+     * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
+     * contains `path`.
+     *
+     * In case of an error, the `err.code` will be one of `Common System Errors`.
+     * @since v19.6.0, v18.15.0
+     * @param path A path to an existing file or directory on the file system to be queried.
+     */
+    function statfsSync(
+        path: PathLike,
+        options?: StatFsOptions & {
+            bigint?: false | undefined;
+        },
+    ): StatsFs;
+    function statfsSync(
+        path: PathLike,
+        options: StatFsOptions & {
+            bigint: true;
+        },
+    ): BigIntStatsFs;
+    function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
+    /**
+     * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    const lstatSync: StatSyncFn;
+    /**
+     * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
+     * a possible
+     * exception are given to the completion callback.
+     * @since v0.1.31
+     */
+    function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
+    namespace link {
+        /**
+         * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
+         * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
+    }
+    /**
+     * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
+     * @since v0.1.31
+     */
+    function linkSync(existingPath: PathLike, newPath: PathLike): void;
+    /**
+     * Creates the link called `path` pointing to `target`. No arguments other than a
+     * possible exception are given to the completion callback.
+     *
+     * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details.
+     *
+     * The `type` argument is only available on Windows and ignored on other platforms.
+     * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
+     * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`.
+     * If the `target` does not exist, `'file'` will be used. Windows junction points
+     * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction
+     * points on NTFS volumes can only point to directories.
+     *
+     * Relative targets are relative to the link's parent directory.
+     *
+     * ```js
+     * import { symlink } from 'node:fs';
+     *
+     * symlink('./mew', './mewtwo', callback);
+     * ```
+     *
+     * The above example creates a symbolic link `mewtwo` which points to `mew` in the
+     * same directory:
+     *
+     * ```bash
+     * $ tree .
+     * .
+     * ├── mew
+     * └── mewtwo -> ./mew
+     * ```
+     * @since v0.1.31
+     * @param [type='null']
+     */
+    function symlink(
+        target: PathLike,
+        path: PathLike,
+        type: symlink.Type | undefined | null,
+        callback: NoParamCallback,
+    ): void;
+    /**
+     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+     */
+    function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
+    namespace symlink {
+        /**
+         * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
+         * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
+         * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
+         * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
+         * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
+         */
+        function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+        type Type = "dir" | "file" | "junction";
+    }
+    /**
+     * Returns `undefined`.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link symlink}.
+     * @since v0.1.31
+     * @param [type='null']
+     */
+    function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
+    /**
+     * Reads the contents of the symbolic link referred to by `path`. The callback gets
+     * two arguments `(err, linkString)`.
+     *
+     * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the link path passed to the callback. If the `encoding` is set to `'buffer'`,
+     * the link path returned will be passed as a `Buffer` object.
+     * @since v0.1.31
+     */
+    function readlink(
+        path: PathLike,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, linkString: string) => void,
+    ): void;
+    /**
+     * Asynchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlink(
+        path: PathLike,
+        options: BufferEncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlink(
+        path: PathLike,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function readlink(
+        path: PathLike,
+        callback: (err: NodeJS.ErrnoException | null, linkString: string) => void,
+    ): void;
+    namespace readlink {
+        /**
+         * Asynchronous readlink(2) - read value of a symbolic link.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+        /**
+         * Asynchronous readlink(2) - read value of a symbolic link.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+        /**
+         * Asynchronous readlink(2) - read value of a symbolic link.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | NonSharedBuffer>;
+    }
+    /**
+     * Returns the symbolic link's string value.
+     *
+     * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the link path returned. If the `encoding` is set to `'buffer'`,
+     * the link path returned will be passed as a `Buffer` object.
+     * @since v0.1.31
+     */
+    function readlinkSync(path: PathLike, options?: EncodingOption): string;
+    /**
+     * Synchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
+    /**
+     * Synchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
+    /**
+     * Asynchronously computes the canonical pathname by resolving `.`, `..`, and
+     * symbolic links.
+     *
+     * A canonical pathname is not necessarily unique. Hard links and bind mounts can
+     * expose a file system entity through many pathnames.
+     *
+     * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions:
+     *
+     * 1. No case conversion is performed on case-insensitive file systems.
+     * 2. The maximum number of symbolic links is platform-independent and generally
+     * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports.
+     *
+     * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths.
+     *
+     * Only paths that can be converted to UTF8 strings are supported.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+     * the path returned will be passed as a `Buffer` object.
+     *
+     * If `path` resolves to a socket or a pipe, the function will return a system
+     * dependent name for that object.
+     * @since v0.1.31
+     */
+    function realpath(
+        path: PathLike,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
+    ): void;
+    /**
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpath(
+        path: PathLike,
+        options: BufferEncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpath(
+        path: PathLike,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function realpath(
+        path: PathLike,
+        callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
+    ): void;
+    namespace realpath {
+        /**
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options?: EncodingOption): Promise<string>;
+        /**
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+        /**
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(path: PathLike, options?: EncodingOption): Promise<string | NonSharedBuffer>;
+        /**
+         * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html).
+         *
+         * The `callback` gets two arguments `(err, resolvedPath)`.
+         *
+         * Only paths that can be converted to UTF8 strings are supported.
+         *
+         * The optional `options` argument can be a string specifying an encoding, or an
+         * object with an `encoding` property specifying the character encoding to use for
+         * the path passed to the callback. If the `encoding` is set to `'buffer'`,
+         * the path returned will be passed as a `Buffer` object.
+         *
+         * On Linux, when Node.js is linked against musl libc, the procfs file system must
+         * be mounted on `/proc` in order for this function to work. Glibc does not have
+         * this restriction.
+         * @since v9.2.0
+         */
+        function native(
+            path: PathLike,
+            options: EncodingOption,
+            callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
+        ): void;
+        function native(
+            path: PathLike,
+            options: BufferEncodingOption,
+            callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void,
+        ): void;
+        function native(
+            path: PathLike,
+            options: EncodingOption,
+            callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void,
+        ): void;
+        function native(
+            path: PathLike,
+            callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void,
+        ): void;
+    }
+    /**
+     * Returns the resolved pathname.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link realpath}.
+     * @since v0.1.31
+     */
+    function realpathSync(path: PathLike, options?: EncodingOption): string;
+    /**
+     * Synchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
+    /**
+     * Synchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
+    namespace realpathSync {
+        function native(path: PathLike, options?: EncodingOption): string;
+        function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer;
+        function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer;
+    }
+    /**
+     * Asynchronously removes a file or symbolic link. No arguments other than a
+     * possible exception are given to the completion callback.
+     *
+     * ```js
+     * import { unlink } from 'node:fs';
+     * // Assuming that 'path/file.txt' is a regular file.
+     * unlink('path/file.txt', (err) => {
+     *   if (err) throw err;
+     *   console.log('path/file.txt was deleted');
+     * });
+     * ```
+     *
+     * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a
+     * directory, use {@link rmdir}.
+     *
+     * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details.
+     * @since v0.0.2
+     */
+    function unlink(path: PathLike, callback: NoParamCallback): void;
+    namespace unlink {
+        /**
+         * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(path: PathLike): Promise<void>;
+    }
+    /**
+     * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`.
+     * @since v0.1.21
+     */
+    function unlinkSync(path: PathLike): void;
+    /** @deprecated `rmdir()` no longer provides any options. This interface will be removed in a future version. */
+    // TODO: remove in future major
+    interface RmDirOptions {}
+    /**
+     * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given
+     * to the completion callback.
+     *
+     * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
+     * Windows and an `ENOTDIR` error on POSIX.
+     *
+     * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`.
+     * @since v0.0.2
+     */
+    function rmdir(path: PathLike, callback: NoParamCallback): void;
+    namespace rmdir {
+        /**
+         * Asynchronous rmdir(2) - delete a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         */
+        function __promisify__(path: PathLike): Promise<void>;
+    }
+    /**
+     * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`.
+     *
+     * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
+     * on Windows and an `ENOTDIR` error on POSIX.
+     *
+     * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`.
+     * @since v0.1.21
+     */
+    function rmdirSync(path: PathLike): void;
+    interface RmOptions {
+        /**
+         * When `true`, exceptions will be ignored if `path` does not exist.
+         * @default false
+         */
+        force?: boolean | undefined;
+        /**
+         * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
+         * `EPERM` error is encountered, Node.js will retry the operation with a linear
+         * backoff wait of `retryDelay` ms longer on each try. This option represents the
+         * number of retries. This option is ignored if the `recursive` option is not
+         * `true`.
+         * @default 0
+         */
+        maxRetries?: number | undefined;
+        /**
+         * If `true`, perform a recursive directory removal. In
+         * recursive mode, operations are retried on failure.
+         * @default false
+         */
+        recursive?: boolean | undefined;
+        /**
+         * The amount of time in milliseconds to wait between retries.
+         * This option is ignored if the `recursive` option is not `true`.
+         * @default 100
+         */
+        retryDelay?: number | undefined;
+    }
+    /**
+     * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the
+     * completion callback.
+     * @since v14.14.0
+     */
+    function rm(path: PathLike, callback: NoParamCallback): void;
+    function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
+    namespace rm {
+        /**
+         * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
+         */
+        function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
+    }
+    /**
+     * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`.
+     * @since v14.14.0
+     */
+    function rmSync(path: PathLike, options?: RmOptions): void;
+    interface MakeDirectoryOptions {
+        /**
+         * Indicates whether parent folders should be created.
+         * If a folder was created, the path to the first created folder will be returned.
+         * @default false
+         */
+        recursive?: boolean | undefined;
+        /**
+         * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
+         * @default 0o777
+         */
+        mode?: Mode | undefined;
+    }
+    /**
+     * Asynchronously creates a directory.
+     *
+     * The callback is given a possible exception and, if `recursive` is `true`, the
+     * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
+     * created (for instance, if it was previously created).
+     *
+     * The optional `options` argument can be an integer specifying `mode` (permission
+     * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that
+     * exists results in an error only
+     * when `recursive` is false. If `recursive` is false and the directory exists,
+     * an `EEXIST` error occurs.
+     *
+     * ```js
+     * import { mkdir } from 'node:fs';
+     *
+     * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist.
+     * mkdir('./tmp/a/apple', { recursive: true }, (err) => {
+     *   if (err) throw err;
+     * });
+     * ```
+     *
+     * On Windows, using `fs.mkdir()` on the root directory even with recursion will
+     * result in an error:
+     *
+     * ```js
+     * import { mkdir } from 'node:fs';
+     *
+     * mkdir('/', { recursive: true }, (err) => {
+     *   // => [Error: EPERM: operation not permitted, mkdir 'C:\']
+     * });
+     * ```
+     *
+     * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+     * @since v0.1.8
+     */
+    function mkdir(
+        path: PathLike,
+        options: MakeDirectoryOptions & {
+            recursive: true;
+        },
+        callback: (err: NodeJS.ErrnoException | null, path?: string) => void,
+    ): void;
+    /**
+     * Asynchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdir(
+        path: PathLike,
+        options:
+            | Mode
+            | (MakeDirectoryOptions & {
+                recursive?: false | undefined;
+            })
+            | null
+            | undefined,
+        callback: NoParamCallback,
+    ): void;
+    /**
+     * Asynchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdir(
+        path: PathLike,
+        options: Mode | MakeDirectoryOptions | null | undefined,
+        callback: (err: NodeJS.ErrnoException | null, path?: string) => void,
+    ): void;
+    /**
+     * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function mkdir(path: PathLike, callback: NoParamCallback): void;
+    namespace mkdir {
+        /**
+         * Asynchronous mkdir(2) - create a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+         */
+        function __promisify__(
+            path: PathLike,
+            options: MakeDirectoryOptions & {
+                recursive: true;
+            },
+        ): Promise<string | undefined>;
+        /**
+         * Asynchronous mkdir(2) - create a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?:
+                | Mode
+                | (MakeDirectoryOptions & {
+                    recursive?: false | undefined;
+                })
+                | null,
+        ): Promise<void>;
+        /**
+         * Asynchronous mkdir(2) - create a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?: Mode | MakeDirectoryOptions | null,
+        ): Promise<string | undefined>;
+    }
+    /**
+     * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created.
+     * This is the synchronous version of {@link mkdir}.
+     *
+     * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details.
+     * @since v0.1.21
+     */
+    function mkdirSync(
+        path: PathLike,
+        options: MakeDirectoryOptions & {
+            recursive: true;
+        },
+    ): string | undefined;
+    /**
+     * Synchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdirSync(
+        path: PathLike,
+        options?:
+            | Mode
+            | (MakeDirectoryOptions & {
+                recursive?: false | undefined;
+            })
+            | null,
+    ): void;
+    /**
+     * Synchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
+    /**
+     * Creates a unique temporary directory.
+     *
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform
+     * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms,
+     * notably the BSDs, can return more than six random characters, and replace
+     * trailing `X` characters in `prefix` with random characters.
+     *
+     * The created directory path is passed as a string to the callback's second
+     * parameter.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use.
+     *
+     * ```js
+     * import { mkdtemp } from 'node:fs';
+     * import { join } from 'node:path';
+     * import { tmpdir } from 'node:os';
+     *
+     * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => {
+     *   if (err) throw err;
+     *   console.log(directory);
+     *   // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
+     * });
+     * ```
+     *
+     * The `fs.mkdtemp()` method will append the six randomly selected characters
+     * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
+     * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
+     * (`import { sep } from 'node:path'`).
+     *
+     * ```js
+     * import { tmpdir } from 'node:os';
+     * import { mkdtemp } from 'node:fs';
+     *
+     * // The parent directory for the new temporary directory
+     * const tmpDir = tmpdir();
+     *
+     * // This method is *INCORRECT*:
+     * mkdtemp(tmpDir, (err, directory) => {
+     *   if (err) throw err;
+     *   console.log(directory);
+     *   // Will print something similar to `/tmpabc123`.
+     *   // A new temporary directory is created at the file system root
+     *   // rather than *within* the /tmp directory.
+     * });
+     *
+     * // This method is *CORRECT*:
+     * import { sep } from 'node:path';
+     * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
+     *   if (err) throw err;
+     *   console.log(directory);
+     *   // Will print something similar to `/tmp/abc123`.
+     *   // A new temporary directory is created within
+     *   // the /tmp directory.
+     * });
+     * ```
+     * @since v5.10.0
+     */
+    function mkdtemp(
+        prefix: string,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, folder: string) => void,
+    ): void;
+    /**
+     * Asynchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtemp(
+        prefix: string,
+        options: BufferEncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtemp(
+        prefix: string,
+        options: EncodingOption,
+        callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+     */
+    function mkdtemp(
+        prefix: string,
+        callback: (err: NodeJS.ErrnoException | null, folder: string) => void,
+    ): void;
+    namespace mkdtemp {
+        /**
+         * Asynchronously creates a unique temporary directory.
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(prefix: string, options?: EncodingOption): Promise<string>;
+        /**
+         * Asynchronously creates a unique temporary directory.
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(prefix: string, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+        /**
+         * Asynchronously creates a unique temporary directory.
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(prefix: string, options?: EncodingOption): Promise<string | NonSharedBuffer>;
+    }
+    /**
+     * Returns the created directory path.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link mkdtemp}.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use.
+     * @since v5.10.0
+     */
+    function mkdtempSync(prefix: string, options?: EncodingOption): string;
+    /**
+     * Synchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer;
+    /**
+     * Synchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer;
+    interface DisposableTempDir extends Disposable {
+        /**
+         * The path of the created directory.
+         */
+        path: string;
+        /**
+         * A function which removes the created directory.
+         */
+        remove(): void;
+        /**
+         * The same as `remove`.
+         */
+        [Symbol.dispose](): void;
+    }
+    /**
+     * Returns a disposable object whose `path` property holds the created directory
+     * path. When the object is disposed, the directory and its contents will be
+     * removed if it still exists. If the directory cannot be deleted, disposal will
+     * throw an error. The object has a `remove()` method which will perform the same
+     * task.
+     *
+     * <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
+     *
+     * For detailed information, see the documentation of `fs.mkdtemp()`.
+     *
+     * There is no callback-based version of this API because it is designed for use
+     * with the `using` syntax.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use.
+     * @since v24.4.0
+     */
+    function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir;
+    /**
+     * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`.
+     *
+     * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the filenames passed to the callback. If the `encoding` is set to `'buffer'`,
+     * the filenames returned will be passed as `Buffer` objects.
+     *
+     * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects.
+     * @since v0.1.8
+     */
+    function readdir(
+        path: PathLike,
+        options:
+            | {
+                encoding: BufferEncoding | null;
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            }
+            | BufferEncoding
+            | undefined
+            | null,
+        callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
+    ): void;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdir(
+        path: PathLike,
+        options:
+            | {
+                encoding: "buffer";
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            }
+            | "buffer",
+        callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void,
+    ): void;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdir(
+        path: PathLike,
+        options:
+            | (ObjectEncodingOptions & {
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            })
+            | BufferEncoding
+            | undefined
+            | null,
+        callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void,
+    ): void;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function readdir(
+        path: PathLike,
+        callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
+    ): void;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+     */
+    function readdir(
+        path: PathLike,
+        options: ObjectEncodingOptions & {
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+        callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void,
+    ): void;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
+     */
+    function readdir(
+        path: PathLike,
+        options: {
+            encoding: "buffer";
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+        callback: (err: NodeJS.ErrnoException | null, files: Dirent<NonSharedBuffer>[]) => void,
+    ): void;
+    namespace readdir {
+        /**
+         * Asynchronous readdir(3) - read a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?:
+                | {
+                    encoding: BufferEncoding | null;
+                    withFileTypes?: false | undefined;
+                    recursive?: boolean | undefined;
+                }
+                | BufferEncoding
+                | null,
+        ): Promise<string[]>;
+        /**
+         * Asynchronous readdir(3) - read a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(
+            path: PathLike,
+            options:
+                | "buffer"
+                | {
+                    encoding: "buffer";
+                    withFileTypes?: false | undefined;
+                    recursive?: boolean | undefined;
+                },
+        ): Promise<NonSharedBuffer[]>;
+        /**
+         * Asynchronous readdir(3) - read a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+         */
+        function __promisify__(
+            path: PathLike,
+            options?:
+                | (ObjectEncodingOptions & {
+                    withFileTypes?: false | undefined;
+                    recursive?: boolean | undefined;
+                })
+                | BufferEncoding
+                | null,
+        ): Promise<string[] | NonSharedBuffer[]>;
+        /**
+         * Asynchronous readdir(3) - read a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
+         */
+        function __promisify__(
+            path: PathLike,
+            options: ObjectEncodingOptions & {
+                withFileTypes: true;
+                recursive?: boolean | undefined;
+            },
+        ): Promise<Dirent[]>;
+        /**
+         * Asynchronous readdir(3) - read a directory.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
+         */
+        function __promisify__(
+            path: PathLike,
+            options: {
+                encoding: "buffer";
+                withFileTypes: true;
+                recursive?: boolean | undefined;
+            },
+        ): Promise<Dirent<NonSharedBuffer>[]>;
+    }
+    /**
+     * Reads the contents of the directory.
+     *
+     * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the filenames returned. If the `encoding` is set to `'buffer'`,
+     * the filenames returned will be passed as `Buffer` objects.
+     *
+     * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects.
+     * @since v0.1.21
+     */
+    function readdirSync(
+        path: PathLike,
+        options?:
+            | {
+                encoding: BufferEncoding | null;
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            }
+            | BufferEncoding
+            | null,
+    ): string[];
+    /**
+     * Synchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdirSync(
+        path: PathLike,
+        options:
+            | {
+                encoding: "buffer";
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            }
+            | "buffer",
+    ): NonSharedBuffer[];
+    /**
+     * Synchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdirSync(
+        path: PathLike,
+        options?:
+            | (ObjectEncodingOptions & {
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            })
+            | BufferEncoding
+            | null,
+    ): string[] | NonSharedBuffer[];
+    /**
+     * Synchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+     */
+    function readdirSync(
+        path: PathLike,
+        options: ObjectEncodingOptions & {
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+    ): Dirent[];
+    /**
+     * Synchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
+     */
+    function readdirSync(
+        path: PathLike,
+        options: {
+            encoding: "buffer";
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+    ): Dirent<NonSharedBuffer>[];
+    /**
+     * Closes the file descriptor. No arguments other than a possible exception are
+     * given to the completion callback.
+     *
+     * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use
+     * through any other `fs` operation may lead to undefined behavior.
+     *
+     * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+     * @since v0.0.2
+     */
+    function close(fd: number, callback?: NoParamCallback): void;
+    namespace close {
+        /**
+         * Asynchronous close(2) - close a file descriptor.
+         * @param fd A file descriptor.
+         */
+        function __promisify__(fd: number): Promise<void>;
+    }
+    /**
+     * Closes the file descriptor. Returns `undefined`.
+     *
+     * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use
+     * through any other `fs` operation may lead to undefined behavior.
+     *
+     * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail.
+     * @since v0.1.21
+     */
+    function closeSync(fd: number): void;
+    /**
+     * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details.
+     *
+     * `mode` sets the file mode (permission and sticky bits), but only if the file was
+     * created. On Windows, only the write permission can be manipulated; see {@link chmod}.
+     *
+     * The callback gets two arguments `(err, fd)`.
+     *
+     * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+     * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+     * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+     *
+     * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
+     * @since v0.0.2
+     * @param [flags='r'] See `support of file system `flags``.
+     * @param [mode=0o666]
+     */
+    function open(
+        path: PathLike,
+        flags: OpenMode | undefined,
+        mode: Mode | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, fd: number) => void,
+    ): void;
+    /**
+     * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param [flags='r'] See `support of file system `flags``.
+     */
+    function open(
+        path: PathLike,
+        flags: OpenMode | undefined,
+        callback: (err: NodeJS.ErrnoException | null, fd: number) => void,
+    ): void;
+    /**
+     * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     */
+    function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
+    namespace open {
+        /**
+         * Asynchronous open(2) - open and possibly create a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
+         */
+        function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
+    }
+    /**
+     * Returns an integer representing the file descriptor.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link open}.
+     * @since v0.1.21
+     * @param [flags='r']
+     * @param [mode=0o666]
+     */
+    function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
+    /**
+     * Change the file system timestamps of the object referenced by `path`.
+     *
+     * The `atime` and `mtime` arguments follow these rules:
+     *
+     * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`.
+     * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown.
+     * @since v0.4.2
+     */
+    function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+    namespace utimes {
+        /**
+         * Asynchronously change file timestamps of the file referenced by the supplied path.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+         */
+        function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+    }
+    /**
+     * Returns `undefined`.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link utimes}.
+     * @since v0.4.2
+     */
+    function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void;
+    /**
+     * Change the file system timestamps of the object referenced by the supplied file
+     * descriptor. See {@link utimes}.
+     * @since v0.4.2
+     */
+    function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
+    namespace futimes {
+        /**
+         * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
+         * @param fd A file descriptor.
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
+         */
+        function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise<void>;
+    }
+    /**
+     * Synchronous version of {@link futimes}. Returns `undefined`.
+     * @since v0.4.2
+     */
+    function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void;
+    /**
+     * Request that all data for the open file descriptor is flushed to the storage
+     * device. The specific implementation is operating system and device specific.
+     * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other
+     * than a possible exception are given to the completion callback.
+     * @since v0.1.96
+     */
+    function fsync(fd: number, callback: NoParamCallback): void;
+    namespace fsync {
+        /**
+         * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
+         * @param fd A file descriptor.
+         */
+        function __promisify__(fd: number): Promise<void>;
+    }
+    /**
+     * Request that all data for the open file descriptor is flushed to the storage
+     * device. The specific implementation is operating system and device specific.
+     * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`.
+     * @since v0.1.96
+     */
+    function fsyncSync(fd: number): void;
+    interface WriteOptions {
+        /**
+         * @default 0
+         */
+        offset?: number | undefined;
+        /**
+         * @default `buffer.byteLength - offset`
+         */
+        length?: number | undefined;
+        /**
+         * @default null
+         */
+        position?: number | null | undefined;
+    }
+    /**
+     * Write `buffer` to the file specified by `fd`.
+     *
+     * `offset` determines the part of the buffer to be written, and `length` is
+     * an integer specifying the number of bytes to write.
+     *
+     * `position` refers to the offset from the beginning of the file where this data
+     * should be written. If `typeof position !== 'number'`, the data will be written
+     * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html).
+     *
+     * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a promise for an `Object` with `bytesWritten` and `buffer` properties.
+     *
+     * It is unsafe to use `fs.write()` multiple times on the same file without waiting
+     * for the callback. For this scenario, {@link createWriteStream} is
+     * recommended.
+     *
+     * On Linux, positional writes don't work when the file is opened in append mode.
+     * The kernel ignores the position argument and always appends the data to
+     * the end of the file.
+     * @since v0.0.2
+     * @param [offset=0]
+     * @param [length=buffer.byteLength - offset]
+     * @param [position='null']
+     */
+    function write<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        offset: number | undefined | null,
+        length: number | undefined | null,
+        position: number | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+     */
+    function write<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        offset: number | undefined | null,
+        length: number | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+     */
+    function write<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        offset: number | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     */
+    function write<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param options An object with the following properties:
+     * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`.
+     * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+     * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+     */
+    function write<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        options: WriteOptions,
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param string A string to write.
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+     * @param encoding The expected string encoding.
+     */
+    function write(
+        fd: number,
+        string: string,
+        position: number | undefined | null,
+        encoding: BufferEncoding | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
+    ): void;
+    /**
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param string A string to write.
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+     */
+    function write(
+        fd: number,
+        string: string,
+        position: number | undefined | null,
+        callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
+    ): void;
+    /**
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+     * @param fd A file descriptor.
+     * @param string A string to write.
+     */
+    function write(
+        fd: number,
+        string: string,
+        callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
+    ): void;
+    namespace write {
+        /**
+         * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+         * @param fd A file descriptor.
+         * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
+         * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+         */
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+            fd: number,
+            buffer?: TBuffer,
+            offset?: number,
+            length?: number,
+            position?: number | null,
+        ): Promise<{
+            bytesWritten: number;
+            buffer: TBuffer;
+        }>;
+        /**
+         * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
+         * @param fd A file descriptor.
+         * @param options An object with the following properties:
+         * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`.
+         * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
+         * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+         */
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+            fd: number,
+            buffer?: TBuffer,
+            options?: WriteOptions,
+        ): Promise<{
+            bytesWritten: number;
+            buffer: TBuffer;
+        }>;
+        /**
+         * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
+         * @param fd A file descriptor.
+         * @param string A string to write.
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+         * @param encoding The expected string encoding.
+         */
+        function __promisify__(
+            fd: number,
+            string: string,
+            position?: number | null,
+            encoding?: BufferEncoding | null,
+        ): Promise<{
+            bytesWritten: number;
+            buffer: string;
+        }>;
+    }
+    /**
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link write}.
+     * @since v0.1.21
+     * @param [offset=0]
+     * @param [length=buffer.byteLength - offset]
+     * @param [position='null']
+     * @return The number of bytes written.
+     */
+    function writeSync(
+        fd: number,
+        buffer: NodeJS.ArrayBufferView,
+        offset?: number | null,
+        length?: number | null,
+        position?: number | null,
+    ): number;
+    /**
+     * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
+     * @param fd A file descriptor.
+     * @param string A string to write.
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
+     * @param encoding The expected string encoding.
+     */
+    function writeSync(
+        fd: number,
+        string: string,
+        position?: number | null,
+        encoding?: BufferEncoding | null,
+    ): number;
+    type ReadPosition = number | bigint;
+    interface ReadOptions {
+        /**
+         * @default 0
+         */
+        offset?: number | undefined;
+        /**
+         * @default `length of buffer`
+         */
+        length?: number | undefined;
+        /**
+         * @default null
+         */
+        position?: ReadPosition | null | undefined;
+    }
+    interface ReadOptionsWithBuffer<T extends NodeJS.ArrayBufferView> extends ReadOptions {
+        buffer?: T | undefined;
+    }
+    /** @deprecated Use `ReadOptions` instead. */
+    // TODO: remove in future major
+    interface ReadSyncOptions extends ReadOptions {}
+    /** @deprecated Use `ReadOptionsWithBuffer` instead. */
+    // TODO: remove in future major
+    interface ReadAsyncOptions<T extends NodeJS.ArrayBufferView> extends ReadOptionsWithBuffer<T> {}
+    /**
+     * Read data from the file specified by `fd`.
+     *
+     * The callback is given the three arguments, `(err, bytesRead, buffer)`.
+     *
+     * If the file is not modified concurrently, the end-of-file is reached when the
+     * number of bytes read is zero.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a promise for an `Object` with `bytesRead` and `buffer` properties.
+     * @since v0.0.2
+     * @param buffer The buffer that the data will be written to.
+     * @param offset The position in `buffer` to write the data to.
+     * @param length The number of bytes to read.
+     * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If
+     * `position` is an integer, the file position will be unchanged.
+     */
+    function read<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        offset: number,
+        length: number,
+        position: ReadPosition | null,
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+    ): void;
+    /**
+     * Similar to the above `fs.read` function, this version takes an optional `options` object.
+     * If not otherwise specified in an `options` object,
+     * `buffer` defaults to `Buffer.alloc(16384)`,
+     * `offset` defaults to `0`,
+     * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
+     * `position` defaults to `null`
+     * @since v12.17.0, 13.11.0
+     */
+    function read<TBuffer extends NodeJS.ArrayBufferView = NonSharedBuffer>(
+        fd: number,
+        options: ReadOptionsWithBuffer<TBuffer>,
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+    ): void;
+    function read<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        options: ReadOptions,
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+    ): void;
+    function read<TBuffer extends NodeJS.ArrayBufferView>(
+        fd: number,
+        buffer: TBuffer,
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
+    ): void;
+    function read(
+        fd: number,
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void,
+    ): void;
+    namespace read {
+        /**
+         * @param fd A file descriptor.
+         * @param buffer The buffer that the data will be written to.
+         * @param offset The offset in the buffer at which to start writing.
+         * @param length The number of bytes to read.
+         * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
+         */
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
+            fd: number,
+            buffer: TBuffer,
+            offset: number,
+            length: number,
+            position: ReadPosition | null,
+        ): Promise<{
+            bytesRead: number;
+            buffer: TBuffer;
+        }>;
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView = NonSharedBuffer>(
+            fd: number,
+            options: ReadOptionsWithBuffer<TBuffer>,
+        ): Promise<{
+            bytesRead: number;
+            buffer: TBuffer;
+        }>;
+        function __promisify__(fd: number): Promise<{
+            bytesRead: number;
+            buffer: NonSharedBuffer;
+        }>;
+    }
+    /**
+     * Returns the number of `bytesRead`.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link read}.
+     * @since v0.1.21
+     * @param [position='null']
+     */
+    function readSync(
+        fd: number,
+        buffer: NodeJS.ArrayBufferView,
+        offset: number,
+        length: number,
+        position: ReadPosition | null,
+    ): number;
+    /**
+     * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
+     * If no `options` object is specified, it will default with the above values.
+     */
+    function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     *
+     * ```js
+     * import { readFile } from 'node:fs';
+     *
+     * readFile('/etc/passwd', (err, data) => {
+     *   if (err) throw err;
+     *   console.log(data);
+     * });
+     * ```
+     *
+     * The callback is passed two arguments `(err, data)`, where `data` is the
+     * contents of the file.
+     *
+     * If no encoding is specified, then the raw buffer is returned.
+     *
+     * If `options` is a string, then it specifies the encoding:
+     *
+     * ```js
+     * import { readFile } from 'node:fs';
+     *
+     * readFile('/etc/passwd', 'utf8', callback);
+     * ```
+     *
+     * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an
+     * error will be returned. On FreeBSD, a representation of the directory's contents
+     * will be returned.
+     *
+     * ```js
+     * import { readFile } from 'node:fs';
+     *
+     * // macOS, Linux, and Windows
+     * readFile('<directory>', (err, data) => {
+     *   // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+     * });
+     *
+     * //  FreeBSD
+     * readFile('<directory>', (err, data) => {
+     *   // => null, <data>
+     * });
+     * ```
+     *
+     * It is possible to abort an ongoing request using an `AbortSignal`. If a
+     * request is aborted the callback is called with an `AbortError`:
+     *
+     * ```js
+     * import { readFile } from 'node:fs';
+     *
+     * const controller = new AbortController();
+     * const signal = controller.signal;
+     * readFile(fileInfo[0].name, { signal }, (err, buf) => {
+     *   // ...
+     * });
+     * // When you want to abort the request
+     * controller.abort();
+     * ```
+     *
+     * The `fs.readFile()` function buffers the entire file. To minimize memory costs,
+     * when possible prefer streaming via `fs.createReadStream()`.
+     *
+     * Aborting an ongoing request does not abort individual operating
+     * system requests but rather the internal buffering `fs.readFile` performs.
+     * @since v0.1.29
+     * @param path filename or file descriptor
+     */
+    function readFile(
+        path: PathOrFileDescriptor,
+        options:
+            | ({
+                encoding?: null | undefined;
+                flag?: string | undefined;
+            } & Abortable)
+            | undefined
+            | null,
+        callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFile(
+        path: PathOrFileDescriptor,
+        options:
+            | ({
+                encoding: BufferEncoding;
+                flag?: string | undefined;
+            } & Abortable)
+            | BufferEncoding,
+        callback: (err: NodeJS.ErrnoException | null, data: string) => void,
+    ): void;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFile(
+        path: PathOrFileDescriptor,
+        options:
+            | (ObjectEncodingOptions & {
+                flag?: string | undefined;
+            } & Abortable)
+            | BufferEncoding
+            | undefined
+            | null,
+        callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void,
+    ): void;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     */
+    function readFile(
+        path: PathOrFileDescriptor,
+        callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
+    ): void;
+    namespace readFile {
+        /**
+         * Asynchronously reads the entire contents of a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+         * @param options An object that may contain an optional flag.
+         * If a flag is not provided, it defaults to `'r'`.
+         */
+        function __promisify__(
+            path: PathOrFileDescriptor,
+            options?: {
+                encoding?: null | undefined;
+                flag?: string | undefined;
+            } | null,
+        ): Promise<NonSharedBuffer>;
+        /**
+         * Asynchronously reads the entire contents of a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+         * If a flag is not provided, it defaults to `'r'`.
+         */
+        function __promisify__(
+            path: PathOrFileDescriptor,
+            options:
+                | {
+                    encoding: BufferEncoding;
+                    flag?: string | undefined;
+                }
+                | BufferEncoding,
+        ): Promise<string>;
+        /**
+         * Asynchronously reads the entire contents of a file.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+         * If a flag is not provided, it defaults to `'r'`.
+         */
+        function __promisify__(
+            path: PathOrFileDescriptor,
+            options?:
+                | (ObjectEncodingOptions & {
+                    flag?: string | undefined;
+                })
+                | BufferEncoding
+                | null,
+        ): Promise<string | NonSharedBuffer>;
+    }
+    /**
+     * Returns the contents of the `path`.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link readFile}.
+     *
+     * If the `encoding` option is specified then this function returns a
+     * string. Otherwise it returns a buffer.
+     *
+     * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific.
+     *
+     * ```js
+     * import { readFileSync } from 'node:fs';
+     *
+     * // macOS, Linux, and Windows
+     * readFileSync('<directory>');
+     * // => [Error: EISDIR: illegal operation on a directory, read <directory>]
+     *
+     * //  FreeBSD
+     * readFileSync('<directory>'); // => <data>
+     * ```
+     * @since v0.1.8
+     * @param path filename or file descriptor
+     */
+    function readFileSync(
+        path: PathOrFileDescriptor,
+        options?: {
+            encoding?: null | undefined;
+            flag?: string | undefined;
+        } | null,
+    ): NonSharedBuffer;
+    /**
+     * Synchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFileSync(
+        path: PathOrFileDescriptor,
+        options:
+            | {
+                encoding: BufferEncoding;
+                flag?: string | undefined;
+            }
+            | BufferEncoding,
+    ): string;
+    /**
+     * Synchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFileSync(
+        path: PathOrFileDescriptor,
+        options?:
+            | (ObjectEncodingOptions & {
+                flag?: string | undefined;
+            })
+            | BufferEncoding
+            | null,
+    ): string | NonSharedBuffer;
+    type WriteFileOptions =
+        | (
+            & ObjectEncodingOptions
+            & Abortable
+            & {
+                mode?: Mode | undefined;
+                flag?: string | undefined;
+                flush?: boolean | undefined;
+            }
+        )
+        | BufferEncoding
+        | null;
+    /**
+     * When `file` is a filename, asynchronously writes data to the file, replacing the
+     * file if it already exists. `data` can be a string or a buffer.
+     *
+     * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using
+     * a file descriptor.
+     *
+     * The `encoding` option is ignored if `data` is a buffer.
+     *
+     * The `mode` option only affects the newly created file. See {@link open} for more details.
+     *
+     * ```js
+     * import { writeFile } from 'node:fs';
+     * import { Buffer } from 'node:buffer';
+     *
+     * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+     * writeFile('message.txt', data, (err) => {
+     *   if (err) throw err;
+     *   console.log('The file has been saved!');
+     * });
+     * ```
+     *
+     * If `options` is a string, then it specifies the encoding:
+     *
+     * ```js
+     * import { writeFile } from 'node:fs';
+     *
+     * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
+     * ```
+     *
+     * It is unsafe to use `fs.writeFile()` multiple times on the same file without
+     * waiting for the callback. For this scenario, {@link createWriteStream} is
+     * recommended.
+     *
+     * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that
+     * performs multiple `write` calls internally to write the buffer passed to it.
+     * For performance sensitive code consider using {@link createWriteStream}.
+     *
+     * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`.
+     * Cancelation is "best effort", and some amount of data is likely still
+     * to be written.
+     *
+     * ```js
+     * import { writeFile } from 'node:fs';
+     * import { Buffer } from 'node:buffer';
+     *
+     * const controller = new AbortController();
+     * const { signal } = controller;
+     * const data = new Uint8Array(Buffer.from('Hello Node.js'));
+     * writeFile('message.txt', data, { signal }, (err) => {
+     *   // When a request is aborted - the callback is called with an AbortError
+     * });
+     * // When the request should be aborted
+     * controller.abort();
+     * ```
+     *
+     * Aborting an ongoing request does not abort individual operating
+     * system requests but rather the internal buffering `fs.writeFile` performs.
+     * @since v0.1.29
+     * @param file filename or file descriptor
+     */
+    function writeFile(
+        file: PathOrFileDescriptor,
+        data: string | NodeJS.ArrayBufferView,
+        options: WriteFileOptions,
+        callback: NoParamCallback,
+    ): void;
+    /**
+     * Asynchronously writes data to a file, replacing the file if it already exists.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+     */
+    function writeFile(
+        path: PathOrFileDescriptor,
+        data: string | NodeJS.ArrayBufferView,
+        callback: NoParamCallback,
+    ): void;
+    namespace writeFile {
+        /**
+         * Asynchronously writes data to a file, replacing the file if it already exists.
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
+         * If `mode` is not supplied, the default of `0o666` is used.
+         * If `mode` is a string, it is parsed as an octal integer.
+         * If `flag` is not supplied, the default of `'w'` is used.
+         */
+        function __promisify__(
+            path: PathOrFileDescriptor,
+            data: string | NodeJS.ArrayBufferView,
+            options?: WriteFileOptions,
+        ): Promise<void>;
+    }
+    /**
+     * Returns `undefined`.
+     *
+     * The `mode` option only affects the newly created file. See {@link open} for more details.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link writeFile}.
+     * @since v0.1.29
+     * @param file filename or file descriptor
+     */
+    function writeFileSync(
+        file: PathOrFileDescriptor,
+        data: string | NodeJS.ArrayBufferView,
+        options?: WriteFileOptions,
+    ): void;
+    /**
+     * Asynchronously append data to a file, creating the file if it does not yet
+     * exist. `data` can be a string or a `Buffer`.
+     *
+     * The `mode` option only affects the newly created file. See {@link open} for more details.
+     *
+     * ```js
+     * import { appendFile } from 'node:fs';
+     *
+     * appendFile('message.txt', 'data to append', (err) => {
+     *   if (err) throw err;
+     *   console.log('The "data to append" was appended to file!');
+     * });
+     * ```
+     *
+     * If `options` is a string, then it specifies the encoding:
+     *
+     * ```js
+     * import { appendFile } from 'node:fs';
+     *
+     * appendFile('message.txt', 'data to append', 'utf8', callback);
+     * ```
+     *
+     * The `path` may be specified as a numeric file descriptor that has been opened
+     * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+     * not be closed automatically.
+     *
+     * ```js
+     * import { open, close, appendFile } from 'node:fs';
+     *
+     * function closeFd(fd) {
+     *   close(fd, (err) => {
+     *     if (err) throw err;
+     *   });
+     * }
+     *
+     * open('message.txt', 'a', (err, fd) => {
+     *   if (err) throw err;
+     *
+     *   try {
+     *     appendFile(fd, 'data to append', 'utf8', (err) => {
+     *       closeFd(fd);
+     *       if (err) throw err;
+     *     });
+     *   } catch (err) {
+     *     closeFd(fd);
+     *     throw err;
+     *   }
+     * });
+     * ```
+     * @since v0.6.7
+     * @param path filename or file descriptor
+     */
+    function appendFile(
+        path: PathOrFileDescriptor,
+        data: string | Uint8Array,
+        options: WriteFileOptions,
+        callback: NoParamCallback,
+    ): void;
+    /**
+     * Asynchronously append data to a file, creating the file if it does not exist.
+     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+     */
+    function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void;
+    namespace appendFile {
+        /**
+         * Asynchronously append data to a file, creating the file if it does not exist.
+         * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
+         * If `mode` is not supplied, the default of `0o666` is used.
+         * If `mode` is a string, it is parsed as an octal integer.
+         * If `flag` is not supplied, the default of `'a'` is used.
+         */
+        function __promisify__(
+            file: PathOrFileDescriptor,
+            data: string | Uint8Array,
+            options?: WriteFileOptions,
+        ): Promise<void>;
+    }
+    /**
+     * Synchronously append data to a file, creating the file if it does not yet
+     * exist. `data` can be a string or a `Buffer`.
+     *
+     * The `mode` option only affects the newly created file. See {@link open} for more details.
+     *
+     * ```js
+     * import { appendFileSync } from 'node:fs';
+     *
+     * try {
+     *   appendFileSync('message.txt', 'data to append');
+     *   console.log('The "data to append" was appended to file!');
+     * } catch (err) {
+     *   // Handle the error
+     * }
+     * ```
+     *
+     * If `options` is a string, then it specifies the encoding:
+     *
+     * ```js
+     * import { appendFileSync } from 'node:fs';
+     *
+     * appendFileSync('message.txt', 'data to append', 'utf8');
+     * ```
+     *
+     * The `path` may be specified as a numeric file descriptor that has been opened
+     * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will
+     * not be closed automatically.
+     *
+     * ```js
+     * import { openSync, closeSync, appendFileSync } from 'node:fs';
+     *
+     * let fd;
+     *
+     * try {
+     *   fd = openSync('message.txt', 'a');
+     *   appendFileSync(fd, 'data to append', 'utf8');
+     * } catch (err) {
+     *   // Handle the error
+     * } finally {
+     *   if (fd !== undefined)
+     *     closeSync(fd);
+     * }
+     * ```
+     * @since v0.6.7
+     * @param path filename or file descriptor
+     */
+    function appendFileSync(
+        path: PathOrFileDescriptor,
+        data: string | Uint8Array,
+        options?: WriteFileOptions,
+    ): void;
+    /**
+     * Watch for changes on `filename`. The callback `listener` will be called each
+     * time the file is accessed.
+     *
+     * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates
+     * whether the process should continue to run as long as files are being watched.
+     * The `options` object may specify an `interval` property indicating how often the
+     * target should be polled in milliseconds.
+     *
+     * The `listener` gets two arguments the current stat object and the previous
+     * stat object:
+     *
+     * ```js
+     * import { watchFile } from 'node:fs';
+     *
+     * watchFile('message.text', (curr, prev) => {
+     *   console.log(`the current mtime is: ${curr.mtime}`);
+     *   console.log(`the previous mtime was: ${prev.mtime}`);
+     * });
+     * ```
+     *
+     * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+     * the numeric values in these objects are specified as `BigInt`s.
+     *
+     * To be notified when the file was modified, not just accessed, it is necessary
+     * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+     *
+     * When an `fs.watchFile` operation results in an `ENOENT` error, it
+     * will invoke the listener once, with all the fields zeroed (or, for dates, the
+     * Unix Epoch). If the file is created later on, the listener will be called
+     * again, with the latest stat objects. This is a change in functionality since
+     * v0.10.
+     *
+     * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible.
+     *
+     * When a file being watched by `fs.watchFile()` disappears and reappears,
+     * then the contents of `previous` in the second callback event (the file's
+     * reappearance) will be the same as the contents of `previous` in the first
+     * callback event (its disappearance).
+     *
+     * This happens when:
+     *
+     * * the file is deleted, followed by a restore
+     * * the file is renamed and then renamed a second time back to its original name
+     * @since v0.1.31
+     */
+    interface WatchFileOptions {
+        bigint?: boolean | undefined;
+        persistent?: boolean | undefined;
+        interval?: number | undefined;
+    }
+    /**
+     * Watch for changes on `filename`. The callback `listener` will be called each
+     * time the file is accessed.
+     *
+     * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates
+     * whether the process should continue to run as long as files are being watched.
+     * The `options` object may specify an `interval` property indicating how often the
+     * target should be polled in milliseconds.
+     *
+     * The `listener` gets two arguments the current stat object and the previous
+     * stat object:
+     *
+     * ```js
+     * import { watchFile } from 'node:fs';
+     *
+     * watchFile('message.text', (curr, prev) => {
+     *   console.log(`the current mtime is: ${curr.mtime}`);
+     *   console.log(`the previous mtime was: ${prev.mtime}`);
+     * });
+     * ```
+     *
+     * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
+     * the numeric values in these objects are specified as `BigInt`s.
+     *
+     * To be notified when the file was modified, not just accessed, it is necessary
+     * to compare `curr.mtimeMs` and `prev.mtimeMs`.
+     *
+     * When an `fs.watchFile` operation results in an `ENOENT` error, it
+     * will invoke the listener once, with all the fields zeroed (or, for dates, the
+     * Unix Epoch). If the file is created later on, the listener will be called
+     * again, with the latest stat objects. This is a change in functionality since
+     * v0.10.
+     *
+     * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible.
+     *
+     * When a file being watched by `fs.watchFile()` disappears and reappears,
+     * then the contents of `previous` in the second callback event (the file's
+     * reappearance) will be the same as the contents of `previous` in the first
+     * callback event (its disappearance).
+     *
+     * This happens when:
+     *
+     * * the file is deleted, followed by a restore
+     * * the file is renamed and then renamed a second time back to its original name
+     * @since v0.1.31
+     */
+    function watchFile(
+        filename: PathLike,
+        options:
+            | (WatchFileOptions & {
+                bigint?: false | undefined;
+            })
+            | undefined,
+        listener: StatsListener,
+    ): StatWatcher;
+    function watchFile(
+        filename: PathLike,
+        options:
+            | (WatchFileOptions & {
+                bigint: true;
+            })
+            | undefined,
+        listener: BigIntStatsListener,
+    ): StatWatcher;
+    /**
+     * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+     */
+    function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
+    /**
+     * Stop watching for changes on `filename`. If `listener` is specified, only that
+     * particular listener is removed. Otherwise, _all_ listeners are removed,
+     * effectively stopping watching of `filename`.
+     *
+     * Calling `fs.unwatchFile()` with a filename that is not being watched is a
+     * no-op, not an error.
+     *
+     * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible.
+     * @since v0.1.31
+     * @param listener Optional, a listener previously attached using `fs.watchFile()`
+     */
+    function unwatchFile(filename: PathLike, listener?: StatsListener): void;
+    function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
+    type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean);
+    interface WatchOptions extends Abortable {
+        encoding?: BufferEncoding | "buffer" | undefined;
+        persistent?: boolean | undefined;
+        recursive?: boolean | undefined;
+        ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined;
+    }
+    interface WatchOptionsWithBufferEncoding extends WatchOptions {
+        encoding: "buffer";
+    }
+    interface WatchOptionsWithStringEncoding extends WatchOptions {
+        encoding?: BufferEncoding | undefined;
+    }
+    type WatchEventType = "rename" | "change";
+    type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
+    type StatsListener = (curr: Stats, prev: Stats) => void;
+    type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
+    /**
+     * Watch for changes on `filename`, where `filename` is either a file or a
+     * directory.
+     *
+     * The second argument is optional. If `options` is provided as a string, it
+     * specifies the `encoding`. Otherwise `options` should be passed as an object.
+     *
+     * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file
+     * which triggered the event.
+     *
+     * On most platforms, `'rename'` is emitted whenever a filename appears or
+     * disappears in the directory.
+     *
+     * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`.
+     *
+     * If a `signal` is passed, aborting the corresponding AbortController will close
+     * the returned `fs.FSWatcher`.
+     * @since v0.5.10
+     * @param listener
+     */
+    function watch(
+        filename: PathLike,
+        options?: WatchOptionsWithStringEncoding | BufferEncoding | null,
+        listener?: WatchListener<string>,
+    ): FSWatcher;
+    function watch(
+        filename: PathLike,
+        options: WatchOptionsWithBufferEncoding | "buffer",
+        listener: WatchListener<NonSharedBuffer>,
+    ): FSWatcher;
+    function watch(
+        filename: PathLike,
+        options: WatchOptions | BufferEncoding | "buffer" | null,
+        listener: WatchListener<string | NonSharedBuffer>,
+    ): FSWatcher;
+    function watch(filename: PathLike, listener: WatchListener<string>): FSWatcher;
+    /**
+     * Test whether or not the given path exists by checking with the file system.
+     * Then call the `callback` argument with either true or false:
+     *
+     * ```js
+     * import { exists } from 'node:fs';
+     *
+     * exists('/etc/passwd', (e) => {
+     *   console.log(e ? 'it exists' : 'no passwd!');
+     * });
+     * ```
+     *
+     * **The parameters for this callback are not consistent with other Node.js**
+     * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback
+     * has only one boolean parameter. This is one reason `fs.access()` is recommended
+     * instead of `fs.exists()`.
+     *
+     * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
+     * so introduces a race condition, since other processes may change the file's
+     * state between the two calls. Instead, user code should open/read/write the
+     * file directly and handle the error raised if the file does not exist.
+     *
+     * **write (NOT RECOMMENDED)**
+     *
+     * ```js
+     * import { exists, open, close } from 'node:fs';
+     *
+     * exists('myfile', (e) => {
+     *   if (e) {
+     *     console.error('myfile already exists');
+     *   } else {
+     *     open('myfile', 'wx', (err, fd) => {
+     *       if (err) throw err;
+     *
+     *       try {
+     *         writeMyData(fd);
+     *       } finally {
+     *         close(fd, (err) => {
+     *           if (err) throw err;
+     *         });
+     *       }
+     *     });
+     *   }
+     * });
+     * ```
+     *
+     * **write (RECOMMENDED)**
+     *
+     * ```js
+     * import { open, close } from 'node:fs';
+     * open('myfile', 'wx', (err, fd) => {
+     *   if (err) {
+     *     if (err.code === 'EEXIST') {
+     *       console.error('myfile already exists');
+     *       return;
+     *     }
+     *
+     *     throw err;
+     *   }
+     *
+     *   try {
+     *     writeMyData(fd);
+     *   } finally {
+     *     close(fd, (err) => {
+     *       if (err) throw err;
+     *     });
+     *   }
+     * });
+     * ```
+     *
+     * **read (NOT RECOMMENDED)**
+     *
+     * ```js
+     * import { open, close, exists } from 'node:fs';
+     *
+     * exists('myfile', (e) => {
+     *   if (e) {
+     *     open('myfile', 'r', (err, fd) => {
+     *       if (err) throw err;
+     *
+     *       try {
+     *         readMyData(fd);
+     *       } finally {
+     *         close(fd, (err) => {
+     *           if (err) throw err;
+     *         });
+     *       }
+     *     });
+     *   } else {
+     *     console.error('myfile does not exist');
+     *   }
+     * });
+     * ```
+     *
+     * **read (RECOMMENDED)**
+     *
+     * ```js
+     * import { open, close } from 'node:fs';
+     *
+     * open('myfile', 'r', (err, fd) => {
+     *   if (err) {
+     *     if (err.code === 'ENOENT') {
+     *       console.error('myfile does not exist');
+     *       return;
+     *     }
+     *
+     *     throw err;
+     *   }
+     *
+     *   try {
+     *     readMyData(fd);
+     *   } finally {
+     *     close(fd, (err) => {
+     *       if (err) throw err;
+     *     });
+     *   }
+     * });
+     * ```
+     *
+     * The "not recommended" examples above check for existence and then use the
+     * file; the "recommended" examples are better because they use the file directly
+     * and handle the error, if any.
+     *
+     * In general, check for the existence of a file only if the file won't be
+     * used directly, for example when its existence is a signal from another
+     * process.
+     * @since v0.0.2
+     * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead.
+     */
+    function exists(path: PathLike, callback: (exists: boolean) => void): void;
+    /** @deprecated */
+    namespace exists {
+        /**
+         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         */
+        function __promisify__(path: PathLike): Promise<boolean>;
+    }
+    /**
+     * Returns `true` if the path exists, `false` otherwise.
+     *
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link exists}.
+     *
+     * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other
+     * Node.js callbacks. `fs.existsSync()` does not use a callback.
+     *
+     * ```js
+     * import { existsSync } from 'node:fs';
+     *
+     * if (existsSync('/etc/passwd'))
+     *   console.log('The path exists.');
+     * ```
+     * @since v0.1.21
+     */
+    function existsSync(path: PathLike): boolean;
+    namespace constants {
+        // File Access Constants
+        /** Constant for fs.access(). File is visible to the calling process. */
+        const F_OK: number;
+        /** Constant for fs.access(). File can be read by the calling process. */
+        const R_OK: number;
+        /** Constant for fs.access(). File can be written by the calling process. */
+        const W_OK: number;
+        /** Constant for fs.access(). File can be executed by the calling process. */
+        const X_OK: number;
+        // File Copy Constants
+        /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
+        const COPYFILE_EXCL: number;
+        /**
+         * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
+         * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
+         */
+        const COPYFILE_FICLONE: number;
+        /**
+         * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
+         * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
+         */
+        const COPYFILE_FICLONE_FORCE: number;
+        // File Open Constants
+        /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
+        const O_RDONLY: number;
+        /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
+        const O_WRONLY: number;
+        /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
+        const O_RDWR: number;
+        /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
+        const O_CREAT: number;
+        /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
+        const O_EXCL: number;
+        /**
+         * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
+         * opening the path shall not cause that terminal to become the controlling terminal for the process
+         * (if the process does not already have one).
+         */
+        const O_NOCTTY: number;
+        /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
+        const O_TRUNC: number;
+        /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
+        const O_APPEND: number;
+        /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
+        const O_DIRECTORY: number;
+        /**
+         * constant for fs.open().
+         * Flag indicating reading accesses to the file system will no longer result in
+         * an update to the atime information associated with the file.
+         * This flag is available on Linux operating systems only.
+         */
+        const O_NOATIME: number;
+        /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
+        const O_NOFOLLOW: number;
+        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
+        const O_SYNC: number;
+        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
+        const O_DSYNC: number;
+        /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
+        const O_SYMLINK: number;
+        /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
+        const O_DIRECT: number;
+        /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
+        const O_NONBLOCK: number;
+        // File Type Constants
+        /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
+        const S_IFMT: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
+        const S_IFREG: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
+        const S_IFDIR: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
+        const S_IFCHR: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
+        const S_IFBLK: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
+        const S_IFIFO: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
+        const S_IFLNK: number;
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
+        const S_IFSOCK: number;
+        // File Mode Constants
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
+        const S_IRWXU: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
+        const S_IRUSR: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
+        const S_IWUSR: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
+        const S_IXUSR: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
+        const S_IRWXG: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
+        const S_IRGRP: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
+        const S_IWGRP: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
+        const S_IXGRP: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
+        const S_IRWXO: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
+        const S_IROTH: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
+        const S_IWOTH: number;
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
+        const S_IXOTH: number;
+        /**
+         * When set, a memory file mapping is used to access the file. This flag
+         * is available on Windows operating systems only. On other operating systems,
+         * this flag is ignored.
+         */
+        const UV_FS_O_FILEMAP: number;
+    }
+    /**
+     * Tests a user's permissions for the file or directory specified by `path`.
+     * The `mode` argument is an optional integer that specifies the accessibility
+     * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK`
+     * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+     * possible values of `mode`.
+     *
+     * The final argument, `callback`, is a callback function that is invoked with
+     * a possible error argument. If any of the accessibility checks fail, the error
+     * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable.
+     *
+     * ```js
+     * import { access, constants } from 'node:fs';
+     *
+     * const file = 'package.json';
+     *
+     * // Check if the file exists in the current directory.
+     * access(file, constants.F_OK, (err) => {
+     *   console.log(`${file} ${err ? 'does not exist' : 'exists'}`);
+     * });
+     *
+     * // Check if the file is readable.
+     * access(file, constants.R_OK, (err) => {
+     *   console.log(`${file} ${err ? 'is not readable' : 'is readable'}`);
+     * });
+     *
+     * // Check if the file is writable.
+     * access(file, constants.W_OK, (err) => {
+     *   console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
+     * });
+     *
+     * // Check if the file is readable and writable.
+     * access(file, constants.R_OK | constants.W_OK, (err) => {
+     *   console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
+     * });
+     * ```
+     *
+     * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
+     * so introduces a race condition, since other processes may change the file's
+     * state between the two calls. Instead, user code should open/read/write the
+     * file directly and handle the error raised if the file is not accessible.
+     *
+     * **write (NOT RECOMMENDED)**
+     *
+     * ```js
+     * import { access, open, close } from 'node:fs';
+     *
+     * access('myfile', (err) => {
+     *   if (!err) {
+     *     console.error('myfile already exists');
+     *     return;
+     *   }
+     *
+     *   open('myfile', 'wx', (err, fd) => {
+     *     if (err) throw err;
+     *
+     *     try {
+     *       writeMyData(fd);
+     *     } finally {
+     *       close(fd, (err) => {
+     *         if (err) throw err;
+     *       });
+     *     }
+     *   });
+     * });
+     * ```
+     *
+     * **write (RECOMMENDED)**
+     *
+     * ```js
+     * import { open, close } from 'node:fs';
+     *
+     * open('myfile', 'wx', (err, fd) => {
+     *   if (err) {
+     *     if (err.code === 'EEXIST') {
+     *       console.error('myfile already exists');
+     *       return;
+     *     }
+     *
+     *     throw err;
+     *   }
+     *
+     *   try {
+     *     writeMyData(fd);
+     *   } finally {
+     *     close(fd, (err) => {
+     *       if (err) throw err;
+     *     });
+     *   }
+     * });
+     * ```
+     *
+     * **read (NOT RECOMMENDED)**
+     *
+     * ```js
+     * import { access, open, close } from 'node:fs';
+     * access('myfile', (err) => {
+     *   if (err) {
+     *     if (err.code === 'ENOENT') {
+     *       console.error('myfile does not exist');
+     *       return;
+     *     }
+     *
+     *     throw err;
+     *   }
+     *
+     *   open('myfile', 'r', (err, fd) => {
+     *     if (err) throw err;
+     *
+     *     try {
+     *       readMyData(fd);
+     *     } finally {
+     *       close(fd, (err) => {
+     *         if (err) throw err;
+     *       });
+     *     }
+     *   });
+     * });
+     * ```
+     *
+     * **read (RECOMMENDED)**
+     *
+     * ```js
+     * import { open, close } from 'node:fs';
+     *
+     * open('myfile', 'r', (err, fd) => {
+     *   if (err) {
+     *     if (err.code === 'ENOENT') {
+     *       console.error('myfile does not exist');
+     *       return;
+     *     }
+     *
+     *     throw err;
+     *   }
+     *
+     *   try {
+     *     readMyData(fd);
+     *   } finally {
+     *     close(fd, (err) => {
+     *       if (err) throw err;
+     *     });
+     *   }
+     * });
+     * ```
+     *
+     * The "not recommended" examples above check for accessibility and then use the
+     * file; the "recommended" examples are better because they use the file directly
+     * and handle the error, if any.
+     *
+     * In general, check for the accessibility of a file only if the file will not be
+     * used directly, for example when its accessibility is a signal from another
+     * process.
+     *
+     * On Windows, access-control policies (ACLs) on a directory may limit access to
+     * a file or directory. The `fs.access()` function, however, does not check the
+     * ACL and therefore may report that a path is accessible even if the ACL restricts
+     * the user from reading or writing to it.
+     * @since v0.11.15
+     * @param [mode=fs.constants.F_OK]
+     */
+    function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
+    /**
+     * Asynchronously tests a user's permissions for the file specified by path.
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+     */
+    function access(path: PathLike, callback: NoParamCallback): void;
+    namespace access {
+        /**
+         * Asynchronously tests a user's permissions for the file specified by path.
+         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
+         * URL support is _experimental_.
+         */
+        function __promisify__(path: PathLike, mode?: number): Promise<void>;
+    }
+    /**
+     * Synchronously tests a user's permissions for the file or directory specified
+     * by `path`. The `mode` argument is an optional integer that specifies the
+     * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and
+     * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+     * possible values of `mode`.
+     *
+     * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
+     * the method will return `undefined`.
+     *
+     * ```js
+     * import { accessSync, constants } from 'node:fs';
+     *
+     * try {
+     *   accessSync('etc/passwd', constants.R_OK | constants.W_OK);
+     *   console.log('can read/write');
+     * } catch (err) {
+     *   console.error('no access!');
+     * }
+     * ```
+     * @since v0.11.15
+     * @param [mode=fs.constants.F_OK]
+     */
+    function accessSync(path: PathLike, mode?: number): void;
+    interface StreamOptions {
+        flags?: string | undefined;
+        encoding?: BufferEncoding | undefined;
+        fd?: number | FileHandle | undefined;
+        mode?: number | undefined;
+        autoClose?: boolean | undefined;
+        emitClose?: boolean | undefined;
+        start?: number | undefined;
+        signal?: AbortSignal | null | undefined;
+        highWaterMark?: number | undefined;
+    }
+    interface FSImplementation {
+        open?: (...args: any[]) => any;
+        close?: (...args: any[]) => any;
+    }
+    interface CreateReadStreamFSImplementation extends FSImplementation {
+        read: (...args: any[]) => any;
+    }
+    interface CreateWriteStreamFSImplementation extends FSImplementation {
+        write: (...args: any[]) => any;
+        writev?: (...args: any[]) => any;
+    }
+    interface ReadStreamOptions extends StreamOptions {
+        fs?: CreateReadStreamFSImplementation | null | undefined;
+        end?: number | undefined;
+    }
+    interface WriteStreamOptions extends StreamOptions {
+        fs?: CreateWriteStreamFSImplementation | null | undefined;
+        flush?: boolean | undefined;
+    }
+    /**
+     * `options` can include `start` and `end` values to read a range of bytes from
+     * the file instead of the entire file. Both `start` and `end` are inclusive and
+     * start counting at 0, allowed values are in the
+     * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is
+     * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the
+     * current file position. The `encoding` can be any one of those accepted by `Buffer`.
+     *
+     * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
+     * the specified file descriptor. This means that no `'open'` event will be
+     * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`.
+     *
+     * If `fd` points to a character device that only supports blocking reads
+     * (such as keyboard or sound card), read operations do not finish until data is
+     * available. This can prevent the process from exiting and the stream from
+     * closing naturally.
+     *
+     * By default, the stream will emit a `'close'` event after it has been
+     * destroyed.  Set the `emitClose` option to `false` to change this behavior.
+     *
+     * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option,
+     * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is
+     * also required.
+     *
+     * ```js
+     * import { createReadStream } from 'node:fs';
+     *
+     * // Create a stream from some character device.
+     * const stream = createReadStream('/dev/input/event0');
+     * setTimeout(() => {
+     *   stream.close(); // This may not close the stream.
+     *   // Artificially marking end-of-stream, as if the underlying resource had
+     *   // indicated end-of-file by itself, allows the stream to close.
+     *   // This does not cancel pending read operations, and if there is such an
+     *   // operation, the process may still not be able to exit successfully
+     *   // until it finishes.
+     *   stream.push(null);
+     *   stream.read(0);
+     * }, 100);
+     * ```
+     *
+     * If `autoClose` is false, then the file descriptor won't be closed, even if
+     * there's an error. It is the application's responsibility to close it and make
+     * sure there's no file descriptor leak. If `autoClose` is set to true (default
+     * behavior), on `'error'` or `'end'` the file descriptor will be closed
+     * automatically.
+     *
+     * `mode` sets the file mode (permission and sticky bits), but only if the
+     * file was created.
+     *
+     * An example to read the last 10 bytes of a file which is 100 bytes long:
+     *
+     * ```js
+     * import { createReadStream } from 'node:fs';
+     *
+     * createReadStream('sample.txt', { start: 90, end: 99 });
+     * ```
+     *
+     * If `options` is a string, then it specifies the encoding.
+     * @since v0.1.31
+     */
+    function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream;
+    /**
+     * `options` may also include a `start` option to allow writing data at some
+     * position past the beginning of the file, allowed values are in the
+     * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+     * replacing it may require the `flags` option to be set to `r+` rather than the
+     * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
+     *
+     * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false,
+     * then the file descriptor won't be closed, even if there's an error.
+     * It is the application's responsibility to close it and make sure there's no
+     * file descriptor leak.
+     *
+     * By default, the stream will emit a `'close'` event after it has been
+     * destroyed.  Set the `emitClose` option to `false` to change this behavior.
+     *
+     * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce
+     * performance as some optimizations (`_writev()`)
+     * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override
+     * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required.
+     *
+     * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be
+     * emitted. `fd` should be blocking; non-blocking `fd`s
+     * should be passed to `net.Socket`.
+     *
+     * If `options` is a string, then it specifies the encoding.
+     * @since v0.1.31
+     */
+    function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
+    /**
+     * Forces all currently queued I/O operations associated with the file to the
+     * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
+     * than a possible
+     * exception are given to the completion callback.
+     * @since v0.1.96
+     */
+    function fdatasync(fd: number, callback: NoParamCallback): void;
+    namespace fdatasync {
+        /**
+         * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
+         * @param fd A file descriptor.
+         */
+        function __promisify__(fd: number): Promise<void>;
+    }
+    /**
+     * Forces all currently queued I/O operations associated with the file to the
+     * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`.
+     * @since v0.1.96
+     */
+    function fdatasyncSync(fd: number): void;
+    /**
+     * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+     * already exists. No arguments other than a possible exception are given to the
+     * callback function. Node.js makes no guarantees about the atomicity of the copy
+     * operation. If an error occurs after the destination file has been opened for
+     * writing, Node.js will attempt to remove the destination.
+     *
+     * `mode` is an optional integer that specifies the behavior
+     * of the copy operation. It is possible to create a mask consisting of the bitwise
+     * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+     *
+     * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+     * exists.
+     * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+     * copy-on-write reflink. If the platform does not support copy-on-write, then a
+     * fallback copy mechanism is used.
+     * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+     * create a copy-on-write reflink. If the platform does not support
+     * copy-on-write, then the operation will fail.
+     *
+     * ```js
+     * import { copyFile, constants } from 'node:fs';
+     *
+     * function callback(err) {
+     *   if (err) throw err;
+     *   console.log('source.txt was copied to destination.txt');
+     * }
+     *
+     * // destination.txt will be created or overwritten by default.
+     * copyFile('source.txt', 'destination.txt', callback);
+     *
+     * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+     * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback);
+     * ```
+     * @since v8.5.0
+     * @param src source filename to copy
+     * @param dest destination filename of the copy operation
+     * @param [mode=0] modifiers for copy operation.
+     */
+    function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
+    function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
+    namespace copyFile {
+        function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
+    }
+    /**
+     * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+     * already exists. Returns `undefined`. Node.js makes no guarantees about the
+     * atomicity of the copy operation. If an error occurs after the destination file
+     * has been opened for writing, Node.js will attempt to remove the destination.
+     *
+     * `mode` is an optional integer that specifies the behavior
+     * of the copy operation. It is possible to create a mask consisting of the bitwise
+     * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
+     *
+     * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
+     * exists.
+     * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
+     * copy-on-write reflink. If the platform does not support copy-on-write, then a
+     * fallback copy mechanism is used.
+     * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
+     * create a copy-on-write reflink. If the platform does not support
+     * copy-on-write, then the operation will fail.
+     *
+     * ```js
+     * import { copyFileSync, constants } from 'node:fs';
+     *
+     * // destination.txt will be created or overwritten by default.
+     * copyFileSync('source.txt', 'destination.txt');
+     * console.log('source.txt was copied to destination.txt');
+     *
+     * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+     * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+     * ```
+     * @since v8.5.0
+     * @param src source filename to copy
+     * @param dest destination filename of the copy operation
+     * @param [mode=0] modifiers for copy operation.
+     */
+    function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
+    /**
+     * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`.
+     *
+     * `position` is the offset from the beginning of the file where this data
+     * should be written. If `typeof position !== 'number'`, the data will be written
+     * at the current position.
+     *
+     * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`.
+     *
+     * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties.
+     *
+     * It is unsafe to use `fs.writev()` multiple times on the same file without
+     * waiting for the callback. For this scenario, use {@link createWriteStream}.
+     *
+     * On Linux, positional writes don't work when the file is opened in append mode.
+     * The kernel ignores the position argument and always appends the data to
+     * the end of the file.
+     * @since v12.9.0
+     * @param [position='null']
+     */
+    function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+        fd: number,
+        buffers: TBuffers,
+        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void,
+    ): void;
+    function writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+        fd: number,
+        buffers: TBuffers,
+        position: number | null,
+        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void,
+    ): void;
+    // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314
+    // TODO: remove default in future major version
+    interface WriteVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
+        bytesWritten: number;
+        buffers: T;
+    }
+    namespace writev {
+        function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+            fd: number,
+            buffers: TBuffers,
+            position?: number,
+        ): Promise<WriteVResult<TBuffers>>;
+    }
+    /**
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link writev}.
+     * @since v12.9.0
+     * @param [position='null']
+     * @return The number of bytes written.
+     */
+    function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
+    /**
+     * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s
+     * using `readv()`.
+     *
+     * `position` is the offset from the beginning of the file from where data
+     * should be read. If `typeof position !== 'number'`, the data will be read
+     * from the current position.
+     *
+     * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file.
+     *
+     * If this method is invoked as its `util.promisify()` ed version, it returns
+     * a promise for an `Object` with `bytesRead` and `buffers` properties.
+     * @since v13.13.0, v12.17.0
+     * @param [position='null']
+     */
+    function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+        fd: number,
+        buffers: TBuffers,
+        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void,
+    ): void;
+    function readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+        fd: number,
+        buffers: TBuffers,
+        position: number | null,
+        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void,
+    ): void;
+    // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314
+    // TODO: remove default in future major version
+    interface ReadVResult<T extends readonly NodeJS.ArrayBufferView[] = NodeJS.ArrayBufferView[]> {
+        bytesRead: number;
+        buffers: T;
+    }
+    namespace readv {
+        function __promisify__<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+            fd: number,
+            buffers: TBuffers,
+            position?: number,
+        ): Promise<ReadVResult<TBuffers>>;
+    }
+    /**
+     * For detailed information, see the documentation of the asynchronous version of
+     * this API: {@link readv}.
+     * @since v13.13.0, v12.17.0
+     * @param [position='null']
+     * @return The number of bytes read.
+     */
+    function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number;
+
+    interface OpenAsBlobOptions {
+        /**
+         * An optional mime type for the blob.
+         *
+         * @default 'undefined'
+         */
+        type?: string | undefined;
+    }
+
+    /**
+     * Returns a `Blob` whose data is backed by the given file.
+     *
+     * The file must not be modified after the `Blob` is created. Any modifications
+     * will cause reading the `Blob` data to fail with a `DOMException` error.
+     * Synchronous stat operations on the file when the `Blob` is created, and before
+     * each read in order to detect whether the file data has been modified on disk.
+     *
+     * ```js
+     * import { openAsBlob } from 'node:fs';
+     *
+     * const blob = await openAsBlob('the.file.txt');
+     * const ab = await blob.arrayBuffer();
+     * blob.stream();
+     * ```
+     * @since v19.8.0
+     */
+    function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
+
+    interface OpenDirOptions {
+        /**
+         * @default 'utf8'
+         */
+        encoding?: BufferEncoding | undefined;
+        /**
+         * Number of directory entries that are buffered
+         * internally when reading from the directory. Higher values lead to better
+         * performance but higher memory usage.
+         * @default 32
+         */
+        bufferSize?: number | undefined;
+        /**
+         * @default false
+         */
+        recursive?: boolean | undefined;
+    }
+    /**
+     * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
+     *
+     * Creates an `fs.Dir`, which contains all further functions for reading from
+     * and cleaning up the directory.
+     *
+     * The `encoding` option sets the encoding for the `path` while opening the
+     * directory and subsequent read operations.
+     * @since v12.12.0
+     */
+    function opendirSync(path: PathLike, options?: OpenDirOptions): Dir;
+    /**
+     * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for
+     * more details.
+     *
+     * Creates an `fs.Dir`, which contains all further functions for reading from
+     * and cleaning up the directory.
+     *
+     * The `encoding` option sets the encoding for the `path` while opening the
+     * directory and subsequent read operations.
+     * @since v12.12.0
+     */
+    function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
+    function opendir(
+        path: PathLike,
+        options: OpenDirOptions,
+        cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void,
+    ): void;
+    namespace opendir {
+        function __promisify__(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+    }
+    interface BigIntStats extends StatsBase<bigint> {
+        atimeNs: bigint;
+        mtimeNs: bigint;
+        ctimeNs: bigint;
+        birthtimeNs: bigint;
+    }
+    interface BigIntOptions {
+        bigint: true;
+    }
+    interface StatOptions {
+        bigint?: boolean | undefined;
+    }
+    interface StatSyncOptions extends StatOptions {
+        throwIfNoEntry?: boolean | undefined;
+    }
+    interface CopyOptionsBase {
+        /**
+         * Dereference symlinks
+         * @default false
+         */
+        dereference?: boolean | undefined;
+        /**
+         * When `force` is `false`, and the destination
+         * exists, throw an error.
+         * @default false
+         */
+        errorOnExist?: boolean | undefined;
+        /**
+         * Overwrite existing file or directory. _The copy
+         * operation will ignore errors if you set this to false and the destination
+         * exists. Use the `errorOnExist` option to change this behavior.
+         * @default true
+         */
+        force?: boolean | undefined;
+        /**
+         * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()}
+         */
+        mode?: number | undefined;
+        /**
+         * When `true` timestamps from `src` will
+         * be preserved.
+         * @default false
+         */
+        preserveTimestamps?: boolean | undefined;
+        /**
+         * Copy directories recursively.
+         * @default false
+         */
+        recursive?: boolean | undefined;
+        /**
+         * When true, path resolution for symlinks will be skipped
+         * @default false
+         */
+        verbatimSymlinks?: boolean | undefined;
+    }
+    interface CopyOptions extends CopyOptionsBase {
+        /**
+         * Function to filter copied files/directories. Return
+         * `true` to copy the item, `false` to ignore it.
+         */
+        filter?: ((source: string, destination: string) => boolean | Promise<boolean>) | undefined;
+    }
+    interface CopySyncOptions extends CopyOptionsBase {
+        /**
+         * Function to filter copied files/directories. Return
+         * `true` to copy the item, `false` to ignore it.
+         */
+        filter?: ((source: string, destination: string) => boolean) | undefined;
+    }
+    /**
+     * Asynchronously copies the entire directory structure from `src` to `dest`,
+     * including subdirectories and files.
+     *
+     * When copying a directory to another directory, globs are not supported and
+     * behavior is similar to `cp dir1/ dir2/`.
+     * @since v16.7.0
+     * @experimental
+     * @param src source path to copy.
+     * @param dest destination path to copy to.
+     */
+    function cp(
+        source: string | URL,
+        destination: string | URL,
+        callback: (err: NodeJS.ErrnoException | null) => void,
+    ): void;
+    function cp(
+        source: string | URL,
+        destination: string | URL,
+        opts: CopyOptions,
+        callback: (err: NodeJS.ErrnoException | null) => void,
+    ): void;
+    /**
+     * Synchronously copies the entire directory structure from `src` to `dest`,
+     * including subdirectories and files.
+     *
+     * When copying a directory to another directory, globs are not supported and
+     * behavior is similar to `cp dir1/ dir2/`.
+     * @since v16.7.0
+     * @experimental
+     * @param src source path to copy.
+     * @param dest destination path to copy to.
+     */
+    function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
+
+    // TODO: collapse
+    interface _GlobOptions<T extends Dirent | string> {
+        /**
+         * Current working directory.
+         * @default process.cwd()
+         */
+        cwd?: string | URL | undefined;
+        /**
+         * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
+         * @default false
+         * @since v22.2.0
+         */
+        withFileTypes?: boolean | undefined;
+        /**
+         * Function to filter out files/directories or a
+         * list of glob patterns to be excluded. If a function is provided, return
+         * `true` to exclude the item, `false` to include it.
+         * If a string array is provided, each string should be a glob pattern that
+         * specifies paths to exclude. Note: Negation patterns (e.g., '!foo.js') are
+         * not supported.
+         * @default undefined
+         */
+        exclude?: ((fileName: T) => boolean) | readonly string[] | undefined;
+    }
+    interface GlobOptions extends _GlobOptions<Dirent | string> {}
+    interface GlobOptionsWithFileTypes extends _GlobOptions<Dirent> {
+        withFileTypes: true;
+    }
+    interface GlobOptionsWithoutFileTypes extends _GlobOptions<string> {
+        withFileTypes?: false | undefined;
+    }
+
+    /**
+     * Retrieves the files matching the specified pattern.
+     *
+     * ```js
+     * import { glob } from 'node:fs';
+     *
+     * glob('*.js', (err, matches) => {
+     *   if (err) throw err;
+     *   console.log(matches);
+     * });
+     * ```
+     * @since v22.0.0
+     */
+    function glob(
+        pattern: string | readonly string[],
+        callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
+    ): void;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithFileTypes,
+        callback: (
+            err: NodeJS.ErrnoException | null,
+            matches: Dirent[],
+        ) => void,
+    ): void;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithoutFileTypes,
+        callback: (
+            err: NodeJS.ErrnoException | null,
+            matches: string[],
+        ) => void,
+    ): void;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptions,
+        callback: (
+            err: NodeJS.ErrnoException | null,
+            matches: Dirent[] | string[],
+        ) => void,
+    ): void;
+    /**
+     * ```js
+     * import { globSync } from 'node:fs';
+     *
+     * console.log(globSync('*.js'));
+     * ```
+     * @since v22.0.0
+     * @returns paths of files that match the pattern.
+     */
+    function globSync(pattern: string | readonly string[]): string[];
+    function globSync(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithFileTypes,
+    ): Dirent[];
+    function globSync(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithoutFileTypes,
+    ): string[];
+    function globSync(
+        pattern: string | readonly string[],
+        options: GlobOptions,
+    ): Dirent[] | string[];
+}
+declare module "node:fs" {
+    export * as promises from "node:fs/promises";
+}
+declare module "fs" {
+    export * from "node:fs";
+}

+ 1319 - 0
node_modules/@types/node/fs/promises.d.ts

@@ -0,0 +1,1319 @@
+declare module "node:fs/promises" {
+    import { NonSharedBuffer } from "node:buffer";
+    import { Abortable } from "node:events";
+    import { Interface as ReadlineInterface } from "node:readline";
+    import {
+        BigIntStats,
+        BigIntStatsFs,
+        BufferEncodingOption,
+        constants as fsConstants,
+        CopyOptions,
+        Dir,
+        Dirent,
+        EncodingOption,
+        GlobOptions,
+        GlobOptionsWithFileTypes,
+        GlobOptionsWithoutFileTypes,
+        MakeDirectoryOptions,
+        Mode,
+        ObjectEncodingOptions,
+        OpenDirOptions,
+        OpenMode,
+        PathLike,
+        ReadOptions,
+        ReadOptionsWithBuffer,
+        ReadPosition,
+        ReadStream,
+        ReadVResult,
+        RmOptions,
+        StatFsOptions,
+        StatOptions,
+        Stats,
+        StatsFs,
+        TimeLike,
+        WatchEventType,
+        WatchOptions as _WatchOptions,
+        WriteStream,
+        WriteVResult,
+    } from "node:fs";
+    import { Stream } from "node:stream";
+    import { ReadableStream } from "node:stream/web";
+    interface FileChangeInfo<T extends string | Buffer> {
+        eventType: WatchEventType;
+        filename: T | null;
+    }
+    interface FlagAndOpenMode {
+        mode?: Mode | undefined;
+        flag?: OpenMode | undefined;
+    }
+    interface FileReadResult<T extends NodeJS.ArrayBufferView> {
+        bytesRead: number;
+        buffer: T;
+    }
+    /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */
+    interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
+        /**
+         * @default `Buffer.alloc(0xffff)`
+         */
+        buffer?: T;
+        /**
+         * @default 0
+         */
+        offset?: number | null;
+        /**
+         * @default `buffer.byteLength`
+         */
+        length?: number | null;
+        position?: ReadPosition | null;
+    }
+    interface CreateReadStreamOptions extends Abortable {
+        encoding?: BufferEncoding | null | undefined;
+        autoClose?: boolean | undefined;
+        emitClose?: boolean | undefined;
+        start?: number | undefined;
+        end?: number | undefined;
+        highWaterMark?: number | undefined;
+    }
+    interface CreateWriteStreamOptions {
+        encoding?: BufferEncoding | null | undefined;
+        autoClose?: boolean | undefined;
+        emitClose?: boolean | undefined;
+        start?: number | undefined;
+        highWaterMark?: number | undefined;
+        flush?: boolean | undefined;
+    }
+    interface ReadableWebStreamOptions {
+        autoClose?: boolean | undefined;
+    }
+    // TODO: Add `EventEmitter` close
+    interface FileHandle {
+        /**
+         * The numeric file descriptor managed by the {FileHandle} object.
+         * @since v10.0.0
+         */
+        readonly fd: number;
+        /**
+         * Alias of `filehandle.writeFile()`.
+         *
+         * When operating on file handles, the mode cannot be changed from what it was set
+         * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
+         * @since v10.0.0
+         * @return Fulfills with `undefined` upon success.
+         */
+        appendFile(
+            data: string | Uint8Array,
+            options?:
+                | (ObjectEncodingOptions & Abortable)
+                | BufferEncoding
+                | null,
+        ): Promise<void>;
+        /**
+         * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
+         * @since v10.0.0
+         * @param uid The file's new owner's user id.
+         * @param gid The file's new group's group id.
+         * @return Fulfills with `undefined` upon success.
+         */
+        chown(uid: number, gid: number): Promise<void>;
+        /**
+         * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
+         * @since v10.0.0
+         * @param mode the file mode bit mask.
+         * @return Fulfills with `undefined` upon success.
+         */
+        chmod(mode: Mode): Promise<void>;
+        /**
+         * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
+         * returned by this method has a default `highWaterMark` of 64 KiB.
+         *
+         * `options` can include `start` and `end` values to read a range of bytes from
+         * the file instead of the entire file. Both `start` and `end` are inclusive and
+         * start counting at 0, allowed values are in the
+         * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
+         * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
+         * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
+         *
+         * If the `FileHandle` points to a character device that only supports blocking
+         * reads (such as keyboard or sound card), read operations do not finish until data
+         * is available. This can prevent the process from exiting and the stream from
+         * closing naturally.
+         *
+         * By default, the stream will emit a `'close'` event after it has been
+         * destroyed.  Set the `emitClose` option to `false` to change this behavior.
+         *
+         * ```js
+         * import { open } from 'node:fs/promises';
+         *
+         * const fd = await open('/dev/input/event0');
+         * // Create a stream from some character device.
+         * const stream = fd.createReadStream();
+         * setTimeout(() => {
+         *   stream.close(); // This may not close the stream.
+         *   // Artificially marking end-of-stream, as if the underlying resource had
+         *   // indicated end-of-file by itself, allows the stream to close.
+         *   // This does not cancel pending read operations, and if there is such an
+         *   // operation, the process may still not be able to exit successfully
+         *   // until it finishes.
+         *   stream.push(null);
+         *   stream.read(0);
+         * }, 100);
+         * ```
+         *
+         * If `autoClose` is false, then the file descriptor won't be closed, even if
+         * there's an error. It is the application's responsibility to close it and make
+         * sure there's no file descriptor leak. If `autoClose` is set to true (default
+         * behavior), on `'error'` or `'end'` the file descriptor will be closed
+         * automatically.
+         *
+         * An example to read the last 10 bytes of a file which is 100 bytes long:
+         *
+         * ```js
+         * import { open } from 'node:fs/promises';
+         *
+         * const fd = await open('sample.txt');
+         * fd.createReadStream({ start: 90, end: 99 });
+         * ```
+         * @since v16.11.0
+         */
+        createReadStream(options?: CreateReadStreamOptions): ReadStream;
+        /**
+         * `options` may also include a `start` option to allow writing data at some
+         * position past the beginning of the file, allowed values are in the
+         * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
+         * replacing it may require the `flags` `open` option to be set to `r+` rather than
+         * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
+         *
+         * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false,
+         * then the file descriptor won't be closed, even if there's an error.
+         * It is the application's responsibility to close it and make sure there's no
+         * file descriptor leak.
+         *
+         * By default, the stream will emit a `'close'` event after it has been
+         * destroyed.  Set the `emitClose` option to `false` to change this behavior.
+         * @since v16.11.0
+         */
+        createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
+        /**
+         * Forces all currently queued I/O operations associated with the file to the
+         * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
+         *
+         * Unlike `filehandle.sync` this method does not flush modified metadata.
+         * @since v10.0.0
+         * @return Fulfills with `undefined` upon success.
+         */
+        datasync(): Promise<void>;
+        /**
+         * Request that all data for the open file descriptor is flushed to the storage
+         * device. The specific implementation is operating system and device specific.
+         * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
+         * @since v10.0.0
+         * @return Fulfills with `undefined` upon success.
+         */
+        sync(): Promise<void>;
+        /**
+         * Reads data from the file and stores that in the given buffer.
+         *
+         * If the file is not modified concurrently, the end-of-file is reached when the
+         * number of bytes read is zero.
+         * @since v10.0.0
+         * @param buffer A buffer that will be filled with the file data read.
+         * @param offset The location in the buffer at which to start filling.
+         * @param length The number of bytes to read.
+         * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
+         * integer, the current file position will remain unchanged.
+         * @return Fulfills upon success with an object with two properties:
+         */
+        read<T extends NodeJS.ArrayBufferView>(
+            buffer: T,
+            offset?: number | null,
+            length?: number | null,
+            position?: ReadPosition | null,
+        ): Promise<FileReadResult<T>>;
+        read<T extends NodeJS.ArrayBufferView>(
+            buffer: T,
+            options?: ReadOptions,
+        ): Promise<FileReadResult<T>>;
+        read<T extends NodeJS.ArrayBufferView = NonSharedBuffer>(
+            options?: ReadOptionsWithBuffer<T>,
+        ): Promise<FileReadResult<T>>;
+        /**
+         * Returns a byte-oriented `ReadableStream` that may be used to read the file's
+         * contents.
+         *
+         * An error will be thrown if this method is called more than once or is called
+         * after the `FileHandle` is closed or closing.
+         *
+         * ```js
+         * import {
+         *   open,
+         * } from 'node:fs/promises';
+         *
+         * const file = await open('./some/file/to/read');
+         *
+         * for await (const chunk of file.readableWebStream())
+         *   console.log(chunk);
+         *
+         * await file.close();
+         * ```
+         *
+         * While the `ReadableStream` will read the file to completion, it will not
+         * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
+         * @since v17.0.0
+         */
+        readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
+        /**
+         * Asynchronously reads the entire contents of a file.
+         *
+         * If `options` is a string, then it specifies the `encoding`.
+         *
+         * The `FileHandle` has to support reading.
+         *
+         * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current
+         * position till the end of the file. It doesn't always read from the beginning
+         * of the file.
+         * @since v10.0.0
+         * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
+         * data will be a string.
+         */
+        readFile(
+            options?:
+                | ({ encoding?: null | undefined } & Abortable)
+                | null,
+        ): Promise<NonSharedBuffer>;
+        /**
+         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+         * The `FileHandle` must have been opened for reading.
+         */
+        readFile(
+            options:
+                | ({ encoding: BufferEncoding } & Abortable)
+                | BufferEncoding,
+        ): Promise<string>;
+        /**
+         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
+         * The `FileHandle` must have been opened for reading.
+         */
+        readFile(
+            options?:
+                | (ObjectEncodingOptions & Abortable)
+                | BufferEncoding
+                | null,
+        ): Promise<string | NonSharedBuffer>;
+        /**
+         * Convenience method to create a `readline` interface and stream over the file.
+         * See `filehandle.createReadStream()` for the options.
+         *
+         * ```js
+         * import { open } from 'node:fs/promises';
+         *
+         * const file = await open('./some/file/to/read');
+         *
+         * for await (const line of file.readLines()) {
+         *   console.log(line);
+         * }
+         * ```
+         * @since v18.11.0
+         */
+        readLines(options?: CreateReadStreamOptions): ReadlineInterface;
+        /**
+         * @since v10.0.0
+         * @return Fulfills with an {fs.Stats} for the file.
+         */
+        stat(
+            opts?: StatOptions & {
+                bigint?: false | undefined;
+            },
+        ): Promise<Stats>;
+        stat(
+            opts: StatOptions & {
+                bigint: true;
+            },
+        ): Promise<BigIntStats>;
+        stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
+        /**
+         * Truncates the file.
+         *
+         * If the file was larger than `len` bytes, only the first `len` bytes will be
+         * retained in the file.
+         *
+         * The following example retains only the first four bytes of the file:
+         *
+         * ```js
+         * import { open } from 'node:fs/promises';
+         *
+         * let filehandle = null;
+         * try {
+         *   filehandle = await open('temp.txt', 'r+');
+         *   await filehandle.truncate(4);
+         * } finally {
+         *   await filehandle?.close();
+         * }
+         * ```
+         *
+         * If the file previously was shorter than `len` bytes, it is extended, and the
+         * extended part is filled with null bytes (`'\0'`):
+         *
+         * If `len` is negative then `0` will be used.
+         * @since v10.0.0
+         * @param [len=0]
+         * @return Fulfills with `undefined` upon success.
+         */
+        truncate(len?: number): Promise<void>;
+        /**
+         * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success.
+         * @since v10.0.0
+         */
+        utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
+        /**
+         * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
+         * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+         * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+         * The promise is fulfilled with no arguments upon success.
+         *
+         * If `options` is a string, then it specifies the `encoding`.
+         *
+         * The `FileHandle` has to support writing.
+         *
+         * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
+         * without waiting for the promise to be fulfilled (or rejected).
+         *
+         * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
+         * current position till the end of the file. It doesn't always write from the
+         * beginning of the file.
+         * @since v10.0.0
+         */
+        writeFile(
+            data: string | Uint8Array,
+            options?:
+                | (ObjectEncodingOptions & Abortable)
+                | BufferEncoding
+                | null,
+        ): Promise<void>;
+        /**
+         * Write `buffer` to the file.
+         *
+         * The promise is fulfilled with an object containing two properties:
+         *
+         * It is unsafe to use `filehandle.write()` multiple times on the same file
+         * without waiting for the promise to be fulfilled (or rejected). For this
+         * scenario, use `filehandle.createWriteStream()`.
+         *
+         * On Linux, positional writes do not work when the file is opened in append mode.
+         * The kernel ignores the position argument and always appends the data to
+         * the end of the file.
+         * @since v10.0.0
+         * @param offset The start position from within `buffer` where the data to write begins.
+         * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
+         * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
+         * position. See the POSIX pwrite(2) documentation for more detail.
+         */
+        write<TBuffer extends NodeJS.ArrayBufferView>(
+            buffer: TBuffer,
+            offset?: number | null,
+            length?: number | null,
+            position?: number | null,
+        ): Promise<{
+            bytesWritten: number;
+            buffer: TBuffer;
+        }>;
+        write<TBuffer extends Uint8Array>(
+            buffer: TBuffer,
+            options?: { offset?: number; length?: number; position?: number },
+        ): Promise<{
+            bytesWritten: number;
+            buffer: TBuffer;
+        }>;
+        write(
+            data: string,
+            position?: number | null,
+            encoding?: BufferEncoding | null,
+        ): Promise<{
+            bytesWritten: number;
+            buffer: string;
+        }>;
+        /**
+         * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
+         *
+         * The promise is fulfilled with an object containing a two properties:
+         *
+         * It is unsafe to call `writev()` multiple times on the same file without waiting
+         * for the promise to be fulfilled (or rejected).
+         *
+         * On Linux, positional writes don't work when the file is opened in append mode.
+         * The kernel ignores the position argument and always appends the data to
+         * the end of the file.
+         * @since v12.9.0
+         * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
+         * position.
+         */
+        writev<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+            buffers: TBuffers,
+            position?: number,
+        ): Promise<WriteVResult<TBuffers>>;
+        /**
+         * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
+         * @since v13.13.0, v12.17.0
+         * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
+         * @return Fulfills upon success an object containing two properties:
+         */
+        readv<TBuffers extends readonly NodeJS.ArrayBufferView[]>(
+            buffers: TBuffers,
+            position?: number,
+        ): Promise<ReadVResult<TBuffers>>;
+        /**
+         * Closes the file handle after waiting for any pending operation on the handle to
+         * complete.
+         *
+         * ```js
+         * import { open } from 'node:fs/promises';
+         *
+         * let filehandle;
+         * try {
+         *   filehandle = await open('thefile.txt', 'r');
+         * } finally {
+         *   await filehandle?.close();
+         * }
+         * ```
+         * @since v10.0.0
+         * @return Fulfills with `undefined` upon success.
+         */
+        close(): Promise<void>;
+        /**
+         * Calls `filehandle.close()` and returns a promise that fulfills when the
+         * filehandle is closed.
+         * @since v20.4.0, v18.8.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    const constants: typeof fsConstants;
+    /**
+     * Tests a user's permissions for the file or directory specified by `path`.
+     * The `mode` argument is an optional integer that specifies the accessibility
+     * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK`
+     * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
+     * possible values of `mode`.
+     *
+     * If the accessibility check is successful, the promise is fulfilled with no
+     * value. If any of the accessibility checks fail, the promise is rejected
+     * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
+     * written by the current process.
+     *
+     * ```js
+     * import { access, constants } from 'node:fs/promises';
+     *
+     * try {
+     *   await access('/etc/passwd', constants.R_OK | constants.W_OK);
+     *   console.log('can access');
+     * } catch {
+     *   console.error('cannot access');
+     * }
+     * ```
+     *
+     * Using `fsPromises.access()` to check for the accessibility of a file before
+     * calling `fsPromises.open()` is not recommended. Doing so introduces a race
+     * condition, since other processes may change the file's state between the two
+     * calls. Instead, user code should open/read/write the file directly and handle
+     * the error raised if the file is not accessible.
+     * @since v10.0.0
+     * @param [mode=fs.constants.F_OK]
+     * @return Fulfills with `undefined` upon success.
+     */
+    function access(path: PathLike, mode?: number): Promise<void>;
+    /**
+     * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
+     * already exists.
+     *
+     * No guarantees are made about the atomicity of the copy operation. If an
+     * error occurs after the destination file has been opened for writing, an attempt
+     * will be made to remove the destination.
+     *
+     * ```js
+     * import { copyFile, constants } from 'node:fs/promises';
+     *
+     * try {
+     *   await copyFile('source.txt', 'destination.txt');
+     *   console.log('source.txt was copied to destination.txt');
+     * } catch {
+     *   console.error('The file could not be copied');
+     * }
+     *
+     * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
+     * try {
+     *   await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
+     *   console.log('source.txt was copied to destination.txt');
+     * } catch {
+     *   console.error('The file could not be copied');
+     * }
+     * ```
+     * @since v10.0.0
+     * @param src source filename to copy
+     * @param dest destination filename of the copy operation
+     * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
+     * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
+     * @return Fulfills with `undefined` upon success.
+     */
+    function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
+    /**
+     * Opens a `FileHandle`.
+     *
+     * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
+     *
+     * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
+     * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
+     * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
+     * @since v10.0.0
+     * @param [flags='r'] See `support of file system `flags``.
+     * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
+     * @return Fulfills with a {FileHandle} object.
+     */
+    function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
+    /**
+     * Renames `oldPath` to `newPath`.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
+    /**
+     * Truncates (shortens or extends the length) of the content at `path` to `len` bytes.
+     * @since v10.0.0
+     * @param [len=0]
+     * @return Fulfills with `undefined` upon success.
+     */
+    function truncate(path: PathLike, len?: number): Promise<void>;
+    /**
+     * Removes the directory identified by `path`.
+     *
+     * Using `fsPromises.rmdir()` on a file (not a directory) results in the
+     * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX.
+     *
+     * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function rmdir(path: PathLike): Promise<void>;
+    /**
+     * Removes files and directories (modeled on the standard POSIX `rm` utility).
+     * @since v14.14.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function rm(path: PathLike, options?: RmOptions): Promise<void>;
+    /**
+     * Asynchronously creates a directory.
+     *
+     * The optional `options` argument can be an integer specifying `mode` (permission
+     * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory
+     * that exists results in a
+     * rejection only when `recursive` is false.
+     *
+     * ```js
+     * import { mkdir } from 'node:fs/promises';
+     *
+     * try {
+     *   const projectFolder = new URL('./test/project/', import.meta.url);
+     *   const createDir = await mkdir(projectFolder, { recursive: true });
+     *
+     *   console.log(`created ${createDir}`);
+     * } catch (err) {
+     *   console.error(err.message);
+     * }
+     * ```
+     * @since v10.0.0
+     * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
+     */
+    function mkdir(
+        path: PathLike,
+        options: MakeDirectoryOptions & {
+            recursive: true;
+        },
+    ): Promise<string | undefined>;
+    /**
+     * Asynchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdir(
+        path: PathLike,
+        options?:
+            | Mode
+            | (MakeDirectoryOptions & {
+                recursive?: false | undefined;
+            })
+            | null,
+    ): Promise<void>;
+    /**
+     * Asynchronous mkdir(2) - create a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
+     */
+    function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
+    /**
+     * Reads the contents of a directory.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
+     * will be passed as `Buffer` objects.
+     *
+     * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects.
+     *
+     * ```js
+     * import { readdir } from 'node:fs/promises';
+     *
+     * try {
+     *   const files = await readdir(path);
+     *   for (const file of files)
+     *     console.log(file);
+     * } catch (err) {
+     *   console.error(err);
+     * }
+     * ```
+     * @since v10.0.0
+     * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
+     */
+    function readdir(
+        path: PathLike,
+        options?:
+            | (ObjectEncodingOptions & {
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            })
+            | BufferEncoding
+            | null,
+    ): Promise<string[]>;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdir(
+        path: PathLike,
+        options:
+            | {
+                encoding: "buffer";
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            }
+            | "buffer",
+    ): Promise<NonSharedBuffer[]>;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readdir(
+        path: PathLike,
+        options?:
+            | (ObjectEncodingOptions & {
+                withFileTypes?: false | undefined;
+                recursive?: boolean | undefined;
+            })
+            | BufferEncoding
+            | null,
+    ): Promise<string[] | NonSharedBuffer[]>;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
+     */
+    function readdir(
+        path: PathLike,
+        options: ObjectEncodingOptions & {
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+    ): Promise<Dirent[]>;
+    /**
+     * Asynchronous readdir(3) - read a directory.
+     * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol.
+     * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`.
+     */
+    function readdir(
+        path: PathLike,
+        options: {
+            encoding: "buffer";
+            withFileTypes: true;
+            recursive?: boolean | undefined;
+        },
+    ): Promise<Dirent<NonSharedBuffer>[]>;
+    /**
+     * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
+     * fulfilled with the`linkString` upon success.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the link path returned. If the `encoding` is set to `'buffer'`, the link path
+     * returned will be passed as a `Buffer` object.
+     * @since v10.0.0
+     * @return Fulfills with the `linkString` upon success.
+     */
+    function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+    /**
+     * Asynchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlink(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+    /**
+     * Asynchronous readlink(2) - read value of a symbolic link.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function readlink(
+        path: PathLike,
+        options?: ObjectEncodingOptions | string | null,
+    ): Promise<string | NonSharedBuffer>;
+    /**
+     * Creates a symbolic link.
+     *
+     * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
+     * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
+     * exist, `'file'` will be used. Windows junction points require the destination
+     * path to be absolute. When using `'junction'`, the `target` argument will
+     * automatically be normalized to absolute path. Junction points on NTFS volumes
+     * can only point to directories.
+     * @since v10.0.0
+     * @param [type='null']
+     * @return Fulfills with `undefined` upon success.
+     */
+    function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
+    /**
+     * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
+     * in which case the link itself is stat-ed, not the file that it refers to.
+     * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
+     * @since v10.0.0
+     * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
+     */
+    function lstat(
+        path: PathLike,
+        opts?: StatOptions & {
+            bigint?: false | undefined;
+        },
+    ): Promise<Stats>;
+    function lstat(
+        path: PathLike,
+        opts: StatOptions & {
+            bigint: true;
+        },
+    ): Promise<BigIntStats>;
+    function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+    /**
+     * @since v10.0.0
+     * @return Fulfills with the {fs.Stats} object for the given `path`.
+     */
+    function stat(
+        path: PathLike,
+        opts?: StatOptions & {
+            bigint?: false | undefined;
+        },
+    ): Promise<Stats>;
+    function stat(
+        path: PathLike,
+        opts: StatOptions & {
+            bigint: true;
+        },
+    ): Promise<BigIntStats>;
+    function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
+    /**
+     * @since v19.6.0, v18.15.0
+     * @return Fulfills with the {fs.StatFs} object for the given `path`.
+     */
+    function statfs(
+        path: PathLike,
+        opts?: StatFsOptions & {
+            bigint?: false | undefined;
+        },
+    ): Promise<StatsFs>;
+    function statfs(
+        path: PathLike,
+        opts: StatFsOptions & {
+            bigint: true;
+        },
+    ): Promise<BigIntStatsFs>;
+    function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
+    /**
+     * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
+    /**
+     * If `path` refers to a symbolic link, then the link is removed without affecting
+     * the file or directory to which that link refers. If the `path` refers to a file
+     * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function unlink(path: PathLike): Promise<void>;
+    /**
+     * Changes the permissions of a file.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function chmod(path: PathLike, mode: Mode): Promise<void>;
+    /**
+     * Changes the permissions on a symbolic link.
+     *
+     * This method is only implemented on macOS.
+     * @deprecated Since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function lchmod(path: PathLike, mode: Mode): Promise<void>;
+    /**
+     * Changes the ownership on a symbolic link.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
+    /**
+     * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
+     * symbolic link, then the link is not dereferenced: instead, the timestamps of
+     * the symbolic link itself are changed.
+     * @since v14.5.0, v12.19.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+    /**
+     * Changes the ownership of a file.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function chown(path: PathLike, uid: number, gid: number): Promise<void>;
+    /**
+     * Change the file system timestamps of the object referenced by `path`.
+     *
+     * The `atime` and `mtime` arguments follow these rules:
+     *
+     * * Values can be either numbers representing Unix epoch time, `Date`s, or a
+     * numeric string like `'123456789.0'`.
+     * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown.
+     * @since v10.0.0
+     * @return Fulfills with `undefined` upon success.
+     */
+    function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
+    /**
+     * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function.
+     *
+     * Only paths that can be converted to UTF8 strings are supported.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use for
+     * the path. If the `encoding` is set to `'buffer'`, the path returned will be
+     * passed as a `Buffer` object.
+     *
+     * On Linux, when Node.js is linked against musl libc, the procfs file system must
+     * be mounted on `/proc` in order for this function to work. Glibc does not have
+     * this restriction.
+     * @since v10.0.0
+     * @return Fulfills with the resolved path upon success.
+     */
+    function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+    /**
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpath(path: PathLike, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+    /**
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function realpath(
+        path: PathLike,
+        options?: ObjectEncodingOptions | BufferEncoding | null,
+    ): Promise<string | NonSharedBuffer>;
+    /**
+     * Creates a unique temporary directory. A unique directory name is generated by
+     * appending six random characters to the end of the provided `prefix`. Due to
+     * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
+     * platforms, notably the BSDs, can return more than six random characters, and
+     * replace trailing `X` characters in `prefix` with random characters.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use.
+     *
+     * ```js
+     * import { mkdtemp } from 'node:fs/promises';
+     * import { join } from 'node:path';
+     * import { tmpdir } from 'node:os';
+     *
+     * try {
+     *   await mkdtemp(join(tmpdir(), 'foo-'));
+     * } catch (err) {
+     *   console.error(err);
+     * }
+     * ```
+     *
+     * The `fsPromises.mkdtemp()` method will append the six randomly selected
+     * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing
+     * platform-specific path separator
+     * (`import { sep } from 'node:path'`).
+     * @since v10.0.0
+     * @return Fulfills with a string containing the file system path of the newly created temporary directory.
+     */
+    function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
+    /**
+     * Asynchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<NonSharedBuffer>;
+    /**
+     * Asynchronously creates a unique temporary directory.
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
+     */
+    function mkdtemp(
+        prefix: string,
+        options?: ObjectEncodingOptions | BufferEncoding | null,
+    ): Promise<string | NonSharedBuffer>;
+    interface DisposableTempDir extends AsyncDisposable {
+        /**
+         * The path of the created directory.
+         */
+        path: string;
+        /**
+         * A function which removes the created directory.
+         */
+        remove(): Promise<void>;
+        /**
+         * The same as `remove`.
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    /**
+     * The resulting Promise holds an async-disposable object whose `path` property
+     * holds the created directory path. When the object is disposed, the directory
+     * and its contents will be removed asynchronously if it still exists. If the
+     * directory cannot be deleted, disposal will throw an error. The object has an
+     * async `remove()` method which will perform the same task.
+     *
+     * Both this function and the disposal function on the resulting object are
+     * async, so it should be used with `await` + `await using` as in
+     * `await using dir = await fsPromises.mkdtempDisposable('prefix')`.
+     *
+     * <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
+     *
+     * For detailed information, see the documentation of `fsPromises.mkdtemp()`.
+     *
+     * The optional `options` argument can be a string specifying an encoding, or an
+     * object with an `encoding` property specifying the character encoding to use.
+     * @since v24.4.0
+     */
+    function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise<DisposableTempDir>;
+    /**
+     * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
+     * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
+     * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
+     *
+     * The `encoding` option is ignored if `data` is a buffer.
+     *
+     * If `options` is a string, then it specifies the encoding.
+     *
+     * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+     *
+     * Any specified `FileHandle` has to support writing.
+     *
+     * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
+     * without waiting for the promise to be settled.
+     *
+     * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
+     * method that performs multiple `write` calls internally to write the buffer
+     * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
+     *
+     * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
+     * Cancelation is "best effort", and some amount of data is likely still
+     * to be written.
+     *
+     * ```js
+     * import { writeFile } from 'node:fs/promises';
+     * import { Buffer } from 'node:buffer';
+     *
+     * try {
+     *   const controller = new AbortController();
+     *   const { signal } = controller;
+     *   const data = new Uint8Array(Buffer.from('Hello Node.js'));
+     *   const promise = writeFile('message.txt', data, { signal });
+     *
+     *   // Abort the request before the promise settles.
+     *   controller.abort();
+     *
+     *   await promise;
+     * } catch (err) {
+     *   // When a request is aborted - err is an AbortError
+     *   console.error(err);
+     * }
+     * ```
+     *
+     * Aborting an ongoing request does not abort individual operating
+     * system requests but rather the internal buffering `fs.writeFile` performs.
+     * @since v10.0.0
+     * @param file filename or `FileHandle`
+     * @return Fulfills with `undefined` upon success.
+     */
+    function writeFile(
+        file: PathLike | FileHandle,
+        data:
+            | string
+            | NodeJS.ArrayBufferView
+            | Iterable<string | NodeJS.ArrayBufferView>
+            | AsyncIterable<string | NodeJS.ArrayBufferView>
+            | Stream,
+        options?:
+            | (ObjectEncodingOptions & {
+                mode?: Mode | undefined;
+                flag?: OpenMode | undefined;
+                /**
+                 * If all data is successfully written to the file, and `flush`
+                 * is `true`, `filehandle.sync()` is used to flush the data.
+                 * @default false
+                 */
+                flush?: boolean | undefined;
+            } & Abortable)
+            | BufferEncoding
+            | null,
+    ): Promise<void>;
+    /**
+     * Asynchronously append data to a file, creating the file if it does not yet
+     * exist. `data` can be a string or a `Buffer`.
+     *
+     * If `options` is a string, then it specifies the `encoding`.
+     *
+     * The `mode` option only affects the newly created file. See `fs.open()` for more details.
+     *
+     * The `path` may be specified as a `FileHandle` that has been opened
+     * for appending (using `fsPromises.open()`).
+     * @since v10.0.0
+     * @param path filename or {FileHandle}
+     * @return Fulfills with `undefined` upon success.
+     */
+    function appendFile(
+        path: PathLike | FileHandle,
+        data: string | Uint8Array,
+        options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
+    ): Promise<void>;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     *
+     * If no encoding is specified (using `options.encoding`), the data is returned
+     * as a `Buffer` object. Otherwise, the data will be a string.
+     *
+     * If `options` is a string, then it specifies the encoding.
+     *
+     * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
+     * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
+     * with an error. On FreeBSD, a representation of the directory's contents will be
+     * returned.
+     *
+     * An example of reading a `package.json` file located in the same directory of the
+     * running code:
+     *
+     * ```js
+     * import { readFile } from 'node:fs/promises';
+     * try {
+     *   const filePath = new URL('./package.json', import.meta.url);
+     *   const contents = await readFile(filePath, { encoding: 'utf8' });
+     *   console.log(contents);
+     * } catch (err) {
+     *   console.error(err.message);
+     * }
+     * ```
+     *
+     * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
+     * request is aborted the promise returned is rejected with an `AbortError`:
+     *
+     * ```js
+     * import { readFile } from 'node:fs/promises';
+     *
+     * try {
+     *   const controller = new AbortController();
+     *   const { signal } = controller;
+     *   const promise = readFile(fileName, { signal });
+     *
+     *   // Abort the request before the promise settles.
+     *   controller.abort();
+     *
+     *   await promise;
+     * } catch (err) {
+     *   // When a request is aborted - err is an AbortError
+     *   console.error(err);
+     * }
+     * ```
+     *
+     * Aborting an ongoing request does not abort individual operating
+     * system requests but rather the internal buffering `fs.readFile` performs.
+     *
+     * Any specified `FileHandle` has to support reading.
+     * @since v10.0.0
+     * @param path filename or `FileHandle`
+     * @return Fulfills with the contents of the file.
+     */
+    function readFile(
+        path: PathLike | FileHandle,
+        options?:
+            | ({
+                encoding?: null | undefined;
+                flag?: OpenMode | undefined;
+            } & Abortable)
+            | null,
+    ): Promise<NonSharedBuffer>;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+     * @param options An object that may contain an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFile(
+        path: PathLike | FileHandle,
+        options:
+            | ({
+                encoding: BufferEncoding;
+                flag?: OpenMode | undefined;
+            } & Abortable)
+            | BufferEncoding,
+    ): Promise<string>;
+    /**
+     * Asynchronously reads the entire contents of a file.
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
+     * @param options An object that may contain an optional flag.
+     * If a flag is not provided, it defaults to `'r'`.
+     */
+    function readFile(
+        path: PathLike | FileHandle,
+        options?:
+            | (
+                & ObjectEncodingOptions
+                & Abortable
+                & {
+                    flag?: OpenMode | undefined;
+                }
+            )
+            | BufferEncoding
+            | null,
+    ): Promise<string | NonSharedBuffer>;
+    /**
+     * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
+     *
+     * Creates an `fs.Dir`, which contains all further functions for reading from
+     * and cleaning up the directory.
+     *
+     * The `encoding` option sets the encoding for the `path` while opening the
+     * directory and subsequent read operations.
+     *
+     * Example using async iteration:
+     *
+     * ```js
+     * import { opendir } from 'node:fs/promises';
+     *
+     * try {
+     *   const dir = await opendir('./');
+     *   for await (const dirent of dir)
+     *     console.log(dirent.name);
+     * } catch (err) {
+     *   console.error(err);
+     * }
+     * ```
+     *
+     * When using the async iterator, the `fs.Dir` object will be automatically
+     * closed after the iterator exits.
+     * @since v12.12.0
+     * @return Fulfills with an {fs.Dir}.
+     */
+    function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
+    interface WatchOptions extends _WatchOptions {
+        maxQueue?: number | undefined;
+        overflow?: "ignore" | "throw" | undefined;
+    }
+    interface WatchOptionsWithBufferEncoding extends WatchOptions {
+        encoding: "buffer";
+    }
+    interface WatchOptionsWithStringEncoding extends WatchOptions {
+        encoding?: BufferEncoding | undefined;
+    }
+    /**
+     * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
+     *
+     * ```js
+     * import { watch } from 'node:fs/promises';
+     *
+     * const ac = new AbortController();
+     * const { signal } = ac;
+     * setTimeout(() => ac.abort(), 10000);
+     *
+     * (async () => {
+     *   try {
+     *     const watcher = watch(__filename, { signal });
+     *     for await (const event of watcher)
+     *       console.log(event);
+     *   } catch (err) {
+     *     if (err.name === 'AbortError')
+     *       return;
+     *     throw err;
+     *   }
+     * })();
+     * ```
+     *
+     * On most platforms, `'rename'` is emitted whenever a filename appears or
+     * disappears in the directory.
+     *
+     * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
+     * @since v15.9.0, v14.18.0
+     * @return of objects with the properties:
+     */
+    function watch(
+        filename: PathLike,
+        options?: WatchOptionsWithStringEncoding | BufferEncoding,
+    ): NodeJS.AsyncIterator<FileChangeInfo<string>>;
+    function watch(
+        filename: PathLike,
+        options: WatchOptionsWithBufferEncoding | "buffer",
+    ): NodeJS.AsyncIterator<FileChangeInfo<NonSharedBuffer>>;
+    function watch(
+        filename: PathLike,
+        options: WatchOptions | BufferEncoding | "buffer",
+    ): NodeJS.AsyncIterator<FileChangeInfo<string | NonSharedBuffer>>;
+    /**
+     * Asynchronously copies the entire directory structure from `src` to `dest`,
+     * including subdirectories and files.
+     *
+     * When copying a directory to another directory, globs are not supported and
+     * behavior is similar to `cp dir1/ dir2/`.
+     * @since v16.7.0
+     * @experimental
+     * @param src source path to copy.
+     * @param dest destination path to copy to.
+     * @return Fulfills with `undefined` upon success.
+     */
+    function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
+    /**
+     * ```js
+     * import { glob } from 'node:fs/promises';
+     *
+     * for await (const entry of glob('*.js'))
+     *   console.log(entry);
+     * ```
+     * @since v22.0.0
+     * @returns An AsyncIterator that yields the paths of files
+     * that match the pattern.
+     */
+    function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithFileTypes,
+    ): NodeJS.AsyncIterator<Dirent>;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptionsWithoutFileTypes,
+    ): NodeJS.AsyncIterator<string>;
+    function glob(
+        pattern: string | readonly string[],
+        options: GlobOptions,
+    ): NodeJS.AsyncIterator<Dirent | string>;
+}
+declare module "fs/promises" {
+    export * from "node:fs/promises";
+}

+ 150 - 0
node_modules/@types/node/globals.d.ts

@@ -0,0 +1,150 @@
+declare var global: typeof globalThis;
+
+declare var process: NodeJS.Process;
+
+interface ErrorConstructor {
+    /**
+     * Creates a `.stack` property on `targetObject`, which when accessed returns
+     * a string representing the location in the code at which
+     * `Error.captureStackTrace()` was called.
+     *
+     * ```js
+     * const myObject = {};
+     * Error.captureStackTrace(myObject);
+     * myObject.stack;  // Similar to `new Error().stack`
+     * ```
+     *
+     * The first line of the trace will be prefixed with
+     * `${myObject.name}: ${myObject.message}`.
+     *
+     * The optional `constructorOpt` argument accepts a function. If given, all frames
+     * above `constructorOpt`, including `constructorOpt`, will be omitted from the
+     * generated stack trace.
+     *
+     * The `constructorOpt` argument is useful for hiding implementation
+     * details of error generation from the user. For instance:
+     *
+     * ```js
+     * function a() {
+     *   b();
+     * }
+     *
+     * function b() {
+     *   c();
+     * }
+     *
+     * function c() {
+     *   // Create an error without stack trace to avoid calculating the stack trace twice.
+     *   const { stackTraceLimit } = Error;
+     *   Error.stackTraceLimit = 0;
+     *   const error = new Error();
+     *   Error.stackTraceLimit = stackTraceLimit;
+     *
+     *   // Capture the stack trace above function b
+     *   Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
+     *   throw error;
+     * }
+     *
+     * a();
+     * ```
+     */
+    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+    /**
+     * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+     */
+    prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
+    /**
+     * The `Error.stackTraceLimit` property specifies the number of stack frames
+     * collected by a stack trace (whether generated by `new Error().stack` or
+     * `Error.captureStackTrace(obj)`).
+     *
+     * The default value is `10` but may be set to any valid JavaScript number. Changes
+     * will affect any stack trace captured _after_ the value has been changed.
+     *
+     * If set to a non-number value, or set to a negative number, stack traces will
+     * not capture any frames.
+     */
+    stackTraceLimit: number;
+}
+
+/**
+ * Enable this API with the `--expose-gc` CLI flag.
+ */
+declare var gc: NodeJS.GCFunction | undefined;
+
+declare namespace NodeJS {
+    interface CallSite {
+        getColumnNumber(): number | null;
+        getEnclosingColumnNumber(): number | null;
+        getEnclosingLineNumber(): number | null;
+        getEvalOrigin(): string | undefined;
+        getFileName(): string | null;
+        getFunction(): Function | undefined;
+        getFunctionName(): string | null;
+        getLineNumber(): number | null;
+        getMethodName(): string | null;
+        getPosition(): number;
+        getPromiseIndex(): number | null;
+        getScriptHash(): string;
+        getScriptNameOrSourceURL(): string | null;
+        getThis(): unknown;
+        getTypeName(): string | null;
+        isAsync(): boolean;
+        isConstructor(): boolean;
+        isEval(): boolean;
+        isNative(): boolean;
+        isPromiseAll(): boolean;
+        isToplevel(): boolean;
+    }
+
+    interface ErrnoException extends Error {
+        errno?: number | undefined;
+        code?: string | undefined;
+        path?: string | undefined;
+        syscall?: string | undefined;
+    }
+
+    interface RefCounted {
+        ref(): this;
+        unref(): this;
+    }
+
+    interface Dict<T> {
+        [key: string]: T | undefined;
+    }
+
+    interface ReadOnlyDict<T> {
+        readonly [key: string]: T | undefined;
+    }
+
+    type PartialOptions<T> = { [K in keyof T]?: T[K] | undefined };
+
+    interface GCFunction {
+        (minor?: boolean): void;
+        (options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
+        (options: NodeJS.GCOptions): void;
+    }
+
+    interface GCOptions {
+        execution?: "sync" | "async" | undefined;
+        flavor?: "regular" | "last-resort" | undefined;
+        type?: "major-snapshot" | "major" | "minor" | undefined;
+        filename?: string | undefined;
+    }
+
+    /** An iterable iterator returned by the Node.js API. */
+    interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
+        [Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
+    }
+
+    /** An async iterable iterator returned by the Node.js API. */
+    interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
+        [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
+    }
+
+    /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */
+    type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
+
+    /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */
+    type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
+}

+ 101 - 0
node_modules/@types/node/globals.typedarray.d.ts

@@ -0,0 +1,101 @@
+export {}; // Make this a module
+
+declare global {
+    namespace NodeJS {
+        type TypedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
+            | Uint8Array<TArrayBuffer>
+            | Uint8ClampedArray<TArrayBuffer>
+            | Uint16Array<TArrayBuffer>
+            | Uint32Array<TArrayBuffer>
+            | Int8Array<TArrayBuffer>
+            | Int16Array<TArrayBuffer>
+            | Int32Array<TArrayBuffer>
+            | BigUint64Array<TArrayBuffer>
+            | BigInt64Array<TArrayBuffer>
+            | Float16Array<TArrayBuffer>
+            | Float32Array<TArrayBuffer>
+            | Float64Array<TArrayBuffer>;
+        type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
+            | TypedArray<TArrayBuffer>
+            | DataView<TArrayBuffer>;
+
+        // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node
+        // while maintaining compatibility with TS <=5.6.
+        // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types.
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedInt8Array = Int8Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedInt16Array = Int16Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedInt32Array = Int32Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedFloat16Array = Float16Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedDataView = DataView<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedTypedArray = TypedArray<ArrayBuffer>;
+        /**
+         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
+         * TypeScript versions earlier than 5.7.
+         */
+        type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
+    }
+}

+ 2147 - 0
node_modules/@types/node/http.d.ts

@@ -0,0 +1,2147 @@
+declare module "node:http" {
+    import { NonSharedBuffer } from "node:buffer";
+    import { LookupOptions } from "node:dns";
+    import { EventEmitter } from "node:events";
+    import * as net from "node:net";
+    import * as stream from "node:stream";
+    import { URL } from "node:url";
+    // incoming headers will never contain number
+    interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
+        accept?: string | undefined;
+        "accept-encoding"?: string | undefined;
+        "accept-language"?: string | undefined;
+        "accept-patch"?: string | undefined;
+        "accept-ranges"?: string | undefined;
+        "access-control-allow-credentials"?: string | undefined;
+        "access-control-allow-headers"?: string | undefined;
+        "access-control-allow-methods"?: string | undefined;
+        "access-control-allow-origin"?: string | undefined;
+        "access-control-expose-headers"?: string | undefined;
+        "access-control-max-age"?: string | undefined;
+        "access-control-request-headers"?: string | undefined;
+        "access-control-request-method"?: string | undefined;
+        age?: string | undefined;
+        allow?: string | undefined;
+        "alt-svc"?: string | undefined;
+        authorization?: string | undefined;
+        "cache-control"?: string | undefined;
+        connection?: string | undefined;
+        "content-disposition"?: string | undefined;
+        "content-encoding"?: string | undefined;
+        "content-language"?: string | undefined;
+        "content-length"?: string | undefined;
+        "content-location"?: string | undefined;
+        "content-range"?: string | undefined;
+        "content-type"?: string | undefined;
+        cookie?: string | undefined;
+        date?: string | undefined;
+        etag?: string | undefined;
+        expect?: string | undefined;
+        expires?: string | undefined;
+        forwarded?: string | undefined;
+        from?: string | undefined;
+        host?: string | undefined;
+        "if-match"?: string | undefined;
+        "if-modified-since"?: string | undefined;
+        "if-none-match"?: string | undefined;
+        "if-unmodified-since"?: string | undefined;
+        "last-modified"?: string | undefined;
+        location?: string | undefined;
+        origin?: string | undefined;
+        pragma?: string | undefined;
+        "proxy-authenticate"?: string | undefined;
+        "proxy-authorization"?: string | undefined;
+        "public-key-pins"?: string | undefined;
+        range?: string | undefined;
+        referer?: string | undefined;
+        "retry-after"?: string | undefined;
+        "sec-fetch-site"?: string | undefined;
+        "sec-fetch-mode"?: string | undefined;
+        "sec-fetch-user"?: string | undefined;
+        "sec-fetch-dest"?: string | undefined;
+        "sec-websocket-accept"?: string | undefined;
+        "sec-websocket-extensions"?: string | undefined;
+        "sec-websocket-key"?: string | undefined;
+        "sec-websocket-protocol"?: string | undefined;
+        "sec-websocket-version"?: string | undefined;
+        "set-cookie"?: string[] | undefined;
+        "strict-transport-security"?: string | undefined;
+        tk?: string | undefined;
+        trailer?: string | undefined;
+        "transfer-encoding"?: string | undefined;
+        upgrade?: string | undefined;
+        "user-agent"?: string | undefined;
+        vary?: string | undefined;
+        via?: string | undefined;
+        warning?: string | undefined;
+        "www-authenticate"?: string | undefined;
+    }
+    // outgoing headers allows numbers (as they are converted internally to strings)
+    type OutgoingHttpHeader = number | string | string[];
+    interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
+        accept?: string | string[] | undefined;
+        "accept-charset"?: string | string[] | undefined;
+        "accept-encoding"?: string | string[] | undefined;
+        "accept-language"?: string | string[] | undefined;
+        "accept-ranges"?: string | undefined;
+        "access-control-allow-credentials"?: string | undefined;
+        "access-control-allow-headers"?: string | undefined;
+        "access-control-allow-methods"?: string | undefined;
+        "access-control-allow-origin"?: string | undefined;
+        "access-control-expose-headers"?: string | undefined;
+        "access-control-max-age"?: string | undefined;
+        "access-control-request-headers"?: string | undefined;
+        "access-control-request-method"?: string | undefined;
+        age?: string | undefined;
+        allow?: string | undefined;
+        authorization?: string | undefined;
+        "cache-control"?: string | undefined;
+        "cdn-cache-control"?: string | undefined;
+        connection?: string | string[] | undefined;
+        "content-disposition"?: string | undefined;
+        "content-encoding"?: string | undefined;
+        "content-language"?: string | undefined;
+        "content-length"?: string | number | undefined;
+        "content-location"?: string | undefined;
+        "content-range"?: string | undefined;
+        "content-security-policy"?: string | undefined;
+        "content-security-policy-report-only"?: string | undefined;
+        "content-type"?: string | undefined;
+        cookie?: string | string[] | undefined;
+        dav?: string | string[] | undefined;
+        dnt?: string | undefined;
+        date?: string | undefined;
+        etag?: string | undefined;
+        expect?: string | undefined;
+        expires?: string | undefined;
+        forwarded?: string | undefined;
+        from?: string | undefined;
+        host?: string | undefined;
+        "if-match"?: string | undefined;
+        "if-modified-since"?: string | undefined;
+        "if-none-match"?: string | undefined;
+        "if-range"?: string | undefined;
+        "if-unmodified-since"?: string | undefined;
+        "last-modified"?: string | undefined;
+        link?: string | string[] | undefined;
+        location?: string | undefined;
+        "max-forwards"?: string | undefined;
+        origin?: string | undefined;
+        pragma?: string | string[] | undefined;
+        "proxy-authenticate"?: string | string[] | undefined;
+        "proxy-authorization"?: string | undefined;
+        "public-key-pins"?: string | undefined;
+        "public-key-pins-report-only"?: string | undefined;
+        range?: string | undefined;
+        referer?: string | undefined;
+        "referrer-policy"?: string | undefined;
+        refresh?: string | undefined;
+        "retry-after"?: string | undefined;
+        "sec-websocket-accept"?: string | undefined;
+        "sec-websocket-extensions"?: string | string[] | undefined;
+        "sec-websocket-key"?: string | undefined;
+        "sec-websocket-protocol"?: string | string[] | undefined;
+        "sec-websocket-version"?: string | undefined;
+        server?: string | undefined;
+        "set-cookie"?: string | string[] | undefined;
+        "strict-transport-security"?: string | undefined;
+        te?: string | undefined;
+        trailer?: string | undefined;
+        "transfer-encoding"?: string | undefined;
+        "user-agent"?: string | undefined;
+        upgrade?: string | undefined;
+        "upgrade-insecure-requests"?: string | undefined;
+        vary?: string | undefined;
+        via?: string | string[] | undefined;
+        warning?: string | undefined;
+        "www-authenticate"?: string | string[] | undefined;
+        "x-content-type-options"?: string | undefined;
+        "x-dns-prefetch-control"?: string | undefined;
+        "x-frame-options"?: string | undefined;
+        "x-xss-protection"?: string | undefined;
+    }
+    interface ClientRequestArgs extends Pick<LookupOptions, "hints"> {
+        _defaultAgent?: Agent | undefined;
+        agent?: Agent | boolean | undefined;
+        auth?: string | null | undefined;
+        createConnection?:
+            | ((
+                options: ClientRequestArgs,
+                oncreate: (err: Error | null, socket: stream.Duplex) => void,
+            ) => stream.Duplex | null | undefined)
+            | undefined;
+        defaultPort?: number | string | undefined;
+        family?: number | undefined;
+        headers?: OutgoingHttpHeaders | readonly string[] | undefined;
+        host?: string | null | undefined;
+        hostname?: string | null | undefined;
+        insecureHTTPParser?: boolean | undefined;
+        localAddress?: string | undefined;
+        localPort?: number | undefined;
+        lookup?: net.LookupFunction | undefined;
+        /**
+         * @default 16384
+         */
+        maxHeaderSize?: number | undefined;
+        method?: string | undefined;
+        path?: string | null | undefined;
+        port?: number | string | null | undefined;
+        protocol?: string | null | undefined;
+        setDefaultHeaders?: boolean | undefined;
+        setHost?: boolean | undefined;
+        signal?: AbortSignal | undefined;
+        socketPath?: string | undefined;
+        timeout?: number | undefined;
+        uniqueHeaders?: Array<string | string[]> | undefined;
+        joinDuplicateHeaders?: boolean | undefined;
+    }
+    interface ServerOptions<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    > {
+        /**
+         * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
+         */
+        IncomingMessage?: Request | undefined;
+        /**
+         * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
+         */
+        ServerResponse?: Response | undefined;
+        /**
+         * Sets the timeout value in milliseconds for receiving the entire request from the client.
+         * @see Server.requestTimeout for more information.
+         * @default 300000
+         * @since v18.0.0
+         */
+        requestTimeout?: number | undefined;
+        /**
+         * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
+         * @default false
+         * @since v18.14.0
+         */
+        joinDuplicateHeaders?: boolean | undefined;
+        /**
+         * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
+         * after it has finished writing the last response, before a socket will be destroyed.
+         * @see Server.keepAliveTimeout for more information.
+         * @default 5000
+         * @since v18.0.0
+         */
+        keepAliveTimeout?: number | undefined;
+        /**
+         * An additional buffer time added to the
+         * `server.keepAliveTimeout` to extend the internal socket timeout.
+         * @since 24.6.0
+         * @default 1000
+         */
+        keepAliveTimeoutBuffer?: number | undefined;
+        /**
+         * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
+         * @default 30000
+         */
+        connectionsCheckingInterval?: number | undefined;
+        /**
+         * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client.
+         * See {@link Server.headersTimeout} for more information.
+         * @default 60000
+         * @since 18.0.0
+         */
+        headersTimeout?: number | undefined;
+        /**
+         * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
+         * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
+         * Default: @see stream.getDefaultHighWaterMark().
+         * @since v20.1.0
+         */
+        highWaterMark?: number | undefined;
+        /**
+         * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
+         * Using the insecure parser should be avoided.
+         * See --insecure-http-parser for more information.
+         * @default false
+         */
+        insecureHTTPParser?: boolean | undefined;
+        /**
+         * Optionally overrides the value of `--max-http-header-size` for requests received by
+         * this server, i.e. the maximum length of request headers in bytes.
+         * @default 16384
+         * @since v13.3.0
+         */
+        maxHeaderSize?: number | undefined;
+        /**
+         * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+         * @default true
+         * @since v16.5.0
+         */
+        noDelay?: boolean | undefined;
+        /**
+         * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code
+         * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification).
+         * @default true
+         * @since 20.0.0
+         */
+        requireHostHeader?: boolean | undefined;
+        /**
+         * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+         * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+         * @default false
+         * @since v16.5.0
+         */
+        keepAlive?: boolean | undefined;
+        /**
+         * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+         * @default 0
+         * @since v16.5.0
+         */
+        keepAliveInitialDelay?: number | undefined;
+        /**
+         * A list of response headers that should be sent only once.
+         * If the header's value is an array, the items will be joined using `; `.
+         */
+        uniqueHeaders?: Array<string | string[]> | undefined;
+        /**
+         * A callback which receives an
+         * incoming request and returns a boolean, to control which upgrade attempts
+         * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or
+         * their sockets will be destroyed, if no listener is registered) while
+         * rejected upgrades will fire a `'request'` event like any non-upgrade
+         * request.
+         * @since v24.9.0
+         * @default () => server.listenerCount('upgrade') > 0
+         */
+        shouldUpgradeCallback?: ((request: InstanceType<Request>) => boolean) | undefined;
+        /**
+         * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body.
+         * @default false
+         * @since v18.17.0, v20.2.0
+         */
+        rejectNonStandardBodyWrites?: boolean | undefined;
+        /**
+         * If set to `true`, requests without `Content-Length`
+         * or `Transfer-Encoding` headers (indicating no body) will be initialized with an
+         * already-ended body stream, so they will never emit any stream events
+         * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case.
+         * @since v25.1.0
+         * @default false
+         */
+        optimizeEmptyRequests?: boolean | undefined;
+    }
+    type RequestListener<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    > = (request: InstanceType<Request>, response: InstanceType<Response> & { req: InstanceType<Request> }) => void;
+    interface ServerEventMap<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    > extends net.ServerEventMap {
+        "checkContinue": Parameters<RequestListener<Request, Response>>;
+        "checkExpectation": Parameters<RequestListener<Request, Response>>;
+        "clientError": [exception: Error, socket: stream.Duplex];
+        "connect": [request: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
+        "connection": [socket: net.Socket];
+        "dropRequest": [request: InstanceType<Request>, socket: stream.Duplex];
+        "request": Parameters<RequestListener<Request, Response>>;
+        "upgrade": [req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
+    }
+    /**
+     * @since v0.1.17
+     */
+    class Server<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    > extends net.Server {
+        constructor(requestListener?: RequestListener<Request, Response>);
+        constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
+        /**
+         * Sets the timeout value for sockets, and emits a `'timeout'` event on
+         * the Server object, passing the socket as an argument, if a timeout
+         * occurs.
+         *
+         * If there is a `'timeout'` event listener on the Server object, then it
+         * will be called with the timed-out socket as an argument.
+         *
+         * By default, the Server does not timeout sockets. However, if a callback
+         * is assigned to the Server's `'timeout'` event, timeouts must be handled
+         * explicitly.
+         * @since v0.9.12
+         * @param [msecs=0 (no timeout)]
+         */
+        setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this;
+        setTimeout(callback: (socket: net.Socket) => void): this;
+        /**
+         * Limits maximum incoming headers count. If set to 0, no limit will be applied.
+         * @since v0.7.0
+         */
+        maxHeadersCount: number | null;
+        /**
+         * The maximum number of requests socket can handle
+         * before closing keep alive connection.
+         *
+         * A value of `0` will disable the limit.
+         *
+         * When the limit is reached it will set the `Connection` header value to `close`,
+         * but will not actually close the connection, subsequent requests sent
+         * after the limit is reached will get `503 Service Unavailable` as a response.
+         * @since v16.10.0
+         */
+        maxRequestsPerSocket: number | null;
+        /**
+         * The number of milliseconds of inactivity before a socket is presumed
+         * to have timed out.
+         *
+         * A value of `0` will disable the timeout behavior on incoming connections.
+         *
+         * The socket timeout logic is set up on connection, so changing this
+         * value only affects new connections to the server, not any existing connections.
+         * @since v0.9.12
+         */
+        timeout: number;
+        /**
+         * Limit the amount of time the parser will wait to receive the complete HTTP
+         * headers.
+         *
+         * If the timeout expires, the server responds with status 408 without
+         * forwarding the request to the request listener and then closes the connection.
+         *
+         * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+         * potential Denial-of-Service attacks in case the server is deployed without a
+         * reverse proxy in front.
+         * @since v11.3.0, v10.14.0
+         */
+        headersTimeout: number;
+        /**
+         * The number of milliseconds of inactivity a server needs to wait for additional
+         * incoming data, after it has finished writing the last response, before a socket
+         * will be destroyed.
+         *
+         * This timeout value is combined with the
+         * `server.keepAliveTimeoutBuffer` option to determine the actual socket
+         * timeout, calculated as:
+         * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer
+         * If the server receives new data before the keep-alive timeout has fired, it
+         * will reset the regular inactivity timeout, i.e., `server.timeout`.
+         *
+         * A value of `0` will disable the keep-alive timeout behavior on incoming
+         * connections.
+         * A value of `0` makes the HTTP server behave similarly to Node.js versions prior
+         * to 8.0.0, which did not have a keep-alive timeout.
+         *
+         * The socket timeout logic is set up on connection, so changing this value only
+         * affects new connections to the server, not any existing connections.
+         * @since v8.0.0
+         */
+        keepAliveTimeout: number;
+        /**
+         * An additional buffer time added to the
+         * `server.keepAliveTimeout` to extend the internal socket timeout.
+         *
+         * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing
+         * the socket timeout slightly beyond the advertised keep-alive timeout.
+         *
+         * This option applies only to new incoming connections.
+         * @since v24.6.0
+         * @default 1000
+         */
+        keepAliveTimeoutBuffer: number;
+        /**
+         * Sets the timeout value in milliseconds for receiving the entire request from
+         * the client.
+         *
+         * If the timeout expires, the server responds with status 408 without
+         * forwarding the request to the request listener and then closes the connection.
+         *
+         * It must be set to a non-zero value (e.g. 120 seconds) to protect against
+         * potential Denial-of-Service attacks in case the server is deployed without a
+         * reverse proxy in front.
+         * @since v14.11.0
+         */
+        requestTimeout: number;
+        /**
+         * Closes all connections connected to this server.
+         * @since v18.2.0
+         */
+        closeAllConnections(): void;
+        /**
+         * Closes all connections connected to this server which are not sending a request
+         * or waiting for a response.
+         * @since v18.2.0
+         */
+        closeIdleConnections(): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ServerEventMap>(
+            eventName: E,
+        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ServerEventMap>(
+            eventName: E,
+        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface OutgoingMessageEventMap extends stream.WritableEventMap {
+        "prefinish": [];
+    }
+    /**
+     * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from
+     * the perspective of the participants of an HTTP transaction.
+     * @since v0.1.17
+     */
+    class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
+        constructor();
+        readonly req: Request;
+        chunkedEncoding: boolean;
+        shouldKeepAlive: boolean;
+        useChunkedEncodingByDefault: boolean;
+        sendDate: boolean;
+        /**
+         * @deprecated Use `writableEnded` instead.
+         */
+        finished: boolean;
+        /**
+         * Read-only. `true` if the headers were sent, otherwise `false`.
+         * @since v0.9.3
+         */
+        readonly headersSent: boolean;
+        /**
+         * Alias of `outgoingMessage.socket`.
+         * @since v0.3.0
+         * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
+         */
+        readonly connection: net.Socket | null;
+        /**
+         * Reference to the underlying socket. Usually, users will not want to access
+         * this property.
+         *
+         * After calling `outgoingMessage.end()`, this property will be nulled.
+         * @since v0.3.0
+         */
+        readonly socket: net.Socket | null;
+        /**
+         * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter.
+         * @since v0.9.12
+         * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+         */
+        setTimeout(msecs: number, callback?: () => void): this;
+        /**
+         * Sets a single header value. If the header already exists in the to-be-sent
+         * headers, its value will be replaced. Use an array of strings to send multiple
+         * headers with the same name.
+         * @since v0.4.0
+         * @param name Header name
+         * @param value Header value
+         */
+        setHeader(name: string, value: number | string | readonly string[]): this;
+        /**
+         * Sets multiple header values for implicit headers. headers must be an instance of
+         * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its
+         * value will be replaced.
+         *
+         * ```js
+         * const headers = new Headers({ foo: 'bar' });
+         * outgoingMessage.setHeaders(headers);
+         * ```
+         *
+         * or
+         *
+         * ```js
+         * const headers = new Map([['foo', 'bar']]);
+         * outgoingMessage.setHeaders(headers);
+         * ```
+         *
+         * When headers have been set with `outgoingMessage.setHeaders()`, they will be
+         * merged with any headers passed to `response.writeHead()`, with the headers passed
+         * to `response.writeHead()` given precedence.
+         *
+         * ```js
+         * // Returns content-type = text/plain
+         * const server = http.createServer((req, res) => {
+         *   const headers = new Headers({ 'Content-Type': 'text/html' });
+         *   res.setHeaders(headers);
+         *   res.writeHead(200, { 'Content-Type': 'text/plain' });
+         *   res.end('ok');
+         * });
+         * ```
+         *
+         * @since v19.6.0, v18.15.0
+         * @param name Header name
+         * @param value Header value
+         */
+        setHeaders(headers: Headers | Map<string, number | string | readonly string[]>): this;
+        /**
+         * Append a single header value to the header object.
+         *
+         * If the value is an array, this is equivalent to calling this method multiple
+         * times.
+         *
+         * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`.
+         *
+         * Depending of the value of `options.uniqueHeaders` when the client request or the
+         * server were created, this will end up in the header being sent multiple times or
+         * a single time with values joined using `; `.
+         * @since v18.3.0, v16.17.0
+         * @param name Header name
+         * @param value Header value
+         */
+        appendHeader(name: string, value: string | readonly string[]): this;
+        /**
+         * Gets the value of the HTTP header with the given name. If that header is not
+         * set, the returned value will be `undefined`.
+         * @since v0.4.0
+         * @param name Name of header
+         */
+        getHeader(name: string): number | string | string[] | undefined;
+        /**
+         * Returns a shallow copy of the current outgoing headers. Since a shallow
+         * copy is used, array values may be mutated without additional calls to
+         * various header-related HTTP module methods. The keys of the returned
+         * object are the header names and the values are the respective header
+         * values. All header names are lowercase.
+         *
+         * The object returned by the `outgoingMessage.getHeaders()` method does
+         * not prototypically inherit from the JavaScript `Object`. This means that
+         * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`,
+         * and others are not defined and will not work.
+         *
+         * ```js
+         * outgoingMessage.setHeader('Foo', 'bar');
+         * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+         *
+         * const headers = outgoingMessage.getHeaders();
+         * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+         * ```
+         * @since v7.7.0
+         */
+        getHeaders(): OutgoingHttpHeaders;
+        /**
+         * Returns an array containing the unique names of the current outgoing headers.
+         * All names are lowercase.
+         * @since v7.7.0
+         */
+        getHeaderNames(): string[];
+        /**
+         * Returns `true` if the header identified by `name` is currently set in the
+         * outgoing headers. The header name is case-insensitive.
+         *
+         * ```js
+         * const hasContentType = outgoingMessage.hasHeader('content-type');
+         * ```
+         * @since v7.7.0
+         */
+        hasHeader(name: string): boolean;
+        /**
+         * Removes a header that is queued for implicit sending.
+         *
+         * ```js
+         * outgoingMessage.removeHeader('Content-Encoding');
+         * ```
+         * @since v0.4.0
+         * @param name Header name
+         */
+        removeHeader(name: string): void;
+        /**
+         * Adds HTTP trailers (headers but at the end of the message) to the message.
+         *
+         * Trailers will **only** be emitted if the message is chunked encoded. If not,
+         * the trailers will be silently discarded.
+         *
+         * HTTP requires the `Trailer` header to be sent to emit trailers,
+         * with a list of header field names in its value, e.g.
+         *
+         * ```js
+         * message.writeHead(200, { 'Content-Type': 'text/plain',
+         *                          'Trailer': 'Content-MD5' });
+         * message.write(fileData);
+         * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
+         * message.end();
+         * ```
+         *
+         * Attempting to set a header field name or value that contains invalid characters
+         * will result in a `TypeError` being thrown.
+         * @since v0.3.0
+         */
+        addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
+        /**
+         * Flushes the message headers.
+         *
+         * For efficiency reason, Node.js normally buffers the message headers
+         * until `outgoingMessage.end()` is called or the first chunk of message data
+         * is written. It then tries to pack the headers and data into a single TCP
+         * packet.
+         *
+         * It is usually desired (it saves a TCP round-trip), but not when the first
+         * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message.
+         * @since v1.6.0
+         */
+        flushHeaders(): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof OutgoingMessageEventMap>(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener?: (...args: OutgoingMessageEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+        ): ((...args: OutgoingMessageEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+        ): ((...args: OutgoingMessageEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof OutgoingMessageEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof OutgoingMessageEventMap>(
+            eventName: E,
+            listener: (...args: OutgoingMessageEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    /**
+     * This object is created internally by an HTTP server, not by the user. It is
+     * passed as the second parameter to the `'request'` event.
+     * @since v0.1.17
+     */
+    class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
+        /**
+         * When using implicit headers (not calling `response.writeHead()` explicitly),
+         * this property controls the status code that will be sent to the client when
+         * the headers get flushed.
+         *
+         * ```js
+         * response.statusCode = 404;
+         * ```
+         *
+         * After response header was sent to the client, this property indicates the
+         * status code which was sent out.
+         * @since v0.4.0
+         */
+        statusCode: number;
+        /**
+         * When using implicit headers (not calling `response.writeHead()` explicitly),
+         * this property controls the status message that will be sent to the client when
+         * the headers get flushed. If this is left as `undefined` then the standard
+         * message for the status code will be used.
+         *
+         * ```js
+         * response.statusMessage = 'Not found';
+         * ```
+         *
+         * After response header was sent to the client, this property indicates the
+         * status message which was sent out.
+         * @since v0.11.8
+         */
+        statusMessage: string;
+        /**
+         * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal.
+         * Mismatching the `Content-Length` header value will result
+         * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+         * @since v18.10.0, v16.18.0
+         */
+        strictContentLength: boolean;
+        constructor(req: Request);
+        assignSocket(socket: net.Socket): void;
+        detachSocket(socket: net.Socket): void;
+        /**
+         * Sends an HTTP/1.1 100 Continue message to the client, indicating that
+         * the request body should be sent. See the `'checkContinue'` event on `Server`.
+         * @since v0.3.0
+         */
+        writeContinue(callback?: () => void): void;
+        /**
+         * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
+         * indicating that the user agent can preload/preconnect the linked resources.
+         * The `hints` is an object containing the values of headers to be sent with
+         * early hints message. The optional `callback` argument will be called when
+         * the response message has been written.
+         *
+         * **Example**
+         *
+         * ```js
+         * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+         * response.writeEarlyHints({
+         *   'link': earlyHintsLink,
+         * });
+         *
+         * const earlyHintsLinks = [
+         *   '</styles.css>; rel=preload; as=style',
+         *   '</scripts.js>; rel=preload; as=script',
+         * ];
+         * response.writeEarlyHints({
+         *   'link': earlyHintsLinks,
+         *   'x-trace-id': 'id for diagnostics',
+         * });
+         *
+         * const earlyHintsCallback = () => console.log('early hints message sent');
+         * response.writeEarlyHints({
+         *   'link': earlyHintsLinks,
+         * }, earlyHintsCallback);
+         * ```
+         * @since v18.11.0
+         * @param hints An object containing the values of headers
+         * @param callback Will be called when the response message has been written
+         */
+        writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
+        /**
+         * Sends a response header to the request. The status code is a 3-digit HTTP
+         * status code, like `404`. The last argument, `headers`, are the response headers.
+         * Optionally one can give a human-readable `statusMessage` as the second
+         * argument.
+         *
+         * `headers` may be an `Array` where the keys and values are in the same list.
+         * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
+         * and the odd-numbered offsets are the associated values. The array is in the same
+         * format as `request.rawHeaders`.
+         *
+         * Returns a reference to the `ServerResponse`, so that calls can be chained.
+         *
+         * ```js
+         * const body = 'hello world';
+         * response
+         *   .writeHead(200, {
+         *     'Content-Length': Buffer.byteLength(body),
+         *     'Content-Type': 'text/plain',
+         *   })
+         *   .end(body);
+         * ```
+         *
+         * This method must only be called once on a message and it must
+         * be called before `response.end()` is called.
+         *
+         * If `response.write()` or `response.end()` are called before calling
+         * this, the implicit/mutable headers will be calculated and call this function.
+         *
+         * When headers have been set with `response.setHeader()`, they will be merged
+         * with any headers passed to `response.writeHead()`, with the headers passed
+         * to `response.writeHead()` given precedence.
+         *
+         * If this method is called and `response.setHeader()` has not been called,
+         * it will directly write the supplied header values onto the network channel
+         * without caching internally, and the `response.getHeader()` on the header
+         * will not yield the expected result. If progressive population of headers is
+         * desired with potential future retrieval and modification, use `response.setHeader()` instead.
+         *
+         * ```js
+         * // Returns content-type = text/plain
+         * const server = http.createServer((req, res) => {
+         *   res.setHeader('Content-Type', 'text/html');
+         *   res.setHeader('X-Foo', 'bar');
+         *   res.writeHead(200, { 'Content-Type': 'text/plain' });
+         *   res.end('ok');
+         * });
+         * ```
+         *
+         * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
+         * will check whether `Content-Length` and the length of the body which has
+         * been transmitted are equal or not.
+         *
+         * Attempting to set a header field name or value that contains invalid characters
+         * will result in a `Error` being thrown.
+         * @since v0.1.30
+         */
+        writeHead(
+            statusCode: number,
+            statusMessage?: string,
+            headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
+        ): this;
+        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
+        /**
+         * Sends a HTTP/1.1 102 Processing message to the client, indicating that
+         * the request body should be sent.
+         * @since v10.0.0
+         */
+        writeProcessing(callback?: () => void): void;
+    }
+    interface InformationEvent {
+        httpVersion: string;
+        httpVersionMajor: number;
+        httpVersionMinor: number;
+        statusCode: number;
+        statusMessage: string;
+        headers: IncomingHttpHeaders;
+        rawHeaders: string[];
+    }
+    interface ClientRequestEventMap extends stream.WritableEventMap {
+        /** @deprecated Listen for the `'close'` event instead. */
+        "abort": [];
+        "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
+        "continue": [];
+        "information": [info: InformationEvent];
+        "response": [response: IncomingMessage];
+        "socket": [socket: net.Socket];
+        "timeout": [];
+        "upgrade": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
+    }
+    /**
+     * This object is created internally and returned from {@link request}. It
+     * represents an _in-progress_ request whose header has already been queued. The
+     * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will
+     * be sent along with the first data chunk or when calling `request.end()`.
+     *
+     * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response
+     * headers have been received. The `'response'` event is executed with one
+     * argument which is an instance of {@link IncomingMessage}.
+     *
+     * During the `'response'` event, one can add listeners to the
+     * response object; particularly to listen for the `'data'` event.
+     *
+     * If no `'response'` handler is added, then the response will be
+     * entirely discarded. However, if a `'response'` event handler is added,
+     * then the data from the response object **must** be consumed, either by
+     * calling `response.read()` whenever there is a `'readable'` event, or
+     * by adding a `'data'` handler, or by calling the `.resume()` method.
+     * Until the data is consumed, the `'end'` event will not fire. Also, until
+     * the data is read it will consume memory that can eventually lead to a
+     * 'process out of memory' error.
+     *
+     * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered.
+     *
+     * Set `Content-Length` header to limit the response body size.
+     * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown,
+     * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
+     *
+     * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes.
+     * @since v0.1.17
+     */
+    class ClientRequest extends OutgoingMessage {
+        /**
+         * The `request.aborted` property will be `true` if the request has
+         * been aborted.
+         * @since v0.11.14
+         * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead.
+         */
+        aborted: boolean;
+        /**
+         * The request host.
+         * @since v14.5.0, v12.19.0
+         */
+        host: string;
+        /**
+         * The request protocol.
+         * @since v14.5.0, v12.19.0
+         */
+        protocol: string;
+        /**
+         * When sending request through a keep-alive enabled agent, the underlying socket
+         * might be reused. But if server closes connection at unfortunate time, client
+         * may run into a 'ECONNRESET' error.
+         *
+         * ```js
+         * import http from 'node:http';
+         * const agent = new http.Agent({ keepAlive: true });
+         *
+         * // Server has a 5 seconds keep-alive timeout by default
+         * http
+         *   .createServer((req, res) => {
+         *     res.write('hello\n');
+         *     res.end();
+         *   })
+         *   .listen(3000);
+         *
+         * setInterval(() => {
+         *   // Adapting a keep-alive agent
+         *   http.get('http://localhost:3000', { agent }, (res) => {
+         *     res.on('data', (data) => {
+         *       // Do nothing
+         *     });
+         *   });
+         * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
+         * ```
+         *
+         * By marking a request whether it reused socket or not, we can do
+         * automatic error retry base on it.
+         *
+         * ```js
+         * import http from 'node:http';
+         * const agent = new http.Agent({ keepAlive: true });
+         *
+         * function retriableRequest() {
+         *   const req = http
+         *     .get('http://localhost:3000', { agent }, (res) => {
+         *       // ...
+         *     })
+         *     .on('error', (err) => {
+         *       // Check if retry is needed
+         *       if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
+         *         retriableRequest();
+         *       }
+         *     });
+         * }
+         *
+         * retriableRequest();
+         * ```
+         * @since v13.0.0, v12.16.0
+         */
+        reusedSocket: boolean;
+        /**
+         * Limits maximum response headers count. If set to 0, no limit will be applied.
+         */
+        maxHeadersCount: number;
+        constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
+        /**
+         * The request method.
+         * @since v0.1.97
+         */
+        method: string;
+        /**
+         * The request path.
+         * @since v0.4.0
+         */
+        path: string;
+        /**
+         * Marks the request as aborting. Calling this will cause remaining data
+         * in the response to be dropped and the socket to be destroyed.
+         * @since v0.3.8
+         * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
+         */
+        abort(): void;
+        onSocket(socket: net.Socket): void;
+        /**
+         * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
+         * @since v0.5.9
+         * @param timeout Milliseconds before a request times out.
+         * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
+         */
+        setTimeout(timeout: number, callback?: () => void): this;
+        /**
+         * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
+         * @since v0.5.9
+         */
+        setNoDelay(noDelay?: boolean): void;
+        /**
+         * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
+         * @since v0.5.9
+         */
+        setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
+        /**
+         * Returns an array containing the unique names of the current outgoing raw
+         * headers. Header names are returned with their exact casing being set.
+         *
+         * ```js
+         * request.setHeader('Foo', 'bar');
+         * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+         *
+         * const headerNames = request.getRawHeaderNames();
+         * // headerNames === ['Foo', 'Set-Cookie']
+         * ```
+         * @since v15.13.0, v14.17.0
+         */
+        getRawHeaderNames(): string[];
+        // #region InternalEventEmitter
+        addListener<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ClientRequestEventMap>(eventName: E, ...args: ClientRequestEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener?: (...args: ClientRequestEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ClientRequestEventMap>(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+        ): ((...args: ClientRequestEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ClientRequestEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ClientRequestEventMap>(
+            eventName: E,
+            listener: (...args: ClientRequestEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface IncomingMessageEventMap extends stream.ReadableEventMap {
+        /** @deprecated Listen for `'close'` event instead. */
+        "aborted": [];
+    }
+    /**
+     * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
+     * access response
+     * status, headers, and data.
+     *
+     * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to
+     * parse and emit the incoming HTTP headers and payload, as the underlying socket
+     * may be reused multiple times in case of keep-alive.
+     * @since v0.1.17
+     */
+    class IncomingMessage extends stream.Readable {
+        constructor(socket: net.Socket);
+        /**
+         * The `message.aborted` property will be `true` if the request has
+         * been aborted.
+         * @since v10.1.0
+         * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
+         */
+        aborted: boolean;
+        /**
+         * In case of server request, the HTTP version sent by the client. In the case of
+         * client response, the HTTP version of the connected-to server.
+         * Probably either `'1.1'` or `'1.0'`.
+         *
+         * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second.
+         * @since v0.1.1
+         */
+        httpVersion: string;
+        httpVersionMajor: number;
+        httpVersionMinor: number;
+        /**
+         * The `message.complete` property will be `true` if a complete HTTP message has
+         * been received and successfully parsed.
+         *
+         * This property is particularly useful as a means of determining if a client or
+         * server fully transmitted a message before a connection was terminated:
+         *
+         * ```js
+         * const req = http.request({
+         *   host: '127.0.0.1',
+         *   port: 8080,
+         *   method: 'POST',
+         * }, (res) => {
+         *   res.resume();
+         *   res.on('end', () => {
+         *     if (!res.complete)
+         *       console.error(
+         *         'The connection was terminated while the message was still being sent');
+         *   });
+         * });
+         * ```
+         * @since v0.3.0
+         */
+        complete: boolean;
+        /**
+         * Alias for `message.socket`.
+         * @since v0.1.90
+         * @deprecated Since v16.0.0 - Use `socket`.
+         */
+        connection: net.Socket;
+        /**
+         * The `net.Socket` object associated with the connection.
+         *
+         * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
+         * client's authentication details.
+         *
+         * This property is guaranteed to be an instance of the `net.Socket` class,
+         * a subclass of `stream.Duplex`, unless the user specified a socket
+         * type other than `net.Socket` or internally nulled.
+         * @since v0.3.0
+         */
+        socket: net.Socket;
+        /**
+         * The request/response headers object.
+         *
+         * Key-value pairs of header names and values. Header names are lower-cased.
+         *
+         * ```js
+         * // Prints something like:
+         * //
+         * // { 'user-agent': 'curl/7.22.0',
+         * //   host: '127.0.0.1:8000',
+         * //   accept: '*' }
+         * console.log(request.headers);
+         * ```
+         *
+         * Duplicates in raw headers are handled in the following ways, depending on the
+         * header name:
+         *
+         * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,
+         * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded.
+         * To allow duplicate values of the headers listed above to be joined,
+         * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more
+         * information.
+         * * `set-cookie` is always an array. Duplicates are added to the array.
+         * * For duplicate `cookie` headers, the values are joined together with `; `.
+         * * For all other headers, the values are joined together with `, `.
+         * @since v0.1.5
+         */
+        headers: IncomingHttpHeaders;
+        /**
+         * Similar to `message.headers`, but there is no join logic and the values are
+         * always arrays of strings, even for headers received just once.
+         *
+         * ```js
+         * // Prints something like:
+         * //
+         * // { 'user-agent': ['curl/7.22.0'],
+         * //   host: ['127.0.0.1:8000'],
+         * //   accept: ['*'] }
+         * console.log(request.headersDistinct);
+         * ```
+         * @since v18.3.0, v16.17.0
+         */
+        headersDistinct: NodeJS.Dict<string[]>;
+        /**
+         * The raw request/response headers list exactly as they were received.
+         *
+         * The keys and values are in the same list. It is _not_ a
+         * list of tuples. So, the even-numbered offsets are key values, and the
+         * odd-numbered offsets are the associated values.
+         *
+         * Header names are not lowercased, and duplicates are not merged.
+         *
+         * ```js
+         * // Prints something like:
+         * //
+         * // [ 'user-agent',
+         * //   'this is invalid because there can be only one',
+         * //   'User-Agent',
+         * //   'curl/7.22.0',
+         * //   'Host',
+         * //   '127.0.0.1:8000',
+         * //   'ACCEPT',
+         * //   '*' ]
+         * console.log(request.rawHeaders);
+         * ```
+         * @since v0.11.6
+         */
+        rawHeaders: string[];
+        /**
+         * The request/response trailers object. Only populated at the `'end'` event.
+         * @since v0.3.0
+         */
+        trailers: NodeJS.Dict<string>;
+        /**
+         * Similar to `message.trailers`, but there is no join logic and the values are
+         * always arrays of strings, even for headers received just once.
+         * Only populated at the `'end'` event.
+         * @since v18.3.0, v16.17.0
+         */
+        trailersDistinct: NodeJS.Dict<string[]>;
+        /**
+         * The raw request/response trailer keys and values exactly as they were
+         * received. Only populated at the `'end'` event.
+         * @since v0.11.6
+         */
+        rawTrailers: string[];
+        /**
+         * Calls `message.socket.setTimeout(msecs, callback)`.
+         * @since v0.5.9
+         */
+        setTimeout(msecs: number, callback?: () => void): this;
+        /**
+         * **Only valid for request obtained from {@link Server}.**
+         *
+         * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
+         * @since v0.1.1
+         */
+        method?: string | undefined;
+        /**
+         * **Only valid for request obtained from {@link Server}.**
+         *
+         * Request URL string. This contains only the URL that is present in the actual
+         * HTTP request. Take the following request:
+         *
+         * ```http
+         * GET /status?name=ryan HTTP/1.1
+         * Accept: text/plain
+         * ```
+         *
+         * To parse the URL into its parts:
+         *
+         * ```js
+         * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`);
+         * ```
+         *
+         * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined:
+         *
+         * ```console
+         * $ node
+         * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`);
+         * URL {
+         *   href: 'http://localhost/status?name=ryan',
+         *   origin: 'http://localhost',
+         *   protocol: 'http:',
+         *   username: '',
+         *   password: '',
+         *   host: 'localhost',
+         *   hostname: 'localhost',
+         *   port: '',
+         *   pathname: '/status',
+         *   search: '?name=ryan',
+         *   searchParams: URLSearchParams { 'name' => 'ryan' },
+         *   hash: ''
+         * }
+         * ```
+         *
+         * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper
+         * validation is used, as clients may specify a custom `Host` header.
+         * @since v0.1.90
+         */
+        url?: string | undefined;
+        /**
+         * **Only valid for response obtained from {@link ClientRequest}.**
+         *
+         * The 3-digit HTTP response status code. E.G. `404`.
+         * @since v0.1.1
+         */
+        statusCode?: number | undefined;
+        /**
+         * **Only valid for response obtained from {@link ClientRequest}.**
+         *
+         * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
+         * @since v0.11.10
+         */
+        statusMessage?: string | undefined;
+        /**
+         * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed
+         * as an argument to any listeners on the event.
+         * @since v0.3.0
+         */
+        destroy(error?: Error): this;
+        // #region InternalEventEmitter
+        addListener<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof IncomingMessageEventMap>(eventName: E, ...args: IncomingMessageEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener?: (...args: IncomingMessageEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+        ): ((...args: IncomingMessageEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+        ): ((...args: IncomingMessageEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof IncomingMessageEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof IncomingMessageEventMap>(
+            eventName: E,
+            listener: (...args: IncomingMessageEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface ProxyEnv extends NodeJS.ProcessEnv {
+        HTTP_PROXY?: string | undefined;
+        HTTPS_PROXY?: string | undefined;
+        NO_PROXY?: string | undefined;
+        http_proxy?: string | undefined;
+        https_proxy?: string | undefined;
+        no_proxy?: string | undefined;
+    }
+    interface AgentOptions extends NodeJS.PartialOptions<net.TcpSocketConnectOpts> {
+        /**
+         * Keep sockets around in a pool to be used by other requests in the future. Default = false
+         */
+        keepAlive?: boolean | undefined;
+        /**
+         * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
+         * Only relevant if keepAlive is set to true.
+         */
+        keepAliveMsecs?: number | undefined;
+        /**
+         * Milliseconds to subtract from
+         * the server-provided `keep-alive: timeout=...` hint when determining socket
+         * expiration time. This buffer helps ensure the agent closes the socket
+         * slightly before the server does, reducing the chance of sending a request
+         * on a socket that’s about to be closed by the server.
+         * @since v24.7.0
+         * @default 1000
+         */
+        agentKeepAliveTimeoutBuffer?: number | undefined;
+        /**
+         * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
+         */
+        maxSockets?: number | undefined;
+        /**
+         * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
+         */
+        maxTotalSockets?: number | undefined;
+        /**
+         * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
+         */
+        maxFreeSockets?: number | undefined;
+        /**
+         * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
+         */
+        timeout?: number | undefined;
+        /**
+         * Scheduling strategy to apply when picking the next free socket to use.
+         * @default `lifo`
+         */
+        scheduling?: "fifo" | "lifo" | undefined;
+        /**
+         * Environment variables for proxy configuration. See
+         * [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details.
+         * @since v24.5.0
+         */
+        proxyEnv?: ProxyEnv | undefined;
+        /**
+         * Default port to use when the port is not specified in requests.
+         * @since v24.5.0
+         */
+        defaultPort?: number | undefined;
+        /**
+         * The protocol to use for the agent.
+         * @since v24.5.0
+         */
+        protocol?: string | undefined;
+    }
+    /**
+     * An `Agent` is responsible for managing connection persistence
+     * and reuse for HTTP clients. It maintains a queue of pending requests
+     * for a given host and port, reusing a single socket connection for each
+     * until the queue is empty, at which time the socket is either destroyed
+     * or put into a pool where it is kept to be used again for requests to the
+     * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`.
+     *
+     * Pooled connections have TCP Keep-Alive enabled for them, but servers may
+     * still close idle connections, in which case they will be removed from the
+     * pool and a new connection will be made when a new HTTP request is made for
+     * that host and port. Servers may also refuse to allow multiple requests
+     * over the same connection, in which case the connection will have to be
+     * remade for every request and cannot be pooled. The `Agent` will still make
+     * the requests to that server, but each one will occur over a new connection.
+     *
+     * When a connection is closed by the client or the server, it is removed
+     * from the pool. Any unused sockets in the pool will be unrefed so as not
+     * to keep the Node.js process running when there are no outstanding requests.
+     * (see `socket.unref()`).
+     *
+     * It is good practice, to `destroy()` an `Agent` instance when it is no
+     * longer in use, because unused sockets consume OS resources.
+     *
+     * Sockets are removed from an agent when the socket emits either
+     * a `'close'` event or an `'agentRemove'` event. When intending to keep one
+     * HTTP request open for a long time without keeping it in the agent, something
+     * like the following may be done:
+     *
+     * ```js
+     * http.get(options, (res) => {
+     *   // Do stuff
+     * }).on('socket', (socket) => {
+     *   socket.emit('agentRemove');
+     * });
+     * ```
+     *
+     * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options
+     * will be used
+     * for the client connection.
+     *
+     * `agent:false`:
+     *
+     * ```js
+     * http.get({
+     *   hostname: 'localhost',
+     *   port: 80,
+     *   path: '/',
+     *   agent: false,  // Create a new agent just for this one request
+     * }, (res) => {
+     *   // Do stuff with response
+     * });
+     * ```
+     *
+     * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v25.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
+     *
+     * To configure any of them, a custom {@link Agent} instance must be created.
+     *
+     * ```js
+     * import http from 'node:http';
+     * const keepAliveAgent = new http.Agent({ keepAlive: true });
+     * options.agent = keepAliveAgent;
+     * http.request(options, onResponseCallback)
+     * ```
+     * @since v0.3.4
+     */
+    class Agent extends EventEmitter {
+        /**
+         * By default set to 256. For agents with `keepAlive` enabled, this
+         * sets the maximum number of sockets that will be left open in the free
+         * state.
+         * @since v0.11.7
+         */
+        maxFreeSockets: number;
+        /**
+         * By default set to `Infinity`. Determines how many concurrent sockets the agent
+         * can have open per origin. Origin is the returned value of `agent.getName()`.
+         * @since v0.3.6
+         */
+        maxSockets: number;
+        /**
+         * By default set to `Infinity`. Determines how many concurrent sockets the agent
+         * can have open. Unlike `maxSockets`, this parameter applies across all origins.
+         * @since v14.5.0, v12.19.0
+         */
+        maxTotalSockets: number;
+        /**
+         * An object which contains arrays of sockets currently awaiting use by
+         * the agent when `keepAlive` is enabled. Do not modify.
+         *
+         * Sockets in the `freeSockets` list will be automatically destroyed and
+         * removed from the array on `'timeout'`.
+         * @since v0.11.4
+         */
+        readonly freeSockets: NodeJS.ReadOnlyDict<net.Socket[]>;
+        /**
+         * An object which contains arrays of sockets currently in use by the
+         * agent. Do not modify.
+         * @since v0.3.6
+         */
+        readonly sockets: NodeJS.ReadOnlyDict<net.Socket[]>;
+        /**
+         * An object which contains queues of requests that have not yet been assigned to
+         * sockets. Do not modify.
+         * @since v0.5.9
+         */
+        readonly requests: NodeJS.ReadOnlyDict<ClientRequest[]>;
+        constructor(opts?: AgentOptions);
+        /**
+         * Destroy any sockets that are currently in use by the agent.
+         *
+         * It is usually not necessary to do this. However, if using an
+         * agent with `keepAlive` enabled, then it is best to explicitly shut down
+         * the agent when it is no longer needed. Otherwise,
+         * sockets might stay open for quite a long time before the server
+         * terminates them.
+         * @since v0.11.4
+         */
+        destroy(): void;
+        /**
+         * Produces a socket/stream to be used for HTTP requests.
+         *
+         * By default, this function behaves identically to `net.createConnection()`,
+         * synchronously returning the created socket. The optional `callback` parameter in the
+         * signature is **not** used by this default implementation.
+         *
+         * However, custom agents may override this method to provide greater flexibility,
+         * for example, to create sockets asynchronously. When overriding `createConnection`:
+         *
+         * 1. **Synchronous socket creation**: The overriding method can return the
+         *    socket/stream directly.
+         * 2. **Asynchronous socket creation**: The overriding method can accept the `callback`
+         *    and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).
+         *    If an error occurs during socket creation, it should be passed as the first
+         *    argument to the `callback` (e.g., `callback(err)`).
+         *
+         * The agent will call the provided `createConnection` function with `options` and
+         * this internal `callback`. The `callback` provided by the agent has a signature
+         * of `(err, stream)`.
+         * @since v0.11.4
+         * @param options Options containing connection details. Check
+         * `net.createConnection` for the format of the options. For custom agents,
+         * this object is passed to the custom `createConnection` function.
+         * @param callback (Optional, primarily for custom agents) A function to be
+         * called by a custom `createConnection` implementation when the socket is
+         * created, especially for asynchronous operations.
+         * @returns The created socket. This is returned by the default
+         * implementation or by a custom synchronous `createConnection` implementation.
+         * If a custom `createConnection` uses the `callback` for asynchronous
+         * operation, this return value might not be the primary way to obtain the socket.
+         */
+        createConnection(
+            options: ClientRequestArgs,
+            callback?: (err: Error | null, stream: stream.Duplex) => void,
+        ): stream.Duplex | null | undefined;
+        /**
+         * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to:
+         *
+         * ```js
+         * socket.setKeepAlive(true, this.keepAliveMsecs);
+         * socket.unref();
+         * return true;
+         * ```
+         *
+         * This method can be overridden by a particular `Agent` subclass. If this
+         * method returns a falsy value, the socket will be destroyed instead of persisting
+         * it for use with the next request.
+         *
+         * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`.
+         * @since v8.1.0
+         */
+        keepSocketAlive(socket: stream.Duplex): void;
+        /**
+         * Called when `socket` is attached to `request` after being persisted because of
+         * the keep-alive options. Default behavior is to:
+         *
+         * ```js
+         * socket.ref();
+         * ```
+         *
+         * This method can be overridden by a particular `Agent` subclass.
+         *
+         * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`.
+         * @since v8.1.0
+         */
+        reuseSocket(socket: stream.Duplex, request: ClientRequest): void;
+        /**
+         * Get a unique name for a set of request options, to determine whether a
+         * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent,
+         * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options
+         * that determine socket reusability.
+         * @since v0.11.4
+         * @param options A set of options providing information for name generation
+         */
+        getName(options?: ClientRequestArgs): string;
+    }
+    const METHODS: string[];
+    const STATUS_CODES: {
+        [errorCode: number]: string | undefined;
+        [errorCode: string]: string | undefined;
+    };
+    /**
+     * Returns a new instance of {@link Server}.
+     *
+     * The `requestListener` is a function which is automatically
+     * added to the `'request'` event.
+     *
+     * ```js
+     * import http from 'node:http';
+     *
+     * // Create a local server to receive data from
+     * const server = http.createServer((req, res) => {
+     *   res.writeHead(200, { 'Content-Type': 'application/json' });
+     *   res.end(JSON.stringify({
+     *     data: 'Hello World!',
+     *   }));
+     * });
+     *
+     * server.listen(8000);
+     * ```
+     *
+     * ```js
+     * import http from 'node:http';
+     *
+     * // Create a local server to receive data from
+     * const server = http.createServer();
+     *
+     * // Listen to the request event
+     * server.on('request', (request, res) => {
+     *   res.writeHead(200, { 'Content-Type': 'application/json' });
+     *   res.end(JSON.stringify({
+     *     data: 'Hello World!',
+     *   }));
+     * });
+     *
+     * server.listen(8000);
+     * ```
+     * @since v0.1.13
+     */
+    function createServer<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
+    function createServer<
+        Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
+    >(
+        options: ServerOptions<Request, Response>,
+        requestListener?: RequestListener<Request, Response>,
+    ): Server<Request, Response>;
+    // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
+    // create interface RequestOptions would make the naming more clear to developers
+    interface RequestOptions extends ClientRequestArgs {}
+    /**
+     * `options` in `socket.connect()` are also supported.
+     *
+     * Node.js maintains several connections per server to make HTTP requests.
+     * This function allows one to transparently issue requests.
+     *
+     * `url` can be a string or a `URL` object. If `url` is a
+     * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+     *
+     * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence.
+     *
+     * The optional `callback` parameter will be added as a one-time listener for
+     * the `'response'` event.
+     *
+     * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
+     * upload a file with a POST request, then write to the `ClientRequest` object.
+     *
+     * ```js
+     * import http from 'node:http';
+     * import { Buffer } from 'node:buffer';
+     *
+     * const postData = JSON.stringify({
+     *   'msg': 'Hello World!',
+     * });
+     *
+     * const options = {
+     *   hostname: 'www.google.com',
+     *   port: 80,
+     *   path: '/upload',
+     *   method: 'POST',
+     *   headers: {
+     *     'Content-Type': 'application/json',
+     *     'Content-Length': Buffer.byteLength(postData),
+     *   },
+     * };
+     *
+     * const req = http.request(options, (res) => {
+     *   console.log(`STATUS: ${res.statusCode}`);
+     *   console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
+     *   res.setEncoding('utf8');
+     *   res.on('data', (chunk) => {
+     *     console.log(`BODY: ${chunk}`);
+     *   });
+     *   res.on('end', () => {
+     *     console.log('No more data in response.');
+     *   });
+     * });
+     *
+     * req.on('error', (e) => {
+     *   console.error(`problem with request: ${e.message}`);
+     * });
+     *
+     * // Write data to request body
+     * req.write(postData);
+     * req.end();
+     * ```
+     *
+     * In the example `req.end()` was called. With `http.request()` one
+     * must always call `req.end()` to signify the end of the request -
+     * even if there is no data being written to the request body.
+     *
+     * If any error is encountered during the request (be that with DNS resolution,
+     * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
+     * on the returned request object. As with all `'error'` events, if no listeners
+     * are registered the error will be thrown.
+     *
+     * There are a few special headers that should be noted.
+     *
+     * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
+     * the server should be persisted until the next request.
+     * * Sending a 'Content-Length' header will disable the default chunked encoding.
+     * * Sending an 'Expect' header will immediately send the request headers.
+     * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
+     * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
+     * information.
+     * * Sending an Authorization header will override using the `auth` option
+     * to compute basic authentication.
+     *
+     * Example using a `URL` as `options`:
+     *
+     * ```js
+     * const options = new URL('http://abc:xyz@example.com');
+     *
+     * const req = http.request(options, (res) => {
+     *   // ...
+     * });
+     * ```
+     *
+     * In a successful request, the following events will be emitted in the following
+     * order:
+     *
+     * * `'socket'`
+     * * `'response'`
+     *    * `'data'` any number of times, on the `res` object
+     *    (`'data'` will not be emitted at all if the response body is empty, for
+     *    instance, in most redirects)
+     *    * `'end'` on the `res` object
+     * * `'close'`
+     *
+     * In the case of a connection error, the following events will be emitted:
+     *
+     * * `'socket'`
+     * * `'error'`
+     * * `'close'`
+     *
+     * In the case of a premature connection close before the response is received,
+     * the following events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`
+     * * `'close'`
+     *
+     * In the case of a premature connection close after the response is received,
+     * the following events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * `'response'`
+     *    * `'data'` any number of times, on the `res` object
+     * * (connection closed here)
+     * * `'aborted'` on the `res` object
+     * * `'close'`
+     * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`
+     * * `'close'` on the `res` object
+     *
+     * If `req.destroy()` is called before a socket is assigned, the following
+     * events will be emitted in the following order:
+     *
+     * * (`req.destroy()` called here)
+     * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
+     * * `'close'`
+     *
+     * If `req.destroy()` is called before the connection succeeds, the following
+     * events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * (`req.destroy()` called here)
+     * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
+     * * `'close'`
+     *
+     * If `req.destroy()` is called after the response is received, the following
+     * events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * `'response'`
+     *    * `'data'` any number of times, on the `res` object
+     * * (`req.destroy()` called here)
+     * * `'aborted'` on the `res` object
+     * * `'close'`
+     * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
+     * * `'close'` on the `res` object
+     *
+     * If `req.abort()` is called before a socket is assigned, the following
+     * events will be emitted in the following order:
+     *
+     * * (`req.abort()` called here)
+     * * `'abort'`
+     * * `'close'`
+     *
+     * If `req.abort()` is called before the connection succeeds, the following
+     * events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * (`req.abort()` called here)
+     * * `'abort'`
+     * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`
+     * * `'close'`
+     *
+     * If `req.abort()` is called after the response is received, the following
+     * events will be emitted in the following order:
+     *
+     * * `'socket'`
+     * * `'response'`
+     *    * `'data'` any number of times, on the `res` object
+     * * (`req.abort()` called here)
+     * * `'abort'`
+     * * `'aborted'` on the `res` object
+     * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`.
+     * * `'close'`
+     * * `'close'` on the `res` object
+     *
+     * Setting the `timeout` option or using the `setTimeout()` function will
+     * not abort the request or do anything besides add a `'timeout'` event.
+     *
+     * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the
+     * request. Specifically, the `'error'` event will be emitted with an error with
+     * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided.
+     * @since v0.3.6
+     */
+    function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+    function request(
+        url: string | URL,
+        options: RequestOptions,
+        callback?: (res: IncomingMessage) => void,
+    ): ClientRequest;
+    /**
+     * Since most requests are GET requests without bodies, Node.js provides this
+     * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to
+     * consume the response
+     * data for reasons stated in {@link ClientRequest} section.
+     *
+     * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
+     *
+     * JSON fetching example:
+     *
+     * ```js
+     * http.get('http://localhost:8000/', (res) => {
+     *   const { statusCode } = res;
+     *   const contentType = res.headers['content-type'];
+     *
+     *   let error;
+     *   // Any 2xx status code signals a successful response but
+     *   // here we're only checking for 200.
+     *   if (statusCode !== 200) {
+     *     error = new Error('Request Failed.\n' +
+     *                       `Status Code: ${statusCode}`);
+     *   } else if (!/^application\/json/.test(contentType)) {
+     *     error = new Error('Invalid content-type.\n' +
+     *                       `Expected application/json but received ${contentType}`);
+     *   }
+     *   if (error) {
+     *     console.error(error.message);
+     *     // Consume response data to free up memory
+     *     res.resume();
+     *     return;
+     *   }
+     *
+     *   res.setEncoding('utf8');
+     *   let rawData = '';
+     *   res.on('data', (chunk) => { rawData += chunk; });
+     *   res.on('end', () => {
+     *     try {
+     *       const parsedData = JSON.parse(rawData);
+     *       console.log(parsedData);
+     *     } catch (e) {
+     *       console.error(e.message);
+     *     }
+     *   });
+     * }).on('error', (e) => {
+     *   console.error(`Got error: ${e.message}`);
+     * });
+     *
+     * // Create a local server to receive data from
+     * const server = http.createServer((req, res) => {
+     *   res.writeHead(200, { 'Content-Type': 'application/json' });
+     *   res.end(JSON.stringify({
+     *     data: 'Hello World!',
+     *   }));
+     * });
+     *
+     * server.listen(8000);
+     * ```
+     * @since v0.3.6
+     * @param options Accepts the same `options` as {@link request}, with the method set to GET by default.
+     */
+    function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
+    function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
+    /**
+     * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called.
+     *
+     * Passing illegal value as `name` will result in a `TypeError` being thrown,
+     * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
+     *
+     * It is not necessary to use this method before passing headers to an HTTP request
+     * or response. The HTTP module will automatically validate such headers.
+     *
+     * Example:
+     *
+     * ```js
+     * import { validateHeaderName } from 'node:http';
+     *
+     * try {
+     *   validateHeaderName('');
+     * } catch (err) {
+     *   console.error(err instanceof TypeError); // --> true
+     *   console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN'
+     *   console.error(err.message); // --> 'Header name must be a valid HTTP token [""]'
+     * }
+     * ```
+     * @since v14.3.0
+     * @param [label='Header name'] Label for error message.
+     */
+    function validateHeaderName(name: string): void;
+    /**
+     * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called.
+     *
+     * Passing illegal value as `value` will result in a `TypeError` being thrown.
+     *
+     * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
+     * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
+     *
+     * It is not necessary to use this method before passing headers to an HTTP request
+     * or response. The HTTP module will automatically validate such headers.
+     *
+     * Examples:
+     *
+     * ```js
+     * import { validateHeaderValue } from 'node:http';
+     *
+     * try {
+     *   validateHeaderValue('x-my-header', undefined);
+     * } catch (err) {
+     *   console.error(err instanceof TypeError); // --> true
+     *   console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true
+     *   console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"'
+     * }
+     *
+     * try {
+     *   validateHeaderValue('x-my-header', 'oʊmɪɡə');
+     * } catch (err) {
+     *   console.error(err instanceof TypeError); // --> true
+     *   console.error(err.code === 'ERR_INVALID_CHAR'); // --> true
+     *   console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]'
+     * }
+     * ```
+     * @since v14.3.0
+     * @param name Header name
+     * @param value Header value
+     */
+    function validateHeaderValue(name: string, value: string): void;
+    /**
+     * Set the maximum number of idle HTTP parsers.
+     * @since v18.8.0, v16.18.0
+     * @param [max=1000]
+     */
+    function setMaxIdleHTTPParsers(max: number): void;
+    /**
+     * Dynamically resets the global configurations to enable built-in proxy support for
+     * `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative
+     * to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable.
+     * It can also be used to override settings configured from the environment variables.
+     *
+     * As this function resets the global configurations, any previously configured
+     * `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be
+     * overridden after this function is invoked. It's recommended to invoke it before any
+     * requests are made and avoid invoking it in the middle of any requests.
+     *
+     * See [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY`
+     * syntax.
+     * @since v25.4.0
+     * @param proxyEnv An object containing proxy configuration. This accepts the
+     * same options as the `proxyEnv` option accepted by {@link Agent}. **Default:**
+     * `process.env`.
+     * @returns A function that restores the original agent and dispatcher
+     * settings to the state before this `http.setGlobalProxyFromEnv()` is invoked.
+     */
+    function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void;
+    /**
+     * Global instance of `Agent` which is used as the default for all HTTP client
+     * requests. Diverges from a default `Agent` configuration by having `keepAlive`
+     * enabled and a `timeout` of 5 seconds.
+     * @since v0.5.9
+     */
+    let globalAgent: Agent;
+    /**
+     * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
+     * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
+     */
+    const maxHeaderSize: number;
+    /**
+     * A browser-compatible implementation of `WebSocket`.
+     * @since v22.5.0
+     */
+    const WebSocket: typeof import("undici-types").WebSocket;
+    /**
+     * @since v22.5.0
+     */
+    const CloseEvent: typeof import("undici-types").CloseEvent;
+    /**
+     * @since v22.5.0
+     */
+    const MessageEvent: typeof import("undici-types").MessageEvent;
+}
+declare module "http" {
+    export * from "node:http";
+}

+ 2470 - 0
node_modules/@types/node/http2.d.ts

@@ -0,0 +1,2470 @@
+declare module "node:http2" {
+    import { NonSharedBuffer } from "node:buffer";
+    import { InternalEventEmitter } from "node:events";
+    import * as fs from "node:fs";
+    import * as net from "node:net";
+    import * as stream from "node:stream";
+    import * as tls from "node:tls";
+    import * as url from "node:url";
+    import {
+        IncomingHttpHeaders as Http1IncomingHttpHeaders,
+        IncomingMessage,
+        OutgoingHttpHeaders,
+        ServerResponse,
+    } from "node:http";
+    interface IncomingHttpStatusHeader {
+        ":status"?: number | undefined;
+    }
+    interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
+        ":path"?: string | undefined;
+        ":method"?: string | undefined;
+        ":authority"?: string | undefined;
+        ":scheme"?: string | undefined;
+    }
+    // Http2Stream
+    interface StreamState {
+        localWindowSize?: number | undefined;
+        state?: number | undefined;
+        localClose?: number | undefined;
+        remoteClose?: number | undefined;
+        /** @deprecated */
+        sumDependencyWeight?: number | undefined;
+        /** @deprecated */
+        weight?: number | undefined;
+    }
+    interface ServerStreamResponseOptions {
+        endStream?: boolean | undefined;
+        waitForTrailers?: boolean | undefined;
+    }
+    interface StatOptions {
+        offset: number;
+        length: number;
+    }
+    interface ServerStreamFileResponseOptions {
+        statCheck?:
+            | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void)
+            | undefined;
+        waitForTrailers?: boolean | undefined;
+        offset?: number | undefined;
+        length?: number | undefined;
+    }
+    interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
+        onError?: ((err: NodeJS.ErrnoException) => void) | undefined;
+    }
+    interface Http2StreamEventMap extends stream.DuplexEventMap {
+        "aborted": [];
+        "data": [chunk: string | NonSharedBuffer];
+        "frameError": [type: number, code: number, id: number];
+        "ready": [];
+        "streamClosed": [code: number];
+        "timeout": [];
+        "trailers": [trailers: IncomingHttpHeaders, flags: number];
+        "wantTrailers": [];
+    }
+    interface Http2Stream extends stream.Duplex {
+        /**
+         * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set,
+         * the `'aborted'` event will have been emitted.
+         * @since v8.4.0
+         */
+        readonly aborted: boolean;
+        /**
+         * This property shows the number of characters currently buffered to be written.
+         * See `net.Socket.bufferSize` for details.
+         * @since v11.2.0, v10.16.0
+         */
+        readonly bufferSize: number;
+        /**
+         * Set to `true` if the `Http2Stream` instance has been closed.
+         * @since v9.4.0
+         */
+        readonly closed: boolean;
+        /**
+         * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer
+         * usable.
+         * @since v8.4.0
+         */
+        readonly destroyed: boolean;
+        /**
+         * Set to `true` if the `END_STREAM` flag was set in the request or response
+         * HEADERS frame received, indicating that no additional data should be received
+         * and the readable side of the `Http2Stream` will be closed.
+         * @since v10.11.0
+         */
+        readonly endAfterHeaders: boolean;
+        /**
+         * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned.
+         * @since v8.4.0
+         */
+        readonly id?: number | undefined;
+        /**
+         * Set to `true` if the `Http2Stream` instance has not yet been assigned a
+         * numeric stream identifier.
+         * @since v9.4.0
+         */
+        readonly pending: boolean;
+        /**
+         * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is
+         * destroyed after either receiving an `RST_STREAM` frame from the connected peer,
+         * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed.
+         * @since v8.4.0
+         */
+        readonly rstCode: number;
+        /**
+         * An object containing the outbound headers sent for this `Http2Stream`.
+         * @since v9.5.0
+         */
+        readonly sentHeaders: OutgoingHttpHeaders;
+        /**
+         * An array of objects containing the outbound informational (additional) headers
+         * sent for this `Http2Stream`.
+         * @since v9.5.0
+         */
+        readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
+        /**
+         * An object containing the outbound trailers sent for this `HttpStream`.
+         * @since v9.5.0
+         */
+        readonly sentTrailers?: OutgoingHttpHeaders | undefined;
+        /**
+         * A reference to the `Http2Session` instance that owns this `Http2Stream`. The
+         * value will be `undefined` after the `Http2Stream` instance is destroyed.
+         * @since v8.4.0
+         */
+        readonly session: Http2Session | undefined;
+        /**
+         * Provides miscellaneous information about the current state of the `Http2Stream`.
+         *
+         * A current state of this `Http2Stream`.
+         * @since v8.4.0
+         */
+        readonly state: StreamState;
+        /**
+         * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the
+         * connected HTTP/2 peer.
+         * @since v8.4.0
+         * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code.
+         * @param callback An optional function registered to listen for the `'close'` event.
+         */
+        close(code?: number, callback?: () => void): void;
+        /**
+         * @deprecated Priority signaling is no longer supported in Node.js.
+         */
+        priority(options: unknown): void;
+        /**
+         * ```js
+         * import http2 from 'node:http2';
+         * const client = http2.connect('http://example.org:8000');
+         * const { NGHTTP2_CANCEL } = http2.constants;
+         * const req = client.request({ ':path': '/' });
+         *
+         * // Cancel the stream if there's no activity after 5 seconds
+         * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL));
+         * ```
+         * @since v8.4.0
+         */
+        setTimeout(msecs: number, callback?: () => void): void;
+        /**
+         * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method
+         * will cause the `Http2Stream` to be immediately closed and must only be
+         * called after the `'wantTrailers'` event has been emitted. When sending a
+         * request or sending a response, the `options.waitForTrailers` option must be set
+         * in order to keep the `Http2Stream` open after the final `DATA` frame so that
+         * trailers can be sent.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   stream.respond(undefined, { waitForTrailers: true });
+         *   stream.on('wantTrailers', () => {
+         *     stream.sendTrailers({ xyz: 'abc' });
+         *   });
+         *   stream.end('Hello World');
+         * });
+         * ```
+         *
+         * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header
+         * fields (e.g. `':method'`, `':path'`, etc).
+         * @since v10.0.0
+         */
+        sendTrailers(headers: OutgoingHttpHeaders): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof Http2StreamEventMap>(eventName: E, ...args: Http2StreamEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener?: (...args: Http2StreamEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof Http2StreamEventMap>(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof Http2StreamEventMap>(eventName: E): ((...args: Http2StreamEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof Http2StreamEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof Http2StreamEventMap>(
+            eventName: E,
+            listener: (...args: Http2StreamEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface ClientHttp2StreamEventMap extends Http2StreamEventMap {
+        "continue": [];
+        "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
+        "push": [headers: IncomingHttpHeaders, flags: number];
+        "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
+    }
+    interface ClientHttp2Stream extends Http2Stream {
+        // #region InternalEventEmitter
+        addListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ClientHttp2StreamEventMap>(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener?: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+        ): ((...args: ClientHttp2StreamEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+        ): ((...args: ClientHttp2StreamEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ClientHttp2StreamEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface ServerHttp2Stream extends Http2Stream {
+        /**
+         * True if headers were sent, false otherwise (read-only).
+         * @since v8.4.0
+         */
+        readonly headersSent: boolean;
+        /**
+         * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote
+         * client's most recent `SETTINGS` frame. Will be `true` if the remote peer
+         * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`.
+         * @since v8.4.0
+         */
+        readonly pushAllowed: boolean;
+        /**
+         * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer.
+         * @since v8.4.0
+         */
+        additionalHeaders(headers: OutgoingHttpHeaders): void;
+        /**
+         * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   stream.respond({ ':status': 200 });
+         *   stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => {
+         *     if (err) throw err;
+         *     pushStream.respond({ ':status': 200 });
+         *     pushStream.end('some pushed data');
+         *   });
+         *   stream.end('some data');
+         * });
+         * ```
+         *
+         * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass
+         * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams.
+         *
+         * Calling `http2stream.pushStream()` from within a pushed stream is not permitted
+         * and will throw an error.
+         * @since v8.4.0
+         * @param callback Callback that is called once the push stream has been initiated.
+         */
+        pushStream(
+            headers: OutgoingHttpHeaders,
+            callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
+        ): void;
+        pushStream(
+            headers: OutgoingHttpHeaders,
+            options?: Pick<ClientSessionRequestOptions, "exclusive" | "parent">,
+            callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
+        ): void;
+        /**
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   stream.respond({ ':status': 200 });
+         *   stream.end('some data');
+         * });
+         * ```
+         *
+         * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+         * will be emitted immediately after queuing the last chunk of payload data to be sent.
+         * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer.
+         *
+         * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+         * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   stream.respond({ ':status': 200 }, { waitForTrailers: true });
+         *   stream.on('wantTrailers', () => {
+         *     stream.sendTrailers({ ABC: 'some value to send' });
+         *   });
+         *   stream.end('some data');
+         * });
+         * ```
+         * @since v8.4.0
+         */
+        respond(headers?: OutgoingHttpHeaders | readonly string[], options?: ServerStreamResponseOptions): void;
+        /**
+         * Initiates a response whose data is read from the given file descriptor. No
+         * validation is performed on the given file descriptor. If an error occurs while
+         * attempting to read data using the file descriptor, the `Http2Stream` will be
+         * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+         *
+         * When used, the `Http2Stream` object's `Duplex` interface will be closed
+         * automatically.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * import fs from 'node:fs';
+         *
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   const fd = fs.openSync('/some/file', 'r');
+         *
+         *   const stat = fs.fstatSync(fd);
+         *   const headers = {
+         *     'content-length': stat.size,
+         *     'last-modified': stat.mtime.toUTCString(),
+         *     'content-type': 'text/plain; charset=utf-8',
+         *   };
+         *   stream.respondWithFD(fd, headers);
+         *   stream.on('close', () => fs.closeSync(fd));
+         * });
+         * ```
+         *
+         * The optional `options.statCheck` function may be specified to give user code
+         * an opportunity to set additional content headers based on the `fs.Stat` details
+         * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will
+         * perform an `fs.fstat()` call to collect details on the provided file descriptor.
+         *
+         * The `offset` and `length` options may be used to limit the response to a
+         * specific range subset. This can be used, for instance, to support HTTP Range
+         * requests.
+         *
+         * The file descriptor or `FileHandle` is not closed when the stream is closed,
+         * so it will need to be closed manually once it is no longer needed.
+         * Using the same file descriptor concurrently for multiple streams
+         * is not supported and may result in data loss. Re-using a file descriptor
+         * after a stream has finished is supported.
+         *
+         * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+         * will be emitted immediately after queuing the last chunk of payload data to be
+         * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+         * header fields to the peer.
+         *
+         * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+         * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()`
+         * or `http2stream.close()` to close the `Http2Stream`.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * import fs from 'node:fs';
+         *
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   const fd = fs.openSync('/some/file', 'r');
+         *
+         *   const stat = fs.fstatSync(fd);
+         *   const headers = {
+         *     'content-length': stat.size,
+         *     'last-modified': stat.mtime.toUTCString(),
+         *     'content-type': 'text/plain; charset=utf-8',
+         *   };
+         *   stream.respondWithFD(fd, headers, { waitForTrailers: true });
+         *   stream.on('wantTrailers', () => {
+         *     stream.sendTrailers({ ABC: 'some value to send' });
+         *   });
+         *
+         *   stream.on('close', () => fs.closeSync(fd));
+         * });
+         * ```
+         * @since v8.4.0
+         * @param fd A readable file descriptor.
+         */
+        respondWithFD(
+            fd: number | fs.promises.FileHandle,
+            headers?: OutgoingHttpHeaders,
+            options?: ServerStreamFileResponseOptions,
+        ): void;
+        /**
+         * Sends a regular file as the response. The `path` must specify a regular file
+         * or an `'error'` event will be emitted on the `Http2Stream` object.
+         *
+         * When used, the `Http2Stream` object's `Duplex` interface will be closed
+         * automatically.
+         *
+         * The optional `options.statCheck` function may be specified to give user code
+         * an opportunity to set additional content headers based on the `fs.Stat` details
+         * of the given file:
+         *
+         * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an
+         * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code.
+         * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed.
+         *
+         * Example using a file path:
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   function statCheck(stat, headers) {
+         *     headers['last-modified'] = stat.mtime.toUTCString();
+         *   }
+         *
+         *   function onError(err) {
+         *     // stream.respond() can throw if the stream has been destroyed by
+         *     // the other side.
+         *     try {
+         *       if (err.code === 'ENOENT') {
+         *         stream.respond({ ':status': 404 });
+         *       } else {
+         *         stream.respond({ ':status': 500 });
+         *       }
+         *     } catch (err) {
+         *       // Perform actual error handling.
+         *       console.error(err);
+         *     }
+         *     stream.end();
+         *   }
+         *
+         *   stream.respondWithFile('/some/file',
+         *                          { 'content-type': 'text/plain; charset=utf-8' },
+         *                          { statCheck, onError });
+         * });
+         * ```
+         *
+         * The `options.statCheck` function may also be used to cancel the send operation
+         * by returning `false`. For instance, a conditional request may check the stat
+         * results to determine if the file has been modified to return an appropriate `304` response:
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   function statCheck(stat, headers) {
+         *     // Check the stat here...
+         *     stream.respond({ ':status': 304 });
+         *     return false; // Cancel the send operation
+         *   }
+         *   stream.respondWithFile('/some/file',
+         *                          { 'content-type': 'text/plain; charset=utf-8' },
+         *                          { statCheck });
+         * });
+         * ```
+         *
+         * The `content-length` header field will be automatically set.
+         *
+         * The `offset` and `length` options may be used to limit the response to a
+         * specific range subset. This can be used, for instance, to support HTTP Range
+         * requests.
+         *
+         * The `options.onError` function may also be used to handle all the errors
+         * that could happen before the delivery of the file is initiated. The
+         * default behavior is to destroy the stream.
+         *
+         * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+         * will be emitted immediately after queuing the last chunk of payload data to be
+         * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing
+         * header fields to the peer.
+         *
+         * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+         * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer();
+         * server.on('stream', (stream) => {
+         *   stream.respondWithFile('/some/file',
+         *                          { 'content-type': 'text/plain; charset=utf-8' },
+         *                          { waitForTrailers: true });
+         *   stream.on('wantTrailers', () => {
+         *     stream.sendTrailers({ ABC: 'some value to send' });
+         *   });
+         * });
+         * ```
+         * @since v8.4.0
+         */
+        respondWithFile(
+            path: string,
+            headers?: OutgoingHttpHeaders,
+            options?: ServerStreamFileResponseOptionsWithError,
+        ): void;
+    }
+    // Http2Session
+    interface Settings {
+        headerTableSize?: number | undefined;
+        enablePush?: boolean | undefined;
+        initialWindowSize?: number | undefined;
+        maxFrameSize?: number | undefined;
+        maxConcurrentStreams?: number | undefined;
+        maxHeaderListSize?: number | undefined;
+        enableConnectProtocol?: boolean | undefined;
+    }
+    interface ClientSessionRequestOptions {
+        endStream?: boolean | undefined;
+        exclusive?: boolean | undefined;
+        parent?: number | undefined;
+        waitForTrailers?: boolean | undefined;
+        signal?: AbortSignal | undefined;
+    }
+    interface SessionState {
+        effectiveLocalWindowSize?: number | undefined;
+        effectiveRecvDataLength?: number | undefined;
+        nextStreamID?: number | undefined;
+        localWindowSize?: number | undefined;
+        lastProcStreamID?: number | undefined;
+        remoteWindowSize?: number | undefined;
+        outboundQueueSize?: number | undefined;
+        deflateDynamicTableSize?: number | undefined;
+        inflateDynamicTableSize?: number | undefined;
+    }
+    interface Http2SessionEventMap {
+        "close": [];
+        "connect": [session: Http2Session, socket: net.Socket | tls.TLSSocket];
+        "error": [err: Error];
+        "frameError": [type: number, code: number, id: number];
+        "goaway": [errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer];
+        "localSettings": [settings: Settings];
+        "ping": [payload: Buffer];
+        "remoteSettings": [settings: Settings];
+        "stream": [
+            stream: Http2Stream,
+            headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
+            flags: number,
+            rawHeaders: string[],
+        ];
+        "timeout": [];
+    }
+    interface Http2Session extends InternalEventEmitter<Http2SessionEventMap> {
+        /**
+         * Value will be `undefined` if the `Http2Session` is not yet connected to a
+         * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or
+         * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property.
+         * @since v9.4.0
+         */
+        readonly alpnProtocol?: string | undefined;
+        /**
+         * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`.
+         * @since v9.4.0
+         */
+        readonly closed: boolean;
+        /**
+         * Will be `true` if this `Http2Session` instance is still connecting, will be set
+         * to `false` before emitting `connect` event and/or calling the `http2.connect` callback.
+         * @since v10.0.0
+         */
+        readonly connecting: boolean;
+        /**
+         * Will be `true` if this `Http2Session` instance has been destroyed and must no
+         * longer be used, otherwise `false`.
+         * @since v8.4.0
+         */
+        readonly destroyed: boolean;
+        /**
+         * Value is `undefined` if the `Http2Session` session socket has not yet been
+         * connected, `true` if the `Http2Session` is connected with a `TLSSocket`,
+         * and `false` if the `Http2Session` is connected to any other kind of socket
+         * or stream.
+         * @since v9.4.0
+         */
+        readonly encrypted?: boolean | undefined;
+        /**
+         * A prototype-less object describing the current local settings of this `Http2Session`.
+         * The local settings are local to _this_`Http2Session` instance.
+         * @since v8.4.0
+         */
+        readonly localSettings: Settings;
+        /**
+         * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property
+         * will return an `Array` of origins for which the `Http2Session` may be
+         * considered authoritative.
+         *
+         * The `originSet` property is only available when using a secure TLS connection.
+         * @since v9.4.0
+         */
+        readonly originSet?: string[] | undefined;
+        /**
+         * Indicates whether the `Http2Session` is currently waiting for acknowledgment of
+         * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method.
+         * Will be `false` once all sent `SETTINGS` frames have been acknowledged.
+         * @since v8.4.0
+         */
+        readonly pendingSettingsAck: boolean;
+        /**
+         * A prototype-less object describing the current remote settings of this`Http2Session`.
+         * The remote settings are set by the _connected_ HTTP/2 peer.
+         * @since v8.4.0
+         */
+        readonly remoteSettings: Settings;
+        /**
+         * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+         * limits available methods to ones safe to use with HTTP/2.
+         *
+         * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw
+         * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information.
+         *
+         * `setTimeout` method will be called on this `Http2Session`.
+         *
+         * All other interactions will be routed directly to the socket.
+         * @since v8.4.0
+         */
+        readonly socket: net.Socket | tls.TLSSocket;
+        /**
+         * Provides miscellaneous information about the current state of the`Http2Session`.
+         *
+         * An object describing the current status of this `Http2Session`.
+         * @since v8.4.0
+         */
+        readonly state: SessionState;
+        /**
+         * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a
+         * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a
+         * client.
+         * @since v8.4.0
+         */
+        readonly type: number;
+        /**
+         * Gracefully closes the `Http2Session`, allowing any existing streams to
+         * complete on their own and preventing new `Http2Stream` instances from being
+         * created. Once closed, `http2session.destroy()`_might_ be called if there
+         * are no open `Http2Stream` instances.
+         *
+         * If specified, the `callback` function is registered as a handler for the`'close'` event.
+         * @since v9.4.0
+         */
+        close(callback?: () => void): void;
+        /**
+         * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`.
+         *
+         * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event.
+         *
+         * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed.
+         * @since v8.4.0
+         * @param error An `Error` object if the `Http2Session` is being destroyed due to an error.
+         * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`.
+         */
+        destroy(error?: Error, code?: number): void;
+        /**
+         * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`.
+         * @since v9.4.0
+         * @param code An HTTP/2 error code
+         * @param lastStreamID The numeric ID of the last processed `Http2Stream`
+         * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame.
+         */
+        goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
+        /**
+         * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
+         * be provided. The method will return `true` if the `PING` was sent, `false` otherwise.
+         *
+         * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10.
+         *
+         * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and
+         * returned with the ping acknowledgment.
+         *
+         * The callback will be invoked with three arguments: an error argument that will
+         * be `null` if the `PING` was successfully acknowledged, a `duration` argument
+         * that reports the number of milliseconds elapsed since the ping was sent and the
+         * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload.
+         *
+         * ```js
+         * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
+         *   if (!err) {
+         *     console.log(`Ping acknowledged in ${duration} milliseconds`);
+         *     console.log(`With payload '${payload.toString()}'`);
+         *   }
+         * });
+         * ```
+         *
+         * If the `payload` argument is not specified, the default payload will be the
+         * 64-bit timestamp (little endian) marking the start of the `PING` duration.
+         * @since v8.9.3
+         * @param payload Optional ping payload.
+         */
+        ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean;
+        ping(
+            payload: NodeJS.ArrayBufferView,
+            callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void,
+        ): boolean;
+        /**
+         * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`.
+         * @since v9.4.0
+         */
+        ref(): void;
+        /**
+         * Sets the local endpoint's window size.
+         * The `windowSize` is the total window size to set, not
+         * the delta.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         *
+         * const server = http2.createServer();
+         * const expectedWindowSize = 2 ** 20;
+         * server.on('connect', (session) => {
+         *
+         *   // Set local window size to be 2 ** 20
+         *   session.setLocalWindowSize(expectedWindowSize);
+         * });
+         * ```
+         * @since v15.3.0, v14.18.0
+         */
+        setLocalWindowSize(windowSize: number): void;
+        /**
+         * Used to set a callback function that is called when there is no activity on
+         * the `Http2Session` after `msecs` milliseconds. The given `callback` is
+         * registered as a listener on the `'timeout'` event.
+         * @since v8.4.0
+         */
+        setTimeout(msecs: number, callback?: () => void): void;
+        /**
+         * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer.
+         *
+         * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new
+         * settings.
+         *
+         * The new settings will not become effective until the `SETTINGS` acknowledgment
+         * is received and the `'localSettings'` event is emitted. It is possible to send
+         * multiple `SETTINGS` frames while acknowledgment is still pending.
+         * @since v8.4.0
+         * @param callback Callback that is called once the session is connected or right away if the session is already connected.
+         */
+        settings(
+            settings: Settings,
+            callback?: (err: Error | null, settings: Settings, duration: number) => void,
+        ): void;
+        /**
+         * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`.
+         * @since v9.4.0
+         */
+        unref(): void;
+    }
+    interface ClientHttp2SessionEventMap extends Http2SessionEventMap {
+        "altsvc": [alt: string, origin: string, streamId: number];
+        "connect": [session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket];
+        "origin": [origins: string[]];
+        "stream": [
+            stream: ClientHttp2Stream,
+            headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
+            flags: number,
+            rawHeaders: string[],
+        ];
+    }
+    interface ClientHttp2Session extends Http2Session {
+        /**
+         * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an
+         * HTTP/2 request to the connected server.
+         *
+         * When a `ClientHttp2Session` is first created, the socket may not yet be
+         * connected. if `clienthttp2session.request()` is called during this time, the
+         * actual request will be deferred until the socket is ready to go.
+         * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown.
+         *
+         * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const clientSession = http2.connect('https://localhost:1234');
+         * const {
+         *   HTTP2_HEADER_PATH,
+         *   HTTP2_HEADER_STATUS,
+         * } = http2.constants;
+         *
+         * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' });
+         * req.on('response', (headers) => {
+         *   console.log(headers[HTTP2_HEADER_STATUS]);
+         *   req.on('data', (chunk) => { // ..  });
+         *   req.on('end', () => { // ..  });
+         * });
+         * ```
+         *
+         * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event
+         * is emitted immediately after queuing the last chunk of payload data to be sent.
+         * The `http2stream.sendTrailers()` method can then be called to send trailing
+         * headers to the peer.
+         *
+         * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically
+         * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`.
+         *
+         * When `options.signal` is set with an `AbortSignal` and then `abort` on the
+         * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error.
+         *
+         * The `:method` and `:path` pseudo-headers are not specified within `headers`,
+         * they respectively default to:
+         *
+         * * `:method` \= `'GET'`
+         * * `:path` \= `/`
+         * @since v8.4.0
+         */
+        request(
+            headers?: OutgoingHttpHeaders | readonly string[],
+            options?: ClientSessionRequestOptions,
+        ): ClientHttp2Stream;
+        // #region InternalEventEmitter
+        addListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ClientHttp2StreamEventMap>(eventName: E, ...args: ClientHttp2StreamEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener?: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+        ): ((...args: ClientHttp2StreamEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+        ): ((...args: ClientHttp2StreamEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ClientHttp2StreamEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ClientHttp2StreamEventMap>(
+            eventName: E,
+            listener: (...args: ClientHttp2StreamEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface AlternativeServiceOptions {
+        origin: number | string | url.URL;
+    }
+    interface ServerHttp2SessionEventMap<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends Http2SessionEventMap {
+        "connect": [
+            session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
+            socket: net.Socket | tls.TLSSocket,
+        ];
+        "stream": [stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]];
+    }
+    interface ServerHttp2Session<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends Http2Session {
+        readonly server:
+            | Http2Server<Http1Request, Http1Response, Http2Request, Http2Response>
+            | Http2SecureServer<Http1Request, Http1Response, Http2Request, Http2Response>;
+        /**
+         * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         *
+         * const server = http2.createServer();
+         * server.on('session', (session) => {
+         *   // Set altsvc for origin https://example.org:80
+         *   session.altsvc('h2=":8000"', 'https://example.org:80');
+         * });
+         *
+         * server.on('stream', (stream) => {
+         *   // Set altsvc for a specific stream
+         *   stream.session.altsvc('h2=":8000"', stream.id);
+         * });
+         * ```
+         *
+         * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate
+         * service is associated with the origin of the given `Http2Stream`.
+         *
+         * The `alt` and origin string _must_ contain only ASCII bytes and are
+         * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given
+         * domain.
+         *
+         * When a string is passed for the `originOrStream` argument, it will be parsed as
+         * a URL and the origin will be derived. For instance, the origin for the
+         * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string
+         * cannot be parsed as a URL or if a valid origin cannot be derived.
+         *
+         * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be
+         * used. The value of the `origin` property _must_ be a properly serialized
+         * ASCII origin.
+         * @since v9.4.0
+         * @param alt A description of the alternative service configuration as defined by `RFC 7838`.
+         * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the
+         * `http2stream.id` property.
+         */
+        altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
+        /**
+         * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client
+         * to advertise the set of origins for which the server is capable of providing
+         * authoritative responses.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const options = getSecureOptionsSomehow();
+         * const server = http2.createSecureServer(options);
+         * server.on('stream', (stream) => {
+         *   stream.respond();
+         *   stream.end('ok');
+         * });
+         * server.on('session', (session) => {
+         *   session.origin('https://example.com', 'https://example.org');
+         * });
+         * ```
+         *
+         * When a string is passed as an `origin`, it will be parsed as a URL and the
+         * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given
+         * string
+         * cannot be parsed as a URL or if a valid origin cannot be derived.
+         *
+         * A `URL` object, or any object with an `origin` property, may be passed as
+         * an `origin`, in which case the value of the `origin` property will be
+         * used. The value of the `origin` property _must_ be a properly serialized
+         * ASCII origin.
+         *
+         * Alternatively, the `origins` option may be used when creating a new HTTP/2
+         * server using the `http2.createSecureServer()` method:
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const options = getSecureOptionsSomehow();
+         * options.origins = ['https://example.com', 'https://example.org'];
+         * const server = http2.createSecureServer(options);
+         * server.on('stream', (stream) => {
+         *   stream.respond();
+         *   stream.end('ok');
+         * });
+         * ```
+         * @since v10.12.0
+         * @param origins One or more URL Strings passed as separate arguments.
+         */
+        origin(
+            ...origins: Array<
+                | string
+                | url.URL
+                | {
+                    origin: string;
+                }
+            >
+        ): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener?: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+        ): ((
+            ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+        ): ((
+            ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ServerHttp2SessionEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ServerHttp2SessionEventMap>(
+            eventName: E,
+            listener: (
+                ...args: ServerHttp2SessionEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    // Http2Server
+    interface SessionOptions {
+        /**
+         * Sets the maximum dynamic table size for deflating header fields.
+         * @default 4Kib
+         */
+        maxDeflateDynamicTableSize?: number | undefined;
+        /**
+         * Sets the maximum number of settings entries per `SETTINGS` frame.
+         * The minimum value allowed is `1`.
+         * @default 32
+         */
+        maxSettings?: number | undefined;
+        /**
+         * Sets the maximum memory that the `Http2Session` is permitted to use.
+         * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte.
+         * The minimum value allowed is `1`.
+         * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded,
+         * but new `Http2Stream` instances will be rejected while this limit is exceeded.
+         * The current number of `Http2Stream` sessions, the current memory use of the header compression tables,
+         * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit.
+         * @default 10
+         */
+        maxSessionMemory?: number | undefined;
+        /**
+         * Sets the maximum number of header entries.
+         * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module.
+         * The minimum value is `1`.
+         * @default 128
+         */
+        maxHeaderListPairs?: number | undefined;
+        /**
+         * Sets the maximum number of outstanding, unacknowledged pings.
+         * @default 10
+         */
+        maxOutstandingPings?: number | undefined;
+        /**
+         * Sets the maximum allowed size for a serialized, compressed block of headers.
+         * Attempts to send headers that exceed this limit will result in
+         * a `'frameError'` event being emitted and the stream being closed and destroyed.
+         */
+        maxSendHeaderBlockLength?: number | undefined;
+        /**
+         * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames.
+         * @default http2.constants.PADDING_STRATEGY_NONE
+         */
+        paddingStrategy?: number | undefined;
+        /**
+         * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received.
+         * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`.
+         * @default 100
+         */
+        peerMaxConcurrentStreams?: number | undefined;
+        /**
+         * The initial settings to send to the remote peer upon connection.
+         */
+        settings?: Settings | undefined;
+        /**
+         * The array of integer values determines the settings types,
+         * which are included in the `CustomSettings`-property of the received remoteSettings.
+         * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types.
+         */
+        remoteCustomSettings?: number[] | undefined;
+        /**
+         * Specifies a timeout in milliseconds that
+         * a server should wait when an [`'unknownProtocol'`][] is emitted. If the
+         * socket has not been destroyed by that time the server will destroy it.
+         * @default 100000
+         */
+        unknownProtocolTimeout?: number | undefined;
+        /**
+         * If `true`, it turns on strict leading
+         * and trailing whitespace validation for HTTP/2 header field names and values
+         * as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1).
+         * @since v24.2.0
+         * @default true
+         */
+        strictFieldWhitespaceValidation?: boolean | undefined;
+    }
+    interface ClientSessionOptions extends SessionOptions {
+        /**
+         * Sets the maximum number of reserved push streams the client will accept at any given time.
+         * Once the current number of currently reserved push streams exceeds reaches this limit,
+         * new push streams sent by the server will be automatically rejected.
+         * The minimum allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
+         * A negative value sets this option to the maximum allowed value.
+         * @default 200
+         */
+        maxReservedRemoteStreams?: number | undefined;
+        /**
+         * An optional callback that receives the `URL` instance passed to `connect` and the `options` object,
+         * and returns any `Duplex` stream that is to be used as the connection for this session.
+         */
+        createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
+        /**
+         * The protocol to connect with, if not set in the `authority`.
+         * Value may be either `'http:'` or `'https:'`.
+         * @default 'https:'
+         */
+        protocol?: "http:" | "https:" | undefined;
+    }
+    interface ServerSessionOptions<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends SessionOptions {
+        streamResetBurst?: number | undefined;
+        streamResetRate?: number | undefined;
+        Http1IncomingMessage?: Http1Request | undefined;
+        Http1ServerResponse?: Http1Response | undefined;
+        Http2ServerRequest?: Http2Request | undefined;
+        Http2ServerResponse?: Http2Response | undefined;
+    }
+    interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
+    interface SecureServerSessionOptions<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends ServerSessionOptions<Http1Request, Http1Response, Http2Request, Http2Response>, tls.TlsOptions {}
+    interface ServerOptions<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends ServerSessionOptions<Http1Request, Http1Response, Http2Request, Http2Response> {}
+    interface SecureServerOptions<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends SecureServerSessionOptions<Http1Request, Http1Response, Http2Request, Http2Response> {
+        allowHTTP1?: boolean | undefined;
+        origins?: string[] | undefined;
+    }
+    interface Http2ServerCommon {
+        setTimeout(msec?: number, callback?: () => void): this;
+        /**
+         * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values.
+         * Throws ERR_INVALID_ARG_TYPE for invalid settings argument.
+         */
+        updateSettings(settings: Settings): void;
+    }
+    interface Http2ServerEventMap<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends net.ServerEventMap, Pick<Http2SessionEventMap, "stream" | "timeout"> {
+        "checkContinue": [request: InstanceType<Http2Request>, response: InstanceType<Http2Response>];
+        "request": [request: InstanceType<Http2Request>, response: InstanceType<Http2Response>];
+        "session": [session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>];
+        "sessionError": [err: Error];
+    }
+    interface Http2Server<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends net.Server, Http2ServerCommon {
+        // #region InternalEventEmitter
+        addListener<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener?: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+        ): ((...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+        ): ((...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof Http2ServerEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof Http2ServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface Http2SecureServerEventMap<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends tls.ServerEventMap, Http2ServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response> {
+        "unknownProtocol": [socket: tls.TLSSocket];
+    }
+    interface Http2SecureServer<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    > extends tls.Server, Http2ServerCommon {
+        // #region InternalEventEmitter
+        addListener<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener?: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+        ): ((
+            ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+        ): ((
+            ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+        ) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof Http2SecureServerEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof Http2SecureServerEventMap>(
+            eventName: E,
+            listener: (
+                ...args: Http2SecureServerEventMap<Http1Request, Http1Response, Http2Request, Http2Response>[E]
+            ) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface Http2ServerRequestEventMap extends stream.ReadableEventMap {
+        "aborted": [hadError: boolean, code: number];
+        "data": [chunk: string | NonSharedBuffer];
+    }
+    /**
+     * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
+     * headers, and
+     * data.
+     * @since v8.4.0
+     */
+    class Http2ServerRequest extends stream.Readable {
+        constructor(
+            stream: ServerHttp2Stream,
+            headers: IncomingHttpHeaders,
+            options: stream.ReadableOptions,
+            rawHeaders: readonly string[],
+        );
+        /**
+         * The `request.aborted` property will be `true` if the request has
+         * been aborted.
+         * @since v10.1.0
+         */
+        readonly aborted: boolean;
+        /**
+         * The request authority pseudo header field. Because HTTP/2 allows requests
+         * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`.
+         * @since v8.4.0
+         */
+        readonly authority: string;
+        /**
+         * See `request.socket`.
+         * @since v8.4.0
+         * @deprecated Since v13.0.0 - Use `socket`.
+         */
+        readonly connection: net.Socket | tls.TLSSocket;
+        /**
+         * The `request.complete` property will be `true` if the request has
+         * been completed, aborted, or destroyed.
+         * @since v12.10.0
+         */
+        readonly complete: boolean;
+        /**
+         * The request/response headers object.
+         *
+         * Key-value pairs of header names and values. Header names are lower-cased.
+         *
+         * ```js
+         * // Prints something like:
+         * //
+         * // { 'user-agent': 'curl/7.22.0',
+         * //   host: '127.0.0.1:8000',
+         * //   accept: '*' }
+         * console.log(request.headers);
+         * ```
+         *
+         * See `HTTP/2 Headers Object`.
+         *
+         * In HTTP/2, the request path, host name, protocol, and method are represented as
+         * special headers prefixed with the `:` character (e.g. `':path'`). These special
+         * headers will be included in the `request.headers` object. Care must be taken not
+         * to inadvertently modify these special headers or errors may occur. For instance,
+         * removing all headers from the request will cause errors to occur:
+         *
+         * ```js
+         * removeAllHeaders(request.headers);
+         * assert(request.url);   // Fails because the :path header has been removed
+         * ```
+         * @since v8.4.0
+         */
+        readonly headers: IncomingHttpHeaders;
+        /**
+         * In case of server request, the HTTP version sent by the client. In the case of
+         * client response, the HTTP version of the connected-to server. Returns `'2.0'`.
+         *
+         * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second.
+         * @since v8.4.0
+         */
+        readonly httpVersion: string;
+        readonly httpVersionMinor: number;
+        readonly httpVersionMajor: number;
+        /**
+         * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`.
+         * @since v8.4.0
+         */
+        readonly method: string;
+        /**
+         * The raw request/response headers list exactly as they were received.
+         *
+         * The keys and values are in the same list. It is _not_ a
+         * list of tuples. So, the even-numbered offsets are key values, and the
+         * odd-numbered offsets are the associated values.
+         *
+         * Header names are not lowercased, and duplicates are not merged.
+         *
+         * ```js
+         * // Prints something like:
+         * //
+         * // [ 'user-agent',
+         * //   'this is invalid because there can be only one',
+         * //   'User-Agent',
+         * //   'curl/7.22.0',
+         * //   'Host',
+         * //   '127.0.0.1:8000',
+         * //   'ACCEPT',
+         * //   '*' ]
+         * console.log(request.rawHeaders);
+         * ```
+         * @since v8.4.0
+         */
+        readonly rawHeaders: string[];
+        /**
+         * The raw request/response trailer keys and values exactly as they were
+         * received. Only populated at the `'end'` event.
+         * @since v8.4.0
+         */
+        readonly rawTrailers: string[];
+        /**
+         * The request scheme pseudo header field indicating the scheme
+         * portion of the target URL.
+         * @since v8.4.0
+         */
+        readonly scheme: string;
+        /**
+         * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+         * applies getters, setters, and methods based on HTTP/2 logic.
+         *
+         * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+         * set on `request.stream`.
+         *
+         * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`.
+         *
+         * `setTimeout` method will be called on `request.stream.session`.
+         *
+         * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+         * more information.
+         *
+         * All other interactions will be routed directly to the socket. With TLS support,
+         * use `request.socket.getPeerCertificate()` to obtain the client's
+         * authentication details.
+         * @since v8.4.0
+         */
+        readonly socket: net.Socket | tls.TLSSocket;
+        /**
+         * The `Http2Stream` object backing the request.
+         * @since v8.4.0
+         */
+        readonly stream: ServerHttp2Stream;
+        /**
+         * The request/response trailers object. Only populated at the `'end'` event.
+         * @since v8.4.0
+         */
+        readonly trailers: IncomingHttpHeaders;
+        /**
+         * Request URL string. This contains only the URL that is present in the actual
+         * HTTP request. If the request is:
+         *
+         * ```http
+         * GET /status?name=ryan HTTP/1.1
+         * Accept: text/plain
+         * ```
+         *
+         * Then `request.url` will be:
+         *
+         * ```js
+         * '/status?name=ryan'
+         * ```
+         *
+         * To parse the url into its parts, `new URL()` can be used:
+         *
+         * ```console
+         * $ node
+         * > new URL('/status?name=ryan', 'http://example.com')
+         * URL {
+         *   href: 'http://example.com/status?name=ryan',
+         *   origin: 'http://example.com',
+         *   protocol: 'http:',
+         *   username: '',
+         *   password: '',
+         *   host: 'example.com',
+         *   hostname: 'example.com',
+         *   port: '',
+         *   pathname: '/status',
+         *   search: '?name=ryan',
+         *   searchParams: URLSearchParams { 'name' => 'ryan' },
+         *   hash: ''
+         * }
+         * ```
+         * @since v8.4.0
+         */
+        url: string;
+        /**
+         * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+         * provided, then it is added as a listener on the `'timeout'` event on
+         * the response object.
+         *
+         * If no `'timeout'` listener is added to the request, the response, or
+         * the server, then `Http2Stream`s are destroyed when they time out. If a
+         * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly.
+         * @since v8.4.0
+         */
+        setTimeout(msecs: number, callback?: () => void): void;
+        read(size?: number): Buffer | string | null;
+        // #region InternalEventEmitter
+        addListener<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof Http2ServerRequestEventMap>(eventName: E, ...args: Http2ServerRequestEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener?: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+        ): ((...args: Http2ServerRequestEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+        ): ((...args: Http2ServerRequestEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof Http2ServerRequestEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof Http2ServerRequestEventMap>(
+            eventName: E,
+            listener: (...args: Http2ServerRequestEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    /**
+     * This object is created internally by an HTTP server, not by the user. It is
+     * passed as the second parameter to the `'request'` event.
+     * @since v8.4.0
+     */
+    class Http2ServerResponse<Request extends Http2ServerRequest = Http2ServerRequest> extends stream.Writable {
+        constructor(stream: ServerHttp2Stream);
+        /**
+         * See `response.socket`.
+         * @since v8.4.0
+         * @deprecated Since v13.0.0 - Use `socket`.
+         */
+        readonly connection: net.Socket | tls.TLSSocket;
+        /**
+         * Append a single header value to the header object.
+         *
+         * If the value is an array, this is equivalent to calling this method multiple times.
+         *
+         * If there were no previous values for the header, this is equivalent to calling {@link setHeader}.
+         *
+         * Attempting to set a header field name or value that contains invalid characters will result in a
+         * [TypeError](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-typeerror) being thrown.
+         *
+         * ```js
+         * // Returns headers including "set-cookie: a" and "set-cookie: b"
+         * const server = http2.createServer((req, res) => {
+         *   res.setHeader('set-cookie', 'a');
+         *   res.appendHeader('set-cookie', 'b');
+         *   res.writeHead(200);
+         *   res.end('ok');
+         * });
+         * ```
+         * @since v20.12.0
+         */
+        appendHeader(name: string, value: string | string[]): void;
+        /**
+         * Boolean value that indicates whether the response has completed. Starts
+         * as `false`. After `response.end()` executes, the value will be `true`.
+         * @since v8.4.0
+         * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
+         */
+        readonly finished: boolean;
+        /**
+         * True if headers were sent, false otherwise (read-only).
+         * @since v8.4.0
+         */
+        readonly headersSent: boolean;
+        /**
+         * A reference to the original HTTP2 `request` object.
+         * @since v15.7.0
+         */
+        readonly req: Request;
+        /**
+         * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
+         * applies getters, setters, and methods based on HTTP/2 logic.
+         *
+         * `destroyed`, `readable`, and `writable` properties will be retrieved from and
+         * set on `response.stream`.
+         *
+         * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`.
+         *
+         * `setTimeout` method will be called on `response.stream.session`.
+         *
+         * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
+         * more information.
+         *
+         * All other interactions will be routed directly to the socket.
+         *
+         * ```js
+         * import http2 from 'node:http2';
+         * const server = http2.createServer((req, res) => {
+         *   const ip = req.socket.remoteAddress;
+         *   const port = req.socket.remotePort;
+         *   res.end(`Your IP address is ${ip} and your source port is ${port}.`);
+         * }).listen(3000);
+         * ```
+         * @since v8.4.0
+         */
+        readonly socket: net.Socket | tls.TLSSocket;
+        /**
+         * The `Http2Stream` object backing the response.
+         * @since v8.4.0
+         */
+        readonly stream: ServerHttp2Stream;
+        /**
+         * When true, the Date header will be automatically generated and sent in
+         * the response if it is not already present in the headers. Defaults to true.
+         *
+         * This should only be disabled for testing; HTTP requires the Date header
+         * in responses.
+         * @since v8.4.0
+         */
+        sendDate: boolean;
+        /**
+         * When using implicit headers (not calling `response.writeHead()` explicitly),
+         * this property controls the status code that will be sent to the client when
+         * the headers get flushed.
+         *
+         * ```js
+         * response.statusCode = 404;
+         * ```
+         *
+         * After response header was sent to the client, this property indicates the
+         * status code which was sent out.
+         * @since v8.4.0
+         */
+        statusCode: number;
+        /**
+         * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
+         * an empty string.
+         * @since v8.4.0
+         */
+        statusMessage: "";
+        /**
+         * This method adds HTTP trailing headers (a header but at the end of the
+         * message) to the response.
+         *
+         * Attempting to set a header field name or value that contains invalid characters
+         * will result in a `TypeError` being thrown.
+         * @since v8.4.0
+         */
+        addTrailers(trailers: OutgoingHttpHeaders): void;
+        /**
+         * This method signals to the server that all of the response headers and body
+         * have been sent; that server should consider this message complete.
+         * The method, `response.end()`, MUST be called on each response.
+         *
+         * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`.
+         *
+         * If `callback` is specified, it will be called when the response stream
+         * is finished.
+         * @since v8.4.0
+         */
+        end(callback?: () => void): this;
+        end(data: string | Uint8Array, callback?: () => void): this;
+        end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
+        /**
+         * Reads out a header that has already been queued but not sent to the client.
+         * The name is case-insensitive.
+         *
+         * ```js
+         * const contentType = response.getHeader('content-type');
+         * ```
+         * @since v8.4.0
+         */
+        getHeader(name: string): string;
+        /**
+         * Returns an array containing the unique names of the current outgoing headers.
+         * All header names are lowercase.
+         *
+         * ```js
+         * response.setHeader('Foo', 'bar');
+         * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+         *
+         * const headerNames = response.getHeaderNames();
+         * // headerNames === ['foo', 'set-cookie']
+         * ```
+         * @since v8.4.0
+         */
+        getHeaderNames(): string[];
+        /**
+         * Returns a shallow copy of the current outgoing headers. Since a shallow copy
+         * is used, array values may be mutated without additional calls to various
+         * header-related http module methods. The keys of the returned object are the
+         * header names and the values are the respective header values. All header names
+         * are lowercase.
+         *
+         * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`,
+         * `obj.hasOwnProperty()`, and others
+         * are not defined and _will not work_.
+         *
+         * ```js
+         * response.setHeader('Foo', 'bar');
+         * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
+         *
+         * const headers = response.getHeaders();
+         * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
+         * ```
+         * @since v8.4.0
+         */
+        getHeaders(): OutgoingHttpHeaders;
+        /**
+         * Returns `true` if the header identified by `name` is currently set in the
+         * outgoing headers. The header name matching is case-insensitive.
+         *
+         * ```js
+         * const hasContentType = response.hasHeader('content-type');
+         * ```
+         * @since v8.4.0
+         */
+        hasHeader(name: string): boolean;
+        /**
+         * Removes a header that has been queued for implicit sending.
+         *
+         * ```js
+         * response.removeHeader('Content-Encoding');
+         * ```
+         * @since v8.4.0
+         */
+        removeHeader(name: string): void;
+        /**
+         * Sets a single header value for implicit headers. If this header already exists
+         * in the to-be-sent headers, its value will be replaced. Use an array of strings
+         * here to send multiple headers with the same name.
+         *
+         * ```js
+         * response.setHeader('Content-Type', 'text/html; charset=utf-8');
+         * ```
+         *
+         * or
+         *
+         * ```js
+         * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']);
+         * ```
+         *
+         * Attempting to set a header field name or value that contains invalid characters
+         * will result in a `TypeError` being thrown.
+         *
+         * When headers have been set with `response.setHeader()`, they will be merged
+         * with any headers passed to `response.writeHead()`, with the headers passed
+         * to `response.writeHead()` given precedence.
+         *
+         * ```js
+         * // Returns content-type = text/plain
+         * const server = http2.createServer((req, res) => {
+         *   res.setHeader('Content-Type', 'text/html; charset=utf-8');
+         *   res.setHeader('X-Foo', 'bar');
+         *   res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+         *   res.end('ok');
+         * });
+         * ```
+         * @since v8.4.0
+         */
+        setHeader(name: string, value: number | string | readonly string[]): void;
+        /**
+         * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
+         * provided, then it is added as a listener on the `'timeout'` event on
+         * the response object.
+         *
+         * If no `'timeout'` listener is added to the request, the response, or
+         * the server, then `Http2Stream` s are destroyed when they time out. If a
+         * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly.
+         * @since v8.4.0
+         */
+        setTimeout(msecs: number, callback?: () => void): void;
+        /**
+         * If this method is called and `response.writeHead()` has not been called,
+         * it will switch to implicit header mode and flush the implicit headers.
+         *
+         * This sends a chunk of the response body. This method may
+         * be called multiple times to provide successive parts of the body.
+         *
+         * In the `node:http` module, the response body is omitted when the
+         * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body.
+         *
+         * `chunk` can be a string or a buffer. If `chunk` is a string,
+         * the second parameter specifies how to encode it into a byte stream.
+         * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk
+         * of data is flushed.
+         *
+         * This is the raw HTTP body and has nothing to do with higher-level multi-part
+         * body encodings that may be used.
+         *
+         * The first time `response.write()` is called, it will send the buffered
+         * header information and the first chunk of the body to the client. The second
+         * time `response.write()` is called, Node.js assumes data will be streamed,
+         * and sends the new data separately. That is, the response is buffered up to the
+         * first chunk of the body.
+         *
+         * Returns `true` if the entire data was flushed successfully to the kernel
+         * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again.
+         * @since v8.4.0
+         */
+        write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
+        write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
+        /**
+         * Sends a status `100 Continue` to the client, indicating that the request body
+         * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`.
+         * @since v8.4.0
+         */
+        writeContinue(): void;
+        /**
+         * Sends a status `103 Early Hints` to the client with a Link header,
+         * indicating that the user agent can preload/preconnect the linked resources.
+         * The `hints` is an object containing the values of headers to be sent with
+         * early hints message.
+         *
+         * **Example**
+         *
+         * ```js
+         * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
+         * response.writeEarlyHints({
+         *   'link': earlyHintsLink,
+         * });
+         *
+         * const earlyHintsLinks = [
+         *   '</styles.css>; rel=preload; as=style',
+         *   '</scripts.js>; rel=preload; as=script',
+         * ];
+         * response.writeEarlyHints({
+         *   'link': earlyHintsLinks,
+         * });
+         * ```
+         * @since v18.11.0
+         */
+        writeEarlyHints(hints: Record<string, string | string[]>): void;
+        /**
+         * Sends a response header to the request. The status code is a 3-digit HTTP
+         * status code, like `404`. The last argument, `headers`, are the response headers.
+         *
+         * Returns a reference to the `Http2ServerResponse`, so that calls can be chained.
+         *
+         * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be
+         * passed as the second argument. However, because the `statusMessage` has no
+         * meaning within HTTP/2, the argument will have no effect and a process warning
+         * will be emitted.
+         *
+         * ```js
+         * const body = 'hello world';
+         * response.writeHead(200, {
+         *   'Content-Length': Buffer.byteLength(body),
+         *   'Content-Type': 'text/plain; charset=utf-8',
+         * });
+         * ```
+         *
+         * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a
+         * given encoding. On outbound messages, Node.js does not check if Content-Length
+         * and the length of the body being transmitted are equal or not. However, when
+         * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size.
+         *
+         * This method may be called at most one time on a message before `response.end()` is called.
+         *
+         * If `response.write()` or `response.end()` are called before calling
+         * this, the implicit/mutable headers will be calculated and call this function.
+         *
+         * When headers have been set with `response.setHeader()`, they will be merged
+         * with any headers passed to `response.writeHead()`, with the headers passed
+         * to `response.writeHead()` given precedence.
+         *
+         * ```js
+         * // Returns content-type = text/plain
+         * const server = http2.createServer((req, res) => {
+         *   res.setHeader('Content-Type', 'text/html; charset=utf-8');
+         *   res.setHeader('X-Foo', 'bar');
+         *   res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
+         *   res.end('ok');
+         * });
+         * ```
+         *
+         * Attempting to set a header field name or value that contains invalid characters
+         * will result in a `TypeError` being thrown.
+         * @since v8.4.0
+         */
+        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | readonly string[]): this;
+        writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | readonly string[]): this;
+        /**
+         * Call `http2stream.pushStream()` with the given headers, and wrap the
+         * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
+         * parameter if successful. When `Http2ServerRequest` is closed, the callback is
+         * called with an error `ERR_HTTP2_INVALID_STREAM`.
+         * @since v8.4.0
+         * @param headers An object describing the headers
+         * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of
+         * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method
+         */
+        createPushResponse(
+            headers: OutgoingHttpHeaders,
+            callback: (err: Error | null, res: Http2ServerResponse) => void,
+        ): void;
+    }
+    namespace constants {
+        const NGHTTP2_SESSION_SERVER: number;
+        const NGHTTP2_SESSION_CLIENT: number;
+        const NGHTTP2_STREAM_STATE_IDLE: number;
+        const NGHTTP2_STREAM_STATE_OPEN: number;
+        const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
+        const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
+        const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
+        const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
+        const NGHTTP2_STREAM_STATE_CLOSED: number;
+        const NGHTTP2_NO_ERROR: number;
+        const NGHTTP2_PROTOCOL_ERROR: number;
+        const NGHTTP2_INTERNAL_ERROR: number;
+        const NGHTTP2_FLOW_CONTROL_ERROR: number;
+        const NGHTTP2_SETTINGS_TIMEOUT: number;
+        const NGHTTP2_STREAM_CLOSED: number;
+        const NGHTTP2_FRAME_SIZE_ERROR: number;
+        const NGHTTP2_REFUSED_STREAM: number;
+        const NGHTTP2_CANCEL: number;
+        const NGHTTP2_COMPRESSION_ERROR: number;
+        const NGHTTP2_CONNECT_ERROR: number;
+        const NGHTTP2_ENHANCE_YOUR_CALM: number;
+        const NGHTTP2_INADEQUATE_SECURITY: number;
+        const NGHTTP2_HTTP_1_1_REQUIRED: number;
+        const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
+        const NGHTTP2_FLAG_NONE: number;
+        const NGHTTP2_FLAG_END_STREAM: number;
+        const NGHTTP2_FLAG_END_HEADERS: number;
+        const NGHTTP2_FLAG_ACK: number;
+        const NGHTTP2_FLAG_PADDED: number;
+        const NGHTTP2_FLAG_PRIORITY: number;
+        const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
+        const DEFAULT_SETTINGS_ENABLE_PUSH: number;
+        const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
+        const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
+        const MAX_MAX_FRAME_SIZE: number;
+        const MIN_MAX_FRAME_SIZE: number;
+        const MAX_INITIAL_WINDOW_SIZE: number;
+        const NGHTTP2_DEFAULT_WEIGHT: number;
+        const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
+        const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
+        const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
+        const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
+        const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
+        const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
+        const PADDING_STRATEGY_NONE: number;
+        const PADDING_STRATEGY_MAX: number;
+        const PADDING_STRATEGY_CALLBACK: number;
+        const HTTP2_HEADER_STATUS: string;
+        const HTTP2_HEADER_METHOD: string;
+        const HTTP2_HEADER_AUTHORITY: string;
+        const HTTP2_HEADER_SCHEME: string;
+        const HTTP2_HEADER_PATH: string;
+        const HTTP2_HEADER_ACCEPT_CHARSET: string;
+        const HTTP2_HEADER_ACCEPT_ENCODING: string;
+        const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
+        const HTTP2_HEADER_ACCEPT_RANGES: string;
+        const HTTP2_HEADER_ACCEPT: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string;
+        const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string;
+        const HTTP2_HEADER_AGE: string;
+        const HTTP2_HEADER_ALLOW: string;
+        const HTTP2_HEADER_AUTHORIZATION: string;
+        const HTTP2_HEADER_CACHE_CONTROL: string;
+        const HTTP2_HEADER_CONNECTION: string;
+        const HTTP2_HEADER_CONTENT_DISPOSITION: string;
+        const HTTP2_HEADER_CONTENT_ENCODING: string;
+        const HTTP2_HEADER_CONTENT_LANGUAGE: string;
+        const HTTP2_HEADER_CONTENT_LENGTH: string;
+        const HTTP2_HEADER_CONTENT_LOCATION: string;
+        const HTTP2_HEADER_CONTENT_MD5: string;
+        const HTTP2_HEADER_CONTENT_RANGE: string;
+        const HTTP2_HEADER_CONTENT_TYPE: string;
+        const HTTP2_HEADER_COOKIE: string;
+        const HTTP2_HEADER_DATE: string;
+        const HTTP2_HEADER_ETAG: string;
+        const HTTP2_HEADER_EXPECT: string;
+        const HTTP2_HEADER_EXPIRES: string;
+        const HTTP2_HEADER_FROM: string;
+        const HTTP2_HEADER_HOST: string;
+        const HTTP2_HEADER_IF_MATCH: string;
+        const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
+        const HTTP2_HEADER_IF_NONE_MATCH: string;
+        const HTTP2_HEADER_IF_RANGE: string;
+        const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
+        const HTTP2_HEADER_LAST_MODIFIED: string;
+        const HTTP2_HEADER_LINK: string;
+        const HTTP2_HEADER_LOCATION: string;
+        const HTTP2_HEADER_MAX_FORWARDS: string;
+        const HTTP2_HEADER_PREFER: string;
+        const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
+        const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
+        const HTTP2_HEADER_RANGE: string;
+        const HTTP2_HEADER_REFERER: string;
+        const HTTP2_HEADER_REFRESH: string;
+        const HTTP2_HEADER_RETRY_AFTER: string;
+        const HTTP2_HEADER_SERVER: string;
+        const HTTP2_HEADER_SET_COOKIE: string;
+        const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
+        const HTTP2_HEADER_TRANSFER_ENCODING: string;
+        const HTTP2_HEADER_TE: string;
+        const HTTP2_HEADER_UPGRADE: string;
+        const HTTP2_HEADER_USER_AGENT: string;
+        const HTTP2_HEADER_VARY: string;
+        const HTTP2_HEADER_VIA: string;
+        const HTTP2_HEADER_WWW_AUTHENTICATE: string;
+        const HTTP2_HEADER_HTTP2_SETTINGS: string;
+        const HTTP2_HEADER_KEEP_ALIVE: string;
+        const HTTP2_HEADER_PROXY_CONNECTION: string;
+        const HTTP2_METHOD_ACL: string;
+        const HTTP2_METHOD_BASELINE_CONTROL: string;
+        const HTTP2_METHOD_BIND: string;
+        const HTTP2_METHOD_CHECKIN: string;
+        const HTTP2_METHOD_CHECKOUT: string;
+        const HTTP2_METHOD_CONNECT: string;
+        const HTTP2_METHOD_COPY: string;
+        const HTTP2_METHOD_DELETE: string;
+        const HTTP2_METHOD_GET: string;
+        const HTTP2_METHOD_HEAD: string;
+        const HTTP2_METHOD_LABEL: string;
+        const HTTP2_METHOD_LINK: string;
+        const HTTP2_METHOD_LOCK: string;
+        const HTTP2_METHOD_MERGE: string;
+        const HTTP2_METHOD_MKACTIVITY: string;
+        const HTTP2_METHOD_MKCALENDAR: string;
+        const HTTP2_METHOD_MKCOL: string;
+        const HTTP2_METHOD_MKREDIRECTREF: string;
+        const HTTP2_METHOD_MKWORKSPACE: string;
+        const HTTP2_METHOD_MOVE: string;
+        const HTTP2_METHOD_OPTIONS: string;
+        const HTTP2_METHOD_ORDERPATCH: string;
+        const HTTP2_METHOD_PATCH: string;
+        const HTTP2_METHOD_POST: string;
+        const HTTP2_METHOD_PRI: string;
+        const HTTP2_METHOD_PROPFIND: string;
+        const HTTP2_METHOD_PROPPATCH: string;
+        const HTTP2_METHOD_PUT: string;
+        const HTTP2_METHOD_REBIND: string;
+        const HTTP2_METHOD_REPORT: string;
+        const HTTP2_METHOD_SEARCH: string;
+        const HTTP2_METHOD_TRACE: string;
+        const HTTP2_METHOD_UNBIND: string;
+        const HTTP2_METHOD_UNCHECKOUT: string;
+        const HTTP2_METHOD_UNLINK: string;
+        const HTTP2_METHOD_UNLOCK: string;
+        const HTTP2_METHOD_UPDATE: string;
+        const HTTP2_METHOD_UPDATEREDIRECTREF: string;
+        const HTTP2_METHOD_VERSION_CONTROL: string;
+        const HTTP_STATUS_CONTINUE: number;
+        const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
+        const HTTP_STATUS_PROCESSING: number;
+        const HTTP_STATUS_OK: number;
+        const HTTP_STATUS_CREATED: number;
+        const HTTP_STATUS_ACCEPTED: number;
+        const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
+        const HTTP_STATUS_NO_CONTENT: number;
+        const HTTP_STATUS_RESET_CONTENT: number;
+        const HTTP_STATUS_PARTIAL_CONTENT: number;
+        const HTTP_STATUS_MULTI_STATUS: number;
+        const HTTP_STATUS_ALREADY_REPORTED: number;
+        const HTTP_STATUS_IM_USED: number;
+        const HTTP_STATUS_MULTIPLE_CHOICES: number;
+        const HTTP_STATUS_MOVED_PERMANENTLY: number;
+        const HTTP_STATUS_FOUND: number;
+        const HTTP_STATUS_SEE_OTHER: number;
+        const HTTP_STATUS_NOT_MODIFIED: number;
+        const HTTP_STATUS_USE_PROXY: number;
+        const HTTP_STATUS_TEMPORARY_REDIRECT: number;
+        const HTTP_STATUS_PERMANENT_REDIRECT: number;
+        const HTTP_STATUS_BAD_REQUEST: number;
+        const HTTP_STATUS_UNAUTHORIZED: number;
+        const HTTP_STATUS_PAYMENT_REQUIRED: number;
+        const HTTP_STATUS_FORBIDDEN: number;
+        const HTTP_STATUS_NOT_FOUND: number;
+        const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
+        const HTTP_STATUS_NOT_ACCEPTABLE: number;
+        const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
+        const HTTP_STATUS_REQUEST_TIMEOUT: number;
+        const HTTP_STATUS_CONFLICT: number;
+        const HTTP_STATUS_GONE: number;
+        const HTTP_STATUS_LENGTH_REQUIRED: number;
+        const HTTP_STATUS_PRECONDITION_FAILED: number;
+        const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
+        const HTTP_STATUS_URI_TOO_LONG: number;
+        const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
+        const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
+        const HTTP_STATUS_EXPECTATION_FAILED: number;
+        const HTTP_STATUS_TEAPOT: number;
+        const HTTP_STATUS_MISDIRECTED_REQUEST: number;
+        const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
+        const HTTP_STATUS_LOCKED: number;
+        const HTTP_STATUS_FAILED_DEPENDENCY: number;
+        const HTTP_STATUS_UNORDERED_COLLECTION: number;
+        const HTTP_STATUS_UPGRADE_REQUIRED: number;
+        const HTTP_STATUS_PRECONDITION_REQUIRED: number;
+        const HTTP_STATUS_TOO_MANY_REQUESTS: number;
+        const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
+        const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
+        const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
+        const HTTP_STATUS_NOT_IMPLEMENTED: number;
+        const HTTP_STATUS_BAD_GATEWAY: number;
+        const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
+        const HTTP_STATUS_GATEWAY_TIMEOUT: number;
+        const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
+        const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
+        const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
+        const HTTP_STATUS_LOOP_DETECTED: number;
+        const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
+        const HTTP_STATUS_NOT_EXTENDED: number;
+        const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
+    }
+    /**
+     * This symbol can be set as a property on the HTTP/2 headers object with
+     * an array value in order to provide a list of headers considered sensitive.
+     */
+    const sensitiveHeaders: symbol;
+    /**
+     * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called
+     * so instances returned may be safely modified for use.
+     * @since v8.4.0
+     */
+    function getDefaultSettings(): Settings;
+    /**
+     * Returns a `Buffer` instance containing serialized representation of the given
+     * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended
+     * for use with the `HTTP2-Settings` header field.
+     *
+     * ```js
+     * import http2 from 'node:http2';
+     *
+     * const packed = http2.getPackedSettings({ enablePush: false });
+     *
+     * console.log(packed.toString('base64'));
+     * // Prints: AAIAAAAA
+     * ```
+     * @since v8.4.0
+     */
+    function getPackedSettings(settings: Settings): NonSharedBuffer;
+    /**
+     * Returns a `HTTP/2 Settings Object` containing the deserialized settings from
+     * the given `Buffer` as generated by `http2.getPackedSettings()`.
+     * @since v8.4.0
+     * @param buf The packed settings.
+     */
+    function getUnpackedSettings(buf: Uint8Array): Settings;
+    /**
+     * Returns a `net.Server` instance that creates and manages `Http2Session` instances.
+     *
+     * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
+     * communicating
+     * with browser clients.
+     *
+     * ```js
+     * import http2 from 'node:http2';
+     *
+     * // Create an unencrypted HTTP/2 server.
+     * // Since there are no browsers known that support
+     * // unencrypted HTTP/2, the use of `http2.createSecureServer()`
+     * // is necessary when communicating with browser clients.
+     * const server = http2.createServer();
+     *
+     * server.on('stream', (stream, headers) => {
+     *   stream.respond({
+     *     'content-type': 'text/html; charset=utf-8',
+     *     ':status': 200,
+     *   });
+     *   stream.end('<h1>Hello World</h1>');
+     * });
+     *
+     * server.listen(8000);
+     * ```
+     * @since v8.4.0
+     * @param onRequestHandler See `Compatibility API`
+     */
+    function createServer(
+        onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
+    ): Http2Server;
+    function createServer<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    >(
+        options: ServerOptions<Http1Request, Http1Response, Http2Request, Http2Response>,
+        onRequestHandler?: (request: InstanceType<Http2Request>, response: InstanceType<Http2Response>) => void,
+    ): Http2Server<Http1Request, Http1Response, Http2Request, Http2Response>;
+    /**
+     * Returns a `tls.Server` instance that creates and manages `Http2Session` instances.
+     *
+     * ```js
+     * import http2 from 'node:http2';
+     * import fs from 'node:fs';
+     *
+     * const options = {
+     *   key: fs.readFileSync('server-key.pem'),
+     *   cert: fs.readFileSync('server-cert.pem'),
+     * };
+     *
+     * // Create a secure HTTP/2 server
+     * const server = http2.createSecureServer(options);
+     *
+     * server.on('stream', (stream, headers) => {
+     *   stream.respond({
+     *     'content-type': 'text/html; charset=utf-8',
+     *     ':status': 200,
+     *   });
+     *   stream.end('<h1>Hello World</h1>');
+     * });
+     *
+     * server.listen(8443);
+     * ```
+     * @since v8.4.0
+     * @param onRequestHandler See `Compatibility API`
+     */
+    function createSecureServer(
+        onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
+    ): Http2SecureServer;
+    function createSecureServer<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    >(
+        options: SecureServerOptions<Http1Request, Http1Response, Http2Request, Http2Response>,
+        onRequestHandler?: (request: InstanceType<Http2Request>, response: InstanceType<Http2Response>) => void,
+    ): Http2SecureServer<Http1Request, Http1Response, Http2Request, Http2Response>;
+    /**
+     * Returns a `ClientHttp2Session` instance.
+     *
+     * ```js
+     * import http2 from 'node:http2';
+     * const client = http2.connect('https://localhost:1234');
+     *
+     * // Use the client
+     *
+     * client.close();
+     * ```
+     * @since v8.4.0
+     * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port
+     * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored.
+     * @param listener Will be registered as a one-time listener of the {@link 'connect'} event.
+     */
+    function connect(
+        authority: string | url.URL,
+        listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
+    ): ClientHttp2Session;
+    function connect(
+        authority: string | url.URL,
+        options?: ClientSessionOptions | SecureClientSessionOptions,
+        listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
+    ): ClientHttp2Session;
+    /**
+     * Create an HTTP/2 server session from an existing socket.
+     * @param socket A Duplex Stream
+     * @param options Any `{@link createServer}` options can be provided.
+     * @since v20.12.0
+     */
+    function performServerHandshake<
+        Http1Request extends typeof IncomingMessage = typeof IncomingMessage,
+        Http1Response extends typeof ServerResponse<InstanceType<Http1Request>> = typeof ServerResponse,
+        Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
+        Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
+    >(
+        socket: stream.Duplex,
+        options?: ServerOptions<Http1Request, Http1Response, Http2Request, Http2Response>,
+    ): ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>;
+}
+declare module "node:http2" {
+    export { OutgoingHttpHeaders } from "node:http";
+}
+declare module "http2" {
+    export * from "node:http2";
+}

+ 400 - 0
node_modules/@types/node/https.d.ts

@@ -0,0 +1,400 @@
+declare module "node:https" {
+    import * as http from "node:http";
+    import { Duplex } from "node:stream";
+    import * as tls from "node:tls";
+    import { URL } from "node:url";
+    interface ServerOptions<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    > extends http.ServerOptions<Request, Response>, tls.TlsOptions {}
+    interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions {
+        checkServerIdentity?:
+            | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined)
+            | undefined;
+        rejectUnauthorized?: boolean | undefined; // Defaults to true
+        servername?: string | undefined; // SNI TLS Extension
+    }
+    interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
+        maxCachedSessions?: number | undefined;
+    }
+    /**
+     * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
+     *
+     * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
+     * to customize how TLS connections are established.
+     *
+     * > See `agent.createConnection()` for details on overriding this method,
+     * > including asynchronous socket creation with a callback.
+     * @since v0.4.5
+     */
+    class Agent extends http.Agent {
+        constructor(options?: AgentOptions);
+        options: AgentOptions;
+        createConnection(
+            options: RequestOptions,
+            callback?: (err: Error | null, stream: Duplex) => void,
+        ): Duplex | null | undefined;
+        getName(options?: RequestOptions): string;
+    }
+    interface ServerEventMap<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    > extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
+    /**
+     * See `http.Server` for more information.
+     * @since v0.3.4
+     */
+    class Server<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    > extends tls.Server {
+        constructor(requestListener?: http.RequestListener<Request, Response>);
+        constructor(
+            options: ServerOptions<Request, Response>,
+            requestListener?: http.RequestListener<Request, Response>,
+        );
+        /**
+         * Closes all connections connected to this server.
+         * @since v18.2.0
+         */
+        closeAllConnections(): void;
+        /**
+         * Closes all connections connected to this server which are not sending a request or waiting for a response.
+         * @since v18.2.0
+         */
+        closeIdleConnections(): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof ServerEventMap>(
+            eventName: E,
+        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof ServerEventMap>(
+            eventName: E,
+        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof ServerEventMap>(
+            eventName: E,
+            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface Server<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    > extends http.Server<Request, Response> {}
+    /**
+     * ```js
+     * // curl -k https://localhost:8000/
+     * import https from 'node:https';
+     * import fs from 'node:fs';
+     *
+     * const options = {
+     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+     * };
+     *
+     * https.createServer(options, (req, res) => {
+     *   res.writeHead(200);
+     *   res.end('hello world\n');
+     * }).listen(8000);
+     * ```
+     *
+     * Or
+     *
+     * ```js
+     * import https from 'node:https';
+     * import fs from 'node:fs';
+     *
+     * const options = {
+     *   pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
+     *   passphrase: 'sample',
+     * };
+     *
+     * https.createServer(options, (req, res) => {
+     *   res.writeHead(200);
+     *   res.end('hello world\n');
+     * }).listen(8000);
+     * ```
+     * @since v0.3.4
+     * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
+     * @param requestListener A listener to be added to the `'request'` event.
+     */
+    function createServer<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
+    function createServer<
+        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
+        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
+    >(
+        options: ServerOptions<Request, Response>,
+        requestListener?: http.RequestListener<Request, Response>,
+    ): Server<Request, Response>;
+    /**
+     * Makes a request to a secure web server.
+     *
+     * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`,
+     * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`.
+     *
+     * `options` can be an object, a string, or a `URL` object. If `options` is a
+     * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+     *
+     * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
+     * upload a file with a POST request, then write to the `ClientRequest` object.
+     *
+     * ```js
+     * import https from 'node:https';
+     *
+     * const options = {
+     *   hostname: 'encrypted.google.com',
+     *   port: 443,
+     *   path: '/',
+     *   method: 'GET',
+     * };
+     *
+     * const req = https.request(options, (res) => {
+     *   console.log('statusCode:', res.statusCode);
+     *   console.log('headers:', res.headers);
+     *
+     *   res.on('data', (d) => {
+     *     process.stdout.write(d);
+     *   });
+     * });
+     *
+     * req.on('error', (e) => {
+     *   console.error(e);
+     * });
+     * req.end();
+     * ```
+     *
+     * Example using options from `tls.connect()`:
+     *
+     * ```js
+     * const options = {
+     *   hostname: 'encrypted.google.com',
+     *   port: 443,
+     *   path: '/',
+     *   method: 'GET',
+     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+     * };
+     * options.agent = new https.Agent(options);
+     *
+     * const req = https.request(options, (res) => {
+     *   // ...
+     * });
+     * ```
+     *
+     * Alternatively, opt out of connection pooling by not using an `Agent`.
+     *
+     * ```js
+     * const options = {
+     *   hostname: 'encrypted.google.com',
+     *   port: 443,
+     *   path: '/',
+     *   method: 'GET',
+     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
+     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
+     *   agent: false,
+     * };
+     *
+     * const req = https.request(options, (res) => {
+     *   // ...
+     * });
+     * ```
+     *
+     * Example using a `URL` as `options`:
+     *
+     * ```js
+     * const options = new URL('https://abc:xyz@example.com');
+     *
+     * const req = https.request(options, (res) => {
+     *   // ...
+     * });
+     * ```
+     *
+     * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
+     *
+     * ```js
+     * import tls from 'node:tls';
+     * import https from 'node:https';
+     * import crypto from 'node:crypto';
+     *
+     * function sha256(s) {
+     *   return crypto.createHash('sha256').update(s).digest('base64');
+     * }
+     * const options = {
+     *   hostname: 'github.com',
+     *   port: 443,
+     *   path: '/',
+     *   method: 'GET',
+     *   checkServerIdentity: function(host, cert) {
+     *     // Make sure the certificate is issued to the host we are connected to
+     *     const err = tls.checkServerIdentity(host, cert);
+     *     if (err) {
+     *       return err;
+     *     }
+     *
+     *     // Pin the public key, similar to HPKP pin-sha256 pinning
+     *     const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
+     *     if (sha256(cert.pubkey) !== pubkey256) {
+     *       const msg = 'Certificate verification error: ' +
+     *         `The public key of '${cert.subject.CN}' ` +
+     *         'does not match our pinned fingerprint';
+     *       return new Error(msg);
+     *     }
+     *
+     *     // Pin the exact certificate, rather than the pub key
+     *     const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
+     *       'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
+     *     if (cert.fingerprint256 !== cert256) {
+     *       const msg = 'Certificate verification error: ' +
+     *         `The certificate of '${cert.subject.CN}' ` +
+     *         'does not match our pinned fingerprint';
+     *       return new Error(msg);
+     *     }
+     *
+     *     // This loop is informational only.
+     *     // Print the certificate and public key fingerprints of all certs in the
+     *     // chain. Its common to pin the public key of the issuer on the public
+     *     // internet, while pinning the public key of the service in sensitive
+     *     // environments.
+     *     do {
+     *       console.log('Subject Common Name:', cert.subject.CN);
+     *       console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);
+     *
+     *       hash = crypto.createHash('sha256');
+     *       console.log('  Public key ping-sha256:', sha256(cert.pubkey));
+     *
+     *       lastprint256 = cert.fingerprint256;
+     *       cert = cert.issuerCertificate;
+     *     } while (cert.fingerprint256 !== lastprint256);
+     *
+     *   },
+     * };
+     *
+     * options.agent = new https.Agent(options);
+     * const req = https.request(options, (res) => {
+     *   console.log('All OK. Server matched our pinned cert or public key');
+     *   console.log('statusCode:', res.statusCode);
+     *   // Print the HPKP values
+     *   console.log('headers:', res.headers['public-key-pins']);
+     *
+     *   res.on('data', (d) => {});
+     * });
+     *
+     * req.on('error', (e) => {
+     *   console.error(e.message);
+     * });
+     * req.end();
+     * ```
+     *
+     * Outputs for example:
+     *
+     * ```text
+     * Subject Common Name: github.com
+     *   Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
+     *   Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
+     * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
+     *   Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
+     *   Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
+     * Subject Common Name: DigiCert High Assurance EV Root CA
+     *   Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
+     *   Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
+     * All OK. Server matched our pinned cert or public key
+     * statusCode: 200
+     * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
+     * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
+     * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
+     * ```
+     * @since v0.3.6
+     * @param options Accepts all `options` from `request`, with some differences in default values:
+     */
+    function request(
+        options: RequestOptions | string | URL,
+        callback?: (res: http.IncomingMessage) => void,
+    ): http.ClientRequest;
+    function request(
+        url: string | URL,
+        options: RequestOptions,
+        callback?: (res: http.IncomingMessage) => void,
+    ): http.ClientRequest;
+    /**
+     * Like `http.get()` but for HTTPS.
+     *
+     * `options` can be an object, a string, or a `URL` object. If `options` is a
+     * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
+     *
+     * ```js
+     * import https from 'node:https';
+     *
+     * https.get('https://encrypted.google.com/', (res) => {
+     *   console.log('statusCode:', res.statusCode);
+     *   console.log('headers:', res.headers);
+     *
+     *   res.on('data', (d) => {
+     *     process.stdout.write(d);
+     *   });
+     *
+     * }).on('error', (e) => {
+     *   console.error(e);
+     * });
+     * ```
+     * @since v0.3.6
+     * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
+     */
+    function get(
+        options: RequestOptions | string | URL,
+        callback?: (res: http.IncomingMessage) => void,
+    ): http.ClientRequest;
+    function get(
+        url: string | URL,
+        options: RequestOptions,
+        callback?: (res: http.IncomingMessage) => void,
+    ): http.ClientRequest;
+    let globalAgent: Agent;
+}
+declare module "https" {
+    export * from "node:https";
+}

+ 115 - 0
node_modules/@types/node/index.d.ts

@@ -0,0 +1,115 @@
+/**
+ * License for programmatically and manually incorporated
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
+ *
+ * Copyright Node.js contributors. All rights reserved.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+// NOTE: These definitions support Node.js and TypeScript 5.8+.
+
+// Reference required TypeScript libraries:
+/// <reference lib="es2020" />
+/// <reference lib="esnext.disposable" />
+/// <reference lib="esnext.float16" />
+
+// Iterator definitions required for compatibility with TypeScript <5.6:
+/// <reference path="compatibility/iterators.d.ts" />
+
+// Definitions for Node.js modules specific to TypeScript 5.7+:
+/// <reference path="globals.typedarray.d.ts" />
+/// <reference path="buffer.buffer.d.ts" />
+
+// Definitions for Node.js modules that are not specific to any version of TypeScript:
+/// <reference path="globals.d.ts" />
+/// <reference path="web-globals/abortcontroller.d.ts" />
+/// <reference path="web-globals/blob.d.ts" />
+/// <reference path="web-globals/console.d.ts" />
+/// <reference path="web-globals/crypto.d.ts" />
+/// <reference path="web-globals/domexception.d.ts" />
+/// <reference path="web-globals/encoding.d.ts" />
+/// <reference path="web-globals/events.d.ts" />
+/// <reference path="web-globals/fetch.d.ts" />
+/// <reference path="web-globals/importmeta.d.ts" />
+/// <reference path="web-globals/messaging.d.ts" />
+/// <reference path="web-globals/navigator.d.ts" />
+/// <reference path="web-globals/performance.d.ts" />
+/// <reference path="web-globals/storage.d.ts" />
+/// <reference path="web-globals/streams.d.ts" />
+/// <reference path="web-globals/timers.d.ts" />
+/// <reference path="web-globals/url.d.ts" />
+/// <reference path="assert.d.ts" />
+/// <reference path="assert/strict.d.ts" />
+/// <reference path="async_hooks.d.ts" />
+/// <reference path="buffer.d.ts" />
+/// <reference path="child_process.d.ts" />
+/// <reference path="cluster.d.ts" />
+/// <reference path="console.d.ts" />
+/// <reference path="constants.d.ts" />
+/// <reference path="crypto.d.ts" />
+/// <reference path="dgram.d.ts" />
+/// <reference path="diagnostics_channel.d.ts" />
+/// <reference path="dns.d.ts" />
+/// <reference path="dns/promises.d.ts" />
+/// <reference path="domain.d.ts" />
+/// <reference path="events.d.ts" />
+/// <reference path="fs.d.ts" />
+/// <reference path="fs/promises.d.ts" />
+/// <reference path="http.d.ts" />
+/// <reference path="http2.d.ts" />
+/// <reference path="https.d.ts" />
+/// <reference path="inspector.d.ts" />
+/// <reference path="inspector.generated.d.ts" />
+/// <reference path="inspector/promises.d.ts" />
+/// <reference path="module.d.ts" />
+/// <reference path="net.d.ts" />
+/// <reference path="os.d.ts" />
+/// <reference path="path.d.ts" />
+/// <reference path="path/posix.d.ts" />
+/// <reference path="path/win32.d.ts" />
+/// <reference path="perf_hooks.d.ts" />
+/// <reference path="process.d.ts" />
+/// <reference path="punycode.d.ts" />
+/// <reference path="querystring.d.ts" />
+/// <reference path="quic.d.ts" />
+/// <reference path="readline.d.ts" />
+/// <reference path="readline/promises.d.ts" />
+/// <reference path="repl.d.ts" />
+/// <reference path="sea.d.ts" />
+/// <reference path="sqlite.d.ts" />
+/// <reference path="stream.d.ts" />
+/// <reference path="stream/consumers.d.ts" />
+/// <reference path="stream/promises.d.ts" />
+/// <reference path="stream/web.d.ts" />
+/// <reference path="string_decoder.d.ts" />
+/// <reference path="test.d.ts" />
+/// <reference path="test/reporters.d.ts" />
+/// <reference path="timers.d.ts" />
+/// <reference path="timers/promises.d.ts" />
+/// <reference path="tls.d.ts" />
+/// <reference path="trace_events.d.ts" />
+/// <reference path="tty.d.ts" />
+/// <reference path="url.d.ts" />
+/// <reference path="util.d.ts" />
+/// <reference path="util/types.d.ts" />
+/// <reference path="v8.d.ts" />
+/// <reference path="vm.d.ts" />
+/// <reference path="wasi.d.ts" />
+/// <reference path="worker_threads.d.ts" />
+/// <reference path="zlib.d.ts" />

+ 264 - 0
node_modules/@types/node/inspector.d.ts

@@ -0,0 +1,264 @@
+declare module "node:inspector" {
+    import { EventEmitter } from "node:events";
+    /**
+     * The `inspector.Session` is used for dispatching messages to the V8 inspector
+     * back-end and receiving message responses and notifications.
+     */
+    class Session extends EventEmitter {
+        /**
+         * Create a new instance of the inspector.Session class.
+         * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
+         */
+        constructor();
+        /**
+         * Connects a session to the inspector back-end.
+         */
+        connect(): void;
+        /**
+         * Connects a session to the inspector back-end.
+         * An exception will be thrown if this API was not called on a Worker thread.
+         * @since v12.11.0
+         */
+        connectToMainThread(): void;
+        /**
+         * Immediately close the session. All pending message callbacks will be called with an error.
+         * `session.connect()` will need to be called to be able to send messages again.
+         * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
+         */
+        disconnect(): void;
+    }
+    /**
+     * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
+     * started.
+     *
+     * If wait is `true`, will block until a client has connected to the inspect port
+     * and flow control has been passed to the debugger client.
+     *
+     * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
+     * regarding the `host` parameter usage.
+     * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
+     * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
+     * @param wait Block until a client has connected. Defaults to what was specified on the CLI.
+     * @returns Disposable that calls `inspector.close()`.
+     */
+    function open(port?: number, host?: string, wait?: boolean): Disposable;
+    /**
+     * Deactivate the inspector. Blocks until there are no active connections.
+     */
+    function close(): void;
+    /**
+     * Return the URL of the active inspector, or `undefined` if there is none.
+     *
+     * ```console
+     * $ node --inspect -p 'inspector.url()'
+     * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+     * For help, see: https://nodejs.org/en/docs/inspector
+     * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
+     *
+     * $ node --inspect=localhost:3000 -p 'inspector.url()'
+     * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+     * For help, see: https://nodejs.org/en/docs/inspector
+     * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
+     *
+     * $ node -p 'inspector.url()'
+     * undefined
+     * ```
+     */
+    function url(): string | undefined;
+    /**
+     * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command.
+     *
+     * An exception will be thrown if there is no active inspector.
+     * @since v12.7.0
+     */
+    function waitForDebugger(): void;
+    // These methods are exposed by the V8 inspector console API (inspector/v8-console.h).
+    // The method signatures differ from those of the Node.js console, and are deliberately
+    // typed permissively.
+    interface InspectorConsole {
+        debug(...data: any[]): void;
+        error(...data: any[]): void;
+        info(...data: any[]): void;
+        log(...data: any[]): void;
+        warn(...data: any[]): void;
+        dir(...data: any[]): void;
+        dirxml(...data: any[]): void;
+        table(...data: any[]): void;
+        trace(...data: any[]): void;
+        group(...data: any[]): void;
+        groupCollapsed(...data: any[]): void;
+        groupEnd(...data: any[]): void;
+        clear(...data: any[]): void;
+        count(label?: any): void;
+        countReset(label?: any): void;
+        assert(value?: any, ...data: any[]): void;
+        profile(label?: any): void;
+        profileEnd(label?: any): void;
+        time(label?: any): void;
+        timeLog(label?: any): void;
+        timeStamp(label?: any): void;
+    }
+    /**
+     * An object to send messages to the remote inspector console.
+     * @since v11.0.0
+     */
+    const console: InspectorConsole;
+    // DevTools protocol event broadcast methods
+    namespace Network {
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
+         * the application is about to send an HTTP request.
+         * @since v22.6.0
+         */
+        function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
+         * `Network.streamResourceContent` command was not invoked for the given request yet.
+         *
+         * Also enables `Network.getResponseBody` command to retrieve the response data.
+         * @since v24.2.0
+         */
+        function dataReceived(params: DataReceivedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Enables `Network.getRequestPostData` command to retrieve the request data.
+         * @since v24.3.0
+         */
+        function dataSent(params: unknown): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
+         * HTTP response is available.
+         * @since v22.6.0
+         */
+        function responseReceived(params: ResponseReceivedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
+         * HTTP request has finished loading.
+         * @since v22.6.0
+         */
+        function loadingFinished(params: LoadingFinishedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
+         * HTTP request has failed to load.
+         * @since v22.7.0
+         */
+        function loadingFailed(params: LoadingFailedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that
+         * a WebSocket connection has been initiated.
+         * @since v24.7.0
+         */
+        function webSocketCreated(params: WebSocketCreatedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends.
+         * This event indicates that the WebSocket handshake response has been received.
+         * @since v24.7.0
+         */
+        function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void;
+        /**
+         * This feature is only available with the `--experimental-network-inspection` flag enabled.
+         *
+         * Broadcasts the `Network.webSocketClosed` event to connected frontends.
+         * This event indicates that a WebSocket connection has been closed.
+         * @since v24.7.0
+         */
+        function webSocketClosed(params: WebSocketClosedEventDataType): void;
+    }
+    namespace NetworkResources {
+        /**
+         * This feature is only available with the `--experimental-inspector-network-resource` flag enabled.
+         *
+         * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource
+         * request issued via the Chrome DevTools Protocol (CDP).
+         * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as
+         * Chrome—requests the resource to retrieve the source map.
+         *
+         * This method allows developers to predefine the resource content to be served in response to such CDP requests.
+         *
+         * ```js
+         * const inspector = require('node:inspector');
+         * // By preemptively calling put to register the resource, a source map can be resolved when
+         * // a loadNetworkResource request is made from the frontend.
+         * async function setNetworkResources() {
+         *   const mapUrl = 'http://localhost:3000/dist/app.js.map';
+         *   const tsUrl = 'http://localhost:3000/src/app.ts';
+         *   const distAppJsMap = await fetch(mapUrl).then((res) => res.text());
+         *   const srcAppTs = await fetch(tsUrl).then((res) => res.text());
+         *   inspector.NetworkResources.put(mapUrl, distAppJsMap);
+         *   inspector.NetworkResources.put(tsUrl, srcAppTs);
+         * };
+         * setNetworkResources().then(() => {
+         *   require('./dist/app');
+         * });
+         * ```
+         *
+         * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)
+         * @since v24.5.0
+         * @experimental
+         */
+        function put(url: string, data: string): void;
+    }
+    namespace DOMStorage {
+        /**
+         * This feature is only available with the
+         * `--experimental-storage-inspection` flag enabled.
+         *
+         * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
+         * This event indicates that a new item has been added to the storage.
+         * @since v25.5.0
+         */
+        function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
+        /**
+         * This feature is only available with the
+         * `--experimental-storage-inspection` flag enabled.
+         *
+         * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
+         * This event indicates that an item has been removed from the storage.
+         * @since v25.5.0
+         */
+        function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
+        /**
+         * This feature is only available with the
+         * `--experimental-storage-inspection` flag enabled.
+
+         * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
+         * This event indicates that a storage item has been updated.
+         * @since v25.5.0
+         */
+        function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
+        /**
+         * This feature is only available with the
+         * `--experimental-storage-inspection` flag enabled.
+         *
+         * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
+         * frontends. This event indicates that all items have been cleared from the
+         * storage.
+         * @since v25.5.0
+         */
+        function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
+        /**
+         * This feature is only available with the
+         * `--experimental-storage-inspection` flag enabled.
+         * @since v25.5.0
+         */
+        function registerStorage(params: unknown): void;
+    }
+}
+declare module "inspector" {
+    export * from "node:inspector";
+}

+ 4401 - 0
node_modules/@types/node/inspector.generated.d.ts

@@ -0,0 +1,4401 @@
+// These definitions are automatically generated by the generate-inspector script.
+// Do not edit this file directly.
+// See scripts/generate-inspector/README.md for information on how to update the protocol definitions.
+// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template).
+
+declare module "node:inspector" {
+    interface InspectorNotification<T> {
+        method: string;
+        params: T;
+    }
+    namespace Schema {
+        /**
+         * Description of the protocol domain.
+         */
+        interface Domain {
+            /**
+             * Domain name.
+             */
+            name: string;
+            /**
+             * Domain version.
+             */
+            version: string;
+        }
+        interface GetDomainsReturnType {
+            /**
+             * List of supported domains.
+             */
+            domains: Domain[];
+        }
+    }
+    namespace Runtime {
+        /**
+         * Unique script identifier.
+         */
+        type ScriptId = string;
+        /**
+         * Unique object identifier.
+         */
+        type RemoteObjectId = string;
+        /**
+         * Primitive value which cannot be JSON-stringified.
+         */
+        type UnserializableValue = string;
+        /**
+         * Mirror object referencing original JavaScript object.
+         */
+        interface RemoteObject {
+            /**
+             * Object type.
+             */
+            type: string;
+            /**
+             * Object subtype hint. Specified for <code>object</code> type values only.
+             */
+            subtype?: string | undefined;
+            /**
+             * Object class (constructor) name. Specified for <code>object</code> type values only.
+             */
+            className?: string | undefined;
+            /**
+             * Remote object value in case of primitive values or JSON values (if it was requested).
+             */
+            value?: any;
+            /**
+             * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
+             */
+            unserializableValue?: UnserializableValue | undefined;
+            /**
+             * String representation of the object.
+             */
+            description?: string | undefined;
+            /**
+             * Unique object identifier (for non-primitive values).
+             */
+            objectId?: RemoteObjectId | undefined;
+            /**
+             * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
+             * @experimental
+             */
+            preview?: ObjectPreview | undefined;
+            /**
+             * @experimental
+             */
+            customPreview?: CustomPreview | undefined;
+        }
+        /**
+         * @experimental
+         */
+        interface CustomPreview {
+            header: string;
+            hasBody: boolean;
+            formatterObjectId: RemoteObjectId;
+            bindRemoteObjectFunctionId: RemoteObjectId;
+            configObjectId?: RemoteObjectId | undefined;
+        }
+        /**
+         * Object containing abbreviated remote object value.
+         * @experimental
+         */
+        interface ObjectPreview {
+            /**
+             * Object type.
+             */
+            type: string;
+            /**
+             * Object subtype hint. Specified for <code>object</code> type values only.
+             */
+            subtype?: string | undefined;
+            /**
+             * String representation of the object.
+             */
+            description?: string | undefined;
+            /**
+             * True iff some of the properties or entries of the original object did not fit.
+             */
+            overflow: boolean;
+            /**
+             * List of the properties.
+             */
+            properties: PropertyPreview[];
+            /**
+             * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
+             */
+            entries?: EntryPreview[] | undefined;
+        }
+        /**
+         * @experimental
+         */
+        interface PropertyPreview {
+            /**
+             * Property name.
+             */
+            name: string;
+            /**
+             * Object type. Accessor means that the property itself is an accessor property.
+             */
+            type: string;
+            /**
+             * User-friendly property value string.
+             */
+            value?: string | undefined;
+            /**
+             * Nested value preview.
+             */
+            valuePreview?: ObjectPreview | undefined;
+            /**
+             * Object subtype hint. Specified for <code>object</code> type values only.
+             */
+            subtype?: string | undefined;
+        }
+        /**
+         * @experimental
+         */
+        interface EntryPreview {
+            /**
+             * Preview of the key. Specified for map-like collection entries.
+             */
+            key?: ObjectPreview | undefined;
+            /**
+             * Preview of the value.
+             */
+            value: ObjectPreview;
+        }
+        /**
+         * Object property descriptor.
+         */
+        interface PropertyDescriptor {
+            /**
+             * Property name or symbol description.
+             */
+            name: string;
+            /**
+             * The value associated with the property.
+             */
+            value?: RemoteObject | undefined;
+            /**
+             * True if the value associated with the property may be changed (data descriptors only).
+             */
+            writable?: boolean | undefined;
+            /**
+             * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
+             */
+            get?: RemoteObject | undefined;
+            /**
+             * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
+             */
+            set?: RemoteObject | undefined;
+            /**
+             * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
+             */
+            configurable: boolean;
+            /**
+             * True if this property shows up during enumeration of the properties on the corresponding object.
+             */
+            enumerable: boolean;
+            /**
+             * True if the result was thrown during the evaluation.
+             */
+            wasThrown?: boolean | undefined;
+            /**
+             * True if the property is owned for the object.
+             */
+            isOwn?: boolean | undefined;
+            /**
+             * Property symbol object, if the property is of the <code>symbol</code> type.
+             */
+            symbol?: RemoteObject | undefined;
+        }
+        /**
+         * Object internal property descriptor. This property isn't normally visible in JavaScript code.
+         */
+        interface InternalPropertyDescriptor {
+            /**
+             * Conventional property name.
+             */
+            name: string;
+            /**
+             * The value associated with the property.
+             */
+            value?: RemoteObject | undefined;
+        }
+        /**
+         * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
+         */
+        interface CallArgument {
+            /**
+             * Primitive value or serializable javascript object.
+             */
+            value?: any;
+            /**
+             * Primitive value which can not be JSON-stringified.
+             */
+            unserializableValue?: UnserializableValue | undefined;
+            /**
+             * Remote object handle.
+             */
+            objectId?: RemoteObjectId | undefined;
+        }
+        /**
+         * Id of an execution context.
+         */
+        type ExecutionContextId = number;
+        /**
+         * Description of an isolated world.
+         */
+        interface ExecutionContextDescription {
+            /**
+             * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
+             */
+            id: ExecutionContextId;
+            /**
+             * Execution context origin.
+             */
+            origin: string;
+            /**
+             * Human readable name describing given context.
+             */
+            name: string;
+            /**
+             * Embedder-specific auxiliary data.
+             */
+            auxData?: object | undefined;
+        }
+        /**
+         * Detailed information about exception (or error) that was thrown during script compilation or execution.
+         */
+        interface ExceptionDetails {
+            /**
+             * Exception id.
+             */
+            exceptionId: number;
+            /**
+             * Exception text, which should be used together with exception object when available.
+             */
+            text: string;
+            /**
+             * Line number of the exception location (0-based).
+             */
+            lineNumber: number;
+            /**
+             * Column number of the exception location (0-based).
+             */
+            columnNumber: number;
+            /**
+             * Script ID of the exception location.
+             */
+            scriptId?: ScriptId | undefined;
+            /**
+             * URL of the exception location, to be used when the script was not reported.
+             */
+            url?: string | undefined;
+            /**
+             * JavaScript stack trace if available.
+             */
+            stackTrace?: StackTrace | undefined;
+            /**
+             * Exception object if available.
+             */
+            exception?: RemoteObject | undefined;
+            /**
+             * Identifier of the context where exception happened.
+             */
+            executionContextId?: ExecutionContextId | undefined;
+        }
+        /**
+         * Number of milliseconds since epoch.
+         */
+        type Timestamp = number;
+        /**
+         * Stack entry for runtime errors and assertions.
+         */
+        interface CallFrame {
+            /**
+             * JavaScript function name.
+             */
+            functionName: string;
+            /**
+             * JavaScript script id.
+             */
+            scriptId: ScriptId;
+            /**
+             * JavaScript script name or url.
+             */
+            url: string;
+            /**
+             * JavaScript script line number (0-based).
+             */
+            lineNumber: number;
+            /**
+             * JavaScript script column number (0-based).
+             */
+            columnNumber: number;
+        }
+        /**
+         * Call frames for assertions or error messages.
+         */
+        interface StackTrace {
+            /**
+             * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
+             */
+            description?: string | undefined;
+            /**
+             * JavaScript function name.
+             */
+            callFrames: CallFrame[];
+            /**
+             * Asynchronous JavaScript stack trace that preceded this stack, if available.
+             */
+            parent?: StackTrace | undefined;
+            /**
+             * Asynchronous JavaScript stack trace that preceded this stack, if available.
+             * @experimental
+             */
+            parentId?: StackTraceId | undefined;
+        }
+        /**
+         * Unique identifier of current debugger.
+         * @experimental
+         */
+        type UniqueDebuggerId = string;
+        /**
+         * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
+         * @experimental
+         */
+        interface StackTraceId {
+            id: string;
+            debuggerId?: UniqueDebuggerId | undefined;
+        }
+        interface EvaluateParameterType {
+            /**
+             * Expression to evaluate.
+             */
+            expression: string;
+            /**
+             * Symbolic group name that can be used to release multiple objects.
+             */
+            objectGroup?: string | undefined;
+            /**
+             * Determines whether Command Line API should be available during the evaluation.
+             */
+            includeCommandLineAPI?: boolean | undefined;
+            /**
+             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+             */
+            silent?: boolean | undefined;
+            /**
+             * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+             */
+            contextId?: ExecutionContextId | undefined;
+            /**
+             * Whether the result is expected to be a JSON object that should be sent by value.
+             */
+            returnByValue?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the result.
+             * @experimental
+             */
+            generatePreview?: boolean | undefined;
+            /**
+             * Whether execution should be treated as initiated by user in the UI.
+             */
+            userGesture?: boolean | undefined;
+            /**
+             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+             */
+            awaitPromise?: boolean | undefined;
+        }
+        interface AwaitPromiseParameterType {
+            /**
+             * Identifier of the promise.
+             */
+            promiseObjectId: RemoteObjectId;
+            /**
+             * Whether the result is expected to be a JSON object that should be sent by value.
+             */
+            returnByValue?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the result.
+             */
+            generatePreview?: boolean | undefined;
+        }
+        interface CallFunctionOnParameterType {
+            /**
+             * Declaration of the function to call.
+             */
+            functionDeclaration: string;
+            /**
+             * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
+             */
+            objectId?: RemoteObjectId | undefined;
+            /**
+             * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
+             */
+            arguments?: CallArgument[] | undefined;
+            /**
+             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+             */
+            silent?: boolean | undefined;
+            /**
+             * Whether the result is expected to be a JSON object which should be sent by value.
+             */
+            returnByValue?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the result.
+             * @experimental
+             */
+            generatePreview?: boolean | undefined;
+            /**
+             * Whether execution should be treated as initiated by user in the UI.
+             */
+            userGesture?: boolean | undefined;
+            /**
+             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+             */
+            awaitPromise?: boolean | undefined;
+            /**
+             * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
+             */
+            executionContextId?: ExecutionContextId | undefined;
+            /**
+             * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
+             */
+            objectGroup?: string | undefined;
+        }
+        interface GetPropertiesParameterType {
+            /**
+             * Identifier of the object to return properties for.
+             */
+            objectId: RemoteObjectId;
+            /**
+             * If true, returns properties belonging only to the element itself, not to its prototype chain.
+             */
+            ownProperties?: boolean | undefined;
+            /**
+             * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
+             * @experimental
+             */
+            accessorPropertiesOnly?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the results.
+             * @experimental
+             */
+            generatePreview?: boolean | undefined;
+        }
+        interface ReleaseObjectParameterType {
+            /**
+             * Identifier of the object to release.
+             */
+            objectId: RemoteObjectId;
+        }
+        interface ReleaseObjectGroupParameterType {
+            /**
+             * Symbolic object group name.
+             */
+            objectGroup: string;
+        }
+        interface SetCustomObjectFormatterEnabledParameterType {
+            enabled: boolean;
+        }
+        interface CompileScriptParameterType {
+            /**
+             * Expression to compile.
+             */
+            expression: string;
+            /**
+             * Source url to be set for the script.
+             */
+            sourceURL: string;
+            /**
+             * Specifies whether the compiled script should be persisted.
+             */
+            persistScript: boolean;
+            /**
+             * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+             */
+            executionContextId?: ExecutionContextId | undefined;
+        }
+        interface RunScriptParameterType {
+            /**
+             * Id of the script to run.
+             */
+            scriptId: ScriptId;
+            /**
+             * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
+             */
+            executionContextId?: ExecutionContextId | undefined;
+            /**
+             * Symbolic group name that can be used to release multiple objects.
+             */
+            objectGroup?: string | undefined;
+            /**
+             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+             */
+            silent?: boolean | undefined;
+            /**
+             * Determines whether Command Line API should be available during the evaluation.
+             */
+            includeCommandLineAPI?: boolean | undefined;
+            /**
+             * Whether the result is expected to be a JSON object which should be sent by value.
+             */
+            returnByValue?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the result.
+             */
+            generatePreview?: boolean | undefined;
+            /**
+             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
+             */
+            awaitPromise?: boolean | undefined;
+        }
+        interface QueryObjectsParameterType {
+            /**
+             * Identifier of the prototype to return objects for.
+             */
+            prototypeObjectId: RemoteObjectId;
+        }
+        interface GlobalLexicalScopeNamesParameterType {
+            /**
+             * Specifies in which execution context to lookup global scope variables.
+             */
+            executionContextId?: ExecutionContextId | undefined;
+        }
+        interface EvaluateReturnType {
+            /**
+             * Evaluation result.
+             */
+            result: RemoteObject;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface AwaitPromiseReturnType {
+            /**
+             * Promise result. Will contain rejected value if promise was rejected.
+             */
+            result: RemoteObject;
+            /**
+             * Exception details if stack strace is available.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface CallFunctionOnReturnType {
+            /**
+             * Call result.
+             */
+            result: RemoteObject;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface GetPropertiesReturnType {
+            /**
+             * Object properties.
+             */
+            result: PropertyDescriptor[];
+            /**
+             * Internal object properties (only of the element itself).
+             */
+            internalProperties?: InternalPropertyDescriptor[] | undefined;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface CompileScriptReturnType {
+            /**
+             * Id of the script.
+             */
+            scriptId?: ScriptId | undefined;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface RunScriptReturnType {
+            /**
+             * Run result.
+             */
+            result: RemoteObject;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: ExceptionDetails | undefined;
+        }
+        interface QueryObjectsReturnType {
+            /**
+             * Array with objects.
+             */
+            objects: RemoteObject;
+        }
+        interface GlobalLexicalScopeNamesReturnType {
+            names: string[];
+        }
+        interface ExecutionContextCreatedEventDataType {
+            /**
+             * A newly created execution context.
+             */
+            context: ExecutionContextDescription;
+        }
+        interface ExecutionContextDestroyedEventDataType {
+            /**
+             * Id of the destroyed context
+             */
+            executionContextId: ExecutionContextId;
+        }
+        interface ExceptionThrownEventDataType {
+            /**
+             * Timestamp of the exception.
+             */
+            timestamp: Timestamp;
+            exceptionDetails: ExceptionDetails;
+        }
+        interface ExceptionRevokedEventDataType {
+            /**
+             * Reason describing why exception was revoked.
+             */
+            reason: string;
+            /**
+             * The id of revoked exception, as reported in <code>exceptionThrown</code>.
+             */
+            exceptionId: number;
+        }
+        interface ConsoleAPICalledEventDataType {
+            /**
+             * Type of the call.
+             */
+            type: string;
+            /**
+             * Call arguments.
+             */
+            args: RemoteObject[];
+            /**
+             * Identifier of the context where the call was made.
+             */
+            executionContextId: ExecutionContextId;
+            /**
+             * Call timestamp.
+             */
+            timestamp: Timestamp;
+            /**
+             * Stack trace captured when the call was made.
+             */
+            stackTrace?: StackTrace | undefined;
+            /**
+             * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
+             * @experimental
+             */
+            context?: string | undefined;
+        }
+        interface InspectRequestedEventDataType {
+            object: RemoteObject;
+            hints: object;
+        }
+    }
+    namespace Debugger {
+        /**
+         * Breakpoint identifier.
+         */
+        type BreakpointId = string;
+        /**
+         * Call frame identifier.
+         */
+        type CallFrameId = string;
+        /**
+         * Location in the source code.
+         */
+        interface Location {
+            /**
+             * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * Line number in the script (0-based).
+             */
+            lineNumber: number;
+            /**
+             * Column number in the script (0-based).
+             */
+            columnNumber?: number | undefined;
+        }
+        /**
+         * Location in the source code.
+         * @experimental
+         */
+        interface ScriptPosition {
+            lineNumber: number;
+            columnNumber: number;
+        }
+        /**
+         * JavaScript call frame. Array of call frames form the call stack.
+         */
+        interface CallFrame {
+            /**
+             * Call frame identifier. This identifier is only valid while the virtual machine is paused.
+             */
+            callFrameId: CallFrameId;
+            /**
+             * Name of the JavaScript function called on this call frame.
+             */
+            functionName: string;
+            /**
+             * Location in the source code.
+             */
+            functionLocation?: Location | undefined;
+            /**
+             * Location in the source code.
+             */
+            location: Location;
+            /**
+             * JavaScript script name or url.
+             */
+            url: string;
+            /**
+             * Scope chain for this call frame.
+             */
+            scopeChain: Scope[];
+            /**
+             * <code>this</code> object for this call frame.
+             */
+            this: Runtime.RemoteObject;
+            /**
+             * The value being returned, if the function is at return point.
+             */
+            returnValue?: Runtime.RemoteObject | undefined;
+        }
+        /**
+         * Scope description.
+         */
+        interface Scope {
+            /**
+             * Scope type.
+             */
+            type: string;
+            /**
+             * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
+             */
+            object: Runtime.RemoteObject;
+            name?: string | undefined;
+            /**
+             * Location in the source code where scope starts
+             */
+            startLocation?: Location | undefined;
+            /**
+             * Location in the source code where scope ends
+             */
+            endLocation?: Location | undefined;
+        }
+        /**
+         * Search match for resource.
+         */
+        interface SearchMatch {
+            /**
+             * Line number in resource content.
+             */
+            lineNumber: number;
+            /**
+             * Line with match content.
+             */
+            lineContent: string;
+        }
+        interface BreakLocation {
+            /**
+             * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * Line number in the script (0-based).
+             */
+            lineNumber: number;
+            /**
+             * Column number in the script (0-based).
+             */
+            columnNumber?: number | undefined;
+            type?: string | undefined;
+        }
+        interface SetBreakpointsActiveParameterType {
+            /**
+             * New value for breakpoints active state.
+             */
+            active: boolean;
+        }
+        interface SetSkipAllPausesParameterType {
+            /**
+             * New value for skip pauses state.
+             */
+            skip: boolean;
+        }
+        interface SetBreakpointByUrlParameterType {
+            /**
+             * Line number to set breakpoint at.
+             */
+            lineNumber: number;
+            /**
+             * URL of the resources to set breakpoint on.
+             */
+            url?: string | undefined;
+            /**
+             * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
+             */
+            urlRegex?: string | undefined;
+            /**
+             * Script hash of the resources to set breakpoint on.
+             */
+            scriptHash?: string | undefined;
+            /**
+             * Offset in the line to set breakpoint at.
+             */
+            columnNumber?: number | undefined;
+            /**
+             * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+             */
+            condition?: string | undefined;
+        }
+        interface SetBreakpointParameterType {
+            /**
+             * Location to set breakpoint in.
+             */
+            location: Location;
+            /**
+             * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
+             */
+            condition?: string | undefined;
+        }
+        interface RemoveBreakpointParameterType {
+            breakpointId: BreakpointId;
+        }
+        interface GetPossibleBreakpointsParameterType {
+            /**
+             * Start of range to search possible breakpoint locations in.
+             */
+            start: Location;
+            /**
+             * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
+             */
+            end?: Location | undefined;
+            /**
+             * Only consider locations which are in the same (non-nested) function as start.
+             */
+            restrictToFunction?: boolean | undefined;
+        }
+        interface ContinueToLocationParameterType {
+            /**
+             * Location to continue to.
+             */
+            location: Location;
+            targetCallFrames?: string | undefined;
+        }
+        interface PauseOnAsyncCallParameterType {
+            /**
+             * Debugger will pause when async call with given stack trace is started.
+             */
+            parentStackTraceId: Runtime.StackTraceId;
+        }
+        interface StepIntoParameterType {
+            /**
+             * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
+             * @experimental
+             */
+            breakOnAsyncCall?: boolean | undefined;
+        }
+        interface GetStackTraceParameterType {
+            stackTraceId: Runtime.StackTraceId;
+        }
+        interface SearchInContentParameterType {
+            /**
+             * Id of the script to search in.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * String to search for.
+             */
+            query: string;
+            /**
+             * If true, search is case sensitive.
+             */
+            caseSensitive?: boolean | undefined;
+            /**
+             * If true, treats string parameter as regex.
+             */
+            isRegex?: boolean | undefined;
+        }
+        interface SetScriptSourceParameterType {
+            /**
+             * Id of the script to edit.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * New content of the script.
+             */
+            scriptSource: string;
+            /**
+             *  If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
+             */
+            dryRun?: boolean | undefined;
+        }
+        interface RestartFrameParameterType {
+            /**
+             * Call frame identifier to evaluate on.
+             */
+            callFrameId: CallFrameId;
+        }
+        interface GetScriptSourceParameterType {
+            /**
+             * Id of the script to get source for.
+             */
+            scriptId: Runtime.ScriptId;
+        }
+        interface SetPauseOnExceptionsParameterType {
+            /**
+             * Pause on exceptions mode.
+             */
+            state: string;
+        }
+        interface EvaluateOnCallFrameParameterType {
+            /**
+             * Call frame identifier to evaluate on.
+             */
+            callFrameId: CallFrameId;
+            /**
+             * Expression to evaluate.
+             */
+            expression: string;
+            /**
+             * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
+             */
+            objectGroup?: string | undefined;
+            /**
+             * Specifies whether command line API should be available to the evaluated expression, defaults to false.
+             */
+            includeCommandLineAPI?: boolean | undefined;
+            /**
+             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
+             */
+            silent?: boolean | undefined;
+            /**
+             * Whether the result is expected to be a JSON object that should be sent by value.
+             */
+            returnByValue?: boolean | undefined;
+            /**
+             * Whether preview should be generated for the result.
+             * @experimental
+             */
+            generatePreview?: boolean | undefined;
+            /**
+             * Whether to throw an exception if side effect cannot be ruled out during evaluation.
+             */
+            throwOnSideEffect?: boolean | undefined;
+        }
+        interface SetVariableValueParameterType {
+            /**
+             * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
+             */
+            scopeNumber: number;
+            /**
+             * Variable name.
+             */
+            variableName: string;
+            /**
+             * New variable value.
+             */
+            newValue: Runtime.CallArgument;
+            /**
+             * Id of callframe that holds variable.
+             */
+            callFrameId: CallFrameId;
+        }
+        interface SetReturnValueParameterType {
+            /**
+             * New return value.
+             */
+            newValue: Runtime.CallArgument;
+        }
+        interface SetAsyncCallStackDepthParameterType {
+            /**
+             * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
+             */
+            maxDepth: number;
+        }
+        interface SetBlackboxPatternsParameterType {
+            /**
+             * Array of regexps that will be used to check script url for blackbox state.
+             */
+            patterns: string[];
+        }
+        interface SetBlackboxedRangesParameterType {
+            /**
+             * Id of the script.
+             */
+            scriptId: Runtime.ScriptId;
+            positions: ScriptPosition[];
+        }
+        interface EnableReturnType {
+            /**
+             * Unique identifier of the debugger.
+             * @experimental
+             */
+            debuggerId: Runtime.UniqueDebuggerId;
+        }
+        interface SetBreakpointByUrlReturnType {
+            /**
+             * Id of the created breakpoint for further reference.
+             */
+            breakpointId: BreakpointId;
+            /**
+             * List of the locations this breakpoint resolved into upon addition.
+             */
+            locations: Location[];
+        }
+        interface SetBreakpointReturnType {
+            /**
+             * Id of the created breakpoint for further reference.
+             */
+            breakpointId: BreakpointId;
+            /**
+             * Location this breakpoint resolved into.
+             */
+            actualLocation: Location;
+        }
+        interface GetPossibleBreakpointsReturnType {
+            /**
+             * List of the possible breakpoint locations.
+             */
+            locations: BreakLocation[];
+        }
+        interface GetStackTraceReturnType {
+            stackTrace: Runtime.StackTrace;
+        }
+        interface SearchInContentReturnType {
+            /**
+             * List of search matches.
+             */
+            result: SearchMatch[];
+        }
+        interface SetScriptSourceReturnType {
+            /**
+             * New stack trace in case editing has happened while VM was stopped.
+             */
+            callFrames?: CallFrame[] | undefined;
+            /**
+             * Whether current call stack  was modified after applying the changes.
+             */
+            stackChanged?: boolean | undefined;
+            /**
+             * Async stack trace, if any.
+             */
+            asyncStackTrace?: Runtime.StackTrace | undefined;
+            /**
+             * Async stack trace, if any.
+             * @experimental
+             */
+            asyncStackTraceId?: Runtime.StackTraceId | undefined;
+            /**
+             * Exception details if any.
+             */
+            exceptionDetails?: Runtime.ExceptionDetails | undefined;
+        }
+        interface RestartFrameReturnType {
+            /**
+             * New stack trace.
+             */
+            callFrames: CallFrame[];
+            /**
+             * Async stack trace, if any.
+             */
+            asyncStackTrace?: Runtime.StackTrace | undefined;
+            /**
+             * Async stack trace, if any.
+             * @experimental
+             */
+            asyncStackTraceId?: Runtime.StackTraceId | undefined;
+        }
+        interface GetScriptSourceReturnType {
+            /**
+             * Script source.
+             */
+            scriptSource: string;
+        }
+        interface EvaluateOnCallFrameReturnType {
+            /**
+             * Object wrapper for the evaluation result.
+             */
+            result: Runtime.RemoteObject;
+            /**
+             * Exception details.
+             */
+            exceptionDetails?: Runtime.ExceptionDetails | undefined;
+        }
+        interface ScriptParsedEventDataType {
+            /**
+             * Identifier of the script parsed.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * URL or name of the script parsed (if any).
+             */
+            url: string;
+            /**
+             * Line offset of the script within the resource with given URL (for script tags).
+             */
+            startLine: number;
+            /**
+             * Column offset of the script within the resource with given URL.
+             */
+            startColumn: number;
+            /**
+             * Last line of the script.
+             */
+            endLine: number;
+            /**
+             * Length of the last line of the script.
+             */
+            endColumn: number;
+            /**
+             * Specifies script creation context.
+             */
+            executionContextId: Runtime.ExecutionContextId;
+            /**
+             * Content hash of the script.
+             */
+            hash: string;
+            /**
+             * Embedder-specific auxiliary data.
+             */
+            executionContextAuxData?: object | undefined;
+            /**
+             * True, if this script is generated as a result of the live edit operation.
+             * @experimental
+             */
+            isLiveEdit?: boolean | undefined;
+            /**
+             * URL of source map associated with script (if any).
+             */
+            sourceMapURL?: string | undefined;
+            /**
+             * True, if this script has sourceURL.
+             */
+            hasSourceURL?: boolean | undefined;
+            /**
+             * True, if this script is ES6 module.
+             */
+            isModule?: boolean | undefined;
+            /**
+             * This script length.
+             */
+            length?: number | undefined;
+            /**
+             * JavaScript top stack frame of where the script parsed event was triggered if available.
+             * @experimental
+             */
+            stackTrace?: Runtime.StackTrace | undefined;
+        }
+        interface ScriptFailedToParseEventDataType {
+            /**
+             * Identifier of the script parsed.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * URL or name of the script parsed (if any).
+             */
+            url: string;
+            /**
+             * Line offset of the script within the resource with given URL (for script tags).
+             */
+            startLine: number;
+            /**
+             * Column offset of the script within the resource with given URL.
+             */
+            startColumn: number;
+            /**
+             * Last line of the script.
+             */
+            endLine: number;
+            /**
+             * Length of the last line of the script.
+             */
+            endColumn: number;
+            /**
+             * Specifies script creation context.
+             */
+            executionContextId: Runtime.ExecutionContextId;
+            /**
+             * Content hash of the script.
+             */
+            hash: string;
+            /**
+             * Embedder-specific auxiliary data.
+             */
+            executionContextAuxData?: object | undefined;
+            /**
+             * URL of source map associated with script (if any).
+             */
+            sourceMapURL?: string | undefined;
+            /**
+             * True, if this script has sourceURL.
+             */
+            hasSourceURL?: boolean | undefined;
+            /**
+             * True, if this script is ES6 module.
+             */
+            isModule?: boolean | undefined;
+            /**
+             * This script length.
+             */
+            length?: number | undefined;
+            /**
+             * JavaScript top stack frame of where the script parsed event was triggered if available.
+             * @experimental
+             */
+            stackTrace?: Runtime.StackTrace | undefined;
+        }
+        interface BreakpointResolvedEventDataType {
+            /**
+             * Breakpoint unique identifier.
+             */
+            breakpointId: BreakpointId;
+            /**
+             * Actual breakpoint location.
+             */
+            location: Location;
+        }
+        interface PausedEventDataType {
+            /**
+             * Call stack the virtual machine stopped on.
+             */
+            callFrames: CallFrame[];
+            /**
+             * Pause reason.
+             */
+            reason: string;
+            /**
+             * Object containing break-specific auxiliary properties.
+             */
+            data?: object | undefined;
+            /**
+             * Hit breakpoints IDs
+             */
+            hitBreakpoints?: string[] | undefined;
+            /**
+             * Async stack trace, if any.
+             */
+            asyncStackTrace?: Runtime.StackTrace | undefined;
+            /**
+             * Async stack trace, if any.
+             * @experimental
+             */
+            asyncStackTraceId?: Runtime.StackTraceId | undefined;
+            /**
+             * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
+             * @experimental
+             */
+            asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
+        }
+    }
+    namespace Console {
+        /**
+         * Console message.
+         */
+        interface ConsoleMessage {
+            /**
+             * Message source.
+             */
+            source: string;
+            /**
+             * Message severity.
+             */
+            level: string;
+            /**
+             * Message text.
+             */
+            text: string;
+            /**
+             * URL of the message origin.
+             */
+            url?: string | undefined;
+            /**
+             * Line number in the resource that generated this message (1-based).
+             */
+            line?: number | undefined;
+            /**
+             * Column number in the resource that generated this message (1-based).
+             */
+            column?: number | undefined;
+        }
+        interface MessageAddedEventDataType {
+            /**
+             * Console message that has been added.
+             */
+            message: ConsoleMessage;
+        }
+    }
+    namespace Profiler {
+        /**
+         * Profile node. Holds callsite information, execution statistics and child nodes.
+         */
+        interface ProfileNode {
+            /**
+             * Unique id of the node.
+             */
+            id: number;
+            /**
+             * Function location.
+             */
+            callFrame: Runtime.CallFrame;
+            /**
+             * Number of samples where this node was on top of the call stack.
+             */
+            hitCount?: number | undefined;
+            /**
+             * Child node ids.
+             */
+            children?: number[] | undefined;
+            /**
+             * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
+             */
+            deoptReason?: string | undefined;
+            /**
+             * An array of source position ticks.
+             */
+            positionTicks?: PositionTickInfo[] | undefined;
+        }
+        /**
+         * Profile.
+         */
+        interface Profile {
+            /**
+             * The list of profile nodes. First item is the root node.
+             */
+            nodes: ProfileNode[];
+            /**
+             * Profiling start timestamp in microseconds.
+             */
+            startTime: number;
+            /**
+             * Profiling end timestamp in microseconds.
+             */
+            endTime: number;
+            /**
+             * Ids of samples top nodes.
+             */
+            samples?: number[] | undefined;
+            /**
+             * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
+             */
+            timeDeltas?: number[] | undefined;
+        }
+        /**
+         * Specifies a number of samples attributed to a certain source position.
+         */
+        interface PositionTickInfo {
+            /**
+             * Source line number (1-based).
+             */
+            line: number;
+            /**
+             * Number of samples attributed to the source line.
+             */
+            ticks: number;
+        }
+        /**
+         * Coverage data for a source range.
+         */
+        interface CoverageRange {
+            /**
+             * JavaScript script source offset for the range start.
+             */
+            startOffset: number;
+            /**
+             * JavaScript script source offset for the range end.
+             */
+            endOffset: number;
+            /**
+             * Collected execution count of the source range.
+             */
+            count: number;
+        }
+        /**
+         * Coverage data for a JavaScript function.
+         */
+        interface FunctionCoverage {
+            /**
+             * JavaScript function name.
+             */
+            functionName: string;
+            /**
+             * Source ranges inside the function with coverage data.
+             */
+            ranges: CoverageRange[];
+            /**
+             * Whether coverage data for this function has block granularity.
+             */
+            isBlockCoverage: boolean;
+        }
+        /**
+         * Coverage data for a JavaScript script.
+         */
+        interface ScriptCoverage {
+            /**
+             * JavaScript script id.
+             */
+            scriptId: Runtime.ScriptId;
+            /**
+             * JavaScript script name or url.
+             */
+            url: string;
+            /**
+             * Functions contained in the script that has coverage data.
+             */
+            functions: FunctionCoverage[];
+        }
+        interface SetSamplingIntervalParameterType {
+            /**
+             * New sampling interval in microseconds.
+             */
+            interval: number;
+        }
+        interface StartPreciseCoverageParameterType {
+            /**
+             * Collect accurate call counts beyond simple 'covered' or 'not covered'.
+             */
+            callCount?: boolean | undefined;
+            /**
+             * Collect block-based coverage.
+             */
+            detailed?: boolean | undefined;
+        }
+        interface StopReturnType {
+            /**
+             * Recorded profile.
+             */
+            profile: Profile;
+        }
+        interface TakePreciseCoverageReturnType {
+            /**
+             * Coverage data for the current isolate.
+             */
+            result: ScriptCoverage[];
+        }
+        interface GetBestEffortCoverageReturnType {
+            /**
+             * Coverage data for the current isolate.
+             */
+            result: ScriptCoverage[];
+        }
+        interface ConsoleProfileStartedEventDataType {
+            id: string;
+            /**
+             * Location of console.profile().
+             */
+            location: Debugger.Location;
+            /**
+             * Profile title passed as an argument to console.profile().
+             */
+            title?: string | undefined;
+        }
+        interface ConsoleProfileFinishedEventDataType {
+            id: string;
+            /**
+             * Location of console.profileEnd().
+             */
+            location: Debugger.Location;
+            profile: Profile;
+            /**
+             * Profile title passed as an argument to console.profile().
+             */
+            title?: string | undefined;
+        }
+    }
+    namespace HeapProfiler {
+        /**
+         * Heap snapshot object id.
+         */
+        type HeapSnapshotObjectId = string;
+        /**
+         * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
+         */
+        interface SamplingHeapProfileNode {
+            /**
+             * Function location.
+             */
+            callFrame: Runtime.CallFrame;
+            /**
+             * Allocations size in bytes for the node excluding children.
+             */
+            selfSize: number;
+            /**
+             * Child nodes.
+             */
+            children: SamplingHeapProfileNode[];
+        }
+        /**
+         * Profile.
+         */
+        interface SamplingHeapProfile {
+            head: SamplingHeapProfileNode;
+        }
+        interface StartTrackingHeapObjectsParameterType {
+            trackAllocations?: boolean | undefined;
+        }
+        interface StopTrackingHeapObjectsParameterType {
+            /**
+             * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
+             */
+            reportProgress?: boolean | undefined;
+        }
+        interface TakeHeapSnapshotParameterType {
+            /**
+             * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
+             */
+            reportProgress?: boolean | undefined;
+        }
+        interface GetObjectByHeapObjectIdParameterType {
+            objectId: HeapSnapshotObjectId;
+            /**
+             * Symbolic group name that can be used to release multiple objects.
+             */
+            objectGroup?: string | undefined;
+        }
+        interface AddInspectedHeapObjectParameterType {
+            /**
+             * Heap snapshot object id to be accessible by means of $x command line API.
+             */
+            heapObjectId: HeapSnapshotObjectId;
+        }
+        interface GetHeapObjectIdParameterType {
+            /**
+             * Identifier of the object to get heap object id for.
+             */
+            objectId: Runtime.RemoteObjectId;
+        }
+        interface StartSamplingParameterType {
+            /**
+             * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
+             */
+            samplingInterval?: number | undefined;
+        }
+        interface GetObjectByHeapObjectIdReturnType {
+            /**
+             * Evaluation result.
+             */
+            result: Runtime.RemoteObject;
+        }
+        interface GetHeapObjectIdReturnType {
+            /**
+             * Id of the heap snapshot object corresponding to the passed remote object id.
+             */
+            heapSnapshotObjectId: HeapSnapshotObjectId;
+        }
+        interface StopSamplingReturnType {
+            /**
+             * Recorded sampling heap profile.
+             */
+            profile: SamplingHeapProfile;
+        }
+        interface GetSamplingProfileReturnType {
+            /**
+             * Return the sampling profile being collected.
+             */
+            profile: SamplingHeapProfile;
+        }
+        interface AddHeapSnapshotChunkEventDataType {
+            chunk: string;
+        }
+        interface ReportHeapSnapshotProgressEventDataType {
+            done: number;
+            total: number;
+            finished?: boolean | undefined;
+        }
+        interface LastSeenObjectIdEventDataType {
+            lastSeenObjectId: number;
+            timestamp: number;
+        }
+        interface HeapStatsUpdateEventDataType {
+            /**
+             * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
+             */
+            statsUpdate: number[];
+        }
+    }
+    namespace IO {
+        type StreamHandle = string;
+        interface ReadParameterType {
+            /**
+             * Handle of the stream to read.
+             */
+            handle: StreamHandle;
+            /**
+             * Seek to the specified offset before reading (if not specified, proceed with offset
+             * following the last read). Some types of streams may only support sequential reads.
+             */
+            offset?: number | undefined;
+            /**
+             * Maximum number of bytes to read (left upon the agent discretion if not specified).
+             */
+            size?: number | undefined;
+        }
+        interface CloseParameterType {
+            /**
+             * Handle of the stream to close.
+             */
+            handle: StreamHandle;
+        }
+        interface ReadReturnType {
+            /**
+             * Data that were read.
+             */
+            data: string;
+            /**
+             * Set if the end-of-file condition occurred while reading.
+             */
+            eof: boolean;
+        }
+    }
+    namespace Network {
+        /**
+         * Resource type as it was perceived by the rendering engine.
+         */
+        type ResourceType = string;
+        /**
+         * Unique request identifier.
+         */
+        type RequestId = string;
+        /**
+         * UTC time in seconds, counted from January 1, 1970.
+         */
+        type TimeSinceEpoch = number;
+        /**
+         * Monotonically increasing time in seconds since an arbitrary point in the past.
+         */
+        type MonotonicTime = number;
+        /**
+         * Information about the request initiator.
+         */
+        interface Initiator {
+            /**
+             * Type of this initiator.
+             */
+            type: string;
+            /**
+             * Initiator JavaScript stack trace, set for Script only.
+             * Requires the Debugger domain to be enabled.
+             */
+            stack?: Runtime.StackTrace | undefined;
+            /**
+             * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
+             */
+            url?: string | undefined;
+            /**
+             * Initiator line number, set for Parser type or for Script type (when script is importing
+             * module) (0-based).
+             */
+            lineNumber?: number | undefined;
+            /**
+             * Initiator column number, set for Parser type or for Script type (when script is importing
+             * module) (0-based).
+             */
+            columnNumber?: number | undefined;
+            /**
+             * Set if another request triggered this request (e.g. preflight).
+             */
+            requestId?: RequestId | undefined;
+        }
+        /**
+         * HTTP request data.
+         */
+        interface Request {
+            url: string;
+            method: string;
+            headers: Headers;
+            hasPostData: boolean;
+        }
+        /**
+         * HTTP response data.
+         */
+        interface Response {
+            url: string;
+            status: number;
+            statusText: string;
+            headers: Headers;
+            mimeType: string;
+            charset: string;
+        }
+        /**
+         * Request / response headers as keys / values of JSON object.
+         */
+        interface Headers {
+        }
+        interface LoadNetworkResourcePageResult {
+            success: boolean;
+            stream?: IO.StreamHandle | undefined;
+        }
+        /**
+         * WebSocket response data.
+         */
+        interface WebSocketResponse {
+            /**
+             * HTTP response status code.
+             */
+            status: number;
+            /**
+             * HTTP response status text.
+             */
+            statusText: string;
+            /**
+             * HTTP response headers.
+             */
+            headers: Headers;
+        }
+        interface EnableParameterType {
+            /**
+             * Buffer size in bytes to use when preserving network payloads (XHRs, etc).
+             * @experimental
+             */
+            maxTotalBufferSize?: number | undefined;
+            /**
+             * Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
+             * @experimental
+             */
+            maxResourceBufferSize?: number | undefined;
+        }
+        interface GetRequestPostDataParameterType {
+            /**
+             * Identifier of the network request to get content for.
+             */
+            requestId: RequestId;
+        }
+        interface GetResponseBodyParameterType {
+            /**
+             * Identifier of the network request to get content for.
+             */
+            requestId: RequestId;
+        }
+        interface StreamResourceContentParameterType {
+            /**
+             * Identifier of the request to stream.
+             */
+            requestId: RequestId;
+        }
+        interface LoadNetworkResourceParameterType {
+            /**
+             * URL of the resource to get content for.
+             */
+            url: string;
+        }
+        interface GetRequestPostDataReturnType {
+            /**
+             * Request body string, omitting files from multipart requests
+             */
+            postData: string;
+        }
+        interface GetResponseBodyReturnType {
+            /**
+             * Response body.
+             */
+            body: string;
+            /**
+             * True, if content was sent as base64.
+             */
+            base64Encoded: boolean;
+        }
+        interface StreamResourceContentReturnType {
+            /**
+             * Data that has been buffered until streaming is enabled.
+             */
+            bufferedData: string;
+        }
+        interface LoadNetworkResourceReturnType {
+            resource: LoadNetworkResourcePageResult;
+        }
+        interface RequestWillBeSentEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Request data.
+             */
+            request: Request;
+            /**
+             * Request initiator.
+             */
+            initiator: Initiator;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+            /**
+             * Timestamp.
+             */
+            wallTime: TimeSinceEpoch;
+        }
+        interface ResponseReceivedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+            /**
+             * Resource type.
+             */
+            type: ResourceType;
+            /**
+             * Response data.
+             */
+            response: Response;
+        }
+        interface LoadingFailedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+            /**
+             * Resource type.
+             */
+            type: ResourceType;
+            /**
+             * Error message.
+             */
+            errorText: string;
+        }
+        interface LoadingFinishedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+        }
+        interface DataReceivedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+            /**
+             * Data chunk length.
+             */
+            dataLength: number;
+            /**
+             * Actual bytes received (might be less than dataLength for compressed encodings).
+             */
+            encodedDataLength: number;
+            /**
+             * Data that was received.
+             * @experimental
+             */
+            data?: string | undefined;
+        }
+        interface WebSocketCreatedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * WebSocket request URL.
+             */
+            url: string;
+            /**
+             * Request initiator.
+             */
+            initiator: Initiator;
+        }
+        interface WebSocketClosedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+        }
+        interface WebSocketHandshakeResponseReceivedEventDataType {
+            /**
+             * Request identifier.
+             */
+            requestId: RequestId;
+            /**
+             * Timestamp.
+             */
+            timestamp: MonotonicTime;
+            /**
+             * WebSocket response data.
+             */
+            response: WebSocketResponse;
+        }
+    }
+    namespace NodeRuntime {
+        interface NotifyWhenWaitingForDisconnectParameterType {
+            enabled: boolean;
+        }
+    }
+    namespace NodeTracing {
+        interface TraceConfig {
+            /**
+             * Controls how the trace buffer stores data.
+             */
+            recordMode?: string | undefined;
+            /**
+             * Included category filters.
+             */
+            includedCategories: string[];
+        }
+        interface StartParameterType {
+            traceConfig: TraceConfig;
+        }
+        interface GetCategoriesReturnType {
+            /**
+             * A list of supported tracing categories.
+             */
+            categories: string[];
+        }
+        interface DataCollectedEventDataType {
+            value: object[];
+        }
+    }
+    namespace NodeWorker {
+        type WorkerID = string;
+        /**
+         * Unique identifier of attached debugging session.
+         */
+        type SessionID = string;
+        interface WorkerInfo {
+            workerId: WorkerID;
+            type: string;
+            title: string;
+            url: string;
+        }
+        interface SendMessageToWorkerParameterType {
+            message: string;
+            /**
+             * Identifier of the session.
+             */
+            sessionId: SessionID;
+        }
+        interface EnableParameterType {
+            /**
+             * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
+             * message to run them.
+             */
+            waitForDebuggerOnStart: boolean;
+        }
+        interface DetachParameterType {
+            sessionId: SessionID;
+        }
+        interface AttachedToWorkerEventDataType {
+            /**
+             * Identifier assigned to the session used to send/receive messages.
+             */
+            sessionId: SessionID;
+            workerInfo: WorkerInfo;
+            waitingForDebugger: boolean;
+        }
+        interface DetachedFromWorkerEventDataType {
+            /**
+             * Detached session identifier.
+             */
+            sessionId: SessionID;
+        }
+        interface ReceivedMessageFromWorkerEventDataType {
+            /**
+             * Identifier of a session which sends a message.
+             */
+            sessionId: SessionID;
+            message: string;
+        }
+    }
+    namespace Target {
+        type SessionID = string;
+        type TargetID = string;
+        interface TargetInfo {
+            targetId: TargetID;
+            type: string;
+            title: string;
+            url: string;
+            attached: boolean;
+            canAccessOpener: boolean;
+        }
+        interface SetAutoAttachParameterType {
+            autoAttach: boolean;
+            waitForDebuggerOnStart: boolean;
+        }
+        interface TargetCreatedEventDataType {
+            targetInfo: TargetInfo;
+        }
+        interface AttachedToTargetEventDataType {
+            sessionId: SessionID;
+            targetInfo: TargetInfo;
+            waitingForDebugger: boolean;
+        }
+    }
+    namespace DOMStorage {
+        type SerializedStorageKey = string;
+        /**
+         * DOM Storage identifier.
+         */
+        interface StorageId {
+            /**
+             * Security origin for the storage.
+             */
+            securityOrigin?: string | undefined;
+            /**
+             * Represents a key by which DOM Storage keys its CachedStorageAreas
+             */
+            storageKey?: SerializedStorageKey | undefined;
+            /**
+             * Whether the storage is local storage (not session storage).
+             */
+            isLocalStorage: boolean;
+        }
+        /**
+         * DOM Storage item.
+         */
+        type Item = string[];
+        interface ClearParameterType {
+            storageId: StorageId;
+        }
+        interface GetDOMStorageItemsParameterType {
+            storageId: StorageId;
+        }
+        interface RemoveDOMStorageItemParameterType {
+            storageId: StorageId;
+            key: string;
+        }
+        interface SetDOMStorageItemParameterType {
+            storageId: StorageId;
+            key: string;
+            value: string;
+        }
+        interface GetDOMStorageItemsReturnType {
+            entries: Item[];
+        }
+        interface DomStorageItemAddedEventDataType {
+            storageId: StorageId;
+            key: string;
+            newValue: string;
+        }
+        interface DomStorageItemRemovedEventDataType {
+            storageId: StorageId;
+            key: string;
+        }
+        interface DomStorageItemUpdatedEventDataType {
+            storageId: StorageId;
+            key: string;
+            oldValue: string;
+            newValue: string;
+        }
+        interface DomStorageItemsClearedEventDataType {
+            storageId: StorageId;
+        }
+    }
+    namespace Storage {
+        type SerializedStorageKey = string;
+        interface GetStorageKeyParameterType {
+            frameId?: string | undefined;
+        }
+        interface GetStorageKeyReturnType {
+            storageKey: SerializedStorageKey;
+        }
+    }
+    interface Session {
+        /**
+         * Posts a message to the inspector back-end. `callback` will be notified when
+         * a response is received. `callback` is a function that accepts two optional
+         * arguments: error and message-specific result.
+         *
+         * ```js
+         * session.post('Runtime.evaluate', { expression: '2 + 2' },
+         *              (error, { result }) => console.log(result));
+         * // Output: { type: 'number', value: 4, description: '4' }
+         * ```
+         *
+         * The latest version of the V8 inspector protocol is published on the
+         * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+         *
+         * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+         * by V8. Chrome DevTools Protocol domain provides an interface for interacting
+         * with one of the runtime agents used to inspect the application state and listen
+         * to the run-time events.
+         */
+        post(method: string, callback?: (err: Error | null, params?: object) => void): void;
+        post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void;
+        /**
+         * Returns supported domains.
+         */
+        post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
+        /**
+         * Evaluates expression on global object.
+         */
+        post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+        post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
+        /**
+         * Add handler to promise with given promise object id.
+         */
+        post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+        post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
+        /**
+         * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+         */
+        post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+        post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
+        /**
+         * Returns properties of a given object. Object group of the result is inherited from the target object.
+         */
+        post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+        post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
+        /**
+         * Releases remote object with given id.
+         */
+        post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
+        /**
+         * Releases all remote objects that belong to a given group.
+         */
+        post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
+        /**
+         * Tells inspected instance to run if it was waiting for debugger to attach.
+         */
+        post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
+        /**
+         * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+         */
+        post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
+        /**
+         * Disables reporting of execution contexts creation.
+         */
+        post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Discards collected exceptions and console API calls.
+         */
+        post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
+        /**
+         * @experimental
+         */
+        post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
+        /**
+         * Compiles expression.
+         */
+        post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+        post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
+        /**
+         * Runs script with given id in a given context.
+         */
+        post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+        post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
+        post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+        post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
+        /**
+         * Returns all let, const and class variables from global scope.
+         */
+        post(
+            method: "Runtime.globalLexicalScopeNames",
+            params?: Runtime.GlobalLexicalScopeNamesParameterType,
+            callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
+        ): void;
+        post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
+        /**
+         * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+         */
+        post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
+        /**
+         * Disables debugger for given page.
+         */
+        post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Activates / deactivates all breakpoints on the page.
+         */
+        post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
+        /**
+         * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+         */
+        post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
+        /**
+         * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+         */
+        post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+        post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
+        /**
+         * Sets JavaScript breakpoint at a given location.
+         */
+        post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+        post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
+        /**
+         * Removes JavaScript breakpoint.
+         */
+        post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
+        /**
+         * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+         */
+        post(
+            method: "Debugger.getPossibleBreakpoints",
+            params?: Debugger.GetPossibleBreakpointsParameterType,
+            callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
+        ): void;
+        post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
+        /**
+         * Continues execution until specific location is reached.
+         */
+        post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
+        /**
+         * @experimental
+         */
+        post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
+        /**
+         * Steps over the statement.
+         */
+        post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
+        /**
+         * Steps into the function call.
+         */
+        post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
+        /**
+         * Steps out of the function call.
+         */
+        post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
+        /**
+         * Stops on the next JavaScript statement.
+         */
+        post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
+        /**
+         * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+         * @experimental
+         */
+        post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
+        /**
+         * Resumes JavaScript execution.
+         */
+        post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
+        /**
+         * Returns stack trace with given <code>stackTraceId</code>.
+         * @experimental
+         */
+        post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+        post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
+        /**
+         * Searches for given string in script content.
+         */
+        post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+        post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
+        /**
+         * Edits JavaScript source live.
+         */
+        post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+        post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
+        /**
+         * Restarts particular call frame from the beginning.
+         */
+        post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+        post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
+        /**
+         * Returns source for the script with given id.
+         */
+        post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+        post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
+        /**
+         * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+         */
+        post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
+        /**
+         * Evaluates expression on a given call frame.
+         */
+        post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+        post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
+        /**
+         * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+         */
+        post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
+        /**
+         * Changes return value in top frame. Available only at return break position.
+         * @experimental
+         */
+        post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
+        /**
+         * Enables or disables async call stacks tracking.
+         */
+        post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
+        /**
+         * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+         * @experimental
+         */
+        post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
+        /**
+         * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+         * @experimental
+         */
+        post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
+        /**
+         * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+         */
+        post(method: "Console.enable", callback?: (err: Error | null) => void): void;
+        /**
+         * Disables console domain, prevents further console messages from being reported to the client.
+         */
+        post(method: "Console.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Does nothing.
+         */
+        post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+         */
+        post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
+        /**
+         * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+         */
+        post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
+        /**
+         * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+         */
+        post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
+        /**
+         * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+         */
+        post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
+        /**
+         * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+         */
+        post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
+        post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
+        post(
+            method: "HeapProfiler.getObjectByHeapObjectId",
+            params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
+            callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
+        ): void;
+        post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
+        /**
+         * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+         */
+        post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+        post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
+        post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
+        post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
+        post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
+        /**
+         * Read a chunk of the stream
+         */
+        post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void;
+        post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void;
+        post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "IO.close", callback?: (err: Error | null) => void): void;
+        /**
+         * Disables network tracking, prevents network events from being sent to the client.
+         */
+        post(method: "Network.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Enables network tracking, network events will now be delivered to the client.
+         */
+        post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Network.enable", callback?: (err: Error | null) => void): void;
+        /**
+         * Returns post data sent with the request. Returns an error when no data was sent with the request.
+         */
+        post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void;
+        post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void;
+        /**
+         * Returns content served for the given request.
+         */
+        post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void;
+        post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void;
+        /**
+         * Enables streaming of the response for the given requestId.
+         * If enabled, the dataReceived event contains the data that was received during streaming.
+         * @experimental
+         */
+        post(
+            method: "Network.streamResourceContent",
+            params?: Network.StreamResourceContentParameterType,
+            callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void
+        ): void;
+        post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void;
+        /**
+         * Fetches the resource and returns the content.
+         */
+        post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void;
+        post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void;
+        /**
+         * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
+         */
+        post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void;
+        /**
+         * Disable NodeRuntime events
+         */
+        post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Enable the `NodeRuntime.waitingForDisconnect`.
+         */
+        post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void;
+        /**
+         * Gets supported tracing categories.
+         */
+        post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
+        /**
+         * Start trace events collection.
+         */
+        post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
+        /**
+         * Stop trace events collection. Remaining collected events will be sent as a sequence of
+         * dataCollected events followed by tracingComplete event.
+         */
+        post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
+        /**
+         * Sends protocol message over session with given id.
+         */
+        post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
+        /**
+         * Instructs the inspector to attach to running workers. Will also attach to new workers
+         * as they start
+         */
+        post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
+        /**
+         * Detaches from all running workers and disables attaching to new workers as they are started.
+         */
+        post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Detached from the worker with given sessionId.
+         */
+        post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
+        post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void;
+        post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "DOMStorage.clear", callback?: (err: Error | null) => void): void;
+        /**
+         * Disables storage tracking, prevents storage events from being sent to the client.
+         */
+        post(method: "DOMStorage.disable", callback?: (err: Error | null) => void): void;
+        /**
+         * Enables storage tracking, storage events will now be delivered to the client.
+         */
+        post(method: "DOMStorage.enable", callback?: (err: Error | null) => void): void;
+        post(
+            method: "DOMStorage.getDOMStorageItems",
+            params?: DOMStorage.GetDOMStorageItemsParameterType,
+            callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void
+        ): void;
+        post(method: "DOMStorage.getDOMStorageItems", callback?: (err: Error | null, params: DOMStorage.GetDOMStorageItemsReturnType) => void): void;
+        post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "DOMStorage.removeDOMStorageItem", callback?: (err: Error | null) => void): void;
+        post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType, callback?: (err: Error | null) => void): void;
+        post(method: "DOMStorage.setDOMStorageItem", callback?: (err: Error | null) => void): void;
+        /**
+         * @experimental
+         */
+        post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType, callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void;
+        post(method: "Storage.getStorageKey", callback?: (err: Error | null, params: Storage.GetStorageKeyReturnType) => void): void;
+        addListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        addListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        addListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        addListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        addListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        addListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        emit(event: string | symbol, ...args: any[]): boolean;
+        emit(event: "inspectorNotification", message: InspectorNotification<object>): boolean;
+        emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+        emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+        emit(event: "Runtime.executionContextsCleared"): boolean;
+        emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+        emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+        emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+        emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+        emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+        emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+        emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+        emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+        emit(event: "Debugger.resumed"): boolean;
+        emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+        emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+        emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+        emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+        emit(event: "HeapProfiler.resetProfiles"): boolean;
+        emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+        emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+        emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+        emit(event: "Network.requestWillBeSent", message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
+        emit(event: "Network.responseReceived", message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
+        emit(event: "Network.loadingFailed", message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
+        emit(event: "Network.loadingFinished", message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
+        emit(event: "Network.dataReceived", message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
+        emit(event: "Network.webSocketCreated", message: InspectorNotification<Network.WebSocketCreatedEventDataType>): boolean;
+        emit(event: "Network.webSocketClosed", message: InspectorNotification<Network.WebSocketClosedEventDataType>): boolean;
+        emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>): boolean;
+        emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
+        emit(event: "NodeRuntime.waitingForDebugger"): boolean;
+        emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+        emit(event: "NodeTracing.tracingComplete"): boolean;
+        emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+        emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+        emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+        emit(event: "Target.targetCreated", message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
+        emit(event: "Target.attachedToTarget", message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>): boolean;
+        on(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        on(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        on(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        on(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        on(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        on(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        on(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        on(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        on(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        on(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        on(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        on(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        on(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        once(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        once(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        once(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        once(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        once(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        once(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        once(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        once(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        once(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        once(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        once(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        once(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        once(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        prependListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        prependListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+    }
+}
+declare module "node:inspector/promises" {
+    export {
+        Schema,
+        Runtime,
+        Debugger,
+        Console,
+        Profiler,
+        HeapProfiler,
+        IO,
+        Network,
+        NodeRuntime,
+        NodeTracing,
+        NodeWorker,
+        Target,
+        DOMStorage,
+        Storage,
+    } from 'inspector';
+}
+declare module "node:inspector/promises" {
+    import {
+        InspectorNotification,
+        Schema,
+        Runtime,
+        Debugger,
+        Console,
+        Profiler,
+        HeapProfiler,
+        IO,
+        Network,
+        NodeRuntime,
+        NodeTracing,
+        NodeWorker,
+        Target,
+        DOMStorage,
+        Storage,
+    } from "inspector";
+    /**
+     * The `inspector.Session` is used for dispatching messages to the V8 inspector
+     * back-end and receiving message responses and notifications.
+     * @since v19.0.0
+     */
+    interface Session {
+        /**
+         * Posts a message to the inspector back-end.
+         *
+         * ```js
+         * import { Session } from 'node:inspector/promises';
+         * try {
+         *   const session = new Session();
+         *   session.connect();
+         *   const result = await session.post('Runtime.evaluate', { expression: '2 + 2' });
+         *   console.log(result);
+         * } catch (error) {
+         *   console.error(error);
+         * }
+         * // Output: { result: { type: 'number', value: 4, description: '4' } }
+         * ```
+         *
+         * The latest version of the V8 inspector protocol is published on the
+         * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
+         *
+         * Node.js inspector supports all the Chrome DevTools Protocol domains declared
+         * by V8. Chrome DevTools Protocol domain provides an interface for interacting
+         * with one of the runtime agents used to inspect the application state and listen
+         * to the run-time events.
+         */
+        post(method: string, params?: object): Promise<void>;
+        /**
+         * Returns supported domains.
+         */
+        post(method: "Schema.getDomains"): Promise<Schema.GetDomainsReturnType>;
+        /**
+         * Evaluates expression on global object.
+         */
+        post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise<Runtime.EvaluateReturnType>;
+        /**
+         * Add handler to promise with given promise object id.
+         */
+        post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise<Runtime.AwaitPromiseReturnType>;
+        /**
+         * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
+         */
+        post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise<Runtime.CallFunctionOnReturnType>;
+        /**
+         * Returns properties of a given object. Object group of the result is inherited from the target object.
+         */
+        post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise<Runtime.GetPropertiesReturnType>;
+        /**
+         * Releases remote object with given id.
+         */
+        post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise<void>;
+        /**
+         * Releases all remote objects that belong to a given group.
+         */
+        post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise<void>;
+        /**
+         * Tells inspected instance to run if it was waiting for debugger to attach.
+         */
+        post(method: "Runtime.runIfWaitingForDebugger"): Promise<void>;
+        /**
+         * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
+         */
+        post(method: "Runtime.enable"): Promise<void>;
+        /**
+         * Disables reporting of execution contexts creation.
+         */
+        post(method: "Runtime.disable"): Promise<void>;
+        /**
+         * Discards collected exceptions and console API calls.
+         */
+        post(method: "Runtime.discardConsoleEntries"): Promise<void>;
+        /**
+         * @experimental
+         */
+        post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise<void>;
+        /**
+         * Compiles expression.
+         */
+        post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise<Runtime.CompileScriptReturnType>;
+        /**
+         * Runs script with given id in a given context.
+         */
+        post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise<Runtime.RunScriptReturnType>;
+        post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise<Runtime.QueryObjectsReturnType>;
+        /**
+         * Returns all let, const and class variables from global scope.
+         */
+        post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise<Runtime.GlobalLexicalScopeNamesReturnType>;
+        /**
+         * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
+         */
+        post(method: "Debugger.enable"): Promise<Debugger.EnableReturnType>;
+        /**
+         * Disables debugger for given page.
+         */
+        post(method: "Debugger.disable"): Promise<void>;
+        /**
+         * Activates / deactivates all breakpoints on the page.
+         */
+        post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise<void>;
+        /**
+         * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
+         */
+        post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise<void>;
+        /**
+         * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
+         */
+        post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise<Debugger.SetBreakpointByUrlReturnType>;
+        /**
+         * Sets JavaScript breakpoint at a given location.
+         */
+        post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise<Debugger.SetBreakpointReturnType>;
+        /**
+         * Removes JavaScript breakpoint.
+         */
+        post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise<void>;
+        /**
+         * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
+         */
+        post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise<Debugger.GetPossibleBreakpointsReturnType>;
+        /**
+         * Continues execution until specific location is reached.
+         */
+        post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise<void>;
+        /**
+         * @experimental
+         */
+        post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise<void>;
+        /**
+         * Steps over the statement.
+         */
+        post(method: "Debugger.stepOver"): Promise<void>;
+        /**
+         * Steps into the function call.
+         */
+        post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise<void>;
+        /**
+         * Steps out of the function call.
+         */
+        post(method: "Debugger.stepOut"): Promise<void>;
+        /**
+         * Stops on the next JavaScript statement.
+         */
+        post(method: "Debugger.pause"): Promise<void>;
+        /**
+         * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
+         * @experimental
+         */
+        post(method: "Debugger.scheduleStepIntoAsync"): Promise<void>;
+        /**
+         * Resumes JavaScript execution.
+         */
+        post(method: "Debugger.resume"): Promise<void>;
+        /**
+         * Returns stack trace with given <code>stackTraceId</code>.
+         * @experimental
+         */
+        post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise<Debugger.GetStackTraceReturnType>;
+        /**
+         * Searches for given string in script content.
+         */
+        post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise<Debugger.SearchInContentReturnType>;
+        /**
+         * Edits JavaScript source live.
+         */
+        post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise<Debugger.SetScriptSourceReturnType>;
+        /**
+         * Restarts particular call frame from the beginning.
+         */
+        post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise<Debugger.RestartFrameReturnType>;
+        /**
+         * Returns source for the script with given id.
+         */
+        post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise<Debugger.GetScriptSourceReturnType>;
+        /**
+         * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
+         */
+        post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise<void>;
+        /**
+         * Evaluates expression on a given call frame.
+         */
+        post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise<Debugger.EvaluateOnCallFrameReturnType>;
+        /**
+         * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
+         */
+        post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise<void>;
+        /**
+         * Changes return value in top frame. Available only at return break position.
+         * @experimental
+         */
+        post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise<void>;
+        /**
+         * Enables or disables async call stacks tracking.
+         */
+        post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise<void>;
+        /**
+         * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
+         * @experimental
+         */
+        post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise<void>;
+        /**
+         * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
+         * @experimental
+         */
+        post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise<void>;
+        /**
+         * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
+         */
+        post(method: "Console.enable"): Promise<void>;
+        /**
+         * Disables console domain, prevents further console messages from being reported to the client.
+         */
+        post(method: "Console.disable"): Promise<void>;
+        /**
+         * Does nothing.
+         */
+        post(method: "Console.clearMessages"): Promise<void>;
+        post(method: "Profiler.enable"): Promise<void>;
+        post(method: "Profiler.disable"): Promise<void>;
+        /**
+         * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
+         */
+        post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise<void>;
+        post(method: "Profiler.start"): Promise<void>;
+        post(method: "Profiler.stop"): Promise<Profiler.StopReturnType>;
+        /**
+         * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
+         */
+        post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise<void>;
+        /**
+         * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
+         */
+        post(method: "Profiler.stopPreciseCoverage"): Promise<void>;
+        /**
+         * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
+         */
+        post(method: "Profiler.takePreciseCoverage"): Promise<Profiler.TakePreciseCoverageReturnType>;
+        /**
+         * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
+         */
+        post(method: "Profiler.getBestEffortCoverage"): Promise<Profiler.GetBestEffortCoverageReturnType>;
+        post(method: "HeapProfiler.enable"): Promise<void>;
+        post(method: "HeapProfiler.disable"): Promise<void>;
+        post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise<void>;
+        post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise<void>;
+        post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise<void>;
+        post(method: "HeapProfiler.collectGarbage"): Promise<void>;
+        post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType>;
+        /**
+         * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
+         */
+        post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise<void>;
+        post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise<HeapProfiler.GetHeapObjectIdReturnType>;
+        post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise<void>;
+        post(method: "HeapProfiler.stopSampling"): Promise<HeapProfiler.StopSamplingReturnType>;
+        post(method: "HeapProfiler.getSamplingProfile"): Promise<HeapProfiler.GetSamplingProfileReturnType>;
+        /**
+         * Read a chunk of the stream
+         */
+        post(method: "IO.read", params?: IO.ReadParameterType): Promise<IO.ReadReturnType>;
+        post(method: "IO.close", params?: IO.CloseParameterType): Promise<void>;
+        /**
+         * Disables network tracking, prevents network events from being sent to the client.
+         */
+        post(method: "Network.disable"): Promise<void>;
+        /**
+         * Enables network tracking, network events will now be delivered to the client.
+         */
+        post(method: "Network.enable", params?: Network.EnableParameterType): Promise<void>;
+        /**
+         * Returns post data sent with the request. Returns an error when no data was sent with the request.
+         */
+        post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise<Network.GetRequestPostDataReturnType>;
+        /**
+         * Returns content served for the given request.
+         */
+        post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise<Network.GetResponseBodyReturnType>;
+        /**
+         * Enables streaming of the response for the given requestId.
+         * If enabled, the dataReceived event contains the data that was received during streaming.
+         * @experimental
+         */
+        post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise<Network.StreamResourceContentReturnType>;
+        /**
+         * Fetches the resource and returns the content.
+         */
+        post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise<Network.LoadNetworkResourceReturnType>;
+        /**
+         * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
+         */
+        post(method: "NodeRuntime.enable"): Promise<void>;
+        /**
+         * Disable NodeRuntime events
+         */
+        post(method: "NodeRuntime.disable"): Promise<void>;
+        /**
+         * Enable the `NodeRuntime.waitingForDisconnect`.
+         */
+        post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
+        /**
+         * Gets supported tracing categories.
+         */
+        post(method: "NodeTracing.getCategories"): Promise<NodeTracing.GetCategoriesReturnType>;
+        /**
+         * Start trace events collection.
+         */
+        post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise<void>;
+        /**
+         * Stop trace events collection. Remaining collected events will be sent as a sequence of
+         * dataCollected events followed by tracingComplete event.
+         */
+        post(method: "NodeTracing.stop"): Promise<void>;
+        /**
+         * Sends protocol message over session with given id.
+         */
+        post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise<void>;
+        /**
+         * Instructs the inspector to attach to running workers. Will also attach to new workers
+         * as they start
+         */
+        post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise<void>;
+        /**
+         * Detaches from all running workers and disables attaching to new workers as they are started.
+         */
+        post(method: "NodeWorker.disable"): Promise<void>;
+        /**
+         * Detached from the worker with given sessionId.
+         */
+        post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise<void>;
+        post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise<void>;
+        post(method: "DOMStorage.clear", params?: DOMStorage.ClearParameterType): Promise<void>;
+        /**
+         * Disables storage tracking, prevents storage events from being sent to the client.
+         */
+        post(method: "DOMStorage.disable"): Promise<void>;
+        /**
+         * Enables storage tracking, storage events will now be delivered to the client.
+         */
+        post(method: "DOMStorage.enable"): Promise<void>;
+        post(method: "DOMStorage.getDOMStorageItems", params?: DOMStorage.GetDOMStorageItemsParameterType): Promise<DOMStorage.GetDOMStorageItemsReturnType>;
+        post(method: "DOMStorage.removeDOMStorageItem", params?: DOMStorage.RemoveDOMStorageItemParameterType): Promise<void>;
+        post(method: "DOMStorage.setDOMStorageItem", params?: DOMStorage.SetDOMStorageItemParameterType): Promise<void>;
+        /**
+         * @experimental
+         */
+        post(method: "Storage.getStorageKey", params?: Storage.GetStorageKeyParameterType): Promise<Storage.GetStorageKeyReturnType>;
+        addListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        addListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        addListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        addListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        addListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        addListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        addListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        addListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        addListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        addListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        emit(event: string | symbol, ...args: any[]): boolean;
+        emit(event: "inspectorNotification", message: InspectorNotification<object>): boolean;
+        emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
+        emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
+        emit(event: "Runtime.executionContextsCleared"): boolean;
+        emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
+        emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
+        emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
+        emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
+        emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
+        emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
+        emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
+        emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
+        emit(event: "Debugger.resumed"): boolean;
+        emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
+        emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
+        emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
+        emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
+        emit(event: "HeapProfiler.resetProfiles"): boolean;
+        emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
+        emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
+        emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
+        emit(event: "Network.requestWillBeSent", message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
+        emit(event: "Network.responseReceived", message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
+        emit(event: "Network.loadingFailed", message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
+        emit(event: "Network.loadingFinished", message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
+        emit(event: "Network.dataReceived", message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
+        emit(event: "Network.webSocketCreated", message: InspectorNotification<Network.WebSocketCreatedEventDataType>): boolean;
+        emit(event: "Network.webSocketClosed", message: InspectorNotification<Network.WebSocketClosedEventDataType>): boolean;
+        emit(event: "Network.webSocketHandshakeResponseReceived", message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>): boolean;
+        emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
+        emit(event: "NodeRuntime.waitingForDebugger"): boolean;
+        emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
+        emit(event: "NodeTracing.tracingComplete"): boolean;
+        emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
+        emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
+        emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
+        emit(event: "Target.targetCreated", message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
+        emit(event: "Target.attachedToTarget", message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemAdded", message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemRemoved", message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemUpdated", message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>): boolean;
+        emit(event: "DOMStorage.domStorageItemsCleared", message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>): boolean;
+        on(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        on(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        on(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        on(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        on(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        on(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        on(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        on(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        on(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        on(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        on(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        on(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        on(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        on(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        on(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        once(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        once(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        once(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        once(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        once(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        once(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        once(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        once(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        once(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        once(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        once(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        once(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        once(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        once(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        once(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        prependListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        prependListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        prependListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        prependListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        prependListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        prependListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
+        /**
+         * Emitted when any notification from the V8 Inspector is received.
+         */
+        prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
+        /**
+         * Issued when new execution context is created.
+         */
+        prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
+        /**
+         * Issued when execution context is destroyed.
+         */
+        prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
+        /**
+         * Issued when all executionContexts were cleared in browser
+         */
+        prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
+        /**
+         * Issued when exception was thrown and unhandled.
+         */
+        prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
+        /**
+         * Issued when unhandled exception was revoked.
+         */
+        prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
+        /**
+         * Issued when console API was called.
+         */
+        prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
+        /**
+         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
+         */
+        prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
+         */
+        prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
+        /**
+         * Fired when virtual machine fails to parse the script.
+         */
+        prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
+        /**
+         * Fired when breakpoint is resolved to an actual script and location.
+         */
+        prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
+         */
+        prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
+        /**
+         * Fired when the virtual machine resumed execution.
+         */
+        prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
+        /**
+         * Issued when new console message is added.
+         */
+        prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
+        /**
+         * Sent when new profile recording is started using console.profile() call.
+         */
+        prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
+        prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
+        prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
+        prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
+        prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
+         */
+        prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
+        /**
+         * If heap objects tracking has been started then backend may send update for one or more fragments
+         */
+        prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
+        /**
+         * Fired when page is about to send HTTP request.
+         */
+        prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
+        /**
+         * Fired when HTTP response is available.
+         */
+        prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
+        prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
+        prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
+        /**
+         * Fired when data chunk was received over the network.
+         */
+        prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
+        /**
+         * Fired upon WebSocket creation.
+         */
+        prependOnceListener(event: "Network.webSocketCreated", listener: (message: InspectorNotification<Network.WebSocketCreatedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket is closed.
+         */
+        prependOnceListener(event: "Network.webSocketClosed", listener: (message: InspectorNotification<Network.WebSocketClosedEventDataType>) => void): this;
+        /**
+         * Fired when WebSocket handshake response becomes available.
+         */
+        prependOnceListener(event: "Network.webSocketHandshakeResponseReceived", listener: (message: InspectorNotification<Network.WebSocketHandshakeResponseReceivedEventDataType>) => void): this;
+        /**
+         * This event is fired instead of `Runtime.executionContextDestroyed` when
+         * enabled.
+         * It is fired when the Node process finished all code execution and is
+         * waiting for all frontends to disconnect.
+         */
+        prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
+        /**
+         * This event is fired when the runtime is waiting for the debugger. For
+         * example, when inspector.waitingForDebugger is called
+         */
+        prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
+        /**
+         * Contains an bucket of collected trace events.
+         */
+        prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
+        /**
+         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
+         * delivered via dataCollected events.
+         */
+        prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
+        /**
+         * Issued when attached to a worker.
+         */
+        prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
+        /**
+         * Issued when detached from the worker.
+         */
+        prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
+        /**
+         * Notifies about a new protocol message received from the session
+         * (session ID is provided in attachedToWorker notification).
+         */
+        prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
+        prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
+        prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemAdded", listener: (message: InspectorNotification<DOMStorage.DomStorageItemAddedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemRemoved", listener: (message: InspectorNotification<DOMStorage.DomStorageItemRemovedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemUpdated", listener: (message: InspectorNotification<DOMStorage.DomStorageItemUpdatedEventDataType>) => void): this;
+        prependOnceListener(event: "DOMStorage.domStorageItemsCleared", listener: (message: InspectorNotification<DOMStorage.DomStorageItemsClearedEventDataType>) => void): this;
+    }
+}

+ 35 - 0
node_modules/@types/node/inspector/promises.d.ts

@@ -0,0 +1,35 @@
+declare module "node:inspector/promises" {
+    import { EventEmitter } from "node:events";
+    export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
+    /**
+     * The `inspector.Session` is used for dispatching messages to the V8 inspector
+     * back-end and receiving message responses and notifications.
+     * @since v19.0.0
+     */
+    export class Session extends EventEmitter {
+        /**
+         * Create a new instance of the inspector.Session class.
+         * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
+         */
+        constructor();
+        /**
+         * Connects a session to the inspector back-end.
+         */
+        connect(): void;
+        /**
+         * Connects a session to the inspector back-end.
+         * An exception will be thrown if this API was not called on a Worker thread.
+         * @since v12.11.0
+         */
+        connectToMainThread(): void;
+        /**
+         * Immediately close the session. All pending message callbacks will be called with an error.
+         * `session.connect()` will need to be called to be able to send messages again.
+         * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
+         */
+        disconnect(): void;
+    }
+}
+declare module "inspector/promises" {
+    export * from "node:inspector/promises";
+}

+ 754 - 0
node_modules/@types/node/module.d.ts

@@ -0,0 +1,754 @@
+declare module "node:module" {
+    import { URL } from "node:url";
+    class Module {
+        constructor(id: string, parent?: Module);
+    }
+    interface Module extends NodeJS.Module {}
+    namespace Module {
+        export { Module };
+    }
+    namespace Module {
+        /**
+         * A list of the names of all modules provided by Node.js. Can be used to verify
+         * if a module is maintained by a third party or not.
+         *
+         * Note: the list doesn't contain prefix-only modules like `node:test`.
+         * @since v9.3.0, v8.10.0, v6.13.0
+         */
+        const builtinModules: readonly string[];
+        /**
+         * @since v12.2.0
+         * @param path Filename to be used to construct the require
+         * function. Must be a file URL object, file URL string, or absolute path
+         * string.
+         */
+        function createRequire(path: string | URL): NodeJS.Require;
+        namespace constants {
+            /**
+             * The following constants are returned as the `status` field in the object returned by
+             * {@link enableCompileCache} to indicate the result of the attempt to enable the
+             * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
+             * @since v22.8.0
+             */
+            namespace compileCacheStatus {
+                /**
+                 * Node.js has enabled the compile cache successfully. The directory used to store the
+                 * compile cache will be returned in the `directory` field in the
+                 * returned object.
+                 */
+                const ENABLED: number;
+                /**
+                 * The compile cache has already been enabled before, either by a previous call to
+                 * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir`
+                 * environment variable. The directory used to store the
+                 * compile cache will be returned in the `directory` field in the
+                 * returned object.
+                 */
+                const ALREADY_ENABLED: number;
+                /**
+                 * Node.js fails to enable the compile cache. This can be caused by the lack of
+                 * permission to use the specified directory, or various kinds of file system errors.
+                 * The detail of the failure will be returned in the `message` field in the
+                 * returned object.
+                 */
+                const FAILED: number;
+                /**
+                 * Node.js cannot enable the compile cache because the environment variable
+                 * `NODE_DISABLE_COMPILE_CACHE=1` has been set.
+                 */
+                const DISABLED: number;
+            }
+        }
+        interface EnableCompileCacheOptions {
+            /**
+             * Optional. Directory to store the compile cache. If not specified,
+             * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable
+             * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')`
+             * otherwise.
+             * @since v25.0.0
+             */
+            directory?: string | undefined;
+            /**
+             * Optional. If `true`, enables portable compile cache so that
+             * the cache can be reused even if the project directory is moved. This is a best-effort
+             * feature. If not specified, it will depend on whether the environment variable
+             * `NODE_COMPILE_CACHE_PORTABLE=1` is set.
+             * @since v25.0.0
+             */
+            portable?: boolean | undefined;
+        }
+        interface EnableCompileCacheResult {
+            /**
+             * One of the {@link constants.compileCacheStatus}
+             */
+            status: number;
+            /**
+             * If Node.js cannot enable the compile cache, this contains
+             * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`.
+             */
+            message?: string;
+            /**
+             * If the compile cache is enabled, this contains the directory
+             * where the compile cache is stored. Only set if  `status` is
+             * `module.constants.compileCacheStatus.ENABLED` or
+             * `module.constants.compileCacheStatus.ALREADY_ENABLED`.
+             */
+            directory?: string;
+        }
+        /**
+         * Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
+         * in the current Node.js instance.
+         *
+         * For general use cases, it's recommended to call `module.enableCompileCache()` without
+         * specifying the `options.directory`, so that the directory can be overridden by the
+         * `NODE_COMPILE_CACHE` environment variable when necessary.
+         *
+         * Since compile cache is supposed to be a optimization that is not mission critical, this
+         * method is designed to not throw any exception when the compile cache cannot be enabled.
+         * Instead, it will return an object containing an error message in the `message` field to
+         * aid debugging. If compile cache is enabled successfully, the `directory` field in the
+         * returned object contains the path to the directory where the compile cache is stored. The
+         * `status` field in the returned object would be one of the `module.constants.compileCacheStatus`
+         * values to indicate the result of the attempt to enable the
+         * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
+         *
+         * This method only affects the current Node.js instance. To enable it in child worker threads,
+         * either call this method in child worker threads too, or set the
+         * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can
+         * be inherited into the child workers. The directory can be obtained either from the
+         * `directory` field returned by this method, or with {@link getCompileCacheDir}.
+         * @since v22.8.0
+         * @param options Optional. If a string is passed, it is considered to be `options.directory`.
+         */
+        function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
+        /**
+         * Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
+         * accumulated from modules already loaded
+         * in the current Node.js instance to disk. This returns after all the flushing
+         * file system operations come to an end, no matter they succeed or not. If there
+         * are any errors, this will fail silently, since compile cache misses should not
+         * interfere with the actual operation of the application.
+         * @since v22.10.0
+         */
+        function flushCompileCache(): void;
+        /**
+         * @since v22.8.0
+         * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
+         * directory if it is enabled, or `undefined` otherwise.
+         */
+        function getCompileCacheDir(): string | undefined;
+        /**
+         * ```text
+         * /path/to/project
+         *   ├ packages/
+         *     ├ bar/
+         *       ├ bar.js
+         *       └ package.json // name = '@foo/bar'
+         *     └ qux/
+         *       ├ node_modules/
+         *         └ some-package/
+         *           └ package.json // name = 'some-package'
+         *       ├ qux.js
+         *       └ package.json // name = '@foo/qux'
+         *   ├ main.js
+         *   └ package.json // name = '@foo'
+         * ```
+         * ```js
+         * // /path/to/project/packages/bar/bar.js
+         * import { findPackageJSON } from 'node:module';
+         *
+         * findPackageJSON('..', import.meta.url);
+         * // '/path/to/project/package.json'
+         * // Same result when passing an absolute specifier instead:
+         * findPackageJSON(new URL('../', import.meta.url));
+         * findPackageJSON(import.meta.resolve('../'));
+         *
+         * findPackageJSON('some-package', import.meta.url);
+         * // '/path/to/project/packages/bar/node_modules/some-package/package.json'
+         * // When passing an absolute specifier, you might get a different result if the
+         * // resolved module is inside a subfolder that has nested `package.json`.
+         * findPackageJSON(import.meta.resolve('some-package'));
+         * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json'
+         *
+         * findPackageJSON('@foo/qux', import.meta.url);
+         * // '/path/to/project/packages/qux/package.json'
+         * ```
+         * @since v22.14.0
+         * @param specifier The specifier for the module whose `package.json` to
+         * retrieve. When passing a _bare specifier_, the `package.json` at the root of
+         * the package is returned. When passing a _relative specifier_ or an _absolute specifier_,
+         * the closest parent `package.json` is returned.
+         * @param base The absolute location (`file:` URL string or FS path) of the
+         * containing  module. For CJS, use `__filename` (not `__dirname`!); for ESM, use
+         * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_.
+         * @returns A path if the `package.json` is found. When `startLocation`
+         * is a package, the package's root `package.json`; when a relative or unresolved, the closest
+         * `package.json` to the `startLocation`.
+         */
+        function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined;
+        /**
+         * @since v18.6.0, v16.17.0
+         */
+        function isBuiltin(moduleName: string): boolean;
+        interface RegisterOptions<Data> {
+            /**
+             * If you want to resolve `specifier` relative to a
+             * base URL, such as `import.meta.url`, you can pass that URL here. This
+             * property is ignored if the `parentURL` is supplied as the second argument.
+             * @default 'data:'
+             */
+            parentURL?: string | URL | undefined;
+            /**
+             * Any arbitrary, cloneable JavaScript value to pass into the
+             * {@link initialize} hook.
+             */
+            data?: Data | undefined;
+            /**
+             * [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist)
+             * to be passed into the `initialize` hook.
+             */
+            transferList?: any[] | undefined;
+        }
+        /* eslint-disable @definitelytyped/no-unnecessary-generics */
+        /**
+         * Register a module that exports hooks that customize Node.js module
+         * resolution and loading behavior. See
+         * [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks).
+         *
+         * This feature requires `--allow-worker` if used with the
+         * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model).
+         * @since v20.6.0, v18.19.0
+         * @param specifier Customization hooks to be registered; this should be
+         * the same string that would be passed to `import()`, except that if it is
+         * relative, it is resolved relative to `parentURL`.
+         * @param parentURL f you want to resolve `specifier` relative to a base
+         * URL, such as `import.meta.url`, you can pass that URL here.
+         */
+        function register<Data = any>(
+            specifier: string | URL,
+            parentURL?: string | URL,
+            options?: RegisterOptions<Data>,
+        ): void;
+        function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
+        interface RegisterHooksOptions {
+            /**
+             * See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload).
+             * @default undefined
+             */
+            load?: LoadHookSync | undefined;
+            /**
+             * See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve).
+             * @default undefined
+             */
+            resolve?: ResolveHookSync | undefined;
+        }
+        interface ModuleHooks {
+            /**
+             * Deregister the hook instance.
+             */
+            deregister(): void;
+        }
+        /**
+         * Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks)
+         * that customize Node.js module resolution and loading behavior.
+         * @since v22.15.0
+         * @experimental
+         */
+        function registerHooks(options: RegisterHooksOptions): ModuleHooks;
+        interface StripTypeScriptTypesOptions {
+            /**
+             * Possible values are:
+             * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features.
+             * * `'transform'` Strip type annotations and transform TypeScript features to JavaScript.
+             * @default 'strip'
+             */
+            mode?: "strip" | "transform" | undefined;
+            /**
+             * Only when `mode` is `'transform'`, if `true`, a source map
+             * will be generated for the transformed code.
+             * @default false
+             */
+            sourceMap?: boolean | undefined;
+            /**
+             * Specifies the source url used in the source map.
+             */
+            sourceUrl?: string | undefined;
+        }
+        /**
+         * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It
+         * can be used to strip type annotations from TypeScript code before running it
+         * with `vm.runInContext()` or `vm.compileFunction()`.
+         * By default, it will throw an error if the code contains TypeScript features
+         * that require transformation such as `Enums`,
+         * see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information.
+         * When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
+         * see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information.
+         * When mode is `'strip'`, source maps are not generated, because locations are preserved.
+         * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
+         *
+         * _WARNING_: The output of this function should not be considered stable across Node.js versions,
+         * due to changes in the TypeScript parser.
+         *
+         * ```js
+         * import { stripTypeScriptTypes } from 'node:module';
+         * const code = 'const a: number = 1;';
+         * const strippedCode = stripTypeScriptTypes(code);
+         * console.log(strippedCode);
+         * // Prints: const a         = 1;
+         * ```
+         *
+         * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output:
+         *
+         * ```js
+         * import { stripTypeScriptTypes } from 'node:module';
+         * const code = 'const a: number = 1;';
+         * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' });
+         * console.log(strippedCode);
+         * // Prints: const a         = 1\n\n//# sourceURL=source.ts;
+         * ```
+         *
+         * When `mode` is `'transform'`, the code is transformed to JavaScript:
+         *
+         * ```js
+         * import { stripTypeScriptTypes } from 'node:module';
+         * const code = `
+         *   namespace MathUtil {
+         *     export const add = (a: number, b: number) => a + b;
+         *   }`;
+         * const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true });
+         * console.log(strippedCode);
+         * // Prints:
+         * // var MathUtil;
+         * // (function(MathUtil) {
+         * //     MathUtil.add = (a, b)=>a + b;
+         * // })(MathUtil || (MathUtil = {}));
+         * // # sourceMappingURL=data:application/json;base64, ...
+         * ```
+         * @since v22.13.0
+         * @param code The code to strip type annotations from.
+         * @returns The code with type annotations stripped.
+         */
+        function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string;
+        /* eslint-enable @definitelytyped/no-unnecessary-generics */
+        /**
+         * The `module.syncBuiltinESMExports()` method updates all the live bindings for
+         * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
+         * does not add or remove exported names from the `ES Modules`.
+         *
+         * ```js
+         * import fs from 'node:fs';
+         * import assert from 'node:assert';
+         * import { syncBuiltinESMExports } from 'node:module';
+         *
+         * fs.readFile = newAPI;
+         *
+         * delete fs.readFileSync;
+         *
+         * function newAPI() {
+         *   // ...
+         * }
+         *
+         * fs.newAPI = newAPI;
+         *
+         * syncBuiltinESMExports();
+         *
+         * import('node:fs').then((esmFS) => {
+         *   // It syncs the existing readFile property with the new value
+         *   assert.strictEqual(esmFS.readFile, newAPI);
+         *   // readFileSync has been deleted from the required fs
+         *   assert.strictEqual('readFileSync' in fs, false);
+         *   // syncBuiltinESMExports() does not remove readFileSync from esmFS
+         *   assert.strictEqual('readFileSync' in esmFS, true);
+         *   // syncBuiltinESMExports() does not add names
+         *   assert.strictEqual(esmFS.newAPI, undefined);
+         * });
+         * ```
+         * @since v12.12.0
+         */
+        function syncBuiltinESMExports(): void;
+        interface ImportAttributes extends NodeJS.Dict<string> {
+            type?: string | undefined;
+        }
+        type ImportPhase = "source" | "evaluation";
+        type ModuleFormat =
+            | "addon"
+            | "builtin"
+            | "commonjs"
+            | "commonjs-typescript"
+            | "json"
+            | "module"
+            | "module-typescript"
+            | "wasm";
+        type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
+        type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
+        interface ResolveHookContext {
+            conditions: string[];
+            importAttributes: ImportAttributes;
+            parentURL: string | undefined;
+        }
+        interface ResolveFnOutput {
+            format?: string | null | undefined;
+            importAttributes?: ImportAttributes | undefined;
+            shortCircuit?: boolean | undefined;
+            url: string;
+        }
+        type ResolveHook = (
+            specifier: string,
+            context: ResolveHookContext,
+            nextResolve: (
+                specifier: string,
+                context?: Partial<ResolveHookContext>,
+            ) => ResolveFnOutput | Promise<ResolveFnOutput>,
+        ) => ResolveFnOutput | Promise<ResolveFnOutput>;
+        type ResolveHookSync = (
+            specifier: string,
+            context: ResolveHookContext,
+            nextResolve: (
+                specifier: string,
+                context?: Partial<ResolveHookContext>,
+            ) => ResolveFnOutput,
+        ) => ResolveFnOutput;
+        interface LoadHookContext {
+            conditions: string[];
+            format: string | null | undefined;
+            importAttributes: ImportAttributes;
+        }
+        interface LoadFnOutput {
+            format: string | null | undefined;
+            shortCircuit?: boolean | undefined;
+            source?: ModuleSource | undefined;
+        }
+        type LoadHook = (
+            url: string,
+            context: LoadHookContext,
+            nextLoad: (
+                url: string,
+                context?: Partial<LoadHookContext>,
+            ) => LoadFnOutput | Promise<LoadFnOutput>,
+        ) => LoadFnOutput | Promise<LoadFnOutput>;
+        type LoadHookSync = (
+            url: string,
+            context: LoadHookContext,
+            nextLoad: (
+                url: string,
+                context?: Partial<LoadHookContext>,
+            ) => LoadFnOutput,
+        ) => LoadFnOutput;
+        interface SourceMapsSupport {
+            /**
+             * If the source maps support is enabled
+             */
+            enabled: boolean;
+            /**
+             * If the support is enabled for files in `node_modules`.
+             */
+            nodeModules: boolean;
+            /**
+             * If the support is enabled for generated code from `eval` or `new Function`.
+             */
+            generatedCode: boolean;
+        }
+        /**
+         * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack
+         * traces is enabled.
+         * @since v23.7.0, v22.14.0
+         */
+        function getSourceMapsSupport(): SourceMapsSupport;
+        /**
+         * `path` is the resolved path for the file for which a corresponding source map
+         * should be fetched.
+         * @since v13.7.0, v12.17.0
+         * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
+         */
+        function findSourceMap(path: string): SourceMap | undefined;
+        interface SetSourceMapsSupportOptions {
+            /**
+             * If enabling the support for files in `node_modules`.
+             * @default false
+             */
+            nodeModules?: boolean | undefined;
+            /**
+             * If enabling the support for generated code from `eval` or `new Function`.
+             * @default false
+             */
+            generatedCode?: boolean | undefined;
+        }
+        /**
+         * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for
+         * stack traces.
+         *
+         * It provides same features as launching Node.js process with commandline options
+         * `--enable-source-maps`, with additional options to alter the support for files
+         * in `node_modules` or generated codes.
+         *
+         * Only source maps in JavaScript files that are loaded after source maps has been
+         * enabled will be parsed and loaded. Preferably, use the commandline options
+         * `--enable-source-maps` to avoid losing track of source maps of modules loaded
+         * before this API call.
+         * @since v23.7.0, v22.14.0
+         */
+        function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void;
+        interface SourceMapConstructorOptions {
+            /**
+             * @since v21.0.0, v20.5.0
+             */
+            lineLengths?: readonly number[] | undefined;
+        }
+        interface SourceMapPayload {
+            file: string;
+            version: number;
+            sources: string[];
+            sourcesContent: string[];
+            names: string[];
+            mappings: string;
+            sourceRoot: string;
+        }
+        interface SourceMapping {
+            generatedLine: number;
+            generatedColumn: number;
+            originalSource: string;
+            originalLine: number;
+            originalColumn: number;
+        }
+        interface SourceOrigin {
+            /**
+             * The name of the range in the source map, if one was provided
+             */
+            name: string | undefined;
+            /**
+             * The file name of the original source, as reported in the SourceMap
+             */
+            fileName: string;
+            /**
+             * The 1-indexed lineNumber of the corresponding call site in the original source
+             */
+            lineNumber: number;
+            /**
+             * The 1-indexed columnNumber of the corresponding call site in the original source
+             */
+            columnNumber: number;
+        }
+        /**
+         * @since v13.7.0, v12.17.0
+         */
+        class SourceMap {
+            constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions);
+            /**
+             * Getter for the payload used to construct the `SourceMap` instance.
+             */
+            readonly payload: SourceMapPayload;
+            /**
+             * Given a line offset and column offset in the generated source
+             * file, returns an object representing the SourceMap range in the
+             * original file if found, or an empty object if not.
+             *
+             * The object returned contains the following keys:
+             *
+             * The returned value represents the raw range as it appears in the
+             * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
+             * column numbers as they appear in Error messages and CallSite
+             * objects.
+             *
+             * To get the corresponding 1-indexed line and column numbers from a
+             * lineNumber and columnNumber as they are reported by Error stacks
+             * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
+             * @param lineOffset The zero-indexed line number offset in the generated source
+             * @param columnOffset The zero-indexed column number offset in the generated source
+             */
+            findEntry(lineOffset: number, columnOffset: number): SourceMapping | {};
+            /**
+             * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source,
+             * find the corresponding call site location in the original source.
+             *
+             * If the `lineNumber` and `columnNumber` provided are not found in any source map,
+             * then an empty object is returned.
+             * @param lineNumber The 1-indexed line number of the call site in the generated source
+             * @param columnNumber The 1-indexed column number of the call site in the generated source
+             */
+            findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {};
+        }
+        function runMain(main?: string): void;
+        function wrap(script: string): string;
+    }
+    global {
+        namespace NodeJS {
+            interface Module {
+                /**
+                 * The module objects required for the first time by this one.
+                 * @since v0.1.16
+                 */
+                children: Module[];
+                /**
+                 * The `module.exports` object is created by the `Module` system. Sometimes this is
+                 * not acceptable; many want their module to be an instance of some class. To do
+                 * this, assign the desired export object to `module.exports`.
+                 * @since v0.1.16
+                 */
+                exports: any;
+                /**
+                 * The fully resolved filename of the module.
+                 * @since v0.1.16
+                 */
+                filename: string;
+                /**
+                 * The identifier for the module. Typically this is the fully resolved
+                 * filename.
+                 * @since v0.1.16
+                 */
+                id: string;
+                /**
+                 * `true` if the module is running during the Node.js preload
+                 * phase.
+                 * @since v15.4.0, v14.17.0
+                 */
+                isPreloading: boolean;
+                /**
+                 * Whether or not the module is done loading, or is in the process of
+                 * loading.
+                 * @since v0.1.16
+                 */
+                loaded: boolean;
+                /**
+                 * The module that first required this one, or `null` if the current module is the
+                 * entry point of the current process, or `undefined` if the module was loaded by
+                 * something that is not a CommonJS module (e.g. REPL or `import`).
+                 * @since v0.1.16
+                 * @deprecated Please use `require.main` and `module.children` instead.
+                 */
+                parent: Module | null | undefined;
+                /**
+                 * The directory name of the module. This is usually the same as the
+                 * `path.dirname()` of the `module.id`.
+                 * @since v11.14.0
+                 */
+                path: string;
+                /**
+                 * The search paths for the module.
+                 * @since v0.4.0
+                 */
+                paths: string[];
+                /**
+                 * The `module.require()` method provides a way to load a module as if
+                 * `require()` was called from the original module.
+                 * @since v0.5.1
+                 */
+                require(id: string): any;
+            }
+            interface Require {
+                /**
+                 * Used to import modules, `JSON`, and local files.
+                 * @since v0.1.13
+                 */
+                (id: string): any;
+                /**
+                 * Modules are cached in this object when they are required. By deleting a key
+                 * value from this object, the next `require` will reload the module.
+                 * This does not apply to
+                 * [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html),
+                 * for which reloading will result in an error.
+                 * @since v0.3.0
+                 */
+                cache: Dict<Module>;
+                /**
+                 * Instruct `require` on how to handle certain file extensions.
+                 * @since v0.3.0
+                 * @deprecated
+                 */
+                extensions: RequireExtensions;
+                /**
+                 * The `Module` object representing the entry script loaded when the Node.js
+                 * process launched, or `undefined` if the entry point of the program is not a
+                 * CommonJS module.
+                 * @since v0.1.17
+                 */
+                main: Module | undefined;
+                /**
+                 * @since v0.3.0
+                 */
+                resolve: RequireResolve;
+            }
+            /** @deprecated */
+            interface RequireExtensions extends Dict<(module: Module, filename: string) => any> {
+                ".js": (module: Module, filename: string) => any;
+                ".json": (module: Module, filename: string) => any;
+                ".node": (module: Module, filename: string) => any;
+            }
+            interface RequireResolveOptions {
+                /**
+                 * Paths to resolve module location from. If present, these
+                 * paths are used instead of the default resolution paths, with the exception
+                 * of
+                 * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders)
+                 * like `$HOME/.node_modules`, which are
+                 * always included. Each of these paths is used as a starting point for
+                 * the module resolution algorithm, meaning that the `node_modules` hierarchy
+                 * is checked from this location.
+                 * @since v8.9.0
+                 */
+                paths?: string[] | undefined;
+            }
+            interface RequireResolve {
+                /**
+                 * Use the internal `require()` machinery to look up the location of a module,
+                 * but rather than loading the module, just return the resolved filename.
+                 *
+                 * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown.
+                 * @since v0.3.0
+                 * @param request The module path to resolve.
+                 */
+                (request: string, options?: RequireResolveOptions): string;
+                /**
+                 * Returns an array containing the paths searched during resolution of `request` or
+                 * `null` if the `request` string references a core module, for example `http` or
+                 * `fs`.
+                 * @since v8.9.0
+                 * @param request The module path whose lookup paths are being retrieved.
+                 */
+                paths(request: string): string[] | null;
+            }
+        }
+        /**
+         * The directory name of the current module. This is the same as the
+         * `path.dirname()` of the `__filename`.
+         * @since v0.1.27
+         */
+        var __dirname: string;
+        /**
+         * The file name of the current module. This is the current module file's absolute
+         * path with symlinks resolved.
+         *
+         * For a main program this is not necessarily the same as the file name used in the
+         * command line.
+         * @since v0.0.1
+         */
+        var __filename: string;
+        /**
+         * The `exports` variable is available within a module's file-level scope, and is
+         * assigned the value of `module.exports` before the module is evaluated.
+         * @since v0.1.16
+         */
+        var exports: NodeJS.Module["exports"];
+        /**
+         * A reference to the current module.
+         * @since v0.1.16
+         */
+        var module: NodeJS.Module;
+        /**
+         * @since v0.1.13
+         */
+        var require: NodeJS.Require;
+        // Global-scope aliases for backwards compatibility with @types/node <13.0.x
+        // TODO: consider removing in a future major version update
+        /** @deprecated Use `NodeJS.Module` instead. */
+        interface NodeModule extends NodeJS.Module {}
+        /** @deprecated Use `NodeJS.Require` instead. */
+        interface NodeRequire extends NodeJS.Require {}
+        /** @deprecated Use `NodeJS.RequireResolve` instead. */
+        interface RequireResolve extends NodeJS.RequireResolve {}
+    }
+    export = Module;
+}
+declare module "module" {
+    import module = require("node:module");
+    export = module;
+}

+ 970 - 0
node_modules/@types/node/net.d.ts

@@ -0,0 +1,970 @@
+declare module "node:net" {
+    import { NonSharedBuffer } from "node:buffer";
+    import * as dns from "node:dns";
+    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+    import * as stream from "node:stream";
+    type LookupFunction = (
+        hostname: string,
+        options: dns.LookupOptions,
+        callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void,
+    ) => void;
+    interface AddressInfo {
+        address: string;
+        family: string;
+        port: number;
+    }
+    interface SocketConstructorOpts {
+        fd?: number | undefined;
+        allowHalfOpen?: boolean | undefined;
+        onread?: OnReadOpts | undefined;
+        readable?: boolean | undefined;
+        writable?: boolean | undefined;
+        signal?: AbortSignal | undefined;
+        noDelay?: boolean | undefined;
+        keepAlive?: boolean | undefined;
+        keepAliveInitialDelay?: number | undefined;
+        blockList?: BlockList | undefined;
+        typeOfService?: number | undefined;
+    }
+    interface OnReadOpts {
+        buffer: Uint8Array | (() => Uint8Array);
+        /**
+         * This function is called for every chunk of incoming data.
+         * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`.
+         * Return `false` from this function to implicitly `pause()` the socket.
+         */
+        callback(bytesWritten: number, buffer: Uint8Array): boolean;
+    }
+    interface TcpSocketConnectOpts {
+        port: number;
+        host?: string | undefined;
+        localAddress?: string | undefined;
+        localPort?: number | undefined;
+        hints?: number | undefined;
+        family?: number | undefined;
+        lookup?: LookupFunction | undefined;
+        /**
+         * @since v18.13.0
+         */
+        autoSelectFamily?: boolean | undefined;
+        /**
+         * @since v18.13.0
+         */
+        autoSelectFamilyAttemptTimeout?: number | undefined;
+    }
+    interface IpcSocketConnectOpts {
+        path: string;
+    }
+    type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
+    type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
+    interface SocketEventMap extends Omit<stream.DuplexEventMap, "close"> {
+        "close": [hadError: boolean];
+        "connect": [];
+        "connectionAttempt": [ip: string, port: number, family: number];
+        "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error];
+        "connectionAttemptTimeout": [ip: string, port: number, family: number];
+        "data": [data: string | NonSharedBuffer];
+        "lookup": [err: Error | null, address: string, family: number | null, host: string];
+        "ready": [];
+        "timeout": [];
+    }
+    /**
+     * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
+     * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
+     * an `EventEmitter`.
+     *
+     * A `net.Socket` can be created by the user and used directly to interact with
+     * a server. For example, it is returned by {@link createConnection},
+     * so the user can use it to talk to the server.
+     *
+     * It can also be created by Node.js and passed to the user when a connection
+     * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
+     * it to interact with the client.
+     * @since v0.3.4
+     */
+    class Socket extends stream.Duplex {
+        constructor(options?: SocketConstructorOpts);
+        /**
+         * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
+         * If the socket is still writable it implicitly calls `socket.end()`.
+         * @since v0.3.4
+         */
+        destroySoon(): void;
+        /**
+         * Sends data on the socket. The second parameter specifies the encoding in the
+         * case of a string. It defaults to UTF8 encoding.
+         *
+         * Returns `true` if the entire data was flushed successfully to the kernel
+         * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
+         *
+         * The optional `callback` parameter will be executed when the data is finally
+         * written out, which may not be immediately.
+         *
+         * See `Writable` stream `write()` method for more
+         * information.
+         * @since v0.1.90
+         */
+        write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+        /**
+         * Sends data on the socket, with an explicit encoding for string data.
+         * @see {@link Socket.write} for full details.
+         * @since v0.1.90
+         * @param [encoding='utf8'] Only used when data is `string`.
+         */
+        write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+        /**
+         * Initiate a connection on a given socket.
+         *
+         * Possible signatures:
+         *
+         * * `socket.connect(options[, connectListener])`
+         * * `socket.connect(path[, connectListener])` for `IPC` connections.
+         * * `socket.connect(port[, host][, connectListener])` for TCP connections.
+         * * Returns: `net.Socket` The socket itself.
+         *
+         * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
+         * instead of a `'connect'` event, an `'error'` event will be emitted with
+         * the error passed to the `'error'` listener.
+         * The last parameter `connectListener`, if supplied, will be added as a listener
+         * for the `'connect'` event **once**.
+         *
+         * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
+         * behavior.
+         */
+        connect(options: SocketConnectOpts, connectionListener?: () => void): this;
+        connect(port: number, host: string, connectionListener?: () => void): this;
+        connect(port: number, connectionListener?: () => void): this;
+        connect(path: string, connectionListener?: () => void): this;
+        /**
+         * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
+         * @since v0.1.90
+         * @return The socket itself.
+         */
+        setEncoding(encoding?: BufferEncoding): this;
+        /**
+         * Pauses the reading of data. That is, `'data'` events will not be emitted.
+         * Useful to throttle back an upload.
+         * @return The socket itself.
+         */
+        pause(): this;
+        /**
+         * Close the TCP connection by sending an RST packet and destroy the stream.
+         * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
+         * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
+         * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
+         * @since v18.3.0, v16.17.0
+         */
+        resetAndDestroy(): this;
+        /**
+         * Resumes reading after a call to `socket.pause()`.
+         * @return The socket itself.
+         */
+        resume(): this;
+        /**
+         * Sets the socket to timeout after `timeout` milliseconds of inactivity on
+         * the socket. By default `net.Socket` do not have a timeout.
+         *
+         * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
+         * end the connection.
+         *
+         * ```js
+         * socket.setTimeout(3000);
+         * socket.on('timeout', () => {
+         *   console.log('socket timeout');
+         *   socket.end();
+         * });
+         * ```
+         *
+         * If `timeout` is 0, then the existing idle timeout is disabled.
+         *
+         * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
+         * @since v0.1.90
+         * @return The socket itself.
+         */
+        setTimeout(timeout: number, callback?: () => void): this;
+        /**
+         * Enable/disable the use of Nagle's algorithm.
+         *
+         * When a TCP connection is created, it will have Nagle's algorithm enabled.
+         *
+         * Nagle's algorithm delays data before it is sent via the network. It attempts
+         * to optimize throughput at the expense of latency.
+         *
+         * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
+         * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
+         * algorithm.
+         * @since v0.1.90
+         * @param [noDelay=true]
+         * @return The socket itself.
+         */
+        setNoDelay(noDelay?: boolean): this;
+        /**
+         * Enable/disable keep-alive functionality, and optionally set the initial
+         * delay before the first keepalive probe is sent on an idle socket.
+         *
+         * Set `initialDelay` (in milliseconds) to set the delay between the last
+         * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
+         * (or previous) setting.
+         *
+         * Enabling the keep-alive functionality will set the following socket options:
+         *
+         * * `SO_KEEPALIVE=1`
+         * * `TCP_KEEPIDLE=initialDelay`
+         * * `TCP_KEEPCNT=10`
+         * * `TCP_KEEPINTVL=1`
+         * @since v0.1.92
+         * @param [enable=false]
+         * @param [initialDelay=0]
+         * @return The socket itself.
+         */
+        setKeepAlive(enable?: boolean, initialDelay?: number): this;
+        /**
+         * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic
+         * Class for IPv6 packets for this socket.
+         *
+         * `setTypeOfService()` may be called before the socket is connected; the value
+         * will be cached and applied when the socket establishes a connection.
+         * `getTypeOfService()` will return the currently set value even before connection.
+         *
+         * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
+         * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
+         * should verify platform-specific semantics.
+         * @since v25.6.0
+         * @returns The current TOS value.
+         */
+        getTypeOfService(): number;
+        /**
+         * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6
+         * Packets sent from this socket. This can be used to prioritize network traffic.
+         *
+         * `setTypeOfService()` may be called before the socket is connected; the value
+         * will be cached and applied when the socket establishes a connection.
+         * `getTypeOfService()` will return the currently set value even before connection.
+         *
+         * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
+         * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
+         * should verify platform-specific semantics.
+         * @since v25.6.0
+         * @param tos The TOS value to set (0-255).
+         * @returns The socket itself.
+         */
+        setTypeOfService(tos: number): this;
+        /**
+         * Returns the bound `address`, the address `family` name and `port` of the
+         * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
+         * @since v0.1.90
+         */
+        address(): AddressInfo | {};
+        /**
+         * Calling `unref()` on a socket will allow the program to exit if this is the only
+         * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
+         * @since v0.9.1
+         * @return The socket itself.
+         */
+        unref(): this;
+        /**
+         * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
+         * If the socket is `ref`ed calling `ref` again will have no effect.
+         * @since v0.9.1
+         * @return The socket itself.
+         */
+        ref(): this;
+        /**
+         * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)`
+         * and it is an array of the addresses that have been attempted.
+         *
+         * Each address is a string in the form of `$IP:$PORT`.
+         * If the connection was successful, then the last address is the one that the socket is currently connected to.
+         * @since v19.4.0
+         */
+        readonly autoSelectFamilyAttemptedAddresses: string[];
+        /**
+         * This property shows the number of characters buffered for writing. The buffer
+         * may contain strings whose length after encoding is not yet known. So this number
+         * is only an approximation of the number of bytes in the buffer.
+         *
+         * `net.Socket` has the property that `socket.write()` always works. This is to
+         * help users get up and running quickly. The computer cannot always keep up
+         * with the amount of data that is written to a socket. The network connection
+         * simply might be too slow. Node.js will internally queue up the data written to a
+         * socket and send it out over the wire when it is possible.
+         *
+         * The consequence of this internal buffering is that memory may grow.
+         * Users who experience large or growing `bufferSize` should attempt to
+         * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
+         * @since v0.3.8
+         * @deprecated Since v14.6.0 - Use `writableLength` instead.
+         */
+        readonly bufferSize: number;
+        /**
+         * The amount of received bytes.
+         * @since v0.5.3
+         */
+        readonly bytesRead: number;
+        /**
+         * The amount of bytes sent.
+         * @since v0.5.3
+         */
+        readonly bytesWritten: number;
+        /**
+         * If `true`, `socket.connect(options[, connectListener])` was
+         * called and has not yet finished. It will stay `true` until the socket becomes
+         * connected, then it is set to `false` and the `'connect'` event is emitted. Note
+         * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
+         * @since v6.1.0
+         */
+        readonly connecting: boolean;
+        /**
+         * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
+         * (see `socket.connecting`).
+         * @since v11.2.0, v10.16.0
+         */
+        readonly pending: boolean;
+        /**
+         * See `writable.destroyed` for further details.
+         */
+        readonly destroyed: boolean;
+        /**
+         * The string representation of the local IP address the remote client is
+         * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
+         * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
+         * @since v0.9.6
+         */
+        readonly localAddress?: string;
+        /**
+         * The numeric representation of the local port. For example, `80` or `21`.
+         * @since v0.9.6
+         */
+        readonly localPort?: number;
+        /**
+         * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
+         * @since v18.8.0, v16.18.0
+         */
+        readonly localFamily?: string;
+        /**
+         * This property represents the state of the connection as a string.
+         *
+         * * If the stream is connecting `socket.readyState` is `opening`.
+         * * If the stream is readable and writable, it is `open`.
+         * * If the stream is readable and not writable, it is `readOnly`.
+         * * If the stream is not readable and writable, it is `writeOnly`.
+         * @since v0.5.0
+         */
+        readonly readyState: SocketReadyState;
+        /**
+         * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
+         * the socket is destroyed (for example, if the client disconnected).
+         * @since v0.5.10
+         */
+        readonly remoteAddress: string | undefined;
+        /**
+         * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
+         * the socket is destroyed (for example, if the client disconnected).
+         * @since v0.11.14
+         */
+        readonly remoteFamily: string | undefined;
+        /**
+         * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
+         * the socket is destroyed (for example, if the client disconnected).
+         * @since v0.5.10
+         */
+        readonly remotePort: number | undefined;
+        /**
+         * The socket timeout in milliseconds as set by `socket.setTimeout()`.
+         * It is `undefined` if a timeout has not been set.
+         * @since v10.7.0
+         */
+        readonly timeout?: number;
+        /**
+         * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
+         * server will still send some data.
+         *
+         * See `writable.end()` for further details.
+         * @since v0.1.90
+         * @param callback Optional callback for when the socket is finished.
+         * @return The socket itself.
+         */
+        end(callback?: () => void): this;
+        /**
+         * Half-closes the socket, with one final chunk of data.
+         * @see {@link Socket.end} for full details.
+         * @since v0.1.90
+         * @param callback Optional callback for when the socket is finished.
+         * @return The socket itself.
+         */
+        end(buffer: Uint8Array | string, callback?: () => void): this;
+        /**
+         * Half-closes the socket, with one final chunk of data.
+         * @see {@link Socket.end} for full details.
+         * @since v0.1.90
+         * @param [encoding='utf8'] Only used when data is `string`.
+         * @param callback Optional callback for when the socket is finished.
+         * @return The socket itself.
+         */
+        end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
+        // #region InternalEventEmitter
+        addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof SocketEventMap>(eventName: E, ...args: SocketEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof SocketEventMap>(
+            eventName: E,
+            listener?: (...args: SocketEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof SocketEventMap>(
+            eventName: E,
+            listener: (...args: SocketEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof SocketEventMap>(
+            eventName: E,
+            listener: (...args: SocketEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof SocketEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof SocketEventMap>(
+            eventName: E,
+            listener: (...args: SocketEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    interface ListenOptions extends Abortable {
+        backlog?: number | undefined;
+        exclusive?: boolean | undefined;
+        host?: string | undefined;
+        /**
+         * @default false
+         */
+        ipv6Only?: boolean | undefined;
+        reusePort?: boolean | undefined;
+        path?: string | undefined;
+        port?: number | undefined;
+        readableAll?: boolean | undefined;
+        writableAll?: boolean | undefined;
+    }
+    interface ServerOpts {
+        /**
+         * Indicates whether half-opened TCP connections are allowed.
+         * @default false
+         */
+        allowHalfOpen?: boolean | undefined;
+        /**
+         * Indicates whether the socket should be paused on incoming connections.
+         * @default false
+         */
+        pauseOnConnect?: boolean | undefined;
+        /**
+         * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
+         * @default false
+         * @since v16.5.0
+         */
+        noDelay?: boolean | undefined;
+        /**
+         * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
+         * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
+         * @default false
+         * @since v16.5.0
+         */
+        keepAlive?: boolean | undefined;
+        /**
+         * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
+         * @default 0
+         * @since v16.5.0
+         */
+        keepAliveInitialDelay?: number | undefined;
+        /**
+         * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
+         * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
+         * @since v18.17.0, v20.1.0
+         */
+        highWaterMark?: number | undefined;
+        /**
+         * `blockList` can be used for disabling inbound
+         * access to specific IP addresses, IP ranges, or IP subnets. This does not
+         * work if the server is behind a reverse proxy, NAT, etc. because the address
+         * checked against the block list is the address of the proxy, or the one
+         * specified by the NAT.
+         * @since v22.13.0
+         */
+        blockList?: BlockList | undefined;
+    }
+    interface DropArgument {
+        localAddress?: string;
+        localPort?: number;
+        localFamily?: string;
+        remoteAddress?: string;
+        remotePort?: number;
+        remoteFamily?: string;
+    }
+    interface ServerEventMap {
+        "close": [];
+        "connection": [socket: Socket];
+        "error": [err: Error];
+        "listening": [];
+        "drop": [data?: DropArgument];
+    }
+    /**
+     * This class is used to create a TCP or `IPC` server.
+     * @since v0.1.90
+     */
+    class Server implements EventEmitter {
+        constructor(connectionListener?: (socket: Socket) => void);
+        constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
+        /**
+         * Start a server listening for connections. A `net.Server` can be a TCP or
+         * an `IPC` server depending on what it listens to.
+         *
+         * Possible signatures:
+         *
+         * * `server.listen(handle[, backlog][, callback])`
+         * * `server.listen(options[, callback])`
+         * * `server.listen(path[, backlog][, callback])` for `IPC` servers
+         * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
+         *
+         * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
+         * event.
+         *
+         * All `listen()` methods can take a `backlog` parameter to specify the maximum
+         * length of the queue of pending connections. The actual length will be determined
+         * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512).
+         *
+         * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
+         * details).
+         *
+         * The `server.listen()` method can be called again if and only if there was an
+         * error during the first `server.listen()` call or `server.close()` has been
+         * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
+         *
+         * One of the most common errors raised when listening is `EADDRINUSE`.
+         * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
+         * after a certain amount of time:
+         *
+         * ```js
+         * server.on('error', (e) => {
+         *   if (e.code === 'EADDRINUSE') {
+         *     console.error('Address in use, retrying...');
+         *     setTimeout(() => {
+         *       server.close();
+         *       server.listen(PORT, HOST);
+         *     }, 1000);
+         *   }
+         * });
+         * ```
+         */
+        listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
+        listen(port?: number, hostname?: string, listeningListener?: () => void): this;
+        listen(port?: number, backlog?: number, listeningListener?: () => void): this;
+        listen(port?: number, listeningListener?: () => void): this;
+        listen(path: string, backlog?: number, listeningListener?: () => void): this;
+        listen(path: string, listeningListener?: () => void): this;
+        listen(options: ListenOptions, listeningListener?: () => void): this;
+        listen(handle: any, backlog?: number, listeningListener?: () => void): this;
+        listen(handle: any, listeningListener?: () => void): this;
+        /**
+         * Stops the server from accepting new connections and keeps existing
+         * connections. This function is asynchronous, the server is finally closed
+         * when all connections are ended and the server emits a `'close'` event.
+         * The optional `callback` will be called once the `'close'` event occurs. Unlike
+         * that event, it will be called with an `Error` as its only argument if the server
+         * was not open when it was closed.
+         * @since v0.1.90
+         * @param callback Called when the server is closed.
+         */
+        close(callback?: (err?: Error) => void): this;
+        /**
+         * Returns the bound `address`, the address `family` name, and `port` of the server
+         * as reported by the operating system if listening on an IP socket
+         * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
+         *
+         * For a server listening on a pipe or Unix domain socket, the name is returned
+         * as a string.
+         *
+         * ```js
+         * const server = net.createServer((socket) => {
+         *   socket.end('goodbye\n');
+         * }).on('error', (err) => {
+         *   // Handle errors here.
+         *   throw err;
+         * });
+         *
+         * // Grab an arbitrary unused port.
+         * server.listen(() => {
+         *   console.log('opened server on', server.address());
+         * });
+         * ```
+         *
+         * `server.address()` returns `null` before the `'listening'` event has been
+         * emitted or after calling `server.close()`.
+         * @since v0.1.90
+         */
+        address(): AddressInfo | string | null;
+        /**
+         * Asynchronously get the number of concurrent connections on the server. Works
+         * when sockets were sent to forks.
+         *
+         * Callback should take two arguments `err` and `count`.
+         * @since v0.9.7
+         */
+        getConnections(cb: (error: Error | null, count: number) => void): this;
+        /**
+         * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
+         * If the server is `ref`ed calling `ref()` again will have no effect.
+         * @since v0.9.1
+         */
+        ref(): this;
+        /**
+         * Calling `unref()` on a server will allow the program to exit if this is the only
+         * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
+         * @since v0.9.1
+         */
+        unref(): this;
+        /**
+         * Set this property to reject connections when the server's connection count gets
+         * high.
+         *
+         * It is not recommended to use this option once a socket has been sent to a child
+         * with `child_process.fork()`.
+         * @since v0.2.0
+         */
+        maxConnections: number;
+        connections: number;
+        /**
+         * Indicates whether or not the server is listening for connections.
+         * @since v5.7.0
+         */
+        readonly listening: boolean;
+        /**
+         * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
+         * @since v20.5.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    interface Server extends InternalEventEmitter<ServerEventMap> {}
+    type IPVersion = "ipv4" | "ipv6";
+    /**
+     * The `BlockList` object can be used with some network APIs to specify rules for
+     * disabling inbound or outbound access to specific IP addresses, IP ranges, or
+     * IP subnets.
+     * @since v15.0.0, v14.18.0
+     */
+    class BlockList {
+        /**
+         * Adds a rule to block the given IP address.
+         * @since v15.0.0, v14.18.0
+         * @param address An IPv4 or IPv6 address.
+         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+         */
+        addAddress(address: string, type?: IPVersion): void;
+        addAddress(address: SocketAddress): void;
+        /**
+         * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
+         * @since v15.0.0, v14.18.0
+         * @param start The starting IPv4 or IPv6 address in the range.
+         * @param end The ending IPv4 or IPv6 address in the range.
+         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+         */
+        addRange(start: string, end: string, type?: IPVersion): void;
+        addRange(start: SocketAddress, end: SocketAddress): void;
+        /**
+         * Adds a rule to block a range of IP addresses specified as a subnet mask.
+         * @since v15.0.0, v14.18.0
+         * @param net The network IPv4 or IPv6 address.
+         * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
+         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+         */
+        addSubnet(net: SocketAddress, prefix: number): void;
+        addSubnet(net: string, prefix: number, type?: IPVersion): void;
+        /**
+         * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
+         *
+         * ```js
+         * const blockList = new net.BlockList();
+         * blockList.addAddress('123.123.123.123');
+         * blockList.addRange('10.0.0.1', '10.0.0.10');
+         * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
+         *
+         * console.log(blockList.check('123.123.123.123'));  // Prints: true
+         * console.log(blockList.check('10.0.0.3'));  // Prints: true
+         * console.log(blockList.check('222.111.111.222'));  // Prints: false
+         *
+         * // IPv6 notation for IPv4 addresses works:
+         * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
+         * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
+         * ```
+         * @since v15.0.0, v14.18.0
+         * @param address The IP address to check
+         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
+         */
+        check(address: SocketAddress): boolean;
+        check(address: string, type?: IPVersion): boolean;
+        /**
+         * The list of rules added to the blocklist.
+         * @since v15.0.0, v14.18.0
+         */
+        rules: readonly string[];
+        /**
+         * Returns `true` if the `value` is a `net.BlockList`.
+         * @since v22.13.0
+         * @param value Any JS value
+         */
+        static isBlockList(value: unknown): value is BlockList;
+        /**
+         * ```js
+         * const blockList = new net.BlockList();
+         * const data = [
+         *   'Subnet: IPv4 192.168.1.0/24',
+         *   'Address: IPv4 10.0.0.5',
+         *   'Range: IPv4 192.168.2.1-192.168.2.10',
+         *   'Range: IPv4 10.0.0.1-10.0.0.10',
+         * ];
+         * blockList.fromJSON(data);
+         * blockList.fromJSON(JSON.stringify(data));
+         * ```
+         * @since v24.5.0
+         * @experimental
+         */
+        fromJSON(data: string | readonly string[]): void;
+        /**
+         * @since v24.5.0
+         * @experimental
+         */
+        toJSON(): readonly string[];
+    }
+    interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
+        timeout?: number | undefined;
+    }
+    interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
+        timeout?: number | undefined;
+    }
+    type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
+    /**
+     * Creates a new TCP or `IPC` server.
+     *
+     * If `allowHalfOpen` is set to `true`, when the other end of the socket
+     * signals the end of transmission, the server will only send back the end of
+     * transmission when `socket.end()` is explicitly called. For example, in the
+     * context of TCP, when a FIN packed is received, a FIN packed is sent
+     * back only when `socket.end()` is explicitly called. Until then the
+     * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
+     *
+     * If `pauseOnConnect` is set to `true`, then the socket associated with each
+     * incoming connection will be paused, and no data will be read from its handle.
+     * This allows connections to be passed between processes without any data being
+     * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
+     *
+     * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
+     *
+     * Here is an example of a TCP echo server which listens for connections
+     * on port 8124:
+     *
+     * ```js
+     * import net from 'node:net';
+     * const server = net.createServer((c) => {
+     *   // 'connection' listener.
+     *   console.log('client connected');
+     *   c.on('end', () => {
+     *     console.log('client disconnected');
+     *   });
+     *   c.write('hello\r\n');
+     *   c.pipe(c);
+     * });
+     * server.on('error', (err) => {
+     *   throw err;
+     * });
+     * server.listen(8124, () => {
+     *   console.log('server bound');
+     * });
+     * ```
+     *
+     * Test this by using `telnet`:
+     *
+     * ```bash
+     * telnet localhost 8124
+     * ```
+     *
+     * To listen on the socket `/tmp/echo.sock`:
+     *
+     * ```js
+     * server.listen('/tmp/echo.sock', () => {
+     *   console.log('server bound');
+     * });
+     * ```
+     *
+     * Use `nc` to connect to a Unix domain socket server:
+     *
+     * ```bash
+     * nc -U /tmp/echo.sock
+     * ```
+     * @since v0.5.0
+     * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
+     */
+    function createServer(connectionListener?: (socket: Socket) => void): Server;
+    function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
+    /**
+     * Aliases to {@link createConnection}.
+     *
+     * Possible signatures:
+     *
+     * * {@link connect}
+     * * {@link connect} for `IPC` connections.
+     * * {@link connect} for TCP connections.
+     */
+    function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
+    function connect(port: number, host?: string, connectionListener?: () => void): Socket;
+    function connect(path: string, connectionListener?: () => void): Socket;
+    /**
+     * A factory function, which creates a new {@link Socket},
+     * immediately initiates connection with `socket.connect()`,
+     * then returns the `net.Socket` that starts the connection.
+     *
+     * When the connection is established, a `'connect'` event will be emitted
+     * on the returned socket. The last parameter `connectListener`, if supplied,
+     * will be added as a listener for the `'connect'` event **once**.
+     *
+     * Possible signatures:
+     *
+     * * {@link createConnection}
+     * * {@link createConnection} for `IPC` connections.
+     * * {@link createConnection} for TCP connections.
+     *
+     * The {@link connect} function is an alias to this function.
+     */
+    function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
+    function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
+    function createConnection(path: string, connectionListener?: () => void): Socket;
+    /**
+     * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`.
+     * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided.
+     * @since v19.4.0
+     */
+    function getDefaultAutoSelectFamily(): boolean;
+    /**
+     * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
+     * @param value The new default value.
+     * The initial default value is `true`, unless the command line option
+     * `--no-network-family-autoselection` is provided.
+     * @since v19.4.0
+     */
+    function setDefaultAutoSelectFamily(value: boolean): void;
+    /**
+     * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
+     * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
+     * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
+     * @since v19.8.0, v18.8.0
+     */
+    function getDefaultAutoSelectFamilyAttemptTimeout(): number;
+    /**
+     * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
+     * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line
+     * option `--network-family-autoselection-attempt-timeout`.
+     * @since v19.8.0, v18.8.0
+     */
+    function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;
+    /**
+     * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
+     * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
+     *
+     * ```js
+     * net.isIP('::1'); // returns 6
+     * net.isIP('127.0.0.1'); // returns 4
+     * net.isIP('127.000.000.001'); // returns 0
+     * net.isIP('127.0.0.1/24'); // returns 0
+     * net.isIP('fhqwhgads'); // returns 0
+     * ```
+     * @since v0.3.0
+     */
+    function isIP(input: string): number;
+    /**
+     * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
+     * leading zeroes. Otherwise, returns `false`.
+     *
+     * ```js
+     * net.isIPv4('127.0.0.1'); // returns true
+     * net.isIPv4('127.000.000.001'); // returns false
+     * net.isIPv4('127.0.0.1/24'); // returns false
+     * net.isIPv4('fhqwhgads'); // returns false
+     * ```
+     * @since v0.3.0
+     */
+    function isIPv4(input: string): boolean;
+    /**
+     * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
+     *
+     * ```js
+     * net.isIPv6('::1'); // returns true
+     * net.isIPv6('fhqwhgads'); // returns false
+     * ```
+     * @since v0.3.0
+     */
+    function isIPv6(input: string): boolean;
+    interface SocketAddressInitOptions {
+        /**
+         * The network address as either an IPv4 or IPv6 string.
+         * @default 127.0.0.1
+         */
+        address?: string | undefined;
+        /**
+         * @default `'ipv4'`
+         */
+        family?: IPVersion | undefined;
+        /**
+         * An IPv6 flow-label used only if `family` is `'ipv6'`.
+         * @default 0
+         */
+        flowlabel?: number | undefined;
+        /**
+         * An IP port.
+         * @default 0
+         */
+        port?: number | undefined;
+    }
+    /**
+     * @since v15.14.0, v14.18.0
+     */
+    class SocketAddress {
+        constructor(options: SocketAddressInitOptions);
+        /**
+         * Either \`'ipv4'\` or \`'ipv6'\`.
+         * @since v15.14.0, v14.18.0
+         */
+        readonly address: string;
+        /**
+         * Either \`'ipv4'\` or \`'ipv6'\`.
+         * @since v15.14.0, v14.18.0
+         */
+        readonly family: IPVersion;
+        /**
+         * @since v15.14.0, v14.18.0
+         */
+        readonly port: number;
+        /**
+         * @since v15.14.0, v14.18.0
+         */
+        readonly flowlabel: number;
+        /**
+         * @since v22.13.0
+         * @param input An input string containing an IP address and optional port,
+         * e.g. `123.1.2.3:1234` or `[1::1]:1234`.
+         * @returns Returns a `SocketAddress` if parsing was successful.
+         * Otherwise returns `undefined`.
+         */
+        static parse(input: string): SocketAddress | undefined;
+    }
+}
+declare module "net" {
+    export * from "node:net";
+}

+ 498 - 0
node_modules/@types/node/os.d.ts

@@ -0,0 +1,498 @@
+declare module "node:os" {
+    import { NonSharedBuffer } from "buffer";
+    interface CpuInfo {
+        model: string;
+        speed: number;
+        times: {
+            /** The number of milliseconds the CPU has spent in user mode. */
+            user: number;
+            /** The number of milliseconds the CPU has spent in nice mode. */
+            nice: number;
+            /** The number of milliseconds the CPU has spent in sys mode. */
+            sys: number;
+            /** The number of milliseconds the CPU has spent in idle mode. */
+            idle: number;
+            /** The number of milliseconds the CPU has spent in irq mode. */
+            irq: number;
+        };
+    }
+    interface NetworkInterfaceBase {
+        address: string;
+        netmask: string;
+        mac: string;
+        internal: boolean;
+        cidr: string | null;
+        scopeid?: number;
+    }
+    interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
+        family: "IPv4";
+    }
+    interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
+        family: "IPv6";
+        scopeid: number;
+    }
+    interface UserInfo<T> {
+        username: T;
+        uid: number;
+        gid: number;
+        shell: T | null;
+        homedir: T;
+    }
+    type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
+    /**
+     * Returns the host name of the operating system as a string.
+     * @since v0.3.3
+     */
+    function hostname(): string;
+    /**
+     * Returns an array containing the 1, 5, and 15 minute load averages.
+     *
+     * The load average is a measure of system activity calculated by the operating
+     * system and expressed as a fractional number.
+     *
+     * The load average is a Unix-specific concept. On Windows, the return value is
+     * always `[0, 0, 0]`.
+     * @since v0.3.3
+     */
+    function loadavg(): number[];
+    /**
+     * Returns the system uptime in number of seconds.
+     * @since v0.3.3
+     */
+    function uptime(): number;
+    /**
+     * Returns the amount of free system memory in bytes as an integer.
+     * @since v0.3.3
+     */
+    function freemem(): number;
+    /**
+     * Returns the total amount of system memory in bytes as an integer.
+     * @since v0.3.3
+     */
+    function totalmem(): number;
+    /**
+     * Returns an array of objects containing information about each logical CPU core.
+     * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
+     *
+     * The properties included on each object include:
+     *
+     * ```js
+     * [
+     *   {
+     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
+     *     speed: 2926,
+     *     times: {
+     *       user: 252020,
+     *       nice: 0,
+     *       sys: 30340,
+     *       idle: 1070356870,
+     *       irq: 0,
+     *     },
+     *   },
+     *   {
+     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
+     *     speed: 2926,
+     *     times: {
+     *       user: 306960,
+     *       nice: 0,
+     *       sys: 26980,
+     *       idle: 1071569080,
+     *       irq: 0,
+     *     },
+     *   },
+     *   {
+     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
+     *     speed: 2926,
+     *     times: {
+     *       user: 248450,
+     *       nice: 0,
+     *       sys: 21750,
+     *       idle: 1070919370,
+     *       irq: 0,
+     *     },
+     *   },
+     *   {
+     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
+     *     speed: 2926,
+     *     times: {
+     *       user: 256880,
+     *       nice: 0,
+     *       sys: 19430,
+     *       idle: 1070905480,
+     *       irq: 20,
+     *     },
+     *   },
+     * ]
+     * ```
+     *
+     * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
+     * are always 0.
+     *
+     * `os.cpus().length` should not be used to calculate the amount of parallelism
+     * available to an application. Use {@link availableParallelism} for this purpose.
+     * @since v0.3.3
+     */
+    function cpus(): CpuInfo[];
+    /**
+     * Returns an estimate of the default amount of parallelism a program should use.
+     * Always returns a value greater than zero.
+     *
+     * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
+     * @since v19.4.0, v18.14.0
+     */
+    function availableParallelism(): number;
+    /**
+     * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
+     * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
+     *
+     * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
+     * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
+     * @since v0.3.3
+     */
+    function type(): string;
+    /**
+     * Returns the operating system as a string.
+     *
+     * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
+     * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+     * @since v0.3.3
+     */
+    function release(): string;
+    /**
+     * Returns an object containing network interfaces that have been assigned a
+     * network address.
+     *
+     * Each key on the returned object identifies a network interface. The associated
+     * value is an array of objects that each describe an assigned network address.
+     *
+     * The properties available on the assigned network address object include:
+     *
+     * ```js
+     * {
+     *   lo: [
+     *     {
+     *       address: '127.0.0.1',
+     *       netmask: '255.0.0.0',
+     *       family: 'IPv4',
+     *       mac: '00:00:00:00:00:00',
+     *       internal: true,
+     *       cidr: '127.0.0.1/8'
+     *     },
+     *     {
+     *       address: '::1',
+     *       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
+     *       family: 'IPv6',
+     *       mac: '00:00:00:00:00:00',
+     *       scopeid: 0,
+     *       internal: true,
+     *       cidr: '::1/128'
+     *     }
+     *   ],
+     *   eth0: [
+     *     {
+     *       address: '192.168.1.108',
+     *       netmask: '255.255.255.0',
+     *       family: 'IPv4',
+     *       mac: '01:02:03:0a:0b:0c',
+     *       internal: false,
+     *       cidr: '192.168.1.108/24'
+     *     },
+     *     {
+     *       address: 'fe80::a00:27ff:fe4e:66a1',
+     *       netmask: 'ffff:ffff:ffff:ffff::',
+     *       family: 'IPv6',
+     *       mac: '01:02:03:0a:0b:0c',
+     *       scopeid: 1,
+     *       internal: false,
+     *       cidr: 'fe80::a00:27ff:fe4e:66a1/64'
+     *     }
+     *   ]
+     * }
+     * ```
+     * @since v0.6.0
+     */
+    function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
+    /**
+     * Returns the string path of the current user's home directory.
+     *
+     * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
+     * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
+     *
+     * On Windows, it uses the `USERPROFILE` environment variable if defined.
+     * Otherwise it uses the path to the profile directory of the current user.
+     * @since v2.3.0
+     */
+    function homedir(): string;
+    interface UserInfoOptions {
+        encoding?: BufferEncoding | "buffer" | undefined;
+    }
+    interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
+        encoding: "buffer";
+    }
+    interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
+        encoding?: BufferEncoding | undefined;
+    }
+    /**
+     * Returns information about the currently effective user. On POSIX platforms,
+     * this is typically a subset of the password file. The returned object includes
+     * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
+     *
+     * The value of `homedir` returned by `os.userInfo()` is provided by the operating
+     * system. This differs from the result of `os.homedir()`, which queries
+     * environment variables for the home directory before falling back to the
+     * operating system response.
+     *
+     * Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
+     * @since v6.0.0
+     */
+    function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
+    function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
+    function userInfo(options: UserInfoOptions): UserInfo<string | NonSharedBuffer>;
+    type SignalConstants = {
+        [key in NodeJS.Signals]: number;
+    };
+    namespace constants {
+        const UV_UDP_REUSEADDR: number;
+        namespace signals {}
+        const signals: SignalConstants;
+        namespace errno {
+            const E2BIG: number;
+            const EACCES: number;
+            const EADDRINUSE: number;
+            const EADDRNOTAVAIL: number;
+            const EAFNOSUPPORT: number;
+            const EAGAIN: number;
+            const EALREADY: number;
+            const EBADF: number;
+            const EBADMSG: number;
+            const EBUSY: number;
+            const ECANCELED: number;
+            const ECHILD: number;
+            const ECONNABORTED: number;
+            const ECONNREFUSED: number;
+            const ECONNRESET: number;
+            const EDEADLK: number;
+            const EDESTADDRREQ: number;
+            const EDOM: number;
+            const EDQUOT: number;
+            const EEXIST: number;
+            const EFAULT: number;
+            const EFBIG: number;
+            const EHOSTUNREACH: number;
+            const EIDRM: number;
+            const EILSEQ: number;
+            const EINPROGRESS: number;
+            const EINTR: number;
+            const EINVAL: number;
+            const EIO: number;
+            const EISCONN: number;
+            const EISDIR: number;
+            const ELOOP: number;
+            const EMFILE: number;
+            const EMLINK: number;
+            const EMSGSIZE: number;
+            const EMULTIHOP: number;
+            const ENAMETOOLONG: number;
+            const ENETDOWN: number;
+            const ENETRESET: number;
+            const ENETUNREACH: number;
+            const ENFILE: number;
+            const ENOBUFS: number;
+            const ENODATA: number;
+            const ENODEV: number;
+            const ENOENT: number;
+            const ENOEXEC: number;
+            const ENOLCK: number;
+            const ENOLINK: number;
+            const ENOMEM: number;
+            const ENOMSG: number;
+            const ENOPROTOOPT: number;
+            const ENOSPC: number;
+            const ENOSR: number;
+            const ENOSTR: number;
+            const ENOSYS: number;
+            const ENOTCONN: number;
+            const ENOTDIR: number;
+            const ENOTEMPTY: number;
+            const ENOTSOCK: number;
+            const ENOTSUP: number;
+            const ENOTTY: number;
+            const ENXIO: number;
+            const EOPNOTSUPP: number;
+            const EOVERFLOW: number;
+            const EPERM: number;
+            const EPIPE: number;
+            const EPROTO: number;
+            const EPROTONOSUPPORT: number;
+            const EPROTOTYPE: number;
+            const ERANGE: number;
+            const EROFS: number;
+            const ESPIPE: number;
+            const ESRCH: number;
+            const ESTALE: number;
+            const ETIME: number;
+            const ETIMEDOUT: number;
+            const ETXTBSY: number;
+            const EWOULDBLOCK: number;
+            const EXDEV: number;
+            const WSAEINTR: number;
+            const WSAEBADF: number;
+            const WSAEACCES: number;
+            const WSAEFAULT: number;
+            const WSAEINVAL: number;
+            const WSAEMFILE: number;
+            const WSAEWOULDBLOCK: number;
+            const WSAEINPROGRESS: number;
+            const WSAEALREADY: number;
+            const WSAENOTSOCK: number;
+            const WSAEDESTADDRREQ: number;
+            const WSAEMSGSIZE: number;
+            const WSAEPROTOTYPE: number;
+            const WSAENOPROTOOPT: number;
+            const WSAEPROTONOSUPPORT: number;
+            const WSAESOCKTNOSUPPORT: number;
+            const WSAEOPNOTSUPP: number;
+            const WSAEPFNOSUPPORT: number;
+            const WSAEAFNOSUPPORT: number;
+            const WSAEADDRINUSE: number;
+            const WSAEADDRNOTAVAIL: number;
+            const WSAENETDOWN: number;
+            const WSAENETUNREACH: number;
+            const WSAENETRESET: number;
+            const WSAECONNABORTED: number;
+            const WSAECONNRESET: number;
+            const WSAENOBUFS: number;
+            const WSAEISCONN: number;
+            const WSAENOTCONN: number;
+            const WSAESHUTDOWN: number;
+            const WSAETOOMANYREFS: number;
+            const WSAETIMEDOUT: number;
+            const WSAECONNREFUSED: number;
+            const WSAELOOP: number;
+            const WSAENAMETOOLONG: number;
+            const WSAEHOSTDOWN: number;
+            const WSAEHOSTUNREACH: number;
+            const WSAENOTEMPTY: number;
+            const WSAEPROCLIM: number;
+            const WSAEUSERS: number;
+            const WSAEDQUOT: number;
+            const WSAESTALE: number;
+            const WSAEREMOTE: number;
+            const WSASYSNOTREADY: number;
+            const WSAVERNOTSUPPORTED: number;
+            const WSANOTINITIALISED: number;
+            const WSAEDISCON: number;
+            const WSAENOMORE: number;
+            const WSAECANCELLED: number;
+            const WSAEINVALIDPROCTABLE: number;
+            const WSAEINVALIDPROVIDER: number;
+            const WSAEPROVIDERFAILEDINIT: number;
+            const WSASYSCALLFAILURE: number;
+            const WSASERVICE_NOT_FOUND: number;
+            const WSATYPE_NOT_FOUND: number;
+            const WSA_E_NO_MORE: number;
+            const WSA_E_CANCELLED: number;
+            const WSAEREFUSED: number;
+        }
+        namespace dlopen {
+            const RTLD_LAZY: number;
+            const RTLD_NOW: number;
+            const RTLD_GLOBAL: number;
+            const RTLD_LOCAL: number;
+            const RTLD_DEEPBIND: number;
+        }
+        namespace priority {
+            const PRIORITY_LOW: number;
+            const PRIORITY_BELOW_NORMAL: number;
+            const PRIORITY_NORMAL: number;
+            const PRIORITY_ABOVE_NORMAL: number;
+            const PRIORITY_HIGH: number;
+            const PRIORITY_HIGHEST: number;
+        }
+    }
+    const devNull: string;
+    /**
+     * The operating system-specific end-of-line marker.
+     * * `\n` on POSIX
+     * * `\r\n` on Windows
+     */
+    const EOL: string;
+    /**
+     * Returns the operating system CPU architecture for which the Node.js binary was
+     * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
+     * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
+     *
+     * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch).
+     * @since v0.5.0
+     */
+    function arch(): NodeJS.Architecture;
+    /**
+     * Returns a string identifying the kernel version.
+     *
+     * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+     * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+     * @since v13.11.0, v12.17.0
+     */
+    function version(): string;
+    /**
+     * Returns a string identifying the operating system platform for which
+     * the Node.js binary was compiled. The value is set at compile time.
+     * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
+     *
+     * The return value is equivalent to `process.platform`.
+     *
+     * The value `'android'` may also be returned if Node.js is built on the Android
+     * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+     * @since v0.5.0
+     */
+    function platform(): NodeJS.Platform;
+    /**
+     * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
+     * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
+     *
+     * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
+     * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
+     * @since v18.9.0, v16.18.0
+     */
+    function machine(): string;
+    /**
+     * Returns the operating system's default directory for temporary files as a
+     * string.
+     * @since v0.9.9
+     */
+    function tmpdir(): string;
+    /**
+     * Returns a string identifying the endianness of the CPU for which the Node.js
+     * binary was compiled.
+     *
+     * Possible values are `'BE'` for big endian and `'LE'` for little endian.
+     * @since v0.9.4
+     */
+    function endianness(): "BE" | "LE";
+    /**
+     * Returns the scheduling priority for the process specified by `pid`. If `pid` is
+     * not provided or is `0`, the priority of the current process is returned.
+     * @since v10.10.0
+     * @param [pid=0] The process ID to retrieve scheduling priority for.
+     */
+    function getPriority(pid?: number): number;
+    /**
+     * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.
+     *
+     * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
+     * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
+     * mapping may cause the return value to be slightly different on Windows. To avoid
+     * confusion, set `priority` to one of the priority constants.
+     *
+     * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
+     * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
+     * @since v10.10.0
+     * @param [pid=0] The process ID to set scheduling priority for.
+     * @param priority The scheduling priority to assign to the process.
+     */
+    function setPriority(priority: number): void;
+    function setPriority(pid: number, priority: number): void;
+}
+declare module "os" {
+    export * from "node:os";
+}

+ 155 - 0
node_modules/@types/node/package.json

@@ -0,0 +1,155 @@
+{
+    "name": "@types/node",
+    "version": "25.6.0",
+    "description": "TypeScript definitions for node",
+    "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
+    "license": "MIT",
+    "contributors": [
+        {
+            "name": "Microsoft TypeScript",
+            "githubUsername": "Microsoft",
+            "url": "https://github.com/Microsoft"
+        },
+        {
+            "name": "Alberto Schiabel",
+            "githubUsername": "jkomyno",
+            "url": "https://github.com/jkomyno"
+        },
+        {
+            "name": "Andrew Makarov",
+            "githubUsername": "r3nya",
+            "url": "https://github.com/r3nya"
+        },
+        {
+            "name": "Benjamin Toueg",
+            "githubUsername": "btoueg",
+            "url": "https://github.com/btoueg"
+        },
+        {
+            "name": "David Junger",
+            "githubUsername": "touffy",
+            "url": "https://github.com/touffy"
+        },
+        {
+            "name": "Mohsen Azimi",
+            "githubUsername": "mohsen1",
+            "url": "https://github.com/mohsen1"
+        },
+        {
+            "name": "Nikita Galkin",
+            "githubUsername": "galkin",
+            "url": "https://github.com/galkin"
+        },
+        {
+            "name": "Sebastian Silbermann",
+            "githubUsername": "eps1lon",
+            "url": "https://github.com/eps1lon"
+        },
+        {
+            "name": "Wilco Bakker",
+            "githubUsername": "WilcoBakker",
+            "url": "https://github.com/WilcoBakker"
+        },
+        {
+            "name": "Marcin Kopacz",
+            "githubUsername": "chyzwar",
+            "url": "https://github.com/chyzwar"
+        },
+        {
+            "name": "Trivikram Kamat",
+            "githubUsername": "trivikr",
+            "url": "https://github.com/trivikr"
+        },
+        {
+            "name": "Junxiao Shi",
+            "githubUsername": "yoursunny",
+            "url": "https://github.com/yoursunny"
+        },
+        {
+            "name": "Ilia Baryshnikov",
+            "githubUsername": "qwelias",
+            "url": "https://github.com/qwelias"
+        },
+        {
+            "name": "ExE Boss",
+            "githubUsername": "ExE-Boss",
+            "url": "https://github.com/ExE-Boss"
+        },
+        {
+            "name": "Piotr Błażejewicz",
+            "githubUsername": "peterblazejewicz",
+            "url": "https://github.com/peterblazejewicz"
+        },
+        {
+            "name": "Anna Henningsen",
+            "githubUsername": "addaleax",
+            "url": "https://github.com/addaleax"
+        },
+        {
+            "name": "Victor Perin",
+            "githubUsername": "victorperin",
+            "url": "https://github.com/victorperin"
+        },
+        {
+            "name": "NodeJS Contributors",
+            "githubUsername": "NodeJS",
+            "url": "https://github.com/NodeJS"
+        },
+        {
+            "name": "Linus Unnebäck",
+            "githubUsername": "LinusU",
+            "url": "https://github.com/LinusU"
+        },
+        {
+            "name": "wafuwafu13",
+            "githubUsername": "wafuwafu13",
+            "url": "https://github.com/wafuwafu13"
+        },
+        {
+            "name": "Matteo Collina",
+            "githubUsername": "mcollina",
+            "url": "https://github.com/mcollina"
+        },
+        {
+            "name": "Dmitry Semigradsky",
+            "githubUsername": "Semigradsky",
+            "url": "https://github.com/Semigradsky"
+        },
+        {
+            "name": "René",
+            "githubUsername": "Renegade334",
+            "url": "https://github.com/Renegade334"
+        },
+        {
+            "name": "Yagiz Nizipli",
+            "githubUsername": "anonrig",
+            "url": "https://github.com/anonrig"
+        }
+    ],
+    "main": "",
+    "types": "index.d.ts",
+    "typesVersions": {
+        "<=5.6": {
+            "*": [
+                "ts5.6/*"
+            ]
+        },
+        "<=5.7": {
+            "*": [
+                "ts5.7/*"
+            ]
+        }
+    },
+    "repository": {
+        "type": "git",
+        "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+        "directory": "types/node"
+    },
+    "scripts": {},
+    "dependencies": {
+        "undici-types": "~7.19.0"
+    },
+    "peerDependencies": {},
+    "typesPublisherContentHash": "753bd9272f1c86686cc2d1bb435a7f033157f700201f64f0319742347e1ca060",
+    "typeScriptVersion": "5.3"
+}

+ 178 - 0
node_modules/@types/node/path.d.ts

@@ -0,0 +1,178 @@
+declare module "node:path" {
+    namespace path {
+        /**
+         * A parsed path object generated by path.parse() or consumed by path.format().
+         */
+        interface ParsedPath {
+            /**
+             * The root of the path such as '/' or 'c:\'
+             */
+            root: string;
+            /**
+             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+             */
+            dir: string;
+            /**
+             * The file name including extension (if any) such as 'index.html'
+             */
+            base: string;
+            /**
+             * The file extension (if any) such as '.html'
+             */
+            ext: string;
+            /**
+             * The file name without extension (if any) such as 'index'
+             */
+            name: string;
+        }
+        interface FormatInputPathObject {
+            /**
+             * The root of the path such as '/' or 'c:\'
+             */
+            root?: string | undefined;
+            /**
+             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
+             */
+            dir?: string | undefined;
+            /**
+             * The file name including extension (if any) such as 'index.html'
+             */
+            base?: string | undefined;
+            /**
+             * The file extension (if any) such as '.html'
+             */
+            ext?: string | undefined;
+            /**
+             * The file name without extension (if any) such as 'index'
+             */
+            name?: string | undefined;
+        }
+        /**
+         * Normalize a string path, reducing '..' and '.' parts.
+         * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
+         *
+         * @param path string path to normalize.
+         * @throws {TypeError} if `path` is not a string.
+         */
+        function normalize(path: string): string;
+        /**
+         * Join all arguments together and normalize the resulting path.
+         *
+         * @param paths paths to join.
+         * @throws {TypeError} if any of the path segments is not a string.
+         */
+        function join(...paths: string[]): string;
+        /**
+         * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
+         *
+         * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
+         *
+         * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
+         * until an absolute path is found. If after using all {from} paths still no absolute path is found,
+         * the current working directory is used as well. The resulting path is normalized,
+         * and trailing slashes are removed unless the path gets resolved to the root directory.
+         *
+         * @param paths A sequence of paths or path segments.
+         * @throws {TypeError} if any of the arguments is not a string.
+         */
+        function resolve(...paths: string[]): string;
+        /**
+         * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
+         * @param path The path to glob-match against.
+         * @param pattern The glob to check the path against.
+         * @returns Whether or not the `path` matched the `pattern`.
+         * @throws {TypeError} if `path` or `pattern` are not strings.
+         * @since v22.5.0
+         */
+        function matchesGlob(path: string, pattern: string): boolean;
+        /**
+         * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
+         *
+         * If the given {path} is a zero-length string, `false` will be returned.
+         *
+         * @param path path to test.
+         * @throws {TypeError} if `path` is not a string.
+         */
+        function isAbsolute(path: string): boolean;
+        /**
+         * Solve the relative path from {from} to {to} based on the current working directory.
+         * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
+         *
+         * @throws {TypeError} if either `from` or `to` is not a string.
+         */
+        function relative(from: string, to: string): string;
+        /**
+         * Return the directory name of a path. Similar to the Unix dirname command.
+         *
+         * @param path the path to evaluate.
+         * @throws {TypeError} if `path` is not a string.
+         */
+        function dirname(path: string): string;
+        /**
+         * Return the last portion of a path. Similar to the Unix basename command.
+         * Often used to extract the file name from a fully qualified path.
+         *
+         * @param path the path to evaluate.
+         * @param suffix optionally, an extension to remove from the result.
+         * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
+         */
+        function basename(path: string, suffix?: string): string;
+        /**
+         * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
+         * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
+         *
+         * @param path the path to evaluate.
+         * @throws {TypeError} if `path` is not a string.
+         */
+        function extname(path: string): string;
+        /**
+         * The platform-specific file separator. '\\' or '/'.
+         */
+        const sep: "\\" | "/";
+        /**
+         * The platform-specific file delimiter. ';' or ':'.
+         */
+        const delimiter: ";" | ":";
+        /**
+         * Returns an object from a path string - the opposite of format().
+         *
+         * @param path path to evaluate.
+         * @throws {TypeError} if `path` is not a string.
+         */
+        function parse(path: string): ParsedPath;
+        /**
+         * Returns a path string from an object - the opposite of parse().
+         *
+         * @param pathObject path to evaluate.
+         */
+        function format(pathObject: FormatInputPathObject): string;
+        /**
+         * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
+         * If path is not a string, path will be returned without modifications.
+         * This method is meaningful only on Windows system.
+         * On POSIX systems, the method is non-operational and always returns path without modifications.
+         */
+        function toNamespacedPath(path: string): string;
+    }
+    namespace path {
+        export {
+            /**
+             * The `path.posix` property provides access to POSIX specific implementations of the `path` methods.
+             *
+             * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`.
+             */
+            path as posix,
+            /**
+             * The `path.win32` property provides access to Windows-specific implementations of the `path` methods.
+             *
+             * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`.
+             */
+            path as win32,
+        };
+    }
+    export = path;
+}
+declare module "path" {
+    import path = require("node:path");
+    export = path;
+}

+ 8 - 0
node_modules/@types/node/path/posix.d.ts

@@ -0,0 +1,8 @@
+declare module "node:path/posix" {
+    import path = require("node:path");
+    export = path.posix;
+}
+declare module "path/posix" {
+    import path = require("path");
+    export = path.posix;
+}

+ 8 - 0
node_modules/@types/node/path/win32.d.ts

@@ -0,0 +1,8 @@
+declare module "node:path/win32" {
+    import path = require("node:path");
+    export = path.win32;
+}
+declare module "path/win32" {
+    import path = require("path");
+    export = path.win32;
+}

+ 612 - 0
node_modules/@types/node/perf_hooks.d.ts

@@ -0,0 +1,612 @@
+declare module "node:perf_hooks" {
+    import { InternalEventTargetEventProperties } from "node:events";
+    // #region web types
+    type EntryType =
+        | "dns" // Node.js only
+        | "function" // Node.js only
+        | "gc" // Node.js only
+        | "http2" // Node.js only
+        | "http" // Node.js only
+        | "mark" // available on the Web
+        | "measure" // available on the Web
+        | "net" // Node.js only
+        | "node" // Node.js only
+        | "resource"; // available on the Web
+    interface ConnectionTimingInfo {
+        domainLookupStartTime: number;
+        domainLookupEndTime: number;
+        connectionStartTime: number;
+        connectionEndTime: number;
+        secureConnectionStartTime: number;
+        ALPNNegotiatedProtocol: string;
+    }
+    interface FetchTimingInfo {
+        startTime: number;
+        redirectStartTime: number;
+        redirectEndTime: number;
+        postRedirectStartTime: number;
+        finalServiceWorkerStartTime: number;
+        finalNetworkRequestStartTime: number;
+        finalNetworkResponseStartTime: number;
+        endTime: number;
+        finalConnectionTimingInfo: ConnectionTimingInfo | null;
+        encodedBodySize: number;
+        decodedBodySize: number;
+    }
+    type PerformanceEntryList = PerformanceEntry[];
+    interface PerformanceMarkOptions {
+        detail?: any;
+        startTime?: number;
+    }
+    interface PerformanceMeasureOptions {
+        detail?: any;
+        duration?: number;
+        end?: string | number;
+        start?: string | number;
+    }
+    interface PerformanceObserverCallback {
+        (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
+    }
+    interface PerformanceObserverInit {
+        buffered?: boolean;
+        entryTypes?: EntryType[];
+        type?: EntryType;
+    }
+    // TODO: remove in next major
+    /** @deprecated Use `TimerifyOptions` instead. */
+    interface PerformanceTimerifyOptions extends TimerifyOptions {}
+    interface PerformanceEventMap {
+        "resourcetimingbufferfull": Event;
+    }
+    interface Performance extends EventTarget, InternalEventTargetEventProperties<PerformanceEventMap> {
+        readonly nodeTiming: PerformanceNodeTiming;
+        readonly timeOrigin: number;
+        clearMarks(markName?: string): void;
+        clearMeasures(measureName?: string): void;
+        clearResourceTimings(resourceTimingName?: string): void;
+        getEntries(): PerformanceEntryList;
+        getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
+        getEntriesByType(type: EntryType): PerformanceEntryList;
+        mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+        markResourceTiming(
+            timingInfo: FetchTimingInfo,
+            requestedUrl: string,
+            initiatorType: string,
+            global: unknown,
+            cacheMode: string,
+            bodyInfo: unknown,
+            responseStatus: number,
+            deliveryType?: string,
+        ): PerformanceResourceTiming;
+        measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure;
+        measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
+        now(): number;
+        setResourceTimingBufferSize(maxSize: number): void;
+        toJSON(): any;
+        addEventListener<K extends keyof PerformanceEventMap>(
+            type: K,
+            listener: (ev: PerformanceEventMap[K]) => void,
+            options?: AddEventListenerOptions | boolean,
+        ): void;
+        addEventListener(
+            type: string,
+            listener: EventListener | EventListenerObject,
+            options?: AddEventListenerOptions | boolean,
+        ): void;
+        removeEventListener<K extends keyof PerformanceEventMap>(
+            type: K,
+            listener: (ev: PerformanceEventMap[K]) => void,
+            options?: EventListenerOptions | boolean,
+        ): void;
+        removeEventListener(
+            type: string,
+            listener: EventListener | EventListenerObject,
+            options?: EventListenerOptions | boolean,
+        ): void;
+        /**
+         * This is an alias of `perf_hooks.eventLoopUtilization()`.
+         *
+         * _This property is an extension by Node.js. It is not available in Web browsers._
+         * @since v14.10.0, v12.19.0
+         * @param utilization1 The result of a previous call to
+         * `eventLoopUtilization()`.
+         * @param utilization2 The result of a previous call to
+         * `eventLoopUtilization()` prior to `utilization1`.
+         */
+        eventLoopUtilization(
+            utilization1?: EventLoopUtilization,
+            utilization2?: EventLoopUtilization,
+        ): EventLoopUtilization;
+        /**
+         * This is an alias of `perf_hooks.timerify()`.
+         *
+         * _This property is an extension by Node.js. It is not available in Web browsers._
+         * @since v8.5.0
+         */
+        timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+    }
+    var Performance: {
+        prototype: Performance;
+        new(): Performance;
+    };
+    interface PerformanceEntry {
+        readonly duration: number;
+        readonly entryType: EntryType;
+        readonly name: string;
+        readonly startTime: number;
+        toJSON(): any;
+    }
+    var PerformanceEntry: {
+        prototype: PerformanceEntry;
+        new(): PerformanceEntry;
+    };
+    interface PerformanceMark extends PerformanceEntry {
+        readonly detail: any;
+        readonly entryType: "mark";
+    }
+    var PerformanceMark: {
+        prototype: PerformanceMark;
+        new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
+    };
+    interface PerformanceMeasure extends PerformanceEntry {
+        readonly detail: any;
+        readonly entryType: "measure";
+    }
+    var PerformanceMeasure: {
+        prototype: PerformanceMeasure;
+        new(): PerformanceMeasure;
+    };
+    interface PerformanceObserver {
+        disconnect(): void;
+        observe(options: PerformanceObserverInit): void;
+        takeRecords(): PerformanceEntryList;
+    }
+    var PerformanceObserver: {
+        prototype: PerformanceObserver;
+        new(callback: PerformanceObserverCallback): PerformanceObserver;
+        readonly supportedEntryTypes: readonly EntryType[];
+    };
+    interface PerformanceObserverEntryList {
+        getEntries(): PerformanceEntryList;
+        getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
+        getEntriesByType(type: EntryType): PerformanceEntryList;
+    }
+    var PerformanceObserverEntryList: {
+        prototype: PerformanceObserverEntryList;
+        new(): PerformanceObserverEntryList;
+    };
+    interface PerformanceResourceTiming extends PerformanceEntry {
+        readonly connectEnd: number;
+        readonly connectStart: number;
+        readonly decodedBodySize: number;
+        readonly domainLookupEnd: number;
+        readonly domainLookupStart: number;
+        readonly encodedBodySize: number;
+        readonly entryType: "resource";
+        readonly fetchStart: number;
+        readonly initiatorType: string;
+        readonly nextHopProtocol: string;
+        readonly redirectEnd: number;
+        readonly redirectStart: number;
+        readonly requestStart: number;
+        readonly responseEnd: number;
+        readonly responseStart: number;
+        readonly responseStatus: number;
+        readonly secureConnectionStart: number;
+        readonly transferSize: number;
+        readonly workerStart: number;
+        toJSON(): any;
+    }
+    var PerformanceResourceTiming: {
+        prototype: PerformanceResourceTiming;
+        new(): PerformanceResourceTiming;
+    };
+    var performance: Performance;
+    // #endregion
+    /**
+     * _This class is an extension by Node.js. It is not available in Web browsers._
+     *
+     * Provides detailed Node.js timing data.
+     *
+     * The constructor of this class is not exposed to users directly.
+     * @since v19.0.0
+     */
+    class PerformanceNodeEntry extends PerformanceEntry {
+        /**
+         * Additional detail specific to the `entryType`.
+         * @since v16.0.0
+         */
+        readonly detail: any;
+        readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node";
+    }
+    interface UVMetrics {
+        /**
+         * Number of event loop iterations.
+         */
+        readonly loopCount: number;
+        /**
+         * Number of events that have been processed by the event handler.
+         */
+        readonly events: number;
+        /**
+         * Number of events that were waiting to be processed when the event provider was called.
+         */
+        readonly eventsWaiting: number;
+    }
+    /**
+     * _This property is an extension by Node.js. It is not available in Web browsers._
+     *
+     * Provides timing details for Node.js itself. The constructor of this class
+     * is not exposed to users.
+     * @since v8.5.0
+     */
+    interface PerformanceNodeTiming extends PerformanceEntry {
+        /**
+         * The high resolution millisecond timestamp at which the Node.js process
+         * completed bootstrapping. If bootstrapping has not yet finished, the property
+         * has the value of -1.
+         * @since v8.5.0
+         */
+        readonly bootstrapComplete: number;
+        readonly entryType: "node";
+        /**
+         * The high resolution millisecond timestamp at which the Node.js environment was
+         * initialized.
+         * @since v8.5.0
+         */
+        readonly environment: number;
+        /**
+         * The high resolution millisecond timestamp of the amount of time the event loop
+         * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
+         * does not take CPU usage into consideration. If the event loop has not yet
+         * started (e.g., in the first tick of the main script), the property has the
+         * value of 0.
+         * @since v14.10.0, v12.19.0
+         */
+        readonly idleTime: number;
+        /**
+         * The high resolution millisecond timestamp at which the Node.js event loop
+         * exited. If the event loop has not yet exited, the property has the value of -1\.
+         * It can only have a value of not -1 in a handler of the `'exit'` event.
+         * @since v8.5.0
+         */
+        readonly loopExit: number;
+        /**
+         * The high resolution millisecond timestamp at which the Node.js event loop
+         * started. If the event loop has not yet started (e.g., in the first tick of the
+         * main script), the property has the value of -1.
+         * @since v8.5.0
+         */
+        readonly loopStart: number;
+        /**
+         * The high resolution millisecond timestamp at which the Node.js process was initialized.
+         * @since v8.5.0
+         */
+        readonly nodeStart: number;
+        /**
+         * This is a wrapper to the `uv_metrics_info` function.
+         * It returns the current set of event loop metrics.
+         *
+         * It is recommended to use this property inside a function whose execution was
+         * scheduled using `setImmediate` to avoid collecting metrics before finishing all
+         * operations scheduled during the current loop iteration.
+         * @since v22.8.0, v20.18.0
+         */
+        readonly uvMetricsInfo: UVMetrics;
+        /**
+         * The high resolution millisecond timestamp at which the V8 platform was
+         * initialized.
+         * @since v8.5.0
+         */
+        readonly v8Start: number;
+    }
+    namespace constants {
+        const NODE_PERFORMANCE_GC_MAJOR: number;
+        const NODE_PERFORMANCE_GC_MINOR: number;
+        const NODE_PERFORMANCE_GC_INCREMENTAL: number;
+        const NODE_PERFORMANCE_GC_WEAKCB: number;
+        const NODE_PERFORMANCE_GC_FLAGS_NO: number;
+        const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
+        const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
+        const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
+        const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
+        const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
+        const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
+    }
+    interface EventLoopMonitorOptions {
+        /**
+         * The sampling rate in milliseconds.
+         * Must be greater than zero.
+         * @default 10
+         */
+        resolution?: number | undefined;
+    }
+    interface Histogram {
+        /**
+         * The number of samples recorded by the histogram.
+         * @since v17.4.0, v16.14.0
+         */
+        readonly count: number;
+        /**
+         * The number of samples recorded by the histogram.
+         * v17.4.0, v16.14.0
+         */
+        readonly countBigInt: bigint;
+        /**
+         * The number of times the event loop delay exceeded the maximum 1 hour event
+         * loop delay threshold.
+         * @since v11.10.0
+         */
+        readonly exceeds: number;
+        /**
+         * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
+         * @since v17.4.0, v16.14.0
+         */
+        readonly exceedsBigInt: bigint;
+        /**
+         * The maximum recorded event loop delay.
+         * @since v11.10.0
+         */
+        readonly max: number;
+        /**
+         * The maximum recorded event loop delay.
+         * v17.4.0, v16.14.0
+         */
+        readonly maxBigInt: number;
+        /**
+         * The mean of the recorded event loop delays.
+         * @since v11.10.0
+         */
+        readonly mean: number;
+        /**
+         * The minimum recorded event loop delay.
+         * @since v11.10.0
+         */
+        readonly min: number;
+        /**
+         * The minimum recorded event loop delay.
+         * v17.4.0, v16.14.0
+         */
+        readonly minBigInt: bigint;
+        /**
+         * Returns the value at the given percentile.
+         * @since v11.10.0
+         * @param percentile A percentile value in the range (0, 100].
+         */
+        percentile(percentile: number): number;
+        /**
+         * Returns the value at the given percentile.
+         * @since v17.4.0, v16.14.0
+         * @param percentile A percentile value in the range (0, 100].
+         */
+        percentileBigInt(percentile: number): bigint;
+        /**
+         * Returns a `Map` object detailing the accumulated percentile distribution.
+         * @since v11.10.0
+         */
+        readonly percentiles: Map<number, number>;
+        /**
+         * Returns a `Map` object detailing the accumulated percentile distribution.
+         * @since v17.4.0, v16.14.0
+         */
+        readonly percentilesBigInt: Map<bigint, bigint>;
+        /**
+         * Resets the collected histogram data.
+         * @since v11.10.0
+         */
+        reset(): void;
+        /**
+         * The standard deviation of the recorded event loop delays.
+         * @since v11.10.0
+         */
+        readonly stddev: number;
+    }
+    interface IntervalHistogram extends Histogram {
+        /**
+         * Enables the update interval timer. Returns `true` if the timer was
+         * started, `false` if it was already started.
+         * @since v11.10.0
+         */
+        enable(): boolean;
+        /**
+         * Disables the update interval timer. Returns `true` if the timer was
+         * stopped, `false` if it was already stopped.
+         * @since v11.10.0
+         */
+        disable(): boolean;
+        /**
+         * Disables the update interval timer when the histogram is disposed.
+         *
+         * ```js
+         * const { monitorEventLoopDelay } = require('node:perf_hooks');
+         * {
+         *   using hist = monitorEventLoopDelay({ resolution: 20 });
+         *   hist.enable();
+         *   // The histogram will be disabled when the block is exited.
+         * }
+         * ```
+         * @since v24.2.0
+         */
+        [Symbol.dispose](): void;
+    }
+    interface RecordableHistogram extends Histogram {
+        /**
+         * @since v15.9.0, v14.18.0
+         * @param val The amount to record in the histogram.
+         */
+        record(val: number | bigint): void;
+        /**
+         * Calculates the amount of time (in nanoseconds) that has passed since the
+         * previous call to `recordDelta()` and records that amount in the histogram.
+         * @since v15.9.0, v14.18.0
+         */
+        recordDelta(): void;
+        /**
+         * Adds the values from `other` to this histogram.
+         * @since v17.4.0, v16.14.0
+         */
+        add(other: RecordableHistogram): void;
+    }
+    interface EventLoopUtilization {
+        idle: number;
+        active: number;
+        utilization: number;
+    }
+    /**
+     * The `eventLoopUtilization()` function returns an object that contains the
+     * cumulative duration of time the event loop has been both idle and active as a
+     * high resolution milliseconds timer. The `utilization` value is the calculated
+     * Event Loop Utilization (ELU).
+     *
+     * If bootstrapping has not yet finished on the main thread the properties have
+     * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#worker-threads) since
+     * bootstrap happens within the event loop.
+     *
+     * Both `utilization1` and `utilization2` are optional parameters.
+     *
+     * If `utilization1` is passed, then the delta between the current call's `active`
+     * and `idle` times, as well as the corresponding `utilization` value are
+     * calculated and returned (similar to `process.hrtime()`).
+     *
+     * If `utilization1` and `utilization2` are both passed, then the delta is
+     * calculated between the two arguments. This is a convenience option because,
+     * unlike `process.hrtime()`, calculating the ELU is more complex than a
+     * single subtraction.
+     *
+     * ELU is similar to CPU utilization, except that it only measures event loop
+     * statistics and not CPU usage. It represents the percentage of time the event
+     * loop has spent outside the event loop's event provider (e.g. `epoll_wait`).
+     * No other CPU idle time is taken into consideration. The following is an example
+     * of how a mostly idle process will have a high ELU.
+     *
+     * ```js
+     * import { eventLoopUtilization } from 'node:perf_hooks';
+     * import { spawnSync } from 'node:child_process';
+     *
+     * setImmediate(() => {
+     *   const elu = eventLoopUtilization();
+     *   spawnSync('sleep', ['5']);
+     *   console.log(eventLoopUtilization(elu).utilization);
+     * });
+     * ```
+     *
+     * Although the CPU is mostly idle while running this script, the value of
+     * `utilization` is `1`. This is because the call to
+     * `child_process.spawnSync()` blocks the event loop from proceeding.
+     *
+     * Passing in a user-defined object instead of the result of a previous call to
+     * `eventLoopUtilization()` will lead to undefined behavior. The return values
+     * are not guaranteed to reflect any correct state of the event loop.
+     * @since v25.2.0
+     * @param utilization1 The result of a previous call to
+     * `eventLoopUtilization()`.
+     * @param utilization2 The result of a previous call to
+     * `eventLoopUtilization()` prior to `utilization1`.
+     */
+    function eventLoopUtilization(
+        utilization1?: EventLoopUtilization,
+        utilization2?: EventLoopUtilization,
+    ): EventLoopUtilization;
+    /**
+     * _This property is an extension by Node.js. It is not available in Web browsers._
+     *
+     * Creates an `IntervalHistogram` object that samples and reports the event loop
+     * delay over time. The delays will be reported in nanoseconds.
+     *
+     * Using a timer to detect approximate event loop delay works because the
+     * execution of timers is tied specifically to the lifecycle of the libuv
+     * event loop. That is, a delay in the loop will cause a delay in the execution
+     * of the timer, and those delays are specifically what this API is intended to
+     * detect.
+     *
+     * ```js
+     * import { monitorEventLoopDelay } from 'node:perf_hooks';
+     * const h = monitorEventLoopDelay({ resolution: 20 });
+     * h.enable();
+     * // Do something.
+     * h.disable();
+     * console.log(h.min);
+     * console.log(h.max);
+     * console.log(h.mean);
+     * console.log(h.stddev);
+     * console.log(h.percentiles);
+     * console.log(h.percentile(50));
+     * console.log(h.percentile(99));
+     * ```
+     * @since v11.10.0
+     */
+    function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
+    interface TimerifyOptions {
+        /**
+         * A histogram object created using
+         * `perf_hooks.createHistogram()` that will record runtime durations in
+         * nanoseconds.
+         */
+        histogram?: RecordableHistogram | undefined;
+    }
+    /**
+     * _This property is an extension by Node.js. It is not available in Web browsers._
+     *
+     * Wraps a function within a new function that measures the running time of the
+     * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'`
+     * event type in order for the timing details to be accessed.
+     *
+     * ```js
+     * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks';
+     *
+     * function someFunction() {
+     *   console.log('hello world');
+     * }
+     *
+     * const wrapped = timerify(someFunction);
+     *
+     * const obs = new PerformanceObserver((list) => {
+     *   console.log(list.getEntries()[0].duration);
+     *
+     *   performance.clearMarks();
+     *   performance.clearMeasures();
+     *   obs.disconnect();
+     * });
+     * obs.observe({ entryTypes: ['function'] });
+     *
+     * // A performance timeline entry will be created
+     * wrapped();
+     * ```
+     *
+     * If the wrapped function returns a promise, a finally handler will be attached
+     * to the promise and the duration will be reported once the finally handler is
+     * invoked.
+     * @since v25.2.0
+     */
+    function timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
+    interface CreateHistogramOptions {
+        /**
+         * The minimum recordable value. Must be an integer value greater than 0.
+         * @default 1
+         */
+        lowest?: number | bigint | undefined;
+        /**
+         * The maximum recordable value. Must be an integer value greater than min.
+         * @default Number.MAX_SAFE_INTEGER
+         */
+        highest?: number | bigint | undefined;
+        /**
+         * The number of accuracy digits. Must be a number between 1 and 5.
+         * @default 3
+         */
+        figures?: number | undefined;
+    }
+    /**
+     * Returns a `RecordableHistogram`.
+     * @since v15.9.0, v14.18.0
+     */
+    function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
+    // TODO: remove these in a future major
+    /** @deprecated Use the canonical `PerformanceMarkOptions` instead. */
+    interface MarkOptions extends PerformanceMarkOptions {}
+    /** @deprecated Use the canonical `PerformanceMeasureOptions` instead. */
+    interface MeasureOptions extends PerformanceMeasureOptions {}
+}
+declare module "perf_hooks" {
+    export * from "node:perf_hooks";
+}

+ 2175 - 0
node_modules/@types/node/process.d.ts

@@ -0,0 +1,2175 @@
+declare module "node:process" {
+    import { Control, MessageOptions, SendHandle } from "node:child_process";
+    import { PathLike } from "node:fs";
+    import * as tty from "node:tty";
+    import { Worker } from "node:worker_threads";
+    interface BuiltInModule {
+        "assert": typeof import("assert");
+        "node:assert": typeof import("node:assert");
+        "assert/strict": typeof import("assert/strict");
+        "node:assert/strict": typeof import("node:assert/strict");
+        "async_hooks": typeof import("async_hooks");
+        "node:async_hooks": typeof import("node:async_hooks");
+        "buffer": typeof import("buffer");
+        "node:buffer": typeof import("node:buffer");
+        "child_process": typeof import("child_process");
+        "node:child_process": typeof import("node:child_process");
+        "cluster": typeof import("cluster");
+        "node:cluster": typeof import("node:cluster");
+        "console": typeof import("console");
+        "node:console": typeof import("node:console");
+        "constants": typeof import("constants");
+        "node:constants": typeof import("node:constants");
+        "crypto": typeof import("crypto");
+        "node:crypto": typeof import("node:crypto");
+        "dgram": typeof import("dgram");
+        "node:dgram": typeof import("node:dgram");
+        "diagnostics_channel": typeof import("diagnostics_channel");
+        "node:diagnostics_channel": typeof import("node:diagnostics_channel");
+        "dns": typeof import("dns");
+        "node:dns": typeof import("node:dns");
+        "dns/promises": typeof import("dns/promises");
+        "node:dns/promises": typeof import("node:dns/promises");
+        "domain": typeof import("domain");
+        "node:domain": typeof import("node:domain");
+        "events": typeof import("events");
+        "node:events": typeof import("node:events");
+        "fs": typeof import("fs");
+        "node:fs": typeof import("node:fs");
+        "fs/promises": typeof import("fs/promises");
+        "node:fs/promises": typeof import("node:fs/promises");
+        "http": typeof import("http");
+        "node:http": typeof import("node:http");
+        "http2": typeof import("http2");
+        "node:http2": typeof import("node:http2");
+        "https": typeof import("https");
+        "node:https": typeof import("node:https");
+        "inspector": typeof import("inspector");
+        "node:inspector": typeof import("node:inspector");
+        "inspector/promises": typeof import("inspector/promises");
+        "node:inspector/promises": typeof import("node:inspector/promises");
+        "module": typeof import("module");
+        "node:module": typeof import("node:module");
+        "net": typeof import("net");
+        "node:net": typeof import("node:net");
+        "os": typeof import("os");
+        "node:os": typeof import("node:os");
+        "path": typeof import("path");
+        "node:path": typeof import("node:path");
+        "path/posix": typeof import("path/posix");
+        "node:path/posix": typeof import("node:path/posix");
+        "path/win32": typeof import("path/win32");
+        "node:path/win32": typeof import("node:path/win32");
+        "perf_hooks": typeof import("perf_hooks");
+        "node:perf_hooks": typeof import("node:perf_hooks");
+        "process": typeof import("process");
+        "node:process": typeof import("node:process");
+        "punycode": typeof import("punycode");
+        "node:punycode": typeof import("node:punycode");
+        "querystring": typeof import("querystring");
+        "node:querystring": typeof import("node:querystring");
+        "node:quic": typeof import("node:quic");
+        "readline": typeof import("readline");
+        "node:readline": typeof import("node:readline");
+        "readline/promises": typeof import("readline/promises");
+        "node:readline/promises": typeof import("node:readline/promises");
+        "repl": typeof import("repl");
+        "node:repl": typeof import("node:repl");
+        "node:sea": typeof import("node:sea");
+        "node:sqlite": typeof import("node:sqlite");
+        "stream": typeof import("stream");
+        "node:stream": typeof import("node:stream");
+        "stream/consumers": typeof import("stream/consumers");
+        "node:stream/consumers": typeof import("node:stream/consumers");
+        "stream/promises": typeof import("stream/promises");
+        "node:stream/promises": typeof import("node:stream/promises");
+        "stream/web": typeof import("stream/web");
+        "node:stream/web": typeof import("node:stream/web");
+        "string_decoder": typeof import("string_decoder");
+        "node:string_decoder": typeof import("node:string_decoder");
+        "node:test": typeof import("node:test");
+        "node:test/reporters": typeof import("node:test/reporters");
+        "timers": typeof import("timers");
+        "node:timers": typeof import("node:timers");
+        "timers/promises": typeof import("timers/promises");
+        "node:timers/promises": typeof import("node:timers/promises");
+        "tls": typeof import("tls");
+        "node:tls": typeof import("node:tls");
+        "trace_events": typeof import("trace_events");
+        "node:trace_events": typeof import("node:trace_events");
+        "tty": typeof import("tty");
+        "node:tty": typeof import("node:tty");
+        "url": typeof import("url");
+        "node:url": typeof import("node:url");
+        "util": typeof import("util");
+        "node:util": typeof import("node:util");
+        "util/types": typeof import("util/types");
+        "node:util/types": typeof import("node:util/types");
+        "v8": typeof import("v8");
+        "node:v8": typeof import("node:v8");
+        "vm": typeof import("vm");
+        "node:vm": typeof import("node:vm");
+        "wasi": typeof import("wasi");
+        "node:wasi": typeof import("node:wasi");
+        "worker_threads": typeof import("worker_threads");
+        "node:worker_threads": typeof import("node:worker_threads");
+        "zlib": typeof import("zlib");
+        "node:zlib": typeof import("node:zlib");
+    }
+    type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] };
+    interface ProcessEventMap extends SignalsEventMap {
+        "beforeExit": [code: number];
+        "disconnect": [];
+        "exit": [code: number];
+        "message": [
+            message: object | boolean | number | string | null,
+            sendHandle: SendHandle | undefined,
+        ];
+        "rejectionHandled": [promise: Promise<unknown>];
+        "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
+        "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
+        "unhandledRejection": [reason: unknown, promise: Promise<unknown>];
+        "warning": [warning: Error];
+        "worker": [worker: Worker];
+        "workerMessage": [value: any, source: number];
+    }
+    global {
+        var process: NodeJS.Process;
+        namespace process {
+            export { ProcessEventMap };
+        }
+        namespace NodeJS {
+            // this namespace merge is here because these are specifically used
+            // as the type for process.stdin, process.stdout, and process.stderr.
+            // they can't live in tty.d.ts because we need to disambiguate the imported name.
+            interface ReadStream extends tty.ReadStream {}
+            interface WriteStream extends tty.WriteStream {}
+            interface MemoryUsageFn {
+                /**
+                 * The `process.memoryUsage()` method iterate over each page to gather informations about memory
+                 * usage which can be slow depending on the program memory allocations.
+                 */
+                (): MemoryUsage;
+                /**
+                 * method returns an integer representing the Resident Set Size (RSS) in bytes.
+                 */
+                rss(): number;
+            }
+            interface MemoryUsage {
+                /**
+                 * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the
+                 * process, including all C++ and JavaScript objects and code.
+                 */
+                rss: number;
+                /**
+                 * Refers to V8's memory usage.
+                 */
+                heapTotal: number;
+                /**
+                 * Refers to V8's memory usage.
+                 */
+                heapUsed: number;
+                external: number;
+                /**
+                 * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included
+                 * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s
+                 * may not be tracked in that case.
+                 */
+                arrayBuffers: number;
+            }
+            interface CpuUsage {
+                user: number;
+                system: number;
+            }
+            interface ProcessRelease {
+                name: string;
+                sourceUrl?: string | undefined;
+                headersUrl?: string | undefined;
+                libUrl?: string | undefined;
+                lts?: string | undefined;
+            }
+            interface ProcessFeatures {
+                /**
+                 * A boolean value that is `true` if the current Node.js build is caching builtin modules.
+                 * @since v12.0.0
+                 */
+                readonly cached_builtins: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build is a debug build.
+                 * @since v0.5.5
+                 */
+                readonly debug: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes the inspector.
+                 * @since v11.10.0
+                 */
+                readonly inspector: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for IPv6.
+                 *
+                 * Since all Node.js builds have IPv6 support, this value is always `true`.
+                 * @since v0.5.3
+                 * @deprecated This property is always true, and any checks based on it are redundant.
+                 */
+                readonly ipv6: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build supports
+                 * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v25.x/api/modules.md#loading-ecmascript-modules-using-require).
+                 * @since v22.10.0
+                 */
+                readonly require_module: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for TLS.
+                 * @since v0.5.3
+                 */
+                readonly tls: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS.
+                 *
+                 * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support.
+                 * This value is therefore identical to that of `process.features.tls`.
+                 * @since v4.8.0
+                 * @deprecated Use `process.features.tls` instead.
+                 */
+                readonly tls_alpn: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS.
+                 *
+                 * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support.
+                 * This value is therefore identical to that of `process.features.tls`.
+                 * @since v0.11.13
+                 * @deprecated Use `process.features.tls` instead.
+                 */
+                readonly tls_ocsp: boolean;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS.
+                 *
+                 * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support.
+                 * This value is therefore identical to that of `process.features.tls`.
+                 * @since v0.5.3
+                 * @deprecated Use `process.features.tls` instead.
+                 */
+                readonly tls_sni: boolean;
+                /**
+                 * A value that is `"strip"` by default,
+                 * `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
+                 * Node.js is run with `--no-strip-types`.
+                 * @since v22.10.0
+                 */
+                readonly typescript: "strip" | "transform" | false;
+                /**
+                 * A boolean value that is `true` if the current Node.js build includes support for libuv.
+                 *
+                 * Since it's not possible to build Node.js without libuv, this value is always `true`.
+                 * @since v0.5.3
+                 * @deprecated This property is always true, and any checks based on it are redundant.
+                 */
+                readonly uv: boolean;
+            }
+            interface ProcessVersions extends Dict<string> {
+                http_parser: string;
+                node: string;
+                v8: string;
+                ares: string;
+                uv: string;
+                zlib: string;
+                modules: string;
+                openssl: string;
+            }
+            type Platform =
+                | "aix"
+                | "android"
+                | "darwin"
+                | "freebsd"
+                | "haiku"
+                | "linux"
+                | "openbsd"
+                | "sunos"
+                | "win32"
+                | "cygwin"
+                | "netbsd";
+            type Architecture =
+                | "arm"
+                | "arm64"
+                | "ia32"
+                | "loong64"
+                | "mips"
+                | "mipsel"
+                | "ppc64"
+                | "riscv64"
+                | "s390x"
+                | "x64";
+            type Signals =
+                | "SIGABRT"
+                | "SIGALRM"
+                | "SIGBUS"
+                | "SIGCHLD"
+                | "SIGCONT"
+                | "SIGFPE"
+                | "SIGHUP"
+                | "SIGILL"
+                | "SIGINT"
+                | "SIGIO"
+                | "SIGIOT"
+                | "SIGKILL"
+                | "SIGPIPE"
+                | "SIGPOLL"
+                | "SIGPROF"
+                | "SIGPWR"
+                | "SIGQUIT"
+                | "SIGSEGV"
+                | "SIGSTKFLT"
+                | "SIGSTOP"
+                | "SIGSYS"
+                | "SIGTERM"
+                | "SIGTRAP"
+                | "SIGTSTP"
+                | "SIGTTIN"
+                | "SIGTTOU"
+                | "SIGUNUSED"
+                | "SIGURG"
+                | "SIGUSR1"
+                | "SIGUSR2"
+                | "SIGVTALRM"
+                | "SIGWINCH"
+                | "SIGXCPU"
+                | "SIGXFSZ"
+                | "SIGBREAK"
+                | "SIGLOST"
+                | "SIGINFO";
+            type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['beforeExit']) => { ... };
+             * ```
+             */
+            type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['disconnect']) => { ... };
+             * ```
+             */
+            type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['exit']) => { ... };
+             * ```
+             */
+            type ExitListener = (...args: ProcessEventMap["exit"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['message']) => { ... };
+             * ```
+             */
+            type MessageListener = (...args: ProcessEventMap["message"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... };
+             * ```
+             */
+            type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             */
+            type SignalsListener = (signal: Signals) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... };
+             * ```
+             */
+            type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... };
+             * ```
+             */
+            type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['warning']) => { ... };
+             * ```
+             */
+            type WarningListener = (...args: ProcessEventMap["warning"]) => void;
+            /**
+             * @deprecated Global listener types will be removed in a future version.
+             * Callbacks passed directly to `process`'s EventEmitter methods
+             * have their parameter types inferred automatically.
+             *
+             * `process` event types are also available via `ProcessEventMap`:
+             *
+             * ```ts
+             * import type { ProcessEventMap } from 'node:process';
+             * const listener = (...args: ProcessEventMap['worker']) => { ... };
+             * ```
+             */
+            type WorkerListener = (...args: ProcessEventMap["worker"]) => void;
+            interface Socket extends ReadWriteStream {
+                isTTY?: true | undefined;
+            }
+            // Alias for compatibility
+            interface ProcessEnv extends Dict<string> {}
+            interface HRTime {
+                /**
+                 * This is the legacy version of {@link process.hrtime.bigint()}
+                 * before bigint was introduced in JavaScript.
+                 *
+                 * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`,
+                 * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision.
+                 *
+                 * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time.
+                 * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown.
+                 * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior.
+                 *
+                 * These times are relative to an arbitrary time in the past,
+                 * and not related to the time of day and therefore not subject to clock drift.
+                 * The primary use is for measuring performance between intervals:
+                 * ```js
+                 * const { hrtime } = require('node:process');
+                 * const NS_PER_SEC = 1e9;
+                 * const time = hrtime();
+                 * // [ 1800216, 25 ]
+                 *
+                 * setTimeout(() => {
+                 *   const diff = hrtime(time);
+                 *   // [ 1, 552 ]
+                 *
+                 *   console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);
+                 *   // Benchmark took 1000000552 nanoseconds
+                 * }, 1000);
+                 * ```
+                 * @since 0.7.6
+                 * @legacy Use {@link process.hrtime.bigint()} instead.
+                 * @param time The result of a previous call to `process.hrtime()`
+                 */
+                (time?: [number, number]): [number, number];
+                /**
+                 * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`.
+                 *
+                 * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s.
+                 * ```js
+                 * import { hrtime } from 'node:process';
+                 *
+                 * const start = hrtime.bigint();
+                 * // 191051479007711n
+                 *
+                 * setTimeout(() => {
+                 *   const end = hrtime.bigint();
+                 *   // 191052633396993n
+                 *
+                 *   console.log(`Benchmark took ${end - start} nanoseconds`);
+                 *   // Benchmark took 1154389282 nanoseconds
+                 * }, 1000);
+                 * ```
+                 * @since v10.7.0
+                 */
+                bigint(): bigint;
+            }
+            interface ProcessPermission {
+                /**
+                 * Verifies that the process is able to access the given scope and reference.
+                 * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')`
+                 * will check if the process has ALL file system read permissions.
+                 *
+                 * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders.
+                 *
+                 * The available scopes are:
+                 *
+                 * * `fs` - All File System
+                 * * `fs.read` - File System read operations
+                 * * `fs.write` - File System write operations
+                 * * `child` - Child process spawning operations
+                 * * `worker` - Worker thread spawning operation
+                 *
+                 * ```js
+                 * // Check if the process has permission to read the README file
+                 * process.permission.has('fs.read', './README.md');
+                 * // Check if the process has read permission operations
+                 * process.permission.has('fs.read');
+                 * ```
+                 * @since v20.0.0
+                 */
+                has(scope: string, reference?: string): boolean;
+            }
+            interface ProcessReport {
+                /**
+                 * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems
+                 * than the default multi-line format designed for human consumption.
+                 * @since v13.12.0, v12.17.0
+                 */
+                compact: boolean;
+                /**
+                 * Directory where the report is written.
+                 * The default value is the empty string, indicating that reports are written to the current
+                 * working directory of the Node.js process.
+                 */
+                directory: string;
+                /**
+                 * Filename where the report is written. If set to the empty string, the output filename will be comprised
+                 * of a timestamp, PID, and sequence number. The default value is the empty string.
+                 */
+                filename: string;
+                /**
+                 * Returns a JavaScript Object representation of a diagnostic report for the running process.
+                 * The report's JavaScript stack trace is taken from `err`, if present.
+                 */
+                getReport(err?: Error): object;
+                /**
+                 * If true, a diagnostic report is generated on fatal errors,
+                 * such as out of memory errors or failed C++ assertions.
+                 * @default false
+                 */
+                reportOnFatalError: boolean;
+                /**
+                 * If true, a diagnostic report is generated when the process
+                 * receives the signal specified by process.report.signal.
+                 * @default false
+                 */
+                reportOnSignal: boolean;
+                /**
+                 * If true, a diagnostic report is generated on uncaught exception.
+                 * @default false
+                 */
+                reportOnUncaughtException: boolean;
+                /**
+                 * If true, a diagnostic report is generated without the environment variables.
+                 * @default false
+                 */
+                excludeEnv: boolean;
+                /**
+                 * The signal used to trigger the creation of a diagnostic report.
+                 * @default 'SIGUSR2'
+                 */
+                signal: Signals;
+                /**
+                 * Writes a diagnostic report to a file. If filename is not provided, the default filename
+                 * includes the date, time, PID, and a sequence number.
+                 * The report's JavaScript stack trace is taken from `err`, if present.
+                 *
+                 * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written
+                 * to the stdout or stderr of the process respectively.
+                 * @param fileName Name of the file where the report is written.
+                 * This should be a relative path, that will be appended to the directory specified in
+                 * `process.report.directory`, or the current working directory of the Node.js process,
+                 * if unspecified.
+                 * @param err A custom error used for reporting the JavaScript stack.
+                 * @return Filename of the generated report.
+                 */
+                writeReport(fileName?: string, err?: Error): string;
+                writeReport(err?: Error): string;
+            }
+            interface ResourceUsage {
+                fsRead: number;
+                fsWrite: number;
+                involuntaryContextSwitches: number;
+                ipcReceived: number;
+                ipcSent: number;
+                majorPageFault: number;
+                maxRSS: number;
+                minorPageFault: number;
+                sharedMemorySize: number;
+                signalsCount: number;
+                swappedOut: number;
+                systemCPUTime: number;
+                unsharedDataSize: number;
+                unsharedStackSize: number;
+                userCPUTime: number;
+                voluntaryContextSwitches: number;
+            }
+            interface EmitWarningOptions {
+                /**
+                 * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
+                 *
+                 * @default 'Warning'
+                 */
+                type?: string | undefined;
+                /**
+                 * A unique identifier for the warning instance being emitted.
+                 */
+                code?: string | undefined;
+                /**
+                 * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
+                 *
+                 * @default process.emitWarning
+                 */
+                ctor?: Function | undefined;
+                /**
+                 * Additional text to include with the error.
+                 */
+                detail?: string | undefined;
+            }
+            interface ProcessConfig {
+                readonly target_defaults: {
+                    readonly cflags: any[];
+                    readonly default_configuration: string;
+                    readonly defines: string[];
+                    readonly include_dirs: string[];
+                    readonly libraries: string[];
+                };
+                readonly variables: {
+                    readonly clang: number;
+                    readonly host_arch: string;
+                    readonly node_install_npm: boolean;
+                    readonly node_install_waf: boolean;
+                    readonly node_prefix: string;
+                    readonly node_shared_openssl: boolean;
+                    readonly node_shared_v8: boolean;
+                    readonly node_shared_zlib: boolean;
+                    readonly node_use_dtrace: boolean;
+                    readonly node_use_etw: boolean;
+                    readonly node_use_openssl: boolean;
+                    readonly target_arch: string;
+                    readonly v8_no_strict_aliasing: number;
+                    readonly v8_use_snapshot: boolean;
+                    readonly visibility: string;
+                };
+            }
+            interface Process extends EventEmitter {
+                /**
+                 * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
+                 * a `Writable` stream.
+                 *
+                 * For example, to copy `process.stdin` to `process.stdout`:
+                 *
+                 * ```js
+                 * import { stdin, stdout } from 'node:process';
+                 *
+                 * stdin.pipe(stdout);
+                 * ```
+                 *
+                 * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+                 */
+                stdout: WriteStream & {
+                    fd: 1;
+                };
+                /**
+                 * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
+                 * a `Writable` stream.
+                 *
+                 * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
+                 */
+                stderr: WriteStream & {
+                    fd: 2;
+                };
+                /**
+                 * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
+                 * a `Readable` stream.
+                 *
+                 * For details of how to read from `stdin` see `readable.read()`.
+                 *
+                 * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
+                 * is compatible with scripts written for Node.js prior to v0.10\.
+                 * For more information see `Stream compatibility`.
+                 *
+                 * In "old" streams mode the `stdin` stream is paused by default, so one
+                 * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode.
+                 */
+                stdin: ReadStream & {
+                    fd: 0;
+                };
+                /**
+                 * The `process.argv` property returns an array containing the command-line
+                 * arguments passed when the Node.js process was launched. The first element will
+                 * be {@link execPath}. See `process.argv0` if access to the original value
+                 * of `argv[0]` is needed. The second element will be the path to the JavaScript
+                 * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v25.x/api/cli.html#program-entry-point) was provided, the second element
+                 * will be the absolute path to it. The remaining elements are additional command-line
+                 * arguments.
+                 *
+                 * For example, assuming the following script for `process-args.js`:
+                 *
+                 * ```js
+                 * import { argv } from 'node:process';
+                 *
+                 * // print process.argv
+                 * argv.forEach((val, index) => {
+                 *   console.log(`${index}: ${val}`);
+                 * });
+                 * ```
+                 *
+                 * Launching the Node.js process as:
+                 *
+                 * ```bash
+                 * node process-args.js one two=three four
+                 * ```
+                 *
+                 * Would generate the output:
+                 *
+                 * ```text
+                 * 0: /usr/local/bin/node
+                 * 1: /Users/mjr/work/node/process-args.js
+                 * 2: one
+                 * 3: two=three
+                 * 4: four
+                 * ```
+                 * @since v0.1.27
+                 */
+                argv: string[];
+                /**
+                 * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
+                 *
+                 * ```console
+                 * $ bash -c 'exec -a customArgv0 ./node'
+                 * > process.argv[0]
+                 * '/Volumes/code/external/node/out/Release/node'
+                 * > process.argv0
+                 * 'customArgv0'
+                 * ```
+                 * @since v6.4.0
+                 */
+                argv0: string;
+                /**
+                 * The `process.execArgv` property returns the set of Node.js-specific command-line
+                 * options passed when the Node.js process was launched. These options do not
+                 * appear in the array returned by the {@link argv} property, and do not
+                 * include the Node.js executable, the name of the script, or any options following
+                 * the script name. These options are useful in order to spawn child processes with
+                 * the same execution environment as the parent.
+                 *
+                 * ```bash
+                 * node --icu-data-dir=./foo --require ./bar.js script.js --version
+                 * ```
+                 *
+                 * Results in `process.execArgv`:
+                 *
+                 * ```js
+                 * ["--icu-data-dir=./foo", "--require", "./bar.js"]
+                 * ```
+                 *
+                 * And `process.argv`:
+                 *
+                 * ```js
+                 * ['/usr/local/bin/node', 'script.js', '--version']
+                 * ```
+                 *
+                 * Refer to `Worker constructor` for the detailed behavior of worker
+                 * threads with this property.
+                 * @since v0.7.7
+                 */
+                execArgv: string[];
+                /**
+                 * The `process.execPath` property returns the absolute pathname of the executable
+                 * that started the Node.js process. Symbolic links, if any, are resolved.
+                 *
+                 * ```js
+                 * '/usr/local/bin/node'
+                 * ```
+                 * @since v0.1.100
+                 */
+                execPath: string;
+                /**
+                 * The `process.abort()` method causes the Node.js process to exit immediately and
+                 * generate a core file.
+                 *
+                 * This feature is not available in `Worker` threads.
+                 * @since v0.7.0
+                 */
+                abort(): never;
+                /**
+                 * The `process.chdir()` method changes the current working directory of the
+                 * Node.js process or throws an exception if doing so fails (for instance, if
+                 * the specified `directory` does not exist).
+                 *
+                 * ```js
+                 * import { chdir, cwd } from 'node:process';
+                 *
+                 * console.log(`Starting directory: ${cwd()}`);
+                 * try {
+                 *   chdir('/tmp');
+                 *   console.log(`New directory: ${cwd()}`);
+                 * } catch (err) {
+                 *   console.error(`chdir: ${err}`);
+                 * }
+                 * ```
+                 *
+                 * This feature is not available in `Worker` threads.
+                 * @since v0.1.17
+                 */
+                chdir(directory: string): void;
+                /**
+                 * The `process.cwd()` method returns the current working directory of the Node.js
+                 * process.
+                 *
+                 * ```js
+                 * import { cwd } from 'node:process';
+                 *
+                 * console.log(`Current directory: ${cwd()}`);
+                 * ```
+                 * @since v0.1.8
+                 */
+                cwd(): string;
+                /**
+                 * The port used by the Node.js debugger when enabled.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * process.debugPort = 5858;
+                 * ```
+                 * @since v0.7.2
+                 */
+                debugPort: number;
+                /**
+                 * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and
+                 * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
+                 * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
+                 *
+                 * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v25.x/api/os.html#dlopen-constants)`
+                 * documentation for details.
+                 *
+                 * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
+                 * are then accessible via `module.exports`.
+                 *
+                 * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant.
+                 * In this example the constant is assumed to be available.
+                 *
+                 * ```js
+                 * import { dlopen } from 'node:process';
+                 * import { constants } from 'node:os';
+                 * import { fileURLToPath } from 'node:url';
+                 *
+                 * const module = { exports: {} };
+                 * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)),
+                 *        constants.dlopen.RTLD_NOW);
+                 * module.exports.foo();
+                 * ```
+                 */
+                dlopen(module: object, filename: string, flags?: number): void;
+                /**
+                 * The `process.emitWarning()` method can be used to emit custom or application
+                 * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
+                 *
+                 * ```js
+                 * import { emitWarning } from 'node:process';
+                 *
+                 * // Emit a warning using a string.
+                 * emitWarning('Something happened!');
+                 * // Emits: (node: 56338) Warning: Something happened!
+                 * ```
+                 *
+                 * ```js
+                 * import { emitWarning } from 'node:process';
+                 *
+                 * // Emit a warning using a string and a type.
+                 * emitWarning('Something Happened!', 'CustomWarning');
+                 * // Emits: (node:56338) CustomWarning: Something Happened!
+                 * ```
+                 *
+                 * ```js
+                 * import { emitWarning } from 'node:process';
+                 *
+                 * emitWarning('Something happened!', 'CustomWarning', 'WARN001');
+                 * // Emits: (node:56338) [WARN001] CustomWarning: Something happened!
+                 * ```js
+                 *
+                 * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * process.on('warning', (warning) => {
+                 *   console.warn(warning.name);    // 'Warning'
+                 *   console.warn(warning.message); // 'Something happened!'
+                 *   console.warn(warning.code);    // 'MY_WARNING'
+                 *   console.warn(warning.stack);   // Stack trace
+                 *   console.warn(warning.detail);  // 'This is some additional information'
+                 * });
+                 * ```
+                 *
+                 * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler
+                 * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored):
+                 *
+                 * ```js
+                 * import { emitWarning } from 'node:process';
+                 *
+                 * // Emit a warning using an Error object.
+                 * const myWarning = new Error('Something happened!');
+                 * // Use the Error name property to specify the type name
+                 * myWarning.name = 'CustomWarning';
+                 * myWarning.code = 'WARN001';
+                 *
+                 * emitWarning(myWarning);
+                 * // Emits: (node:56338) [WARN001] CustomWarning: Something happened!
+                 * ```
+                 *
+                 * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object.
+                 *
+                 * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms.
+                 *
+                 * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`:
+                 * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event.
+                 * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed.
+                 * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace.
+                 * @since v8.0.0
+                 * @param warning The warning to emit.
+                 */
+                emitWarning(warning: string | Error, ctor?: Function): void;
+                emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
+                emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
+                emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
+                /**
+                 * The `process.env` property returns an object containing the user environment.
+                 * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
+                 *
+                 * An example of this object looks like:
+                 *
+                 * ```js
+                 * {
+                 *   TERM: 'xterm-256color',
+                 *   SHELL: '/usr/local/bin/bash',
+                 *   USER: 'maciej',
+                 *   PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
+                 *   PWD: '/Users/maciej',
+                 *   EDITOR: 'vim',
+                 *   SHLVL: '1',
+                 *   HOME: '/Users/maciej',
+                 *   LOGNAME: 'maciej',
+                 *   _: '/usr/local/bin/node'
+                 * }
+                 * ```
+                 *
+                 * It is possible to modify this object, but such modifications will not be
+                 * reflected outside the Node.js process, or (unless explicitly requested)
+                 * to other `Worker` threads.
+                 * In other words, the following example would not work:
+                 *
+                 * ```bash
+                 * node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
+                 * ```
+                 *
+                 * While the following will:
+                 *
+                 * ```js
+                 * import { env } from 'node:process';
+                 *
+                 * env.foo = 'bar';
+                 * console.log(env.foo);
+                 * ```
+                 *
+                 * Assigning a property on `process.env` will implicitly convert the value
+                 * to a string. **This behavior is deprecated.** Future versions of Node.js may
+                 * throw an error when the value is not a string, number, or boolean.
+                 *
+                 * ```js
+                 * import { env } from 'node:process';
+                 *
+                 * env.test = null;
+                 * console.log(env.test);
+                 * // => 'null'
+                 * env.test = undefined;
+                 * console.log(env.test);
+                 * // => 'undefined'
+                 * ```
+                 *
+                 * Use `delete` to delete a property from `process.env`.
+                 *
+                 * ```js
+                 * import { env } from 'node:process';
+                 *
+                 * env.TEST = 1;
+                 * delete env.TEST;
+                 * console.log(env.TEST);
+                 * // => undefined
+                 * ```
+                 *
+                 * On Windows operating systems, environment variables are case-insensitive.
+                 *
+                 * ```js
+                 * import { env } from 'node:process';
+                 *
+                 * env.TEST = 1;
+                 * console.log(env.test);
+                 * // => 1
+                 * ```
+                 *
+                 * Unless explicitly specified when creating a `Worker` instance,
+                 * each `Worker` thread has its own copy of `process.env`, based on its
+                 * parent thread's `process.env`, or whatever was specified as the `env` option
+                 * to the `Worker` constructor. Changes to `process.env` will not be visible
+                 * across `Worker` threads, and only the main thread can make changes that
+                 * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner
+                 * unlike the main thread.
+                 * @since v0.1.27
+                 */
+                env: ProcessEnv;
+                /**
+                 * The `process.exit()` method instructs Node.js to terminate the process
+                 * synchronously with an exit status of `code`. If `code` is omitted, exit uses
+                 * either the 'success' code `0` or the value of `process.exitCode` if it has been
+                 * set. Node.js will not terminate until all the `'exit'` event listeners are
+                 * called.
+                 *
+                 * To exit with a 'failure' code:
+                 *
+                 * ```js
+                 * import { exit } from 'node:process';
+                 *
+                 * exit(1);
+                 * ```
+                 *
+                 * The shell that executed Node.js should see the exit code as `1`.
+                 *
+                 * Calling `process.exit()` will force the process to exit as quickly as possible
+                 * even if there are still asynchronous operations pending that have not yet
+                 * completed fully, including I/O operations to `process.stdout` and `process.stderr`.
+                 *
+                 * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_
+                 * _work pending_ in the event loop. The `process.exitCode` property can be set to
+                 * tell the process which exit code to use when the process exits gracefully.
+                 *
+                 * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being
+                 * truncated and lost:
+                 *
+                 * ```js
+                 * import { exit } from 'node:process';
+                 *
+                 * // This is an example of what *not* to do:
+                 * if (someConditionNotMet()) {
+                 *   printUsageToStdout();
+                 *   exit(1);
+                 * }
+                 * ```
+                 *
+                 * The reason this is problematic is because writes to `process.stdout` in Node.js
+                 * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
+                 * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
+                 *
+                 * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding
+                 * scheduling any additional work for the event loop:
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * // How to properly set the exit code while letting
+                 * // the process exit gracefully.
+                 * if (someConditionNotMet()) {
+                 *   printUsageToStdout();
+                 *   process.exitCode = 1;
+                 * }
+                 * ```
+                 *
+                 * If it is necessary to terminate the Node.js process due to an error condition,
+                 * throwing an _uncaught_ error and allowing the process to terminate accordingly
+                 * is safer than calling `process.exit()`.
+                 *
+                 * In `Worker` threads, this function stops the current thread rather
+                 * than the current process.
+                 * @since v0.1.13
+                 * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
+                 */
+                exit(code?: number | string | null): never;
+                /**
+                 * A number which will be the process exit code, when the process either
+                 * exits gracefully, or is exited via {@link exit} without specifying
+                 * a code.
+                 *
+                 * Specifying a code to {@link exit} will override any
+                 * previous setting of `process.exitCode`.
+                 * @default undefined
+                 * @since v0.11.8
+                 */
+                exitCode: number | string | null | undefined;
+                finalization: {
+                    /**
+                     * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
+                     * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit.
+                     *
+                     * Inside the callback you can release the resources allocated by the `ref` object.
+                     * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function,
+                     * this means that there is a possibility that the callback will not be called under special circumstances.
+                     *
+                     * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used.
+                     * @param ref The reference to the resource that is being tracked.
+                     * @param callback The callback function to be called when the resource is finalized.
+                     * @since v22.5.0
+                     * @experimental
+                     */
+                    register<T extends object>(ref: T, callback: (ref: T, event: "exit") => void): void;
+                    /**
+                     * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected.
+                     *
+                     * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances.
+                     * @param ref The reference to the resource that is being tracked.
+                     * @param callback The callback function to be called when the resource is finalized.
+                     * @since v22.5.0
+                     * @experimental
+                     */
+                    registerBeforeExit<T extends object>(ref: T, callback: (ref: T, event: "beforeExit") => void): void;
+                    /**
+                     * This function remove the register of the object from the finalization registry, so the callback will not be called anymore.
+                     * @param ref The reference to the resource that was registered previously.
+                     * @since v22.5.0
+                     * @experimental
+                     */
+                    unregister(ref: object): void;
+                };
+                /**
+                 * The `process.getActiveResourcesInfo()` method returns an array of strings containing
+                 * the types of the active resources that are currently keeping the event loop alive.
+                 *
+                 * ```js
+                 * import { getActiveResourcesInfo } from 'node:process';
+                 * import { setTimeout } from 'node:timers';
+
+                 * console.log('Before:', getActiveResourcesInfo());
+                 * setTimeout(() => {}, 1000);
+                 * console.log('After:', getActiveResourcesInfo());
+                 * // Prints:
+                 * //   Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ]
+                 * //   After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ]
+                 * ```
+                 * @since v17.3.0, v16.14.0
+                 */
+                getActiveResourcesInfo(): string[];
+                /**
+                 * Provides a way to load built-in modules in a globally available function.
+                 * @param id ID of the built-in module being requested.
+                 */
+                getBuiltinModule<ID extends keyof BuiltInModule>(id: ID): BuiltInModule[ID];
+                getBuiltinModule(id: string): object | undefined;
+                /**
+                 * The `process.getgid()` method returns the numerical group identity of the
+                 * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getgid) {
+                 *   console.log(`Current gid: ${process.getgid()}`);
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * @since v0.1.31
+                 */
+                getgid?: () => number;
+                /**
+                 * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
+                 * numeric ID or a group name
+                 * string. If a group name is specified, this method blocks while resolving the
+                 * associated numeric ID.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getgid &#x26;&#x26; process.setgid) {
+                 *   console.log(`Current gid: ${process.getgid()}`);
+                 *   try {
+                 *     process.setgid(501);
+                 *     console.log(`New gid: ${process.getgid()}`);
+                 *   } catch (err) {
+                 *     console.log(`Failed to set gid: ${err}`);
+                 *   }
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * This feature is not available in `Worker` threads.
+                 * @since v0.1.31
+                 * @param id The group name or ID
+                 */
+                setgid?: (id: number | string) => void;
+                /**
+                 * The `process.getuid()` method returns the numeric user identity of the process.
+                 * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getuid) {
+                 *   console.log(`Current uid: ${process.getuid()}`);
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * @since v0.1.28
+                 */
+                getuid?: () => number;
+                /**
+                 * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
+                 * numeric ID or a username string.
+                 * If a username is specified, the method blocks while resolving the associated
+                 * numeric ID.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getuid &#x26;&#x26; process.setuid) {
+                 *   console.log(`Current uid: ${process.getuid()}`);
+                 *   try {
+                 *     process.setuid(501);
+                 *     console.log(`New uid: ${process.getuid()}`);
+                 *   } catch (err) {
+                 *     console.log(`Failed to set uid: ${err}`);
+                 *   }
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * This feature is not available in `Worker` threads.
+                 * @since v0.1.28
+                 */
+                setuid?: (id: number | string) => void;
+                /**
+                 * The `process.geteuid()` method returns the numerical effective user identity of
+                 * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.geteuid) {
+                 *   console.log(`Current uid: ${process.geteuid()}`);
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * @since v2.0.0
+                 */
+                geteuid?: () => number;
+                /**
+                 * The `process.seteuid()` method sets the effective user identity of the process.
+                 * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
+                 * string. If a username is specified, the method blocks while resolving the
+                 * associated numeric ID.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.geteuid &#x26;&#x26; process.seteuid) {
+                 *   console.log(`Current uid: ${process.geteuid()}`);
+                 *   try {
+                 *     process.seteuid(501);
+                 *     console.log(`New uid: ${process.geteuid()}`);
+                 *   } catch (err) {
+                 *     console.log(`Failed to set uid: ${err}`);
+                 *   }
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * This feature is not available in `Worker` threads.
+                 * @since v2.0.0
+                 * @param id A user name or ID
+                 */
+                seteuid?: (id: number | string) => void;
+                /**
+                 * The `process.getegid()` method returns the numerical effective group identity
+                 * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getegid) {
+                 *   console.log(`Current gid: ${process.getegid()}`);
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * @since v2.0.0
+                 */
+                getegid?: () => number;
+                /**
+                 * The `process.setegid()` method sets the effective group identity of the process.
+                 * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
+                 * name string. If a group name is specified, this method blocks while resolving
+                 * the associated a numeric ID.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getegid &#x26;&#x26; process.setegid) {
+                 *   console.log(`Current gid: ${process.getegid()}`);
+                 *   try {
+                 *     process.setegid(501);
+                 *     console.log(`New gid: ${process.getegid()}`);
+                 *   } catch (err) {
+                 *     console.log(`Failed to set gid: ${err}`);
+                 *   }
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * This feature is not available in `Worker` threads.
+                 * @since v2.0.0
+                 * @param id A group name or ID
+                 */
+                setegid?: (id: number | string) => void;
+                /**
+                 * The `process.getgroups()` method returns an array with the supplementary group
+                 * IDs. POSIX leaves it unspecified if the effective group ID is included but
+                 * Node.js ensures it always is.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getgroups) {
+                 *   console.log(process.getgroups()); // [ 16, 21, 297 ]
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * @since v0.9.4
+                 */
+                getgroups?: () => number[];
+                /**
+                 * The `process.setgroups()` method sets the supplementary group IDs for the
+                 * Node.js process. This is a privileged operation that requires the Node.js
+                 * process to have `root` or the `CAP_SETGID` capability.
+                 *
+                 * The `groups` array can contain numeric group IDs, group names, or both.
+                 *
+                 * ```js
+                 * import process from 'node:process';
+                 *
+                 * if (process.getgroups &#x26;&#x26; process.setgroups) {
+                 *   try {
+                 *     process.setgroups([501]);
+                 *     console.log(process.getgroups()); // new groups
+                 *   } catch (err) {
+                 *     console.log(`Failed to set groups: ${err}`);
+                 *   }
+                 * }
+                 * ```
+                 *
+                 * This function is only available on POSIX platforms (i.e. not Windows or
+                 * Android).
+                 * This feature is not available in `Worker` threads.
+                 * @since v0.9.4
+                 */
+                setgroups?: (groups: ReadonlyArray<string | number>) => void;
+                /**
+                 * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
+                 * that will be invoked when an uncaught exception occurs, which will receive the
+                 * exception value itself as its first argument.
+                 *
+                 * If such a function is set, the `'uncaughtException'` event will
+                 * not be emitted. If `--abort-on-uncaught-exception` was passed from the
+                 * command line or set through `v8.setFlagsFromString()`, the process will
+                 * not abort. Actions configured to take place on exceptions such as report
+                 * generations will be affected too
+                 *
+                 * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
+                 * method with a non-`null` argument while another capture function is set will
+                 * throw an error.
+                 *
+                 * Using this function is mutually exclusive with using the deprecated `domain` built-in module.
+                 * @since v9.3.0
+                 */
+                setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
+                /**
+                 * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
+                 * @since v9.3.0
+                 */
+                hasUncaughtExceptionCaptureCallback(): boolean;
+                /**
+                 * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled.
+                 * @since v20.7.0
+                 * @experimental
+                 */
+                readonly sourceMapsEnabled: boolean;
+                /**
+                 * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for
+                 * stack traces.
+                 *
+                 * It provides same features as launching Node.js process with commandline options `--enable-source-maps`.
+                 *
+                 * Only source maps in JavaScript files that are loaded after source maps has been
+                 * enabled will be parsed and loaded.
+                 * @since v16.6.0, v14.18.0
+                 * @experimental
+                 */
+                setSourceMapsEnabled(value: boolean): void;
+                /**
+                 * The `process.version` property contains the Node.js version string.
+                 *
+                 * ```js
+                 * import { version } from 'node:process';
+                 *
+                 * console.log(`Version: ${version}`);
+                 * // Version: v14.8.0
+                 * ```
+                 *
+                 * To get the version string without the prepended _v_, use`process.versions.node`.
+                 * @since v0.1.3
+                 */
+                readonly version: string;
+                /**
+                 * The `process.versions` property returns an object listing the version strings of
+                 * Node.js and its dependencies. `process.versions.modules` indicates the current
+                 * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
+                 * to load modules that were compiled against a different module ABI version.
+                 *
+                 * ```js
+                 * import { versions } from 'node:process';
+                 *
+                 * console.log(versions);
+                 * ```
+                 *
+                 * Will generate an object similar to:
+                 *
+                 * ```console
+                 * { node: '20.2.0',
+                 *   acorn: '8.8.2',
+                 *   ada: '2.4.0',
+                 *   ares: '1.19.0',
+                 *   base64: '0.5.0',
+                 *   brotli: '1.0.9',
+                 *   cjs_module_lexer: '1.2.2',
+                 *   cldr: '43.0',
+                 *   icu: '73.1',
+                 *   llhttp: '8.1.0',
+                 *   modules: '115',
+                 *   napi: '8',
+                 *   nghttp2: '1.52.0',
+                 *   nghttp3: '0.7.0',
+                 *   ngtcp2: '0.8.1',
+                 *   openssl: '3.0.8+quic',
+                 *   simdutf: '3.2.9',
+                 *   tz: '2023c',
+                 *   undici: '5.22.0',
+                 *   unicode: '15.0',
+                 *   uv: '1.44.2',
+                 *   uvwasi: '0.0.16',
+                 *   v8: '11.3.244.8-node.9',
+                 *   zlib: '1.2.13' }
+                 * ```
+                 * @since v0.2.0
+                 */
+                readonly versions: ProcessVersions;
+                /**
+                 * The `process.config` property returns a frozen `Object` containing the
+                 * JavaScript representation of the configure options used to compile the current
+                 * Node.js executable. This is the same as the `config.gypi` file that was produced
+                 * when running the `./configure` script.
+                 *
+                 * An example of the possible output looks like:
+                 *
+                 * ```js
+                 * {
+                 *   target_defaults:
+                 *    { cflags: [],
+                 *      default_configuration: 'Release',
+                 *      defines: [],
+                 *      include_dirs: [],
+                 *      libraries: [] },
+                 *   variables:
+                 *    {
+                 *      host_arch: 'x64',
+                 *      napi_build_version: 5,
+                 *      node_install_npm: 'true',
+                 *      node_prefix: '',
+                 *      node_shared_cares: 'false',
+                 *      node_shared_http_parser: 'false',
+                 *      node_shared_libuv: 'false',
+                 *      node_shared_zlib: 'false',
+                 *      node_use_openssl: 'true',
+                 *      node_shared_openssl: 'false',
+                 *      strict_aliasing: 'true',
+                 *      target_arch: 'x64',
+                 *      v8_use_snapshot: 1
+                 *    }
+                 * }
+                 * ```
+                 * @since v0.7.7
+                 */
+                readonly config: ProcessConfig;
+                /**
+                 * The `process.kill()` method sends the `signal` to the process identified by`pid`.
+                 *
+                 * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
+                 *
+                 * This method will throw an error if the target `pid` does not exist. As a special
+                 * case, a signal of `0` can be used to test for the existence of a process.
+                 * Windows platforms will throw an error if the `pid` is used to kill a process
+                 * group.
+                 *
+                 * Even though the name of this function is `process.kill()`, it is really just a
+                 * signal sender, like the `kill` system call. The signal sent may do something
+                 * other than kill the target process.
+                 *
+                 * ```js
+                 * import process, { kill } from 'node:process';
+                 *
+                 * process.on('SIGHUP', () => {
+                 *   console.log('Got SIGHUP signal.');
+                 * });
+                 *
+                 * setTimeout(() => {
+                 *   console.log('Exiting.');
+                 *   process.exit(0);
+                 * }, 100);
+                 *
+                 * kill(process.pid, 'SIGHUP');
+                 * ```
+                 *
+                 * When `SIGUSR1` is received by a Node.js process, Node.js will start the
+                 * debugger. See `Signal Events`.
+                 * @since v0.0.6
+                 * @param pid A process ID
+                 * @param [signal='SIGTERM'] The signal to send, either as a string or number.
+                 */
+                kill(pid: number, signal?: string | number): true;
+                /**
+                 * Loads the environment configuration from a `.env` file into `process.env`. If
+                 * the file is not found, error will be thrown.
+                 *
+                 * To load a specific .env file by specifying its path, use the following code:
+                 *
+                 * ```js
+                 * import { loadEnvFile } from 'node:process';
+                 *
+                 * loadEnvFile('./development.env')
+                 * ```
+                 * @since v20.12.0
+                 * @param path The path to the .env file
+                 */
+                loadEnvFile(path?: PathLike): void;
+                /**
+                 * The `process.pid` property returns the PID of the process.
+                 *
+                 * ```js
+                 * import { pid } from 'node:process';
+                 *
+                 * console.log(`This process is pid ${pid}`);
+                 * ```
+                 * @since v0.1.15
+                 */
+                readonly pid: number;
+                /**
+                 * The `process.ppid` property returns the PID of the parent of the
+                 * current process.
+                 *
+                 * ```js
+                 * import { ppid } from 'node:process';
+                 *
+                 * console.log(`The parent process is pid ${ppid}`);
+                 * ```
+                 * @since v9.2.0, v8.10.0, v6.13.0
+                 */
+                readonly ppid: number;
+                /**
+                 * The `process.threadCpuUsage()` method returns the user and system CPU time usage of
+                 * the current worker thread, in an object with properties `user` and `system`, whose
+                 * values are microsecond values (millionth of a second).
+                 *
+                 * The result of a previous call to `process.threadCpuUsage()` can be passed as the
+                 * argument to the function, to get a diff reading.
+                 * @since v23.9.0
+                 * @param previousValue A previous return value from calling
+                 * `process.threadCpuUsage()`
+                 */
+                threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
+                /**
+                 * The `process.title` property returns the current process title (i.e. returns
+                 * the current value of `ps`). Assigning a new value to `process.title` modifies
+                 * the current value of `ps`.
+                 *
+                 * When a new value is assigned, different platforms will impose different maximum
+                 * length restrictions on the title. Usually such restrictions are quite limited.
+                 * For instance, on Linux and macOS, `process.title` is limited to the size of the
+                 * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8
+                 * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure)
+                 * cases.
+                 *
+                 * Assigning a value to `process.title` might not result in an accurate label
+                 * within process manager applications such as macOS Activity Monitor or Windows
+                 * Services Manager.
+                 * @since v0.1.104
+                 */
+                title: string;
+                /**
+                 * The operating system CPU architecture for which the Node.js binary was compiled.
+                 * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
+                 * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
+                 *
+                 * ```js
+                 * import { arch } from 'node:process';
+                 *
+                 * console.log(`This processor architecture is ${arch}`);
+                 * ```
+                 * @since v0.5.0
+                 */
+                readonly arch: Architecture;
+                /**
+                 * The `process.platform` property returns a string identifying the operating
+                 * system platform for which the Node.js binary was compiled.
+                 *
+                 * Currently possible values are:
+                 *
+                 * * `'aix'`
+                 * * `'darwin'`
+                 * * `'freebsd'`
+                 * * `'linux'`
+                 * * `'openbsd'`
+                 * * `'sunos'`
+                 * * `'win32'`
+                 *
+                 * ```js
+                 * import { platform } from 'node:process';
+                 *
+                 * console.log(`This platform is ${platform}`);
+                 * ```
+                 *
+                 * The value `'android'` may also be returned if the Node.js is built on the
+                 * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
+                 * @since v0.1.16
+                 */
+                readonly platform: Platform;
+                /**
+                 * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
+                 * runtime, `require.main` may still refer to the original main module in
+                 * modules that were required before the change occurred. Generally, it's
+                 * safe to assume that the two refer to the same module.
+                 *
+                 * As with `require.main`, `process.mainModule` will be `undefined` if there
+                 * is no entry script.
+                 * @since v0.1.17
+                 * @deprecated Since v14.0.0 - Use `main` instead.
+                 */
+                mainModule?: Module;
+                memoryUsage: MemoryUsageFn;
+                /**
+                 * Gets the amount of memory available to the process (in bytes) based on
+                 * limits imposed by the OS. If there is no such constraint, or the constraint
+                 * is unknown, `0` is returned.
+                 *
+                 * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
+                 * information.
+                 * @since v19.6.0, v18.15.0
+                 */
+                constrainedMemory(): number;
+                /**
+                 * Gets the amount of free memory that is still available to the process (in bytes).
+                 * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v25.x/api/process.html#processavailablememory) for more information.
+                 * @since v20.13.0
+                 */
+                availableMemory(): number;
+                /**
+                 * The `process.cpuUsage()` method returns the user and system CPU time usage of
+                 * the current process, in an object with properties `user` and `system`, whose
+                 * values are microsecond values (millionth of a second). These values measure time
+                 * spent in user and system code respectively, and may end up being greater than
+                 * actual elapsed time if multiple CPU cores are performing work for this process.
+                 *
+                 * The result of a previous call to `process.cpuUsage()` can be passed as the
+                 * argument to the function, to get a diff reading.
+                 *
+                 * ```js
+                 * import { cpuUsage } from 'node:process';
+                 *
+                 * const startUsage = cpuUsage();
+                 * // { user: 38579, system: 6986 }
+                 *
+                 * // spin the CPU for 500 milliseconds
+                 * const now = Date.now();
+                 * while (Date.now() - now < 500);
+                 *
+                 * console.log(cpuUsage(startUsage));
+                 * // { user: 514883, system: 11226 }
+                 * ```
+                 * @since v6.1.0
+                 * @param previousValue A previous return value from calling `process.cpuUsage()`
+                 */
+                cpuUsage(previousValue?: CpuUsage): CpuUsage;
+                /**
+                 * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
+                 * fully drained after the current operation on the JavaScript stack runs to
+                 * completion and before the event loop is allowed to continue. It's possible to
+                 * create an infinite loop if one were to recursively call `process.nextTick()`.
+                 * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
+                 *
+                 * ```js
+                 * import { nextTick } from 'node:process';
+                 *
+                 * console.log('start');
+                 * nextTick(() => {
+                 *   console.log('nextTick callback');
+                 * });
+                 * console.log('scheduled');
+                 * // Output:
+                 * // start
+                 * // scheduled
+                 * // nextTick callback
+                 * ```
+                 *
+                 * This is important when developing APIs in order to give users the opportunity
+                 * to assign event handlers _after_ an object has been constructed but before any
+                 * I/O has occurred:
+                 *
+                 * ```js
+                 * import { nextTick } from 'node:process';
+                 *
+                 * function MyThing(options) {
+                 *   this.setupOptions(options);
+                 *
+                 *   nextTick(() => {
+                 *     this.startDoingStuff();
+                 *   });
+                 * }
+                 *
+                 * const thing = new MyThing();
+                 * thing.getReadyForStuff();
+                 *
+                 * // thing.startDoingStuff() gets called now, not before.
+                 * ```
+                 *
+                 * It is very important for APIs to be either 100% synchronous or 100%
+                 * asynchronous. Consider this example:
+                 *
+                 * ```js
+                 * // WARNING!  DO NOT USE!  BAD UNSAFE HAZARD!
+                 * function maybeSync(arg, cb) {
+                 *   if (arg) {
+                 *     cb();
+                 *     return;
+                 *   }
+                 *
+                 *   fs.stat('file', cb);
+                 * }
+                 * ```
+                 *
+                 * This API is hazardous because in the following case:
+                 *
+                 * ```js
+                 * const maybeTrue = Math.random() > 0.5;
+                 *
+                 * maybeSync(maybeTrue, () => {
+                 *   foo();
+                 * });
+                 *
+                 * bar();
+                 * ```
+                 *
+                 * It is not clear whether `foo()` or `bar()` will be called first.
+                 *
+                 * The following approach is much better:
+                 *
+                 * ```js
+                 * import { nextTick } from 'node:process';
+                 *
+                 * function definitelyAsync(arg, cb) {
+                 *   if (arg) {
+                 *     nextTick(cb);
+                 *     return;
+                 *   }
+                 *
+                 *   fs.stat('file', cb);
+                 * }
+                 * ```
+                 * @since v0.1.26
+                 * @param args Additional arguments to pass when invoking the `callback`
+                 */
+                nextTick(callback: Function, ...args: any[]): void;
+                /**
+                 * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
+                 * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
+                 */
+                noDeprecation?: boolean;
+                /**
+                 * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
+                 *
+                 * `process.permission` is an object whose methods are used to manage permissions for the current process.
+                 * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model).
+                 * @since v20.0.0
+                 */
+                permission: ProcessPermission;
+                /**
+                 * The `process.release` property returns an `Object` containing metadata related
+                 * to the current release, including URLs for the source tarball and headers-only
+                 * tarball.
+                 *
+                 * `process.release` contains the following properties:
+                 *
+                 * ```js
+                 * {
+                 *   name: 'node',
+                 *   lts: 'Hydrogen',
+                 *   sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz',
+                 *   headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz',
+                 *   libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib'
+                 * }
+                 * ```
+                 *
+                 * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be
+                 * relied upon to exist.
+                 * @since v3.0.0
+                 */
+                readonly release: ProcessRelease;
+                readonly features: ProcessFeatures;
+                /**
+                 * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
+                 * is set on the current Node.js process. This property allows programmatic control over the
+                 * tracing of warnings, enabling or disabling stack traces for warnings at runtime.
+                 *
+                 * ```js
+                 * // Enable trace warnings
+                 * process.traceProcessWarnings = true;
+                 *
+                 * // Emit a warning with a stack trace
+                 * process.emitWarning('Warning with stack trace');
+                 *
+                 * // Disable trace warnings
+                 * process.traceProcessWarnings = false;
+                 * ```
+                 * @since v6.10.0
+                 */
+                traceProcessWarnings: boolean;
+                /**
+                 * `process.umask()` returns the Node.js process's file mode creation mask. Child
+                 * processes inherit the mask from the parent process.
+                 * @since v0.1.19
+                 * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential
+                 * security vulnerability. There is no safe, cross-platform alternative API.
+                 */
+                umask(): number;
+                /**
+                 * Can only be set if not in worker thread.
+                 */
+                umask(mask: string | number): number;
+                /**
+                 * The `process.uptime()` method returns the number of seconds the current Node.js
+                 * process has been running.
+                 *
+                 * The return value includes fractions of a second. Use `Math.floor()` to get whole
+                 * seconds.
+                 * @since v0.5.0
+                 */
+                uptime(): number;
+                hrtime: HRTime;
+                /**
+                 * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel.
+                 * If no IPC channel exists, this property is undefined.
+                 * @since v7.1.0
+                 */
+                channel?: Control;
+                /**
+                 * If Node.js is spawned with an IPC channel, the `process.send()` method can be
+                 * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
+                 *
+                 * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`.
+                 *
+                 * The message goes through serialization and parsing. The resulting message might
+                 * not be the same as what is originally sent.
+                 * @since v0.5.9
+                 * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties:
+                 */
+                send?(
+                    message: any,
+                    sendHandle?: SendHandle,
+                    options?: MessageOptions,
+                    callback?: (error: Error | null) => void,
+                ): boolean;
+                send?(
+                    message: any,
+                    sendHandle: SendHandle,
+                    callback?: (error: Error | null) => void,
+                ): boolean;
+                send?(
+                    message: any,
+                    callback: (error: Error | null) => void,
+                ): boolean;
+                /**
+                 * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
+                 * IPC channel to the parent process, allowing the child process to exit gracefully
+                 * once there are no other connections keeping it alive.
+                 *
+                 * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
+                 *
+                 * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`.
+                 * @since v0.7.2
+                 */
+                disconnect?(): void;
+                /**
+                 * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC
+                 * channel is connected and will return `false` after `process.disconnect()` is called.
+                 *
+                 * Once `process.connected` is `false`, it is no longer possible to send messages
+                 * over the IPC channel using `process.send()`.
+                 * @since v0.7.2
+                 */
+                connected: boolean;
+                /**
+                 * The `process.allowedNodeEnvironmentFlags` property is a special,
+                 * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
+                 *
+                 * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag
+                 * representations. `process.allowedNodeEnvironmentFlags.has()` will
+                 * return `true` in the following cases:
+                 *
+                 * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`.
+                 * * Flags passed through to V8 (as listed in `--v8-options`) may replace
+                 * one or more _non-leading_ dashes for an underscore, or vice-versa;
+                 * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
+                 * etc.
+                 * * Flags may contain one or more equals (`=`) characters; all
+                 * characters after and including the first equals will be ignored;
+                 * e.g., `--stack-trace-limit=100`.
+                 * * Flags _must_ be allowable within `NODE_OPTIONS`.
+                 *
+                 * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
+                 * appear only _once_; each will begin with one or more dashes. Flags
+                 * passed through to V8 will contain underscores instead of non-leading
+                 * dashes:
+                 *
+                 * ```js
+                 * import { allowedNodeEnvironmentFlags } from 'node:process';
+                 *
+                 * allowedNodeEnvironmentFlags.forEach((flag) => {
+                 *   // -r
+                 *   // --inspect-brk
+                 *   // --abort_on_uncaught_exception
+                 *   // ...
+                 * });
+                 * ```
+                 *
+                 * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
+                 * silently.
+                 *
+                 * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
+                 * contain what _would have_ been allowable.
+                 * @since v10.10.0
+                 */
+                allowedNodeEnvironmentFlags: ReadonlySet<string>;
+                /**
+                 * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
+                 * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v25.x/api/report.html).
+                 * @since v11.8.0
+                 */
+                report: ProcessReport;
+                /**
+                 * ```js
+                 * import { resourceUsage } from 'node:process';
+                 *
+                 * console.log(resourceUsage());
+                 * /*
+                 *   Will output:
+                 *   {
+                 *     userCPUTime: 82872,
+                 *     systemCPUTime: 4143,
+                 *     maxRSS: 33164,
+                 *     sharedMemorySize: 0,
+                 *     unsharedDataSize: 0,
+                 *     unsharedStackSize: 0,
+                 *     minorPageFault: 2469,
+                 *     majorPageFault: 0,
+                 *     swappedOut: 0,
+                 *     fsRead: 0,
+                 *     fsWrite: 8,
+                 *     ipcSent: 0,
+                 *     ipcReceived: 0,
+                 *     signalsCount: 0,
+                 *     voluntaryContextSwitches: 79,
+                 *     involuntaryContextSwitches: 1
+                 *   }
+                 *
+                 * ```
+                 * @since v12.6.0
+                 * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
+                 */
+                resourceUsage(): ResourceUsage;
+                /**
+                 * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation`
+                 * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning()
+                 * method for more information.
+                 *
+                 * ```bash
+                 * $ node --throw-deprecation -p "process.throwDeprecation"
+                 * true
+                 * $ node -p "process.throwDeprecation"
+                 * undefined
+                 * $ node
+                 * > process.emitWarning('test', 'DeprecationWarning');
+                 * undefined
+                 * > (node:26598) DeprecationWarning: test
+                 * > process.throwDeprecation = true;
+                 * true
+                 * > process.emitWarning('test', 'DeprecationWarning');
+                 * Thrown:
+                 * [DeprecationWarning: test] { name: 'DeprecationWarning' }
+                 * ```
+                 * @since v0.9.12
+                 */
+                throwDeprecation: boolean;
+                /**
+                 * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the
+                 * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
+                 * flag's behavior.
+                 * @since v0.8.0
+                 */
+                traceDeprecation: boolean;
+                /**
+                 * An object is "refable" if it implements the Node.js "Refable protocol".
+                 * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
+                 * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
+                 * event loop alive, while "unref'd" objects will not. Historically, this was
+                 * implemented by using `ref()` and `unref()` methods directly on the objects.
+                 * This pattern, however, is being deprecated in favor of the "Refable protocol"
+                 * in order to better support Web Platform API types whose APIs cannot be modified
+                 * to add `ref()` and `unref()` methods but still need to support that behavior.
+                 * @since v22.14.0
+                 * @experimental
+                 * @param maybeRefable An object that may be "refable".
+                 */
+                ref(maybeRefable: any): void;
+                /**
+                 * An object is "unrefable" if it implements the Node.js "Refable protocol".
+                 * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
+                 * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
+                 * event loop alive, while "unref'd" objects will not. Historically, this was
+                 * implemented by using `ref()` and `unref()` methods directly on the objects.
+                 * This pattern, however, is being deprecated in favor of the "Refable protocol"
+                 * in order to better support Web Platform API types whose APIs cannot be modified
+                 * to add `ref()` and `unref()` methods but still need to support that behavior.
+                 * @since v22.14.0
+                 * @experimental
+                 * @param maybeRefable An object that may be "unref'd".
+                 */
+                unref(maybeRefable: any): void;
+                /**
+                 * Replaces the current process with a new process.
+                 *
+                 * This is achieved by using the `execve` POSIX function and therefore no memory or other
+                 * resources from the current process are preserved, except for the standard input,
+                 * standard output and standard error file descriptor.
+                 *
+                 * All other resources are discarded by the system when the processes are swapped, without triggering
+                 * any exit or close events and without running any cleanup handler.
+                 *
+                 * This function will never return, unless an error occurred.
+                 *
+                 * This function is not available on Windows or IBM i.
+                 * @since v22.15.0
+                 * @experimental
+                 * @param file The name or path of the executable file to run.
+                 * @param args List of string arguments. No argument can contain a null-byte (`\u0000`).
+                 * @param env Environment key-value pairs.
+                 * No key or value can contain a null-byte (`\u0000`).
+                 * **Default:** `process.env`.
+                 */
+                execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
+                // #region InternalEventEmitter
+                addListener<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
+                emit(eventName: string | symbol, ...args: any[]): boolean;
+                listenerCount<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener?: (...args: ProcessEventMap[E]) => void,
+                ): number;
+                listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+                listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
+                listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+                off<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                on<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                once<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                prependListener<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                prependOnceListener<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
+                rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+                // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+                removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
+                removeAllListeners(eventName?: string | symbol): this;
+                removeListener<E extends keyof ProcessEventMap>(
+                    eventName: E,
+                    listener: (...args: ProcessEventMap[E]) => void,
+                ): this;
+                removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+                // #endregion
+            }
+        }
+    }
+    export = process;
+}
+declare module "process" {
+    import process = require("node:process");
+    export = process;
+}

+ 89 - 0
node_modules/@types/node/punycode.d.ts

@@ -0,0 +1,89 @@
+declare module "node:punycode" {
+    /**
+     * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
+     * characters to the equivalent string of Unicode codepoints.
+     *
+     * ```js
+     * punycode.decode('maana-pta'); // 'mañana'
+     * punycode.decode('--dqo34k'); // '☃-⌘'
+     * ```
+     * @since v0.5.1
+     */
+    function decode(string: string): string;
+    /**
+     * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
+     *
+     * ```js
+     * punycode.encode('mañana'); // 'maana-pta'
+     * punycode.encode('☃-⌘'); // '--dqo34k'
+     * ```
+     * @since v0.5.1
+     */
+    function encode(string: string): string;
+    /**
+     * The `punycode.toUnicode()` method converts a string representing a domain name
+     * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
+     * converted.
+     *
+     * ```js
+     * // decode domain names
+     * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
+     * punycode.toUnicode('xn----dqo34k.com');  // '☃-⌘.com'
+     * punycode.toUnicode('example.com');       // 'example.com'
+     * ```
+     * @since v0.6.1
+     */
+    function toUnicode(domain: string): string;
+    /**
+     * The `punycode.toASCII()` method converts a Unicode string representing an
+     * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
+     * domain name will be converted. Calling `punycode.toASCII()` on a string that
+     * already only contains ASCII characters will have no effect.
+     *
+     * ```js
+     * // encode domain names
+     * punycode.toASCII('mañana.com');  // 'xn--maana-pta.com'
+     * punycode.toASCII('☃-⌘.com');   // 'xn----dqo34k.com'
+     * punycode.toASCII('example.com'); // 'example.com'
+     * ```
+     * @since v0.6.1
+     */
+    function toASCII(domain: string): string;
+    /**
+     * @deprecated since v7.0.0
+     * The version of the punycode module bundled in Node.js is being deprecated.
+     * In a future major version of Node.js this module will be removed.
+     * Users currently depending on the punycode module should switch to using
+     * the userland-provided Punycode.js module instead.
+     */
+    const ucs2: ucs2;
+    interface ucs2 {
+        /**
+         * @deprecated since v7.0.0
+         * The version of the punycode module bundled in Node.js is being deprecated.
+         * In a future major version of Node.js this module will be removed.
+         * Users currently depending on the punycode module should switch to using
+         * the userland-provided Punycode.js module instead.
+         */
+        decode(string: string): number[];
+        /**
+         * @deprecated since v7.0.0
+         * The version of the punycode module bundled in Node.js is being deprecated.
+         * In a future major version of Node.js this module will be removed.
+         * Users currently depending on the punycode module should switch to using
+         * the userland-provided Punycode.js module instead.
+         */
+        encode(codePoints: readonly number[]): string;
+    }
+    /**
+     * @deprecated since v7.0.0
+     * The version of the punycode module bundled in Node.js is being deprecated.
+     * In a future major version of Node.js this module will be removed.
+     * Users currently depending on the punycode module should switch to using
+     * the userland-provided Punycode.js module instead.
+     */
+    const version: string;
+}
+declare module "punycode" {
+    export * from "node:punycode";
+}

+ 139 - 0
node_modules/@types/node/querystring.d.ts

@@ -0,0 +1,139 @@
+declare module "node:querystring" {
+    interface StringifyOptions {
+        /**
+         * The function to use when converting URL-unsafe characters to percent-encoding in the query string.
+         * @default `querystring.escape()`
+         */
+        encodeURIComponent?: ((str: string) => string) | undefined;
+    }
+    interface ParseOptions {
+        /**
+         * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations.
+         * @default 1000
+         */
+        maxKeys?: number | undefined;
+        /**
+         * The function to use when decoding percent-encoded characters in the query string.
+         * @default `querystring.unescape()`
+         */
+        decodeURIComponent?: ((str: string) => string) | undefined;
+    }
+    interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
+    interface ParsedUrlQueryInput extends
+        NodeJS.Dict<
+            | string
+            | number
+            | boolean
+            | bigint
+            | ReadonlyArray<string | number | boolean | bigint>
+            | null
+        >
+    {}
+    /**
+     * The `querystring.stringify()` method produces a URL query string from a
+     * given `obj` by iterating through the object's "own properties".
+     *
+     * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+     * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+     * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+     * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
+     * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
+     * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
+     * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
+     * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
+     * empty strings.
+     *
+     * ```js
+     * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
+     * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
+     *
+     * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
+     * // Returns 'foo:bar;baz:qux'
+     * ```
+     *
+     * By default, characters requiring percent-encoding within the query string will
+     * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified:
+     *
+     * ```js
+     * // Assuming gbkEncodeURIComponent function already exists,
+     *
+     * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
+     *                       { encodeURIComponent: gbkEncodeURIComponent });
+     * ```
+     * @since v0.1.25
+     * @param obj The object to serialize into a URL query string
+     * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+     * @param [eq='='] . The substring used to delimit keys and values in the query string.
+     */
+    function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
+    /**
+     * The `querystring.parse()` method parses a URL query string (`str`) into a
+     * collection of key and value pairs.
+     *
+     * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
+     *
+     * ```json
+     * {
+     *   "foo": "bar",
+     *   "abc": ["xyz", "123"]
+     * }
+     * ```
+     *
+     * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`,
+     * `obj.hasOwnProperty()`, and others
+     * are not defined and _will not work_.
+     *
+     * By default, percent-encoded characters within the query string will be assumed
+     * to use UTF-8 encoding. If an alternative character encoding is used, then an
+     * alternative `decodeURIComponent` option will need to be specified:
+     *
+     * ```js
+     * // Assuming gbkDecodeURIComponent function already exists...
+     *
+     * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
+     *                   { decodeURIComponent: gbkDecodeURIComponent });
+     * ```
+     * @since v0.1.25
+     * @param str The URL query string to parse
+     * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
+     * @param [eq='='] The substring used to delimit keys and values in the query string.
+     */
+    function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
+    /**
+     * The querystring.encode() function is an alias for querystring.stringify().
+     */
+    const encode: typeof stringify;
+    /**
+     * The querystring.decode() function is an alias for querystring.parse().
+     */
+    const decode: typeof parse;
+    /**
+     * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL
+     * query strings.
+     *
+     * The `querystring.escape()` method is used by `querystring.stringify()` and is
+     * generally not expected to be used directly. It is exported primarily to allow
+     * application code to provide a replacement percent-encoding implementation if
+     * necessary by assigning `querystring.escape` to an alternative function.
+     * @since v0.1.25
+     */
+    function escape(str: string): string;
+    /**
+     * The `querystring.unescape()` method performs decoding of URL percent-encoded
+     * characters on the given `str`.
+     *
+     * The `querystring.unescape()` method is used by `querystring.parse()` and is
+     * generally not expected to be used directly. It is exported primarily to allow
+     * application code to provide a replacement decoding implementation if
+     * necessary by assigning `querystring.unescape` to an alternative function.
+     *
+     * By default, the `querystring.unescape()` method will attempt to use the
+     * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
+     * a safer equivalent that does not throw on malformed URLs will be used.
+     * @since v0.1.25
+     */
+    function unescape(str: string): string;
+}
+declare module "querystring" {
+    export * from "node:querystring";
+}

+ 897 - 0
node_modules/@types/node/quic.d.ts

@@ -0,0 +1,897 @@
+declare module "node:quic" {
+    import { KeyObject, webcrypto } from "node:crypto";
+    import { SocketAddress } from "node:net";
+    import { ReadableStream } from "node:stream/web";
+    /**
+     * @since v23.8.0
+     */
+    type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnDatagramCallback = (this: QuicSession, datagram: Uint8Array, early: boolean) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnDatagramStatusCallback = (this: QuicSession, id: bigint, status: "lost" | "acknowledged") => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnPathValidationCallback = (
+        this: QuicSession,
+        result: "success" | "failure" | "aborted",
+        newLocalAddress: SocketAddress,
+        newRemoteAddress: SocketAddress,
+        oldLocalAddress: SocketAddress,
+        oldRemoteAddress: SocketAddress,
+        preferredAddress: boolean,
+    ) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnVersionNegotiationCallback = (
+        this: QuicSession,
+        version: number,
+        requestedVersions: number[],
+        supportedVersions: number[],
+    ) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnHandshakeCallback = (
+        this: QuicSession,
+        sni: string,
+        alpn: string,
+        cipher: string,
+        cipherVersion: string,
+        validationErrorReason: string,
+        validationErrorCode: number,
+        earlyDataAccepted: boolean,
+    ) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnBlockedCallback = (this: QuicStream) => void;
+    /**
+     * @since v23.8.0
+     */
+    type OnStreamErrorCallback = (this: QuicStream, error: any) => void;
+    /**
+     * @since v23.8.0
+     */
+    interface TransportParams {
+        /**
+         * The preferred IPv4 address to advertise.
+         * @since v23.8.0
+         */
+        preferredAddressIpv4?: SocketAddress | undefined;
+        /**
+         * The preferred IPv6 address to advertise.
+         * @since v23.8.0
+         */
+        preferredAddressIpv6?: SocketAddress | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxStreamDataBidiLocal?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxStreamDataBidiRemote?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxStreamDataUni?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxData?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxStreamsBidi?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        initialMaxStreamsUni?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        maxIdleTimeout?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        activeConnectionIDLimit?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        ackDelayExponent?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        maxAckDelay?: bigint | number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        maxDatagramFrameSize?: bigint | number | undefined;
+    }
+    /**
+     * @since v23.8.0
+     */
+    interface SessionOptions {
+        /**
+         * An endpoint to use.
+         * @since v23.8.0
+         */
+        endpoint?: EndpointOptions | QuicEndpoint | undefined;
+        /**
+         * The ALPN protocol identifier.
+         * @since v23.8.0
+         */
+        alpn?: string | undefined;
+        /**
+         * The CA certificates to use for sessions.
+         * @since v23.8.0
+         */
+        ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
+        /**
+         * Specifies the congestion control algorithm that will be used.
+         * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`.
+         *
+         * This is an advanced option that users typically won't have need to specify.
+         * @since v23.8.0
+         */
+        cc?: `${constants.cc}` | undefined;
+        /**
+         * The TLS certificates to use for sessions.
+         * @since v23.8.0
+         */
+        certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
+        /**
+         * The list of supported TLS 1.3 cipher algorithms.
+         * @since v23.8.0
+         */
+        ciphers?: string | undefined;
+        /**
+         * The CRL to use for sessions.
+         * @since v23.8.0
+         */
+        crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
+        /**
+         * The list of support TLS 1.3 cipher groups.
+         * @since v23.8.0
+         */
+        groups?: string | undefined;
+        /**
+         * True to enable TLS keylogging output.
+         * @since v23.8.0
+         */
+        keylog?: boolean | undefined;
+        /**
+         * The TLS crypto keys to use for sessions.
+         * @since v23.8.0
+         */
+        keys?: KeyObject | webcrypto.CryptoKey | ReadonlyArray<KeyObject | webcrypto.CryptoKey> | undefined;
+        /**
+         * Specifies the maximum UDP packet payload size.
+         * @since v23.8.0
+         */
+        maxPayloadSize?: bigint | number | undefined;
+        /**
+         * Specifies the maximum stream flow-control window size.
+         * @since v23.8.0
+         */
+        maxStreamWindow?: bigint | number | undefined;
+        /**
+         * Specifies the maximum session flow-control window size.
+         * @since v23.8.0
+         */
+        maxWindow?: bigint | number | undefined;
+        /**
+         * The minimum QUIC version number to allow. This is an advanced option that users
+         * typically won't have need to specify.
+         * @since v23.8.0
+         */
+        minVersion?: number | undefined;
+        /**
+         * When the remote peer advertises a preferred address, this option specifies whether
+         * to use it or ignore it.
+         * @since v23.8.0
+         */
+        preferredAddressPolicy?: "use" | "ignore" | "default" | undefined;
+        /**
+         * True if qlog output should be enabled.
+         * @since v23.8.0
+         */
+        qlog?: boolean | undefined;
+        /**
+         * A session ticket to use for 0RTT session resumption.
+         * @since v23.8.0
+         */
+        sessionTicket?: NodeJS.ArrayBufferView | undefined;
+        /**
+         * Specifies the maximum number of milliseconds a TLS handshake is permitted to take
+         * to complete before timing out.
+         * @since v23.8.0
+         */
+        handshakeTimeout?: bigint | number | undefined;
+        /**
+         * The peer server name to target.
+         * @since v23.8.0
+         */
+        sni?: string | undefined;
+        /**
+         * True to enable TLS tracing output.
+         * @since v23.8.0
+         */
+        tlsTrace?: boolean | undefined;
+        /**
+         * The QUIC transport parameters to use for the session.
+         * @since v23.8.0
+         */
+        transportParams?: TransportParams | undefined;
+        /**
+         * Specifies the maximum number of unacknowledged packets a session should allow.
+         * @since v23.8.0
+         */
+        unacknowledgedPacketThreshold?: bigint | number | undefined;
+        /**
+         * True to require verification of TLS client certificate.
+         * @since v23.8.0
+         */
+        verifyClient?: boolean | undefined;
+        /**
+         * True to require private key verification.
+         * @since v23.8.0
+         */
+        verifyPrivateKey?: boolean | undefined;
+        /**
+         * The QUIC version number to use. This is an advanced option that users typically
+         * won't have need to specify.
+         * @since v23.8.0
+         */
+        version?: number | undefined;
+    }
+    /**
+     * Initiate a new client-side session.
+     *
+     * ```js
+     * import { connect } from 'node:quic';
+     * import { Buffer } from 'node:buffer';
+     *
+     * const enc = new TextEncoder();
+     * const alpn = 'foo';
+     * const client = await connect('123.123.123.123:8888', { alpn });
+     * await client.createUnidirectionalStream({
+     *   body: enc.encode('hello world'),
+     * });
+     * ```
+     *
+     * By default, every call to `connect(...)` will create a new local
+     * `QuicEndpoint` instance bound to a new random local IP port. To
+     * specify the exact local address to use, or to multiplex multiple
+     * QUIC sessions over a single local port, pass the `endpoint` option
+     * with either a `QuicEndpoint` or `EndpointOptions` as the argument.
+     *
+     * ```js
+     * import { QuicEndpoint, connect } from 'node:quic';
+     *
+     * const endpoint = new QuicEndpoint({
+     *   address: '127.0.0.1:1234',
+     * });
+     *
+     * const client = await connect('123.123.123.123:8888', { endpoint });
+     * ```
+     * @since v23.8.0
+     */
+    function connect(address: string | SocketAddress, options?: SessionOptions): Promise<QuicSession>;
+    /**
+     * Configures the endpoint to listen as a server. When a new session is initiated by
+     * a remote peer, the given `onsession` callback will be invoked with the created
+     * session.
+     *
+     * ```js
+     * import { listen } from 'node:quic';
+     *
+     * const endpoint = await listen((session) => {
+     *   // ... handle the session
+     * });
+     *
+     * // Closing the endpoint allows any sessions open when close is called
+     * // to complete naturally while preventing new sessions from being
+     * // initiated. Once all existing sessions have finished, the endpoint
+     * // will be destroyed. The call returns a promise that is resolved once
+     * // the endpoint is destroyed.
+     * await endpoint.close();
+     * ```
+     *
+     * By default, every call to `listen(...)` will create a new local
+     * `QuicEndpoint` instance bound to a new random local IP port. To
+     * specify the exact local address to use, or to multiplex multiple
+     * QUIC sessions over a single local port, pass the `endpoint` option
+     * with either a `QuicEndpoint` or `EndpointOptions` as the argument.
+     *
+     * At most, any single `QuicEndpoint` can only be configured to listen as
+     * a server once.
+     * @since v23.8.0
+     */
+    function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise<QuicEndpoint>;
+    /**
+     * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance.
+     * @since v23.8.0
+     */
+    interface EndpointOptions {
+        /**
+         * If not specified the endpoint will bind to IPv4 `localhost` on a random port.
+         * @since v23.8.0
+         */
+        address?: SocketAddress | string | undefined;
+        /**
+         * The endpoint maintains an internal cache of validated socket addresses as a
+         * performance optimization. This option sets the maximum number of addresses
+         * that are cache. This is an advanced option that users typically won't have
+         * need to specify.
+         * @since v23.8.0
+         */
+        addressLRUSize?: bigint | number | undefined;
+        /**
+         * When `true`, indicates that the endpoint should bind only to IPv6 addresses.
+         * @since v23.8.0
+         */
+        ipv6Only?: boolean | undefined;
+        /**
+         * Specifies the maximum number of concurrent sessions allowed per remote peer address.
+         * @since v23.8.0
+         */
+        maxConnectionsPerHost?: bigint | number | undefined;
+        /**
+         * Specifies the maximum total number of concurrent sessions.
+         * @since v23.8.0
+         */
+        maxConnectionsTotal?: bigint | number | undefined;
+        /**
+         * Specifies the maximum number of QUIC retry attempts allowed per remote peer address.
+         * @since v23.8.0
+         */
+        maxRetries?: bigint | number | undefined;
+        /**
+         * Specifies the maximum number of stateless resets that are allowed per remote peer address.
+         * @since v23.8.0
+         */
+        maxStatelessResetsPerHost?: bigint | number | undefined;
+        /**
+         * Specifies the length of time a QUIC retry token is considered valid.
+         * @since v23.8.0
+         */
+        retryTokenExpiration?: bigint | number | undefined;
+        /**
+         * Specifies the 16-byte secret used to generate QUIC retry tokens.
+         * @since v23.8.0
+         */
+        resetTokenSecret?: NodeJS.ArrayBufferView | undefined;
+        /**
+         * Specifies the length of time a QUIC token is considered valid.
+         * @since v23.8.0
+         */
+        tokenExpiration?: bigint | number | undefined;
+        /**
+         * Specifies the 16-byte secret used to generate QUIC tokens.
+         * @since v23.8.0
+         */
+        tokenSecret?: NodeJS.ArrayBufferView | undefined;
+        /**
+         * @since v23.8.0
+         */
+        udpReceiveBufferSize?: number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        udpSendBufferSize?: number | undefined;
+        /**
+         * @since v23.8.0
+         */
+        udpTTL?: number | undefined;
+        /**
+         * When `true`, requires that the endpoint validate peer addresses using retry packets
+         * while establishing a new connection.
+         * @since v23.8.0
+         */
+        validateAddress?: boolean | undefined;
+    }
+    /**
+     * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be
+     * used as both a client and a server.
+     * @since v23.8.0
+     */
+    class QuicEndpoint implements AsyncDisposable {
+        constructor(options?: EndpointOptions);
+        /**
+         * The local UDP socket address to which the endpoint is bound, if any.
+         *
+         * If the endpoint is not currently bound then the value will be `undefined`. Read only.
+         * @since v23.8.0
+         */
+        readonly address: SocketAddress | undefined;
+        /**
+         * When `endpoint.busy` is set to true, the endpoint will temporarily reject
+         * new sessions from being created. Read/write.
+         *
+         * ```js
+         * // Mark the endpoint busy. New sessions will be prevented.
+         * endpoint.busy = true;
+         *
+         * // Mark the endpoint free. New session will be allowed.
+         * endpoint.busy = false;
+         * ```
+         *
+         * The `busy` property is useful when the endpoint is under heavy load and needs to
+         * temporarily reject new sessions while it catches up.
+         * @since v23.8.0
+         */
+        busy: boolean;
+        /**
+         * Gracefully close the endpoint. The endpoint will close and destroy itself when
+         * all currently open sessions close. Once called, new sessions will be rejected.
+         *
+         * Returns a promise that is fulfilled when the endpoint is destroyed.
+         * @since v23.8.0
+         */
+        close(): Promise<void>;
+        /**
+         * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is
+         * returned by the `endpoint.close()` function. Read only.
+         * @since v23.8.0
+         */
+        readonly closed: Promise<void>;
+        /**
+         * True if `endpoint.close()` has been called and closing the endpoint has not yet completed.
+         * Read only.
+         * @since v23.8.0
+         */
+        readonly closing: boolean;
+        /**
+         * Forcefully closes the endpoint by forcing all open sessions to be immediately
+         * closed.
+         * @since v23.8.0
+         */
+        destroy(error?: any): void;
+        /**
+         * True if `endpoint.destroy()` has been called. Read only.
+         * @since v23.8.0
+         */
+        readonly destroyed: boolean;
+        /**
+         * The statistics collected for an active session. Read only.
+         * @since v23.8.0
+         */
+        readonly stats: QuicEndpoint.Stats;
+        /**
+         * Calls `endpoint.close()` and returns a promise that fulfills when the
+         * endpoint has closed.
+         * @since v23.8.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    namespace QuicEndpoint {
+        /**
+         * A view of the collected statistics for an endpoint.
+         * @since v23.8.0
+         */
+        class Stats {
+            private constructor();
+            /**
+             * A timestamp indicating the moment the endpoint was created. Read only.
+             * @since v23.8.0
+             */
+            readonly createdAt: bigint;
+            /**
+             * A timestamp indicating the moment the endpoint was destroyed. Read only.
+             * @since v23.8.0
+             */
+            readonly destroyedAt: bigint;
+            /**
+             * The total number of bytes received by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly bytesReceived: bigint;
+            /**
+             * The total number of bytes sent by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly bytesSent: bigint;
+            /**
+             * The total number of QUIC packets successfully received by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly packetsReceived: bigint;
+            /**
+             * The total number of QUIC packets successfully sent by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly packetsSent: bigint;
+            /**
+             * The total number of peer-initiated sessions received by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly serverSessions: bigint;
+            /**
+             * The total number of sessions initiated by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly clientSessions: bigint;
+            /**
+             * The total number of times an initial packet was rejected due to the
+             * endpoint being marked busy. Read only.
+             * @since v23.8.0
+             */
+            readonly serverBusyCount: bigint;
+            /**
+             * The total number of QUIC retry attempts on this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly retryCount: bigint;
+            /**
+             * The total number sessions rejected due to QUIC version mismatch. Read only.
+             * @since v23.8.0
+             */
+            readonly versionNegotiationCount: bigint;
+            /**
+             * The total number of stateless resets handled by this endpoint. Read only.
+             * @since v23.8.0
+             */
+            readonly statelessResetCount: bigint;
+            /**
+             * The total number of sessions that were closed before handshake completed. Read only.
+             * @since v23.8.0
+             */
+            readonly immediateCloseCount: bigint;
+        }
+    }
+    interface CreateStreamOptions {
+        body?: ArrayBuffer | NodeJS.ArrayBufferView | Blob | undefined;
+        sendOrder?: number | undefined;
+    }
+    interface SessionPath {
+        local: SocketAddress;
+        remote: SocketAddress;
+    }
+    /**
+     * A `QuicSession` represents the local side of a QUIC connection.
+     * @since v23.8.0
+     */
+    class QuicSession implements AsyncDisposable {
+        private constructor();
+        /**
+         * Initiate a graceful close of the session. Existing streams will be allowed
+         * to complete but no new streams will be opened. Once all streams have closed,
+         * the session will be destroyed. The returned promise will be fulfilled once
+         * the session has been destroyed.
+         * @since v23.8.0
+         */
+        close(): Promise<void>;
+        /**
+         * A promise that is fulfilled once the session is destroyed.
+         * @since v23.8.0
+         */
+        readonly closed: Promise<void>;
+        /**
+         * Immediately destroy the session. All streams will be destroys and the
+         * session will be closed.
+         * @since v23.8.0
+         */
+        destroy(error?: any): void;
+        /**
+         * True if `session.destroy()` has been called. Read only.
+         * @since v23.8.0
+         */
+        readonly destroyed: boolean;
+        /**
+         * The endpoint that created this session. Read only.
+         * @since v23.8.0
+         */
+        readonly endpoint: QuicEndpoint;
+        /**
+         * The callback to invoke when a new stream is initiated by a remote peer. Read/write.
+         * @since v23.8.0
+         */
+        onstream: OnStreamCallback | undefined;
+        /**
+         * The callback to invoke when a new datagram is received from a remote peer. Read/write.
+         * @since v23.8.0
+         */
+        ondatagram: OnDatagramCallback | undefined;
+        /**
+         * The callback to invoke when the status of a datagram is updated. Read/write.
+         * @since v23.8.0
+         */
+        ondatagramstatus: OnDatagramStatusCallback | undefined;
+        /**
+         * The callback to invoke when the path validation is updated. Read/write.
+         * @since v23.8.0
+         */
+        onpathvalidation: OnPathValidationCallback | undefined;
+        /**
+         * The callback to invoke when a new session ticket is received. Read/write.
+         * @since v23.8.0
+         */
+        onsessionticket: OnSessionTicketCallback | undefined;
+        /**
+         * The callback to invoke when a version negotiation is initiated. Read/write.
+         * @since v23.8.0
+         */
+        onversionnegotiation: OnVersionNegotiationCallback | undefined;
+        /**
+         * The callback to invoke when the TLS handshake is completed. Read/write.
+         * @since v23.8.0
+         */
+        onhandshake: OnHandshakeCallback | undefined;
+        /**
+         * Open a new bidirectional stream. If the `body` option is not specified,
+         * the outgoing stream will be half-closed.
+         * @since v23.8.0
+         */
+        createBidirectionalStream(options?: CreateStreamOptions): Promise<QuicStream>;
+        /**
+         * Open a new unidirectional stream. If the `body` option is not specified,
+         * the outgoing stream will be closed.
+         * @since v23.8.0
+         */
+        createUnidirectionalStream(options?: CreateStreamOptions): Promise<QuicStream>;
+        /**
+         * The local and remote socket addresses associated with the session. Read only.
+         * @since v23.8.0
+         */
+        path: SessionPath | undefined;
+        /**
+         * Sends an unreliable datagram to the remote peer, returning the datagram ID.
+         * If the datagram payload is specified as an `ArrayBufferView`, then ownership of
+         * that view will be transfered to the underlying stream.
+         * @since v23.8.0
+         */
+        sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint;
+        /**
+         * Return the current statistics for the session. Read only.
+         * @since v23.8.0
+         */
+        readonly stats: QuicSession.Stats;
+        /**
+         * Initiate a key update for the session.
+         * @since v23.8.0
+         */
+        updateKey(): void;
+        /**
+         * Calls `session.close()` and returns a promise that fulfills when the
+         * session has closed.
+         * @since v23.8.0
+         */
+        [Symbol.asyncDispose](): Promise<void>;
+    }
+    namespace QuicSession {
+        /**
+         * @since v23.8.0
+         */
+        class Stats {
+            private constructor();
+            /**
+             * @since v23.8.0
+             */
+            readonly createdAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly closingAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly handshakeCompletedAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly handshakeConfirmedAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bytesReceived: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bytesSent: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bidiInStreamCount: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bidiOutStreamCount: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly uniInStreamCount: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly uniOutStreamCount: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly maxBytesInFlights: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bytesInFlight: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly blockCount: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly cwnd: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly latestRtt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly minRtt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly rttVar: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly smoothedRtt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly ssthresh: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly datagramsReceived: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly datagramsSent: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly datagramsAcknowledged: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly datagramsLost: bigint;
+        }
+    }
+    /**
+     * @since v23.8.0
+     */
+    class QuicStream {
+        private constructor();
+        /**
+         * A promise that is fulfilled when the stream is fully closed.
+         * @since v23.8.0
+         */
+        readonly closed: Promise<void>;
+        /**
+         * Immediately and abruptly destroys the stream.
+         * @since v23.8.0
+         */
+        destroy(error?: any): void;
+        /**
+         * True if `stream.destroy()` has been called.
+         * @since v23.8.0
+         */
+        readonly destroyed: boolean;
+        /**
+         * The directionality of the stream. Read only.
+         * @since v23.8.0
+         */
+        readonly direction: "bidi" | "uni";
+        /**
+         * The stream ID. Read only.
+         * @since v23.8.0
+         */
+        readonly id: bigint;
+        /**
+         * The callback to invoke when the stream is blocked. Read/write.
+         * @since v23.8.0
+         */
+        onblocked: OnBlockedCallback | undefined;
+        /**
+         * The callback to invoke when the stream is reset. Read/write.
+         * @since v23.8.0
+         */
+        onreset: OnStreamErrorCallback | undefined;
+        /**
+         * @since v23.8.0
+         */
+        readonly readable: ReadableStream<Uint8Array>;
+        /**
+         * The session that created this stream. Read only.
+         * @since v23.8.0
+         */
+        readonly session: QuicSession;
+        /**
+         * The current statistics for the stream. Read only.
+         * @since v23.8.0
+         */
+        readonly stats: QuicStream.Stats;
+    }
+    namespace QuicStream {
+        /**
+         * @since v23.8.0
+         */
+        class Stats {
+            private constructor();
+            /**
+             * @since v23.8.0
+             */
+            readonly ackedAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bytesReceived: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly bytesSent: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly createdAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly destroyedAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly finalSize: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly isConnected: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly maxOffset: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly maxOffsetAcknowledged: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly maxOffsetReceived: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly openedAt: bigint;
+            /**
+             * @since v23.8.0
+             */
+            readonly receivedAt: bigint;
+        }
+    }
+    namespace constants {
+        enum cc {
+            RENO = "reno",
+            CUBIC = "cubic",
+            BBR = "bbr",
+        }
+        const DEFAULT_CIPHERS: string;
+        const DEFAULT_GROUPS: string;
+    }
+}

+ 507 - 0
node_modules/@types/node/readline.d.ts

@@ -0,0 +1,507 @@
+declare module "node:readline" {
+    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
+    interface Key {
+        sequence?: string | undefined;
+        name?: string | undefined;
+        ctrl?: boolean | undefined;
+        meta?: boolean | undefined;
+        shift?: boolean | undefined;
+    }
+    interface InterfaceEventMap {
+        "close": [];
+        "error": [error: Error];
+        "history": [history: string[]];
+        "line": [input: string];
+        "pause": [];
+        "resume": [];
+        "SIGCONT": [];
+        "SIGINT": [];
+        "SIGTSTP": [];
+    }
+    /**
+     * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
+     * single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream.
+     * The `output` stream is used to print prompts for user input that arrives on,
+     * and is read from, the `input` stream.
+     * @since v0.1.104
+     */
+    class Interface implements EventEmitter, Disposable {
+        /**
+         * NOTE: According to the documentation:
+         *
+         * > Instances of the `readline.Interface` class are constructed using the
+         * > `readline.createInterface()` method.
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
+         */
+        protected constructor(
+            input: NodeJS.ReadableStream,
+            output?: NodeJS.WritableStream,
+            completer?: Completer | AsyncCompleter,
+            terminal?: boolean,
+        );
+        /**
+         * NOTE: According to the documentation:
+         *
+         * > Instances of the `readline.Interface` class are constructed using the
+         * > `readline.createInterface()` method.
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
+         */
+        protected constructor(options: ReadLineOptions);
+        readonly terminal: boolean;
+        /**
+         * The current input data being processed by node.
+         *
+         * This can be used when collecting input from a TTY stream to retrieve the
+         * current value that has been processed thus far, prior to the `line` event
+         * being emitted. Once the `line` event has been emitted, this property will
+         * be an empty string.
+         *
+         * Be aware that modifying the value during the instance runtime may have
+         * unintended consequences if `rl.cursor` is not also controlled.
+         *
+         * **If not using a TTY stream for input, use the `'line'` event.**
+         *
+         * One possible use case would be as follows:
+         *
+         * ```js
+         * const values = ['lorem ipsum', 'dolor sit amet'];
+         * const rl = readline.createInterface(process.stdin);
+         * const showResults = debounce(() => {
+         *   console.log(
+         *     '\n',
+         *     values.filter((val) => val.startsWith(rl.line)).join(' '),
+         *   );
+         * }, 300);
+         * process.stdin.on('keypress', (c, k) => {
+         *   showResults();
+         * });
+         * ```
+         * @since v0.1.98
+         */
+        readonly line: string;
+        /**
+         * The cursor position relative to `rl.line`.
+         *
+         * This will track where the current cursor lands in the input string, when
+         * reading input from a TTY stream. The position of cursor determines the
+         * portion of the input string that will be modified as input is processed,
+         * as well as the column where the terminal caret will be rendered.
+         * @since v0.1.98
+         */
+        readonly cursor: number;
+        /**
+         * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
+         * @since v15.3.0, v14.17.0
+         * @return the current prompt string
+         */
+        getPrompt(): string;
+        /**
+         * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called.
+         * @since v0.1.98
+         */
+        setPrompt(prompt: string): void;
+        /**
+         * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
+         * location at which to provide input.
+         *
+         * When called, `rl.prompt()` will resume the `input` stream if it has been
+         * paused.
+         *
+         * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written.
+         * @since v0.1.98
+         * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
+         */
+        prompt(preserveCursor?: boolean): void;
+        /**
+         * The `rl.question()` method displays the `query` by writing it to the `output`,
+         * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
+         *
+         * When called, `rl.question()` will resume the `input` stream if it has been
+         * paused.
+         *
+         * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
+         *
+         * The `callback` function passed to `rl.question()` does not follow the typical
+         * pattern of accepting an `Error` object or `null` as the first argument.
+         * The `callback` is called with the provided answer as the only argument.
+         *
+         * An error will be thrown if calling `rl.question()` after `rl.close()`.
+         *
+         * Example usage:
+         *
+         * ```js
+         * rl.question('What is your favorite food? ', (answer) => {
+         *   console.log(`Oh, so your favorite food is ${answer}`);
+         * });
+         * ```
+         *
+         * Using an `AbortController` to cancel a question.
+         *
+         * ```js
+         * const ac = new AbortController();
+         * const signal = ac.signal;
+         *
+         * rl.question('What is your favorite food? ', { signal }, (answer) => {
+         *   console.log(`Oh, so your favorite food is ${answer}`);
+         * });
+         *
+         * signal.addEventListener('abort', () => {
+         *   console.log('The food question timed out');
+         * }, { once: true });
+         *
+         * setTimeout(() => ac.abort(), 10000);
+         * ```
+         * @since v0.3.3
+         * @param query A statement or query to write to `output`, prepended to the prompt.
+         * @param callback A callback function that is invoked with the user's input in response to the `query`.
+         */
+        question(query: string, callback: (answer: string) => void): void;
+        question(query: string, options: Abortable, callback: (answer: string) => void): void;
+        /**
+         * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
+         * later if necessary.
+         *
+         * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance.
+         * @since v0.3.4
+         */
+        pause(): this;
+        /**
+         * The `rl.resume()` method resumes the `input` stream if it has been paused.
+         * @since v0.3.4
+         */
+        resume(): this;
+        /**
+         * The `rl.close()` method closes the `Interface` instance and
+         * relinquishes control over the `input` and `output` streams. When called,
+         * the `'close'` event will be emitted.
+         *
+         * Calling `rl.close()` does not immediately stop other events (including `'line'`)
+         * from being emitted by the `Interface` instance.
+         * @since v0.1.98
+         */
+        close(): void;
+        /**
+         * Alias for `rl.close()`.
+         * @since v22.15.0
+         */
+        [Symbol.dispose](): void;
+        /**
+         * The `rl.write()` method will write either `data` or a key sequence identified
+         * by `key` to the `output`. The `key` argument is supported only if `output` is
+         * a `TTY` text terminal. See `TTY keybindings` for a list of key
+         * combinations.
+         *
+         * If `key` is specified, `data` is ignored.
+         *
+         * When called, `rl.write()` will resume the `input` stream if it has been
+         * paused.
+         *
+         * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written.
+         *
+         * ```js
+         * rl.write('Delete this!');
+         * // Simulate Ctrl+U to delete the line written previously
+         * rl.write(null, { ctrl: true, name: 'u' });
+         * ```
+         *
+         * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_.
+         * @since v0.1.98
+         */
+        write(data: string | Buffer, key?: Key): void;
+        write(data: undefined | null | string | Buffer, key: Key): void;
+        /**
+         * Returns the real position of the cursor in relation to the input
+         * prompt + string. Long input (wrapping) strings, as well as multiple
+         * line prompts are included in the calculations.
+         * @since v13.5.0, v12.16.0
+         */
+        getCursorPos(): CursorPos;
+        [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
+    }
+    interface Interface extends InternalEventEmitter<InterfaceEventMap> {}
+    type ReadLine = Interface; // type forwarded for backwards compatibility
+    type Completer = (line: string) => CompleterResult;
+    type AsyncCompleter = (
+        line: string,
+        callback: (err?: null | Error, result?: CompleterResult) => void,
+    ) => void;
+    type CompleterResult = [string[], string];
+    interface ReadLineOptions {
+        /**
+         * The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to
+         */
+        input: NodeJS.ReadableStream;
+        /**
+         * The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to.
+         */
+        output?: NodeJS.WritableStream | undefined;
+        /**
+         * An optional function used for Tab autocompletion.
+         */
+        completer?: Completer | AsyncCompleter | undefined;
+        /**
+         * `true` if the `input` and `output` streams should be treated like a TTY,
+         * and have ANSI/VT100 escape codes written to it.
+         * Default: checking `isTTY` on the `output` stream upon instantiation.
+         */
+        terminal?: boolean | undefined;
+        /**
+         * Initial list of history lines.
+         * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
+         * otherwise the history caching mechanism is not initialized at all.
+         * @default []
+         */
+        history?: string[] | undefined;
+        /**
+         * Maximum number of history lines retained.
+         * To disable the history set this value to `0`.
+         * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
+         * otherwise the history caching mechanism is not initialized at all.
+         * @default 30
+         */
+        historySize?: number | undefined;
+        /**
+         * If `true`, when a new input line added to the history list duplicates an older one,
+         * this removes the older line from the list.
+         * @default false
+         */
+        removeHistoryDuplicates?: boolean | undefined;
+        /**
+         * The prompt string to use.
+         * @default "> "
+         */
+        prompt?: string | undefined;
+        /**
+         * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
+         * both `\r` and `\n` will be treated as separate end-of-line input.
+         * `crlfDelay` will be coerced to a number no less than `100`.
+         * It can be set to `Infinity`, in which case
+         * `\r` followed by `\n` will always be considered a single newline
+         * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
+         * @default 100
+         */
+        crlfDelay?: number | undefined;
+        /**
+         * The duration `readline` will wait for a character
+         * (when reading an ambiguous key sequence in milliseconds
+         * one that can both form a complete key sequence using the input read so far
+         * and can take additional input to complete a longer key sequence).
+         * @default 500
+         */
+        escapeCodeTimeout?: number | undefined;
+        /**
+         * The number of spaces a tab is equal to (minimum 1).
+         * @default 8
+         */
+        tabSize?: number | undefined;
+        /**
+         * Allows closing the interface using an AbortSignal.
+         * Aborting the signal will internally call `close` on the interface.
+         */
+        signal?: AbortSignal | undefined;
+    }
+    /**
+     * The `readline.createInterface()` method creates a new `readline.Interface` instance.
+     *
+     * ```js
+     * import readline from 'node:readline';
+     * const rl = readline.createInterface({
+     *   input: process.stdin,
+     *   output: process.stdout,
+     * });
+     * ```
+     *
+     * Once the `readline.Interface` instance is created, the most common case is to
+     * listen for the `'line'` event:
+     *
+     * ```js
+     * rl.on('line', (line) => {
+     *   console.log(`Received: ${line}`);
+     * });
+     * ```
+     *
+     * If `terminal` is `true` for this instance then the `output` stream will get
+     * the best compatibility if it defines an `output.columns` property and emits
+     * a `'resize'` event on the `output` if or when the columns ever change
+     * (`process.stdout` does this automatically when it is a TTY).
+     *
+     * When creating a `readline.Interface` using `stdin` as input, the program
+     * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
+     * waiting for user input, call `process.stdin.unref()`.
+     * @since v0.1.98
+     */
+    function createInterface(
+        input: NodeJS.ReadableStream,
+        output?: NodeJS.WritableStream,
+        completer?: Completer | AsyncCompleter,
+        terminal?: boolean,
+    ): Interface;
+    function createInterface(options: ReadLineOptions): Interface;
+    /**
+     * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
+     *
+     * Optionally, `interface` specifies a `readline.Interface` instance for which
+     * autocompletion is disabled when copy-pasted input is detected.
+     *
+     * If the `stream` is a `TTY`, then it must be in raw mode.
+     *
+     * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop
+     * the `input` from emitting `'keypress'` events.
+     *
+     * ```js
+     * readline.emitKeypressEvents(process.stdin);
+     * if (process.stdin.isTTY)
+     *   process.stdin.setRawMode(true);
+     * ```
+     *
+     * ## Example: Tiny CLI
+     *
+     * The following example illustrates the use of `readline.Interface` class to
+     * implement a small command-line interface:
+     *
+     * ```js
+     * import readline from 'node:readline';
+     * const rl = readline.createInterface({
+     *   input: process.stdin,
+     *   output: process.stdout,
+     *   prompt: 'OHAI> ',
+     * });
+     *
+     * rl.prompt();
+     *
+     * rl.on('line', (line) => {
+     *   switch (line.trim()) {
+     *     case 'hello':
+     *       console.log('world!');
+     *       break;
+     *     default:
+     *       console.log(`Say what? I might have heard '${line.trim()}'`);
+     *       break;
+     *   }
+     *   rl.prompt();
+     * }).on('close', () => {
+     *   console.log('Have a great day!');
+     *   process.exit(0);
+     * });
+     * ```
+     *
+     * ## Example: Read file stream line-by-Line
+     *
+     * A common use case for `readline` is to consume an input file one line at a
+     * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
+     * well as a `for await...of` loop:
+     *
+     * ```js
+     * import fs from 'node:fs';
+     * import readline from 'node:readline';
+     *
+     * async function processLineByLine() {
+     *   const fileStream = fs.createReadStream('input.txt');
+     *
+     *   const rl = readline.createInterface({
+     *     input: fileStream,
+     *     crlfDelay: Infinity,
+     *   });
+     *   // Note: we use the crlfDelay option to recognize all instances of CR LF
+     *   // ('\r\n') in input.txt as a single line break.
+     *
+     *   for await (const line of rl) {
+     *     // Each line in input.txt will be successively available here as `line`.
+     *     console.log(`Line from file: ${line}`);
+     *   }
+     * }
+     *
+     * processLineByLine();
+     * ```
+     *
+     * Alternatively, one could use the `'line'` event:
+     *
+     * ```js
+     * import fs from 'node:fs';
+     * import readline from 'node:readline';
+     *
+     * const rl = readline.createInterface({
+     *   input: fs.createReadStream('sample.txt'),
+     *   crlfDelay: Infinity,
+     * });
+     *
+     * rl.on('line', (line) => {
+     *   console.log(`Line from file: ${line}`);
+     * });
+     * ```
+     *
+     * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied:
+     *
+     * ```js
+     * import { once } from 'node:events';
+     * import { createReadStream } from 'node:fs';
+     * import { createInterface } from 'node:readline';
+     *
+     * (async function processLineByLine() {
+     *   try {
+     *     const rl = createInterface({
+     *       input: createReadStream('big-file.txt'),
+     *       crlfDelay: Infinity,
+     *     });
+     *
+     *     rl.on('line', (line) => {
+     *       // Process the line.
+     *     });
+     *
+     *     await once(rl, 'close');
+     *
+     *     console.log('File processed.');
+     *   } catch (err) {
+     *     console.error(err);
+     *   }
+     * })();
+     * ```
+     * @since v0.7.7
+     */
+    function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
+    type Direction = -1 | 0 | 1;
+    interface CursorPos {
+        rows: number;
+        cols: number;
+    }
+    /**
+     * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream
+     * in a specified direction identified by `dir`.
+     * @since v0.7.7
+     * @param callback Invoked once the operation completes.
+     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+     */
+    function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
+    /**
+     * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from
+     * the current position of the cursor down.
+     * @since v0.7.7
+     * @param callback Invoked once the operation completes.
+     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+     */
+    function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
+    /**
+     * The `readline.cursorTo()` method moves cursor to the specified position in a
+     * given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
+     * @since v0.7.7
+     * @param callback Invoked once the operation completes.
+     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+     */
+    function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
+    /**
+     * The `readline.moveCursor()` method moves the cursor _relative_ to its current
+     * position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
+     * @since v0.7.7
+     * @param callback Invoked once the operation completes.
+     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+     */
+    function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
+}
+declare module "node:readline" {
+    export * as promises from "node:readline/promises";
+}
+declare module "readline" {
+    export * from "node:readline";
+}

+ 158 - 0
node_modules/@types/node/readline/promises.d.ts

@@ -0,0 +1,158 @@
+declare module "node:readline/promises" {
+    import { Abortable } from "node:events";
+    import {
+        CompleterResult,
+        Direction,
+        Interface as _Interface,
+        ReadLineOptions as _ReadLineOptions,
+    } from "node:readline";
+    /**
+     * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a
+     * single `input` `Readable` stream and a single `output` `Writable` stream.
+     * The `output` stream is used to print prompts for user input that arrives on,
+     * and is read from, the `input` stream.
+     * @since v17.0.0
+     */
+    class Interface extends _Interface {
+        /**
+         * The `rl.question()` method displays the `query` by writing it to the `output`,
+         * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
+         *
+         * When called, `rl.question()` will resume the `input` stream if it has been
+         * paused.
+         *
+         * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
+         *
+         * If the question is called after `rl.close()`, it returns a rejected promise.
+         *
+         * Example usage:
+         *
+         * ```js
+         * const answer = await rl.question('What is your favorite food? ');
+         * console.log(`Oh, so your favorite food is ${answer}`);
+         * ```
+         *
+         * Using an `AbortSignal` to cancel a question.
+         *
+         * ```js
+         * const signal = AbortSignal.timeout(10_000);
+         *
+         * signal.addEventListener('abort', () => {
+         *   console.log('The food question timed out');
+         * }, { once: true });
+         *
+         * const answer = await rl.question('What is your favorite food? ', { signal });
+         * console.log(`Oh, so your favorite food is ${answer}`);
+         * ```
+         * @since v17.0.0
+         * @param query A statement or query to write to `output`, prepended to the prompt.
+         * @return A promise that is fulfilled with the user's input in response to the `query`.
+         */
+        question(query: string): Promise<string>;
+        question(query: string, options: Abortable): Promise<string>;
+    }
+    /**
+     * @since v17.0.0
+     */
+    class Readline {
+        /**
+         * @param stream A TTY stream.
+         */
+        constructor(
+            stream: NodeJS.WritableStream,
+            options?: {
+                autoCommit?: boolean | undefined;
+            },
+        );
+        /**
+         * The `rl.clearLine()` method adds to the internal list of pending action an
+         * action that clears current line of the associated `stream` in a specified
+         * direction identified by `dir`.
+         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+         * @since v17.0.0
+         * @return this
+         */
+        clearLine(dir: Direction): this;
+        /**
+         * The `rl.clearScreenDown()` method adds to the internal list of pending action an
+         * action that clears the associated stream from the current position of the
+         * cursor down.
+         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+         * @since v17.0.0
+         * @return this
+         */
+        clearScreenDown(): this;
+        /**
+         * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
+         * @since v17.0.0
+         */
+        commit(): Promise<void>;
+        /**
+         * The `rl.cursorTo()` method adds to the internal list of pending action an action
+         * that moves cursor to the specified position in the associated `stream`.
+         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+         * @since v17.0.0
+         * @return this
+         */
+        cursorTo(x: number, y?: number): this;
+        /**
+         * The `rl.moveCursor()` method adds to the internal list of pending action an
+         * action that moves the cursor _relative_ to its current position in the
+         * associated `stream`.
+         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
+         * @since v17.0.0
+         * @return this
+         */
+        moveCursor(dx: number, dy: number): this;
+        /**
+         * The `rl.rollback` methods clears the internal list of pending actions without
+         * sending it to the associated `stream`.
+         * @since v17.0.0
+         * @return this
+         */
+        rollback(): this;
+    }
+    type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
+    interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
+        /**
+         * An optional function used for Tab autocompletion.
+         */
+        completer?: Completer | undefined;
+    }
+    /**
+     * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
+     *
+     * ```js
+     * import readlinePromises from 'node:readline/promises';
+     * const rl = readlinePromises.createInterface({
+     *   input: process.stdin,
+     *   output: process.stdout,
+     * });
+     * ```
+     *
+     * Once the `readlinePromises.Interface` instance is created, the most common case
+     * is to listen for the `'line'` event:
+     *
+     * ```js
+     * rl.on('line', (line) => {
+     *   console.log(`Received: ${line}`);
+     * });
+     * ```
+     *
+     * If `terminal` is `true` for this instance then the `output` stream will get
+     * the best compatibility if it defines an `output.columns` property and emits
+     * a `'resize'` event on the `output` if or when the columns ever change
+     * (`process.stdout` does this automatically when it is a TTY).
+     * @since v17.0.0
+     */
+    function createInterface(
+        input: NodeJS.ReadableStream,
+        output?: NodeJS.WritableStream,
+        completer?: Completer,
+        terminal?: boolean,
+    ): Interface;
+    function createInterface(options: ReadLineOptions): Interface;
+}
+declare module "readline/promises" {
+    export * from "node:readline/promises";
+}

+ 405 - 0
node_modules/@types/node/repl.d.ts

@@ -0,0 +1,405 @@
+declare module "node:repl" {
+    import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline";
+    import { InspectOptions } from "node:util";
+    import { Context } from "node:vm";
+    interface ReplOptions {
+        /**
+         * The input prompt to display.
+         * @default "> "
+         */
+        prompt?: string | undefined;
+        /**
+         * The `Readable` stream from which REPL input will be read.
+         * @default process.stdin
+         */
+        input?: NodeJS.ReadableStream | undefined;
+        /**
+         * The `Writable` stream to which REPL output will be written.
+         * @default process.stdout
+         */
+        output?: NodeJS.WritableStream | undefined;
+        /**
+         * If `true`, specifies that the output should be treated as a TTY terminal, and have
+         * ANSI/VT100 escape codes written to it.
+         * Default: checking the value of the `isTTY` property on the output stream upon
+         * instantiation.
+         */
+        terminal?: boolean | undefined;
+        /**
+         * The function to be used when evaluating each given line of input.
+         * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
+         * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
+         * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions)
+         * section for more details.
+         */
+        eval?: REPLEval | undefined;
+        /**
+         * Defines if the repl prints output previews or not.
+         * @default `true` Always `false` in case `terminal` is falsy.
+         */
+        preview?: boolean | undefined;
+        /**
+         * If `true`, specifies that the default `writer` function should include ANSI color
+         * styling to REPL output. If a custom `writer` function is provided then this has no
+         * effect.
+         * @default the REPL instance's `terminal` value
+         */
+        useColors?: boolean | undefined;
+        /**
+         * If `true`, specifies that the default evaluation function will use the JavaScript
+         * `global` as the context as opposed to creating a new separate context for the REPL
+         * instance. The node CLI REPL sets this value to `true`.
+         * @default false
+         */
+        useGlobal?: boolean | undefined;
+        /**
+         * If `true`, specifies that the default writer will not output the return value of a
+         * command if it evaluates to `undefined`.
+         * @default false
+         */
+        ignoreUndefined?: boolean | undefined;
+        /**
+         * The function to invoke to format the output of each command before writing to `output`.
+         * @default a wrapper for `util.inspect`
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output
+         */
+        writer?: REPLWriter | undefined;
+        /**
+         * An optional function used for custom Tab auto completion.
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function
+         */
+        completer?: Completer | AsyncCompleter | undefined;
+        /**
+         * A flag that specifies whether the default evaluator executes all JavaScript commands in
+         * strict mode or default (sloppy) mode.
+         * Accepted values are:
+         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+         *   prefacing every repl statement with `'use strict'`.
+         */
+        replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
+        /**
+         * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
+         * pressed. This cannot be used together with a custom `eval` function.
+         * @default false
+         */
+        breakEvalOnSigint?: boolean | undefined;
+    }
+    type REPLEval = (
+        this: REPLServer,
+        evalCmd: string,
+        context: Context,
+        file: string,
+        cb: (err: Error | null, result: any) => void,
+    ) => void;
+    type REPLWriter = (this: REPLServer, obj: any) => string;
+    /**
+     * This is the default "writer" value, if none is passed in the REPL options,
+     * and it can be overridden by custom print functions.
+     */
+    const writer: REPLWriter & {
+        options: InspectOptions;
+    };
+    type REPLCommandAction = (this: REPLServer, text: string) => void;
+    interface REPLCommand {
+        /**
+         * Help text to be displayed when `.help` is entered.
+         */
+        help?: string | undefined;
+        /**
+         * The function to execute, optionally accepting a single string argument.
+         */
+        action: REPLCommandAction;
+    }
+    interface REPLServerSetupHistoryOptions {
+        filePath?: string | undefined;
+        size?: number | undefined;
+        removeHistoryDuplicates?: boolean | undefined;
+        onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
+    }
+    interface REPLServerEventMap extends InterfaceEventMap {
+        "exit": [];
+        "reset": [context: Context];
+    }
+    /**
+     * Instances of `repl.REPLServer` are created using the {@link start} method
+     * or directly using the JavaScript `new` keyword.
+     *
+     * ```js
+     * import repl from 'node:repl';
+     *
+     * const options = { useColors: true };
+     *
+     * const firstInstance = repl.start(options);
+     * const secondInstance = new repl.REPLServer(options);
+     * ```
+     * @since v0.1.91
+     */
+    class REPLServer extends Interface {
+        /**
+         * NOTE: According to the documentation:
+         *
+         * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
+         * > _should not_ be created directly using the JavaScript `new` keyword.
+         *
+         * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver
+         */
+        private constructor();
+        /**
+         * The `vm.Context` provided to the `eval` function to be used for JavaScript
+         * evaluation.
+         */
+        readonly context: Context;
+        /**
+         * @deprecated since v14.3.0 - Use `input` instead.
+         */
+        readonly inputStream: NodeJS.ReadableStream;
+        /**
+         * @deprecated since v14.3.0 - Use `output` instead.
+         */
+        readonly outputStream: NodeJS.WritableStream;
+        /**
+         * The `Readable` stream from which REPL input will be read.
+         */
+        readonly input: NodeJS.ReadableStream;
+        /**
+         * The `Writable` stream to which REPL output will be written.
+         */
+        readonly output: NodeJS.WritableStream;
+        /**
+         * The commands registered via `replServer.defineCommand()`.
+         */
+        readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
+        /**
+         * A value indicating whether the REPL is currently in "editor mode".
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys
+         */
+        readonly editorMode: boolean;
+        /**
+         * A value indicating whether the `_` variable has been assigned.
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+         */
+        readonly underscoreAssigned: boolean;
+        /**
+         * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
+         *
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+         */
+        readonly last: any;
+        /**
+         * A value indicating whether the `_error` variable has been assigned.
+         *
+         * @since v9.8.0
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+         */
+        readonly underscoreErrAssigned: boolean;
+        /**
+         * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
+         *
+         * @since v9.8.0
+         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
+         */
+        readonly lastError: any;
+        /**
+         * Specified in the REPL options, this is the function to be used when evaluating each
+         * given line of input. If not specified in the REPL options, this is an async wrapper
+         * for the JavaScript `eval()` function.
+         */
+        readonly eval: REPLEval;
+        /**
+         * Specified in the REPL options, this is a value indicating whether the default
+         * `writer` function should include ANSI color styling to REPL output.
+         */
+        readonly useColors: boolean;
+        /**
+         * Specified in the REPL options, this is a value indicating whether the default `eval`
+         * function will use the JavaScript `global` as the context as opposed to creating a new
+         * separate context for the REPL instance.
+         */
+        readonly useGlobal: boolean;
+        /**
+         * Specified in the REPL options, this is a value indicating whether the default `writer`
+         * function should output the result of a command if it evaluates to `undefined`.
+         */
+        readonly ignoreUndefined: boolean;
+        /**
+         * Specified in the REPL options, this is the function to invoke to format the output of
+         * each command before writing to `outputStream`. If not specified in the REPL options,
+         * this will be a wrapper for `util.inspect`.
+         */
+        readonly writer: REPLWriter;
+        /**
+         * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
+         */
+        readonly completer: Completer | AsyncCompleter;
+        /**
+         * Specified in the REPL options, this is a flag that specifies whether the default `eval`
+         * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
+         * Possible values are:
+         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
+         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
+         *    prefacing every repl statement with `'use strict'`.
+         */
+        readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
+        /**
+         * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
+         * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
+         * properties:
+         *
+         * The following example shows two new commands added to the REPL instance:
+         *
+         * ```js
+         * import repl from 'node:repl';
+         *
+         * const replServer = repl.start({ prompt: '> ' });
+         * replServer.defineCommand('sayhello', {
+         *   help: 'Say hello',
+         *   action(name) {
+         *     this.clearBufferedCommand();
+         *     console.log(`Hello, ${name}!`);
+         *     this.displayPrompt();
+         *   },
+         * });
+         * replServer.defineCommand('saybye', function saybye() {
+         *   console.log('Goodbye!');
+         *   this.close();
+         * });
+         * ```
+         *
+         * The new commands can then be used from within the REPL instance:
+         *
+         * ```console
+         * > .sayhello Node.js User
+         * Hello, Node.js User!
+         * > .saybye
+         * Goodbye!
+         * ```
+         * @since v0.3.0
+         * @param keyword The command keyword (_without_ a leading `.` character).
+         * @param cmd The function to invoke when the command is processed.
+         */
+        defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
+        /**
+         * The `replServer.displayPrompt()` method readies the REPL instance for input
+         * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
+         *
+         * When multi-line input is being entered, a pipe `'|'` is printed rather than the
+         * 'prompt'.
+         *
+         * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
+         *
+         * The `replServer.displayPrompt` method is primarily intended to be called from
+         * within the action function for commands registered using the `replServer.defineCommand()` method.
+         * @since v0.1.91
+         */
+        displayPrompt(preserveCursor?: boolean): void;
+        /**
+         * The `replServer.clearBufferedCommand()` method clears any command that has been
+         * buffered but not yet executed. This method is primarily intended to be
+         * called from within the action function for commands registered using the `replServer.defineCommand()` method.
+         * @since v9.0.0
+         */
+        clearBufferedCommand(): void;
+        /**
+         * Initializes a history log file for the REPL instance. When executing the
+         * Node.js binary and using the command-line REPL, a history file is initialized
+         * by default. However, this is not the case when creating a REPL
+         * programmatically. Use this method to initialize a history log file when working
+         * with REPL instances programmatically.
+         * @since v11.10.0
+         * @param historyPath the path to the history file
+         * @param callback called when history writes are ready or upon error
+         */
+        setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
+        setupHistory(
+            historyConfig?: REPLServerSetupHistoryOptions,
+            callback?: (err: Error | null, repl: this) => void,
+        ): void;
+        // #region InternalEventEmitter
+        addListener<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener: (...args: REPLServerEventMap[E]) => void,
+        ): this;
+        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        emit<E extends keyof REPLServerEventMap>(eventName: E, ...args: REPLServerEventMap[E]): boolean;
+        emit(eventName: string | symbol, ...args: any[]): boolean;
+        listenerCount<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener?: (...args: REPLServerEventMap[E]) => void,
+        ): number;
+        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+        listeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
+        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        off<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
+        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        on<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
+        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        once<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener: (...args: REPLServerEventMap[E]) => void,
+        ): this;
+        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependListener<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener: (...args: REPLServerEventMap[E]) => void,
+        ): this;
+        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        prependOnceListener<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener: (...args: REPLServerEventMap[E]) => void,
+        ): this;
+        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        rawListeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
+        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+        removeAllListeners<E extends keyof REPLServerEventMap>(eventName?: E): this;
+        removeAllListeners(eventName?: string | symbol): this;
+        removeListener<E extends keyof REPLServerEventMap>(
+            eventName: E,
+            listener: (...args: REPLServerEventMap[E]) => void,
+        ): this;
+        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+        // #endregion
+    }
+    /**
+     * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
+     */
+    const REPL_MODE_SLOPPY: unique symbol;
+    /**
+     * A flag passed in the REPL options. Evaluates expressions in strict mode.
+     * This is equivalent to prefacing every repl statement with `'use strict'`.
+     */
+    const REPL_MODE_STRICT: unique symbol;
+    /**
+     * The `repl.start()` method creates and starts a {@link REPLServer} instance.
+     *
+     * If `options` is a string, then it specifies the input prompt:
+     *
+     * ```js
+     * import repl from 'node:repl';
+     *
+     * // a Unix style prompt
+     * repl.start('$ ');
+     * ```
+     * @since v0.1.91
+     */
+    function start(options?: string | ReplOptions): REPLServer;
+    /**
+     * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
+     *
+     * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors
+     */
+    class Recoverable extends SyntaxError {
+        err: Error;
+        constructor(err: Error);
+    }
+}
+declare module "repl" {
+    export * from "node:repl";
+}

+ 47 - 0
node_modules/@types/node/sea.d.ts

@@ -0,0 +1,47 @@
+declare module "node:sea" {
+    type AssetKey = string;
+    /**
+     * @since v20.12.0
+     * @return Whether this script is running inside a single-executable application.
+     */
+    function isSea(): boolean;
+    /**
+     * This method can be used to retrieve the assets configured to be bundled into the
+     * single-executable application at build time.
+     * An error is thrown when no matching asset can be found.
+     * @since v20.12.0
+     */
+    function getAsset(key: AssetKey): ArrayBuffer;
+    function getAsset(key: AssetKey, encoding: string): string;
+    /**
+     * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob).
+     * An error is thrown when no matching asset can be found.
+     * @since v20.12.0
+     */
+    function getAssetAsBlob(key: AssetKey, options?: {
+        type: string;
+    }): Blob;
+    /**
+     * This method can be used to retrieve the assets configured to be bundled into the
+     * single-executable application at build time.
+     * An error is thrown when no matching asset can be found.
+     *
+     * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not
+     * return a copy. Instead, it returns the raw asset bundled inside the executable.
+     *
+     * For now, users should avoid writing to the returned array buffer. If the
+     * injected section is not marked as writable or not aligned properly,
+     * writes to the returned array buffer is likely to result in a crash.
+     * @since v20.12.0
+     */
+    function getRawAsset(key: AssetKey): ArrayBuffer;
+    /**
+     * This method can be used to retrieve an array of all the keys of assets
+     * embedded into the single-executable application.
+     * An error is thrown when not running inside a single-executable application.
+     * @since v24.8.0
+     * @returns An array containing all the keys of the assets
+     * embedded in the executable. If no assets are embedded, returns an empty array.
+     */
+    function getAssetKeys(): string[];
+}

+ 1021 - 0
node_modules/@types/node/sqlite.d.ts

@@ -0,0 +1,1021 @@
+declare module "node:sqlite" {
+    import { PathLike } from "node:fs";
+    type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView;
+    type SQLOutputValue = null | number | bigint | string | NodeJS.NonSharedUint8Array;
+    interface DatabaseSyncOptions {
+        /**
+         * If `true`, the database is opened by the constructor. When
+         * this value is `false`, the database must be opened via the `open()` method.
+         * @since v22.5.0
+         * @default true
+         */
+        open?: boolean | undefined;
+        /**
+         * If `true`, foreign key constraints
+         * are enabled. This is recommended but can be disabled for compatibility with
+         * legacy database schemas. The enforcement of foreign key constraints can be
+         * enabled and disabled after opening the database using
+         * [`PRAGMA foreign_keys`](https://www.sqlite.org/pragma.html#pragma_foreign_keys).
+         * @since v22.10.0
+         * @default true
+         */
+        enableForeignKeyConstraints?: boolean | undefined;
+        /**
+         * If `true`, SQLite will accept
+         * [double-quoted string literals](https://www.sqlite.org/quirks.html#dblquote).
+         * This is not recommended but can be
+         * enabled for compatibility with legacy database schemas.
+         * @since v22.10.0
+         * @default false
+         */
+        enableDoubleQuotedStringLiterals?: boolean | undefined;
+        /**
+         * If `true`, the database is opened in read-only mode.
+         * If the database does not exist, opening it will fail.
+         * @since v22.12.0
+         * @default false
+         */
+        readOnly?: boolean | undefined;
+        /**
+         * If `true`, the `loadExtension` SQL function
+         * and the `loadExtension()` method are enabled.
+         * You can call `enableLoadExtension(false)` later to disable this feature.
+         * @since v22.13.0
+         * @default false
+         */
+        allowExtension?: boolean | undefined;
+        /**
+         * The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of
+         * time that SQLite will wait for a database lock to be released before
+         * returning an error.
+         * @since v24.0.0
+         * @default 0
+         */
+        timeout?: number | undefined;
+        /**
+         * If `true`, integer fields are read as JavaScript `BigInt` values. If `false`,
+         * integer fields are read as JavaScript numbers.
+         * @since v24.4.0
+         * @default false
+         */
+        readBigInts?: boolean | undefined;
+        /**
+         * If `true`, query results are returned as arrays instead of objects.
+         * @since v24.4.0
+         * @default false
+         */
+        returnArrays?: boolean | undefined;
+        /**
+         * If `true`, allows binding named parameters without the prefix
+         * character (e.g., `foo` instead of `:foo`).
+         * @since v24.4.40
+         * @default true
+         */
+        allowBareNamedParameters?: boolean | undefined;
+        /**
+         * If `true`, unknown named parameters are ignored when binding.
+         * If `false`, an exception is thrown for unknown named parameters.
+         * @since v24.4.40
+         * @default false
+         */
+        allowUnknownNamedParameters?: boolean | undefined;
+        /**
+         * If `true`, enables the defensive flag. When the defensive flag is enabled,
+         * language features that allow ordinary SQL to deliberately corrupt the database file are disabled.
+         * The defensive flag can also be set using `enableDefensive()`.
+         * @since v25.1.0
+         * @default true
+         */
+        defensive?: boolean | undefined;
+    }
+    interface CreateSessionOptions {
+        /**
+         * A specific table to track changes for. By default, changes to all tables are tracked.
+         * @since v22.12.0
+         */
+        table?: string | undefined;
+        /**
+         * Name of the database to track. This is useful when multiple databases have been added using
+         * [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html).
+         * @since v22.12.0
+         * @default 'main'
+         */
+        db?: string | undefined;
+    }
+    interface ApplyChangesetOptions {
+        /**
+         * Skip changes that, when targeted table name is supplied to this function, return a truthy value.
+         * By default, all changes are attempted.
+         * @since v22.12.0
+         */
+        filter?: ((tableName: string) => boolean) | undefined;
+        /**
+         * A function that determines how to handle conflicts. The function receives one argument,
+         * which can be one of the following values:
+         *
+         * * `SQLITE_CHANGESET_DATA`: A `DELETE` or `UPDATE` change does not contain the expected "before" values.
+         * * `SQLITE_CHANGESET_NOTFOUND`: A row matching the primary key of the `DELETE` or `UPDATE` change does not exist.
+         * * `SQLITE_CHANGESET_CONFLICT`: An `INSERT` change results in a duplicate primary key.
+         * * `SQLITE_CHANGESET_FOREIGN_KEY`: Applying a change would result in a foreign key violation.
+         * * `SQLITE_CHANGESET_CONSTRAINT`: Applying a change results in a `UNIQUE`, `CHECK`, or `NOT NULL` constraint
+         * violation.
+         *
+         * The function should return one of the following values:
+         *
+         * * `SQLITE_CHANGESET_OMIT`: Omit conflicting changes.
+         * * `SQLITE_CHANGESET_REPLACE`: Replace existing values with conflicting changes (only valid with
+             `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT` conflicts).
+         * * `SQLITE_CHANGESET_ABORT`: Abort on conflict and roll back the database.
+         *
+         * When an error is thrown in the conflict handler or when any other value is returned from the handler,
+         * applying the changeset is aborted and the database is rolled back.
+         *
+         * **Default**: A function that returns `SQLITE_CHANGESET_ABORT`.
+         * @since v22.12.0
+         */
+        onConflict?: ((conflictType: number) => number) | undefined;
+    }
+    interface FunctionOptions {
+        /**
+         * If `true`, the [`SQLITE_DETERMINISTIC`](https://www.sqlite.org/c3ref/c_deterministic.html) flag is
+         * set on the created function.
+         * @default false
+         */
+        deterministic?: boolean | undefined;
+        /**
+         * If `true`, the [`SQLITE_DIRECTONLY`](https://www.sqlite.org/c3ref/c_directonly.html) flag is set on
+         * the created function.
+         * @default false
+         */
+        directOnly?: boolean | undefined;
+        /**
+         * If `true`, integer arguments to `function`
+         * are converted to `BigInt`s. If `false`, integer arguments are passed as
+         * JavaScript numbers.
+         * @default false
+         */
+        useBigIntArguments?: boolean | undefined;
+        /**
+         * If `true`, `function` may be invoked with any number of
+         * arguments (between zero and
+         * [`SQLITE_MAX_FUNCTION_ARG`](https://www.sqlite.org/limits.html#max_function_arg)). If `false`,
+         * `function` must be invoked with exactly `function.length` arguments.
+         * @default false
+         */
+        varargs?: boolean | undefined;
+    }
+    interface AggregateOptions<T extends SQLInputValue = SQLInputValue> extends FunctionOptions {
+        /**
+         * The identity value for the aggregation function. This value is used when the aggregation
+         * function is initialized. When a `Function` is passed the identity will be its return value.
+         */
+        start: T | (() => T);
+        /**
+         * The function to call for each row in the aggregation. The
+         * function receives the current state and the row value. The return value of
+         * this function should be the new state.
+         */
+        step: (accumulator: T, ...args: SQLOutputValue[]) => T;
+        /**
+         * The function to call to get the result of the
+         * aggregation. The function receives the final state and should return the
+         * result of the aggregation.
+         */
+        result?: ((accumulator: T) => SQLInputValue) | undefined;
+        /**
+         * When this function is provided, the `aggregate` method will work as a window function.
+         * The function receives the current state and the dropped row value. The return value of this function should be the
+         * new state.
+         */
+        inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
+    }
+    interface PrepareOptions {
+        /**
+         * If `true`, integer fields are read as `BigInt`s.
+         * @since v25.5.0
+         */
+        readBigInts?: boolean | undefined;
+        /**
+         * If `true`, results are returned as arrays.
+         * @since v25.5.0
+         */
+        returnArrays?: boolean | undefined;
+        /**
+         * If `true`, allows binding named parameters without the prefix character.
+         * @since v25.5.0
+         */
+        allowBareNamedParameters?: boolean | undefined;
+        /**
+         * If `true`, unknown named parameters are ignored.
+         * @since v25.5.0
+         */
+        allowUnknownNamedParameters?: boolean | undefined;
+    }
+    /**
+     * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
+     * exposed by this class execute synchronously.
+     * @since v22.5.0
+     */
+    class DatabaseSync implements Disposable {
+        /**
+         * Constructs a new `DatabaseSync` instance.
+         * @param path The path of the database.
+         * A SQLite database can be stored in a file or completely [in memory](https://www.sqlite.org/inmemorydb.html).
+         * To use a file-backed database, the path should be a file path.
+         * To use an in-memory database, the path should be the special name `':memory:'`.
+         * @param options Configuration options for the database connection.
+         */
+        constructor(path: PathLike, options?: DatabaseSyncOptions);
+        /**
+         * Registers a new aggregate function with the SQLite database. This method is a wrapper around
+         * [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html).
+         *
+         * When used as a window function, the `result` function will be called multiple times.
+         *
+         * ```js
+         * import { DatabaseSync } from 'node:sqlite';
+         *
+         * const db = new DatabaseSync(':memory:');
+         * db.exec(`
+         *   CREATE TABLE t3(x, y);
+         *   INSERT INTO t3 VALUES ('a', 4),
+         *                         ('b', 5),
+         *                         ('c', 3),
+         *                         ('d', 8),
+         *                         ('e', 1);
+         * `);
+         *
+         * db.aggregate('sumint', {
+         *   start: 0,
+         *   step: (acc, value) => acc + value,
+         * });
+         *
+         * db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 }
+         * ```
+         * @since v24.0.0
+         * @param name The name of the SQLite function to create.
+         * @param options Function configuration settings.
+         */
+        aggregate(name: string, options: AggregateOptions): void;
+        aggregate<T extends SQLInputValue>(name: string, options: AggregateOptions<T>): void;
+        /**
+         * Closes the database connection. An exception is thrown if the database is not
+         * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html).
+         * @since v22.5.0
+         */
+        close(): void;
+        /**
+         * Loads a shared library into the database connection. This method is a wrapper
+         * around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
+         * `allowExtension` option when constructing the `DatabaseSync` instance.
+         * @since v22.13.0
+         * @param path The path to the shared library to load.
+         */
+        loadExtension(path: string): void;
+        /**
+         * Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
+         * method. When `allowExtension` is `false` when constructing, you cannot enable
+         * loading extensions for security reasons.
+         * @since v22.13.0
+         * @param allow Whether to allow loading extensions.
+         */
+        enableLoadExtension(allow: boolean): void;
+        /**
+         * Enables or disables the defensive flag. When the defensive flag is active,
+         * language features that allow ordinary SQL to deliberately corrupt the database file are disabled.
+         * See [`SQLITE_DBCONFIG_DEFENSIVE`](https://www.sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive) in the SQLite documentation for details.
+         * @since v25.1.0
+         * @param active Whether to set the defensive flag.
+         */
+        enableDefensive(active: boolean): void;
+        /**
+         * This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
+         * @since v24.0.0
+         * @param dbName Name of the database. This can be `'main'` (the default primary database) or any other
+         * database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`.
+         * @returns The location of the database file. When using an in-memory database,
+         * this method returns null.
+         */
+        location(dbName?: string): string | null;
+        /**
+         * This method allows one or more SQL statements to be executed without returning
+         * any results. This method is useful when executing SQL statements read from a
+         * file. This method is a wrapper around [`sqlite3_exec()`](https://www.sqlite.org/c3ref/exec.html).
+         * @since v22.5.0
+         * @param sql A SQL string to execute.
+         */
+        exec(sql: string): void;
+        /**
+         * This method is used to create SQLite user-defined functions. This method is a
+         * wrapper around [`sqlite3_create_function_v2()`](https://www.sqlite.org/c3ref/create_function.html).
+         * @since v22.13.0
+         * @param name The name of the SQLite function to create.
+         * @param options Optional configuration settings for the function.
+         * @param func The JavaScript function to call when the SQLite
+         * function is invoked. The return value of this function should be a valid
+         * SQLite data type: see
+         * [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v25.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
+         * The result defaults to `NULL` if the return value is `undefined`.
+         */
+        function(
+            name: string,
+            options: FunctionOptions,
+            func: (...args: SQLOutputValue[]) => SQLInputValue,
+        ): void;
+        function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void;
+        /**
+         * Sets an authorizer callback that SQLite will invoke whenever it attempts to
+         * access data or modify the database schema through prepared statements.
+         * This can be used to implement security policies, audit access, or restrict certain operations.
+         * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html).
+         *
+         * When invoked, the callback receives five arguments:
+         *
+         * * `actionCode` {number} The type of operation being performed (e.g.,
+         *   `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`).
+         * * `arg1` {string|null} The first argument (context-dependent, often a table name).
+         * * `arg2` {string|null} The second argument (context-dependent, often a column name).
+         * * `dbName` {string|null} The name of the database.
+         * * `triggerOrView` {string|null} The name of the trigger or view causing the access.
+         *
+         * The callback must return one of the following constants:
+         *
+         * * `SQLITE_OK` - Allow the operation.
+         * * `SQLITE_DENY` - Deny the operation (causes an error).
+         * * `SQLITE_IGNORE` - Ignore the operation (silently skip).
+         *
+         * ```js
+         * import { DatabaseSync, constants } from 'node:sqlite';
+         * const db = new DatabaseSync(':memory:');
+         *
+         * // Set up an authorizer that denies all table creation
+         * db.setAuthorizer((actionCode) => {
+         *   if (actionCode === constants.SQLITE_CREATE_TABLE) {
+         *     return constants.SQLITE_DENY;
+         *   }
+         *   return constants.SQLITE_OK;
+         * });
+         *
+         * // This will work
+         * db.prepare('SELECT 1').get();
+         *
+         * // This will throw an error due to authorization denial
+         * try {
+         *   db.exec('CREATE TABLE blocked (id INTEGER)');
+         * } catch (err) {
+         *   console.log('Operation blocked:', err.message);
+         * }
+         * ```
+         * @since v24.10.0
+         * @param callback The authorizer function to set, or `null` to
+         * clear the current authorizer.
+         */
+        setAuthorizer(
+            callback:
+                | ((
+                    actionCode: number,
+                    arg1: string | null,
+                    arg2: string | null,
+                    dbName: string | null,
+                    triggerOrView: string | null,
+                ) => number)
+                | null,
+        ): void;
+        /**
+         * Whether the database is currently open or not.
+         * @since v22.15.0
+         */
+        readonly isOpen: boolean;
+        /**
+         * Whether the database is currently within a transaction. This method
+         * is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html).
+         * @since v24.0.0
+         */
+        readonly isTransaction: boolean;
+        /**
+         * Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via
+         * the constructor. An exception is thrown if the database is already open.
+         * @since v22.5.0
+         */
+        open(): void;
+        /**
+         * Compiles a SQL statement into a [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This method is a wrapper
+         * around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).
+         * @since v22.5.0
+         * @param sql A SQL string to compile to a prepared statement.
+         * @param options Optional configuration for the prepared statement.
+         * @return The prepared statement.
+         */
+        prepare(sql: string, options?: PrepareOptions): StatementSync;
+        /**
+         * Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache
+         * for storing prepared statements. This allows for the efficient reuse of
+         * prepared statements by tagging them with a unique identifier.
+         *
+         * When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared
+         * statement for the corresponding SQL query string already exists in the cache.
+         * If it does, the cached statement is used. If not, a new prepared statement is
+         * created, executed, and then stored in the cache for future use. This mechanism
+         * helps to avoid the overhead of repeatedly parsing and preparing the same SQL
+         * statements.
+         *
+         * Tagged statements bind the placeholder values from the template literal as
+         * parameters to the underlying prepared statement. For example:
+         *
+         * ```js
+         * sqlTagStore.get`SELECT ${value}`;
+         * ```
+         *
+         * is equivalent to:
+         *
+         * ```js
+         * db.prepare('SELECT ?').get(value);
+         * ```
+         *
+         * However, in the first example, the tag store will cache the underlying prepared
+         * statement for future use.
+         *
+         * > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to
+         * > the prepared statement. This differs from its behavior in _untagged_ template
+         * > literals, where it performs string interpolation.
+         * >
+         * > ```js
+         * > // This a safe example of binding a parameter to a tagged statement.
+         * > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`;
+         * >
+         * > // This is an *unsafe* example of an untagged template string.
+         * > // `id` is interpolated into the query text as a string.
+         * > // This can lead to SQL injection and data corruption.
+         * > db.run(`INSERT INTO t1 (id) VALUES (${id})`);
+         * > ```
+         *
+         * The tag store will match a statement from the cache if the query strings
+         * (including the positions of any bound placeholders) are identical.
+         *
+         * ```js
+         * // The following statements will match in the cache:
+         * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
+         * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`;
+         *
+         * // The following statements will not match, as the query strings
+         * // and bound placeholders differ:
+         * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
+         * sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`;
+         *
+         * // The following statements will not match, as matches are case-sensitive:
+         * sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
+         * sqlTagStore.get`select * from t1 where id = ${id} and active = 1`;
+         * ```
+         *
+         * The only way of binding parameters in tagged statements is with the `${value}`
+         * syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query
+         * string itself.
+         *
+         * ```js
+         * import { DatabaseSync } from 'node:sqlite';
+         *
+         * const db = new DatabaseSync(':memory:');
+         * const sql = db.createSQLTagStore();
+         *
+         * db.exec('CREATE TABLE users (id INT, name TEXT)');
+         *
+         * // Using the 'run' method to insert data.
+         * // The tagged literal is used to identify the prepared statement.
+         * sql.run`INSERT INTO users VALUES (1, 'Alice')`;
+         * sql.run`INSERT INTO users VALUES (2, 'Bob')`;
+         *
+         * // Using the 'get' method to retrieve a single row.
+         * const name = 'Alice';
+         * const user = sql.get`SELECT * FROM users WHERE name = ${name}`;
+         * console.log(user); // { id: 1, name: 'Alice' }
+         *
+         * // Using the 'all' method to retrieve all rows.
+         * const allUsers = sql.all`SELECT * FROM users ORDER BY id`;
+         * console.log(allUsers);
+         * // [
+         * //   { id: 1, name: 'Alice' },
+         * //   { id: 2, name: 'Bob' }
+         * // ]
+         * ```
+         * @since v24.9.0
+         * @returns A new SQL tag store for caching prepared statements.
+         */
+        createTagStore(maxSize?: number): SQLTagStore;
+        /**
+         * Creates and attaches a session to the database. This method is a wrapper around
+         * [`sqlite3session_create()`](https://www.sqlite.org/session/sqlite3session_create.html) and
+         * [`sqlite3session_attach()`](https://www.sqlite.org/session/sqlite3session_attach.html).
+         * @param options The configuration options for the session.
+         * @returns A session handle.
+         * @since v22.12.0
+         */
+        createSession(options?: CreateSessionOptions): Session;
+        /**
+         * An exception is thrown if the database is not
+         * open. This method is a wrapper around
+         * [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
+         *
+         * ```js
+         * import { DatabaseSync } from 'node:sqlite';
+         *
+         * const sourceDb = new DatabaseSync(':memory:');
+         * const targetDb = new DatabaseSync(':memory:');
+         *
+         * sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
+         * targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
+         *
+         * const session = sourceDb.createSession();
+         *
+         * const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
+         * insert.run(1, 'hello');
+         * insert.run(2, 'world');
+         *
+         * const changeset = session.changeset();
+         * targetDb.applyChangeset(changeset);
+         * // Now that the changeset has been applied, targetDb contains the same data as sourceDb.
+         * ```
+         * @param changeset A binary changeset or patchset.
+         * @param options The configuration options for how the changes will be applied.
+         * @returns Whether the changeset was applied successfully without being aborted.
+         * @since v22.12.0
+         */
+        applyChangeset(changeset: Uint8Array, options?: ApplyChangesetOptions): boolean;
+        /**
+         * Closes the database connection. If the database connection is already closed
+         * then this is a no-op.
+         * @since v22.15.0
+         */
+        [Symbol.dispose](): void;
+    }
+    /**
+     * @since v22.12.0
+     */
+    interface Session {
+        /**
+         * Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times.
+         * An exception is thrown if the database or the session is not open. This method is a wrapper around
+         * [`sqlite3session_changeset()`](https://www.sqlite.org/session/sqlite3session_changeset.html).
+         * @returns Binary changeset that can be applied to other databases.
+         * @since v22.12.0
+         */
+        changeset(): NodeJS.NonSharedUint8Array;
+        /**
+         * Similar to the method above, but generates a more compact patchset. See
+         * [Changesets and Patchsets](https://www.sqlite.org/sessionintro.html#changesets_and_patchsets)
+         * in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a
+         * wrapper around
+         * [`sqlite3session_patchset()`](https://www.sqlite.org/session/sqlite3session_patchset.html).
+         * @returns Binary patchset that can be applied to other databases.
+         * @since v22.12.0
+         */
+        patchset(): NodeJS.NonSharedUint8Array;
+        /**
+         * Closes the session. An exception is thrown if the database or the session is not open. This method is a
+         * wrapper around
+         * [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
+         */
+        close(): void;
+        /**
+         * Closes the session. If the session is already closed, does nothing.
+         * @since v24.9.0
+         */
+        [Symbol.dispose](): void;
+    }
+    /**
+     * This class represents a single LRU (Least Recently Used) cache for storing
+     * prepared statements.
+     *
+     * Instances of this class are created via the `database.createTagStore()`
+     * method, not by using a constructor. The store caches prepared statements based
+     * on the provided SQL query string. When the same query is seen again, the store
+     * retrieves the cached statement and safely applies the new values through
+     * parameter binding, thereby preventing attacks like SQL injection.
+     *
+     * The cache has a maxSize that defaults to 1000 statements, but a custom size can
+     * be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this
+     * class execute synchronously.
+     * @since v24.9.0
+     */
+    interface SQLTagStore {
+        /**
+         * Executes the given SQL query and returns all resulting rows as an array of
+         * objects.
+         *
+         * This function is intended to be used as a template literal tag, not to be
+         * called directly.
+         * @since v24.9.0
+         * @param stringElements Template literal elements containing the SQL
+         * query.
+         * @param boundParameters Parameter values to be bound to placeholders in the template string.
+         * @returns An array of objects representing the rows returned by the query.
+         */
+        all(
+            stringElements: TemplateStringsArray,
+            ...boundParameters: SQLInputValue[]
+        ): Record<string, SQLOutputValue>[];
+        /**
+         * Executes the given SQL query and returns the first resulting row as an object.
+         *
+         * This function is intended to be used as a template literal tag, not to be
+         * called directly.
+         * @since v24.9.0
+         * @param stringElements Template literal elements containing the SQL
+         * query.
+         * @param boundParameters Parameter values to be bound to placeholders in the template string.
+         * @returns An object representing the first row returned by
+         * the query, or `undefined` if no rows are returned.
+         */
+        get(
+            stringElements: TemplateStringsArray,
+            ...boundParameters: SQLInputValue[]
+        ): Record<string, SQLOutputValue> | undefined;
+        /**
+         * Executes the given SQL query and returns an iterator over the resulting rows.
+         *
+         * This function is intended to be used as a template literal tag, not to be
+         * called directly.
+         * @since v24.9.0
+         * @param stringElements Template literal elements containing the SQL
+         * query.
+         * @param boundParameters Parameter values to be bound to placeholders in the template string.
+         * @returns An iterator that yields objects representing the rows returned by the query.
+         */
+        iterate(
+            stringElements: TemplateStringsArray,
+            ...boundParameters: SQLInputValue[]
+        ): NodeJS.Iterator<Record<string, SQLOutputValue>>;
+        /**
+         * Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE).
+         *
+         * This function is intended to be used as a template literal tag, not to be
+         * called directly.
+         * @since v24.9.0
+         * @param stringElements Template literal elements containing the SQL
+         * query.
+         * @param boundParameters Parameter values to be bound to placeholders in the template string.
+         * @returns An object containing information about the execution, including `changes` and `lastInsertRowid`.
+         */
+        run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges;
+        /**
+         * A read-only property that returns the number of prepared statements currently in the cache.
+         * @since v24.9.0
+         */
+        readonly size: number;
+        /**
+         * A read-only property that returns the maximum number of prepared statements the cache can hold.
+         * @since v24.9.0
+         */
+        readonly capacity: number;
+        /**
+         * A read-only property that returns the `DatabaseSync` object associated with this `SQLTagStore`.
+         * @since v24.9.0
+         */
+        readonly db: DatabaseSync;
+        /**
+         * Resets the LRU cache, clearing all stored prepared statements.
+         * @since v24.9.0
+         */
+        clear(): void;
+    }
+    interface StatementColumnMetadata {
+        /**
+         * The unaliased name of the column in the origin
+         * table, or `null` if the column is the result of an expression or subquery.
+         * This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
+         */
+        column: string | null;
+        /**
+         * The unaliased name of the origin database, or
+         * `null` if the column is the result of an expression or subquery. This
+         * property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
+         */
+        database: string | null;
+        /**
+         * The name assigned to the column in the result set of a
+         * `SELECT` statement. This property is the result of
+         * [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html).
+         */
+        name: string;
+        /**
+         * The unaliased name of the origin table, or `null` if
+         * the column is the result of an expression or subquery. This property is the
+         * result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
+         */
+        table: string | null;
+        /**
+         * The declared data type of the column, or `null` if the
+         * column is the result of an expression or subquery. This property is the
+         * result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html).
+         */
+        type: string | null;
+    }
+    interface StatementResultingChanges {
+        /**
+         * The number of rows modified, inserted, or deleted by the most recently completed `INSERT`, `UPDATE`, or `DELETE` statement.
+         * This field is either a number or a `BigInt` depending on the prepared statement's configuration.
+         * This property is the result of [`sqlite3_changes64()`](https://www.sqlite.org/c3ref/changes.html).
+         */
+        changes: number | bigint;
+        /**
+         * The most recently inserted rowid.
+         * This field is either a number or a `BigInt` depending on the prepared statement's configuration.
+         * This property is the result of [`sqlite3_last_insert_rowid()`](https://www.sqlite.org/c3ref/last_insert_rowid.html).
+         */
+        lastInsertRowid: number | bigint;
+    }
+    /**
+     * This class represents a single [prepared statement](https://www.sqlite.org/c3ref/stmt.html). This class cannot be
+     * instantiated via its constructor. Instead, instances are created via the`database.prepare()` method. All APIs exposed by this class execute
+     * synchronously.
+     *
+     * A prepared statement is an efficient binary representation of the SQL used to
+     * create it. Prepared statements are parameterizable, and can be invoked multiple
+     * times with different bound values. Parameters also offer protection against [SQL injection](https://en.wikipedia.org/wiki/SQL_injection) attacks. For these reasons, prepared statements are
+     * preferred
+     * over hand-crafted SQL strings when handling user input.
+     * @since v22.5.0
+     */
+    class StatementSync {
+        private constructor();
+        /**
+         * This method executes a prepared statement and returns all results as an array of
+         * objects. If the prepared statement does not return any results, this method
+         * returns an empty array. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
+         * the values in `namedParameters` and `anonymousParameters`.
+         * @since v22.5.0
+         * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+         * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+         * @return An array of objects. Each object corresponds to a row returned by executing the prepared statement. The keys and values of each object correspond to the column names and values of
+         * the row.
+         */
+        all(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue>[];
+        all(
+            namedParameters: Record<string, SQLInputValue>,
+            ...anonymousParameters: SQLInputValue[]
+        ): Record<string, SQLOutputValue>[];
+        /**
+         * This method is used to retrieve information about the columns returned by the
+         * prepared statement.
+         * @since v23.11.0
+         * @returns An array of objects. Each object corresponds to a column
+         * in the prepared statement, and contains the following properties:
+         */
+        columns(): StatementColumnMetadata[];
+        /**
+         * The source SQL text of the prepared statement with parameter
+         * placeholders replaced by the values that were used during the most recent
+         * execution of this prepared statement. This property is a wrapper around
+         * [`sqlite3_expanded_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
+         * @since v22.5.0
+         */
+        readonly expandedSQL: string;
+        /**
+         * This method executes a prepared statement and returns the first result as an
+         * object. If the prepared statement does not return any results, this method
+         * returns `undefined`. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
+         * values in `namedParameters` and `anonymousParameters`.
+         * @since v22.5.0
+         * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+         * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+         * @return An object corresponding to the first row returned by executing the prepared statement. The keys and values of the object correspond to the column names and values of the row. If no
+         * rows were returned from the database then this method returns `undefined`.
+         */
+        get(...anonymousParameters: SQLInputValue[]): Record<string, SQLOutputValue> | undefined;
+        get(
+            namedParameters: Record<string, SQLInputValue>,
+            ...anonymousParameters: SQLInputValue[]
+        ): Record<string, SQLOutputValue> | undefined;
+        /**
+         * This method executes a prepared statement and returns an iterator of
+         * objects. If the prepared statement does not return any results, this method
+         * returns an empty iterator. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using
+         * the values in `namedParameters` and `anonymousParameters`.
+         * @since v22.13.0
+         * @param namedParameters An optional object used to bind named parameters.
+         * The keys of this object are used to configure the mapping.
+         * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+         * @returns An iterable iterator of objects. Each object corresponds to a row
+         * returned by executing the prepared statement. The keys and values of each
+         * object correspond to the column names and values of the row.
+         */
+        iterate(...anonymousParameters: SQLInputValue[]): NodeJS.Iterator<Record<string, SQLOutputValue>>;
+        iterate(
+            namedParameters: Record<string, SQLInputValue>,
+            ...anonymousParameters: SQLInputValue[]
+        ): NodeJS.Iterator<Record<string, SQLOutputValue>>;
+        /**
+         * This method executes a prepared statement and returns an object summarizing the
+         * resulting changes. The prepared statement [parameters are bound](https://www.sqlite.org/c3ref/bind_blob.html) using the
+         * values in `namedParameters` and `anonymousParameters`.
+         * @since v22.5.0
+         * @param namedParameters An optional object used to bind named parameters. The keys of this object are used to configure the mapping.
+         * @param anonymousParameters Zero or more values to bind to anonymous parameters.
+         */
+        run(...anonymousParameters: SQLInputValue[]): StatementResultingChanges;
+        run(
+            namedParameters: Record<string, SQLInputValue>,
+            ...anonymousParameters: SQLInputValue[]
+        ): StatementResultingChanges;
+        /**
+         * The names of SQLite parameters begin with a prefix character. By default,`node:sqlite` requires that this prefix character is present when binding
+         * parameters. However, with the exception of dollar sign character, these
+         * prefix characters also require extra quoting when used in object keys.
+         *
+         * To improve ergonomics, this method can be used to also allow bare named
+         * parameters, which do not require the prefix character in JavaScript code. There
+         * are several caveats to be aware of when enabling bare named parameters:
+         *
+         * * The prefix character is still required in SQL.
+         * * The prefix character is still allowed in JavaScript. In fact, prefixed names
+         * will have slightly better binding performance.
+         * * Using ambiguous named parameters, such as `$k` and `@k`, in the same prepared
+         * statement will result in an exception as it cannot be determined how to bind
+         * a bare name.
+         * @since v22.5.0
+         * @param enabled Enables or disables support for binding named parameters without the prefix character.
+         */
+        setAllowBareNamedParameters(enabled: boolean): void;
+        /**
+         * By default, if an unknown name is encountered while binding parameters, an
+         * exception is thrown. This method allows unknown named parameters to be ignored.
+         * @since v22.15.0
+         * @param enabled Enables or disables support for unknown named parameters.
+         */
+        setAllowUnknownNamedParameters(enabled: boolean): void;
+        /**
+         * When enabled, query results returned by the `all()`, `get()`, and `iterate()` methods will be returned as arrays instead
+         * of objects.
+         * @since v24.0.0
+         * @param enabled Enables or disables the return of query results as arrays.
+         */
+        setReturnArrays(enabled: boolean): void;
+        /**
+         * When reading from the database, SQLite `INTEGER`s are mapped to JavaScript
+         * numbers by default. However, SQLite `INTEGER`s can store values larger than
+         * JavaScript numbers are capable of representing. In such cases, this method can
+         * be used to read `INTEGER` data using JavaScript `BigInt`s. This method has no
+         * impact on database write operations where numbers and `BigInt`s are both
+         * supported at all times.
+         * @since v22.5.0
+         * @param enabled Enables or disables the use of `BigInt`s when reading `INTEGER` fields from the database.
+         */
+        setReadBigInts(enabled: boolean): void;
+        /**
+         * The source SQL text of the prepared statement. This property is a
+         * wrapper around [`sqlite3_sql()`](https://www.sqlite.org/c3ref/expanded_sql.html).
+         * @since v22.5.0
+         */
+        readonly sourceSQL: string;
+    }
+    interface BackupOptions {
+        /**
+         * Name of the source database. This can be `'main'` (the default primary database) or any other
+         * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
+         * @default 'main'
+         */
+        source?: string | undefined;
+        /**
+         * Name of the target database. This can be `'main'` (the default primary database) or any other
+         * database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
+         * @default 'main'
+         */
+        target?: string | undefined;
+        /**
+         * Number of pages to be transmitted in each batch of the backup.
+         * @default 100
+         */
+        rate?: number | undefined;
+        /**
+         * An optional callback function that will be called after each backup step. The argument passed
+         * to this callback is an `Object` with `remainingPages` and `totalPages` properties, describing the current progress
+         * of the backup operation.
+         */
+        progress?: ((progressInfo: BackupProgressInfo) => void) | undefined;
+    }
+    interface BackupProgressInfo {
+        totalPages: number;
+        remainingPages: number;
+    }
+    /**
+     * This method makes a database backup. This method abstracts the
+     * [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit),
+     * [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep)
+     * and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions.
+     *
+     * The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same
+     * `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause
+     * the backup process to restart.
+     *
+     * ```js
+     * import { backup, DatabaseSync } from 'node:sqlite';
+     *
+     * const sourceDb = new DatabaseSync('source.db');
+     * const totalPagesTransferred = await backup(sourceDb, 'backup.db', {
+     *   rate: 1, // Copy one page at a time.
+     *   progress: ({ totalPages, remainingPages }) => {
+     *     console.log('Backup in progress', { totalPages, remainingPages });
+     *   },
+     * });
+     *
+     * console.log('Backup completed', totalPagesTransferred);
+     * ```
+     * @since v23.8.0
+     * @param sourceDb The database to backup. The source database must be open.
+     * @param path The path where the backup will be created. If the file already exists,
+     * the contents will be overwritten.
+     * @param options Optional configuration for the backup. The
+     * following properties are supported:
+     * @returns A promise that fulfills with the total number of backed-up pages upon completion, or rejects if an
+     * error occurs.
+     */
+    function backup(sourceDb: DatabaseSync, path: PathLike, options?: BackupOptions): Promise<number>;
+    /**
+     * @since v22.13.0
+     */
+    namespace constants {
+        /**
+         * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is present in the database, but one or more other (non primary-key) fields modified by the update do not contain the expected "before" values.
+         * @since v22.14.0
+         */
+        const SQLITE_CHANGESET_DATA: number;
+        /**
+         * The conflict handler is invoked with this constant when processing a DELETE or UPDATE change if a row with the required PRIMARY KEY fields is not present in the database.
+         * @since v22.14.0
+         */
+        const SQLITE_CHANGESET_NOTFOUND: number;
+        /**
+         * This constant is passed to the conflict handler while processing an INSERT change if the operation would result in duplicate primary key values.
+         * @since v22.14.0
+         */
+        const SQLITE_CHANGESET_CONFLICT: number;
+        /**
+         * If foreign key handling is enabled, and applying a changeset leaves the database in a state containing foreign key violations, the conflict handler is invoked with this constant exactly once before the changeset is committed. If the conflict handler returns `SQLITE_CHANGESET_OMIT`, the changes, including those that caused the foreign key constraint violation, are committed. Or, if it returns `SQLITE_CHANGESET_ABORT`, the changeset is rolled back.
+         * @since v22.14.0
+         */
+        const SQLITE_CHANGESET_FOREIGN_KEY: number;
+        /**
+         * Conflicting changes are omitted.
+         * @since v22.12.0
+         */
+        const SQLITE_CHANGESET_OMIT: number;
+        /**
+         * Conflicting changes replace existing values. Note that this value can only be returned when the type of conflict is either `SQLITE_CHANGESET_DATA` or `SQLITE_CHANGESET_CONFLICT`.
+         * @since v22.12.0
+         */
+        const SQLITE_CHANGESET_REPLACE: number;
+        /**
+         * Abort when a change encounters a conflict and roll back database.
+         * @since v22.12.0
+         */
+        const SQLITE_CHANGESET_ABORT: number;
+        /**
+         * Deny the operation and cause an error to be returned.
+         * @since v24.10.0
+         */
+        const SQLITE_DENY: number;
+        /**
+         * Ignore the operation and continue as if it had never been requested.
+         * @since 24.10.0
+         */
+        const SQLITE_IGNORE: number;
+        /**
+         * Allow the operation to proceed normally.
+         * @since v24.10.0
+         */
+        const SQLITE_OK: number;
+        const SQLITE_CREATE_INDEX: number;
+        const SQLITE_CREATE_TABLE: number;
+        const SQLITE_CREATE_TEMP_INDEX: number;
+        const SQLITE_CREATE_TEMP_TABLE: number;
+        const SQLITE_CREATE_TEMP_TRIGGER: number;
+        const SQLITE_CREATE_TEMP_VIEW: number;
+        const SQLITE_CREATE_TRIGGER: number;
+        const SQLITE_CREATE_VIEW: number;
+        const SQLITE_DELETE: number;
+        const SQLITE_DROP_INDEX: number;
+        const SQLITE_DROP_TABLE: number;
+        const SQLITE_DROP_TEMP_INDEX: number;
+        const SQLITE_DROP_TEMP_TABLE: number;
+        const SQLITE_DROP_TEMP_TRIGGER: number;
+        const SQLITE_DROP_TEMP_VIEW: number;
+        const SQLITE_DROP_TRIGGER: number;
+        const SQLITE_DROP_VIEW: number;
+        const SQLITE_INSERT: number;
+        const SQLITE_PRAGMA: number;
+        const SQLITE_READ: number;
+        const SQLITE_SELECT: number;
+        const SQLITE_TRANSACTION: number;
+        const SQLITE_UPDATE: number;
+        const SQLITE_ATTACH: number;
+        const SQLITE_DETACH: number;
+        const SQLITE_ALTER_TABLE: number;
+        const SQLITE_REINDEX: number;
+        const SQLITE_ANALYZE: number;
+        const SQLITE_CREATE_VTABLE: number;
+        const SQLITE_DROP_VTABLE: number;
+        const SQLITE_FUNCTION: number;
+        const SQLITE_SAVEPOINT: number;
+        const SQLITE_COPY: number;
+        const SQLITE_RECURSIVE: number;
+    }
+}

+ 1774 - 0
node_modules/@types/node/stream.d.ts

@@ -0,0 +1,1774 @@
+declare module "node:stream" {
+    import { Blob } from "node:buffer";
+    import { Abortable, EventEmitter } from "node:events";
+    import * as promises from "node:stream/promises";
+    import * as web from "node:stream/web";
+    class Stream extends EventEmitter {
+        /**
+         * @since v0.9.4
+         */
+        pipe<T extends NodeJS.WritableStream>(
+            destination: T,
+            options?: Stream.PipeOptions,
+        ): T;
+    }
+    namespace Stream {
+        export { promises, Stream };
+    }
+    namespace Stream {
+        interface PipeOptions {
+            /**
+             * End the writer when the reader ends.
+             * @default true
+             */
+            end?: boolean | undefined;
+        }
+        interface StreamOptions<T extends Stream> extends Abortable {
+            emitClose?: boolean | undefined;
+            highWaterMark?: number | undefined;
+            objectMode?: boolean | undefined;
+            construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
+            destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined;
+            autoDestroy?: boolean | undefined;
+        }
+        interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
+            encoding?: BufferEncoding | undefined;
+            read?: ((this: T, size: number) => void) | undefined;
+        }
+        interface ReadableIteratorOptions {
+            /**
+             * When set to `false`, calling `return` on the async iterator,
+             * or exiting a `for await...of` iteration using a `break`,
+             * `return`, or `throw` will not destroy the stream.
+             * @default true
+             */
+            destroyOnReturn?: boolean | undefined;
+        }
+        interface ReadableOperatorOptions extends Abortable {
+            /**
+             * The maximum concurrent invocations of `fn` to call
+             * on the stream at once.
+             * @default 1
+             */
+            concurrency?: number | undefined;
+            /**
+             * How many items to buffer while waiting for user consumption
+             * of the output.
+             * @default concurrency * 2 - 1
+             */
+            highWaterMark?: number | undefined;
+        }
+        /** @deprecated Use `ReadableOperatorOptions` instead. */
+        interface ArrayOptions extends ReadableOperatorOptions {}
+        interface ReadableToWebOptions {
+            strategy?: web.QueuingStrategy | undefined;
+            type?: web.ReadableStreamType | undefined;
+        }
+        interface ReadableEventMap {
+            "close": [];
+            "data": [chunk: any];
+            "end": [];
+            "error": [err: Error];
+            "pause": [];
+            "readable": [];
+            "resume": [];
+        }
+        /**
+         * @since v0.9.4
+         */
+        class Readable extends Stream implements NodeJS.ReadableStream {
+            constructor(options?: ReadableOptions);
+            /**
+             * A utility method for creating Readable Streams out of iterators.
+             * @since v12.3.0, v10.17.0
+             * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed.
+             * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`.
+             */
+            static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
+            /**
+             * A utility method for creating a `Readable` from a web `ReadableStream`.
+             * @since v17.0.0
+             */
+            static fromWeb(
+                readableStream: web.ReadableStream,
+                options?: Pick<ReadableOptions, "encoding" | "highWaterMark" | "objectMode" | "signal">,
+            ): Readable;
+            /**
+             * A utility method for creating a web `ReadableStream` from a `Readable`.
+             * @since v17.0.0
+             */
+            static toWeb(
+                streamReadable: NodeJS.ReadableStream,
+                options?: ReadableToWebOptions,
+            ): web.ReadableStream;
+            /**
+             * Returns whether the stream has been read from or cancelled.
+             * @since v16.8.0
+             */
+            static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean;
+            /**
+             * Returns whether the stream was destroyed or errored before emitting `'end'`.
+             * @since v16.8.0
+             */
+            readonly readableAborted: boolean;
+            /**
+             * Is `true` if it is safe to call {@link read}, which means
+             * the stream has not been destroyed or emitted `'error'` or `'end'`.
+             * @since v11.4.0
+             */
+            readable: boolean;
+            /**
+             * Returns whether `'data'` has been emitted.
+             * @since v16.7.0, v14.18.0
+             */
+            readonly readableDidRead: boolean;
+            /**
+             * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method.
+             * @since v12.7.0
+             */
+            readonly readableEncoding: BufferEncoding | null;
+            /**
+             * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v25.x/api/stream.html#event-end) event is emitted.
+             * @since v12.9.0
+             */
+            readonly readableEnded: boolean;
+            /**
+             * This property reflects the current state of a `Readable` stream as described
+             * in the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.
+             * @since v9.4.0
+             */
+            readableFlowing: boolean | null;
+            /**
+             * Returns the value of `highWaterMark` passed when creating this `Readable`.
+             * @since v9.3.0
+             */
+            readonly readableHighWaterMark: number;
+            /**
+             * This property contains the number of bytes (or objects) in the queue
+             * ready to be read. The value provides introspection data regarding
+             * the status of the `highWaterMark`.
+             * @since v9.4.0
+             */
+            readonly readableLength: number;
+            /**
+             * Getter for the property `objectMode` of a given `Readable` stream.
+             * @since v12.3.0
+             */
+            readonly readableObjectMode: boolean;
+            /**
+             * Is `true` after `readable.destroy()` has been called.
+             * @since v8.0.0
+             */
+            destroyed: boolean;
+            /**
+             * Is `true` after `'close'` has been emitted.
+             * @since v18.0.0
+             */
+            readonly closed: boolean;
+            /**
+             * Returns error if the stream has been destroyed with an error.
+             * @since v18.0.0
+             */
+            readonly errored: Error | null;
+            _construct?(callback: (error?: Error | null) => void): void;
+            _read(size: number): void;
+            /**
+             * The `readable.read()` method reads data out of the internal buffer and
+             * returns it. If no data is available to be read, `null` is returned. By default,
+             * the data is returned as a `Buffer` object unless an encoding has been
+             * specified using the `readable.setEncoding()` method or the stream is operating
+             * in object mode.
+             *
+             * The optional `size` argument specifies a specific number of bytes to read. If
+             * `size` bytes are not available to be read, `null` will be returned _unless_ the
+             * stream has ended, in which case all of the data remaining in the internal buffer
+             * will be returned.
+             *
+             * If the `size` argument is not specified, all of the data contained in the
+             * internal buffer will be returned.
+             *
+             * The `size` argument must be less than or equal to 1 GiB.
+             *
+             * The `readable.read()` method should only be called on `Readable` streams
+             * operating in paused mode. In flowing mode, `readable.read()` is called
+             * automatically until the internal buffer is fully drained.
+             *
+             * ```js
+             * const readable = getReadableStreamSomehow();
+             *
+             * // 'readable' may be triggered multiple times as data is buffered in
+             * readable.on('readable', () => {
+             *   let chunk;
+             *   console.log('Stream is readable (new data received in buffer)');
+             *   // Use a loop to make sure we read all currently available data
+             *   while (null !== (chunk = readable.read())) {
+             *     console.log(`Read ${chunk.length} bytes of data...`);
+             *   }
+             * });
+             *
+             * // 'end' will be triggered once when there is no more data available
+             * readable.on('end', () => {
+             *   console.log('Reached end of stream.');
+             * });
+             * ```
+             *
+             * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
+             * are not concatenated. A `while` loop is necessary to consume all data
+             * currently in the buffer. When reading a large file `.read()` may return `null`,
+             * having consumed all buffered content so far, but there is still more data to
+             * come not yet buffered. In this case a new `'readable'` event will be emitted
+             * when there is more data in the buffer. Finally the `'end'` event will be
+             * emitted when there is no more data to come.
+             *
+             * Therefore to read a file's whole contents from a `readable`, it is necessary
+             * to collect chunks across multiple `'readable'` events:
+             *
+             * ```js
+             * const chunks = [];
+             *
+             * readable.on('readable', () => {
+             *   let chunk;
+             *   while (null !== (chunk = readable.read())) {
+             *     chunks.push(chunk);
+             *   }
+             * });
+             *
+             * readable.on('end', () => {
+             *   const content = chunks.join('');
+             * });
+             * ```
+             *
+             * A `Readable` stream in object mode will always return a single item from
+             * a call to `readable.read(size)`, regardless of the value of the `size` argument.
+             *
+             * If the `readable.read()` method returns a chunk of data, a `'data'` event will
+             * also be emitted.
+             *
+             * Calling {@link read} after the `'end'` event has
+             * been emitted will return `null`. No runtime error will be raised.
+             * @since v0.9.4
+             * @param size Optional argument to specify how much data to read.
+             */
+            read(size?: number): any;
+            /**
+             * The `readable.setEncoding()` method sets the character encoding for
+             * data read from the `Readable` stream.
+             *
+             * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data
+             * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the
+             * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
+             * string format.
+             *
+             * The `Readable` stream will properly handle multi-byte characters delivered
+             * through the stream that would otherwise become improperly decoded if simply
+             * pulled from the stream as `Buffer` objects.
+             *
+             * ```js
+             * const readable = getReadableStreamSomehow();
+             * readable.setEncoding('utf8');
+             * readable.on('data', (chunk) => {
+             *   assert.equal(typeof chunk, 'string');
+             *   console.log('Got %d characters of string data:', chunk.length);
+             * });
+             * ```
+             * @since v0.9.4
+             * @param encoding The encoding to use.
+             */
+            setEncoding(encoding: BufferEncoding): this;
+            /**
+             * The `readable.pause()` method will cause a stream in flowing mode to stop
+             * emitting `'data'` events, switching out of flowing mode. Any data that
+             * becomes available will remain in the internal buffer.
+             *
+             * ```js
+             * const readable = getReadableStreamSomehow();
+             * readable.on('data', (chunk) => {
+             *   console.log(`Received ${chunk.length} bytes of data.`);
+             *   readable.pause();
+             *   console.log('There will be no additional data for 1 second.');
+             *   setTimeout(() => {
+             *     console.log('Now data will start flowing again.');
+             *     readable.resume();
+             *   }, 1000);
+             * });
+             * ```
+             *
+             * The `readable.pause()` method has no effect if there is a `'readable'` event listener.
+             * @since v0.9.4
+             */
+            pause(): this;
+            /**
+             * The `readable.resume()` method causes an explicitly paused `Readable` stream to
+             * resume emitting `'data'` events, switching the stream into flowing mode.
+             *
+             * The `readable.resume()` method can be used to fully consume the data from a
+             * stream without actually processing any of that data:
+             *
+             * ```js
+             * getReadableStreamSomehow()
+             *   .resume()
+             *   .on('end', () => {
+             *     console.log('Reached the end, but did not read anything.');
+             *   });
+             * ```
+             *
+             * The `readable.resume()` method has no effect if there is a `'readable'` event listener.
+             * @since v0.9.4
+             */
+            resume(): this;
+            /**
+             * The `readable.isPaused()` method returns the current operating state of the `Readable`.
+             * This is used primarily by the mechanism that underlies the `readable.pipe()` method.
+             * In most typical cases, there will be no reason to use this method directly.
+             *
+             * ```js
+             * const readable = new stream.Readable();
+             *
+             * readable.isPaused(); // === false
+             * readable.pause();
+             * readable.isPaused(); // === true
+             * readable.resume();
+             * readable.isPaused(); // === false
+             * ```
+             * @since v0.11.14
+             */
+            isPaused(): boolean;
+            /**
+             * The `readable.unpipe()` method detaches a `Writable` stream previously attached
+             * using the {@link pipe} method.
+             *
+             * If the `destination` is not specified, then _all_ pipes are detached.
+             *
+             * If the `destination` is specified, but no pipe is set up for it, then
+             * the method does nothing.
+             *
+             * ```js
+             * import fs from 'node:fs';
+             * const readable = getReadableStreamSomehow();
+             * const writable = fs.createWriteStream('file.txt');
+             * // All the data from readable goes into 'file.txt',
+             * // but only for the first second.
+             * readable.pipe(writable);
+             * setTimeout(() => {
+             *   console.log('Stop writing to file.txt.');
+             *   readable.unpipe(writable);
+             *   console.log('Manually close the file stream.');
+             *   writable.end();
+             * }, 1000);
+             * ```
+             * @since v0.9.4
+             * @param destination Optional specific stream to unpipe
+             */
+            unpipe(destination?: NodeJS.WritableStream): this;
+            /**
+             * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
+             * same as `readable.push(null)`, after which no more data can be written. The EOF
+             * signal is put at the end of the buffer and any buffered data will still be
+             * flushed.
+             *
+             * The `readable.unshift()` method pushes a chunk of data back into the internal
+             * buffer. This is useful in certain situations where a stream is being consumed by
+             * code that needs to "un-consume" some amount of data that it has optimistically
+             * pulled out of the source, so that the data can be passed on to some other party.
+             *
+             * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
+             * has been emitted or a runtime error will be thrown.
+             *
+             * Developers using `stream.unshift()` often should consider switching to
+             * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
+             *
+             * ```js
+             * // Pull off a header delimited by \n\n.
+             * // Use unshift() if we get too much.
+             * // Call the callback with (error, header, stream).
+             * import { StringDecoder } from 'node:string_decoder';
+             * function parseHeader(stream, callback) {
+             *   stream.on('error', callback);
+             *   stream.on('readable', onReadable);
+             *   const decoder = new StringDecoder('utf8');
+             *   let header = '';
+             *   function onReadable() {
+             *     let chunk;
+             *     while (null !== (chunk = stream.read())) {
+             *       const str = decoder.write(chunk);
+             *       if (str.includes('\n\n')) {
+             *         // Found the header boundary.
+             *         const split = str.split(/\n\n/);
+             *         header += split.shift();
+             *         const remaining = split.join('\n\n');
+             *         const buf = Buffer.from(remaining, 'utf8');
+             *         stream.removeListener('error', callback);
+             *         // Remove the 'readable' listener before unshifting.
+             *         stream.removeListener('readable', onReadable);
+             *         if (buf.length)
+             *           stream.unshift(buf);
+             *         // Now the body of the message can be read from the stream.
+             *         callback(null, header, stream);
+             *         return;
+             *       }
+             *       // Still reading the header.
+             *       header += str;
+             *     }
+             *   }
+             * }
+             * ```
+             *
+             * Unlike {@link push}, `stream.unshift(chunk)` will not
+             * end the reading process by resetting the internal reading state of the stream.
+             * This can cause unexpected results if `readable.unshift()` is called during a
+             * read (i.e. from within a {@link _read} implementation on a
+             * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
+             * however it is best to simply avoid calling `readable.unshift()` while in the
+             * process of performing a read.
+             * @since v0.9.11
+             * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must
+             * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value.
+             * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
+             */
+            unshift(chunk: any, encoding?: BufferEncoding): void;
+            /**
+             * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more
+             * information.)
+             *
+             * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable`
+             * stream that uses
+             * the old stream as its data source.
+             *
+             * It will rarely be necessary to use `readable.wrap()` but the method has been
+             * provided as a convenience for interacting with older Node.js applications and
+             * libraries.
+             *
+             * ```js
+             * import { OldReader } from './old-api-module.js';
+             * import { Readable } from 'node:stream';
+             * const oreader = new OldReader();
+             * const myReader = new Readable().wrap(oreader);
+             *
+             * myReader.on('readable', () => {
+             *   myReader.read(); // etc.
+             * });
+             * ```
+             * @since v0.9.4
+             * @param stream An "old style" readable stream
+             */
+            wrap(stream: NodeJS.ReadableStream): this;
+            push(chunk: any, encoding?: BufferEncoding): boolean;
+            /**
+             * ```js
+             * import { Readable } from 'node:stream';
+             *
+             * async function* splitToWords(source) {
+             *   for await (const chunk of source) {
+             *     const words = String(chunk).split(' ');
+             *
+             *     for (const word of words) {
+             *       yield word;
+             *     }
+             *   }
+             * }
+             *
+             * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
+             * const words = await wordsStream.toArray();
+             *
+             * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']
+             * ```
+             *
+             * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`.
+             *
+             * This method also allows for an `AbortSignal` to be provided, which will destroy
+             * the composed stream when aborted.
+             *
+             * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information.
+             * @since v19.1.0, v18.13.0
+             * @returns a stream composed with the stream `stream`.
+             */
+            compose(
+                stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void),
+                options?: Abortable,
+            ): Duplex;
+            /**
+             * The iterator created by this method gives users the option to cancel the destruction
+             * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
+             * or if the iterator should destroy the stream if the stream emitted an error during iteration.
+             * @since v16.3.0
+             */
+            iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator<any>;
+            /**
+             * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
+             * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
+             * @since v17.4.0, v16.14.0
+             * @param fn a function to map over every chunk in the stream. Async or not.
+             * @returns a stream mapped with the function *fn*.
+             */
+            map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable;
+            /**
+             * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
+             * and if it returns a truthy value, the chunk will be passed to the result stream.
+             * If the *fn* function returns a promise - that promise will be `await`ed.
+             * @since v17.4.0, v16.14.0
+             * @param fn a function to filter chunks from the stream. Async or not.
+             * @returns a stream filtered with the predicate *fn*.
+             */
+            filter(
+                fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
+                options?: ReadableOperatorOptions,
+            ): Readable;
+            /**
+             * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
+             * If the *fn* function returns a promise - that promise will be `await`ed.
+             *
+             * This method is different from `for await...of` loops in that it can optionally process chunks concurrently.
+             * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option
+             * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`.
+             * In either case the stream will be destroyed.
+             *
+             * This method is different from listening to the `'data'` event in that it uses the `readable` event
+             * in the underlying machinary and can limit the number of concurrent *fn* calls.
+             * @since v17.5.0
+             * @param fn a function to call on each chunk of the stream. Async or not.
+             * @returns a promise for when the stream has finished.
+             */
+            forEach(
+                fn: (data: any, options?: Abortable) => void | Promise<void>,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Promise<void>;
+            /**
+             * This method allows easily obtaining the contents of a stream.
+             *
+             * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended
+             * for interoperability and convenience, not as the primary way to consume streams.
+             * @since v17.5.0
+             * @returns a promise containing an array with the contents of the stream.
+             */
+            toArray(options?: Abortable): Promise<any[]>;
+            /**
+             * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
+             * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
+             * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`.
+             * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`.
+             * @since v17.5.0
+             * @param fn a function to call on each chunk of the stream. Async or not.
+             * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
+             */
+            some(
+                fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Promise<boolean>;
+            /**
+             * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
+             * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy,
+             * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value.
+             * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`.
+             * @since v17.5.0
+             * @param fn a function to call on each chunk of the stream. Async or not.
+             * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value,
+             * or `undefined` if no element was found.
+             */
+            find<T>(
+                fn: (data: any, options?: Abortable) => data is T,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Promise<T | undefined>;
+            find(
+                fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Promise<any>;
+            /**
+             * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
+             * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk
+             * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`.
+             * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`.
+             * @since v17.5.0
+             * @param fn a function to call on each chunk of the stream. Async or not.
+             * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
+             */
+            every(
+                fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Promise<boolean>;
+            /**
+             * This method returns a new stream by applying the given callback to each chunk of the stream
+             * and then flattening the result.
+             *
+             * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams
+             * will be merged (flattened) into the returned stream.
+             * @since v17.5.0
+             * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
+             * @returns a stream flat-mapped with the function *fn*.
+             */
+            flatMap(
+                fn: (data: any, options?: Abortable) => any,
+                options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
+            ): Readable;
+            /**
+             * This method returns a new stream with the first *limit* chunks dropped from the start.
+             * @since v17.5.0
+             * @param limit the number of chunks to drop from the readable.
+             * @returns a stream with *limit* chunks dropped from the start.
+             */
+            drop(limit: number, options?: Abortable): Readable;
+            /**
+             * This method returns a new stream with the first *limit* chunks.
+             * @since v17.5.0
+             * @param limit the number of chunks to take from the readable.
+             * @returns a stream with *limit* chunks taken.
+             */
+            take(limit: number, options?: Abortable): Readable;
+            /**
+             * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
+             * on the previous element. It returns a promise for the final value of the reduction.
+             *
+             * If no *initial* value is supplied the first chunk of the stream is used as the initial value.
+             * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property.
+             *
+             * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter
+             * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method.
+             * @since v17.5.0
+             * @param fn a reducer function to call over every chunk in the stream. Async or not.
+             * @param initial the initial value to use in the reduction.
+             * @returns a promise for the final value of the reduction.
+             */
+            reduce<T>(fn: (previous: any, data: any, options?: Abortable) => T): Promise<T>;
+            reduce<T>(
+                fn: (previous: T, data: any, options?: Abortable) => T,
+                initial: T,
+                options?: Abortable,
+            ): Promise<T>;
+            _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+            /**
+             * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable
+             * stream will release any internal resources and subsequent calls to `push()` will be ignored.
+             *
+             * Once `destroy()` has been called any further calls will be a no-op and no
+             * further errors except from `_destroy()` may be emitted as `'error'`.
+             *
+             * Implementors should not override this method, but instead implement `readable._destroy()`.
+             * @since v8.0.0
+             * @param error Error which will be passed as payload in `'error'` event
+             */
+            destroy(error?: Error): this;
+            /**
+             * @returns `AsyncIterator` to fully consume the stream.
+             * @since v10.0.0
+             */
+            [Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
+            /**
+             * Calls `readable.destroy()` with an `AbortError` and returns
+             * a promise that fulfills when the stream is finished.
+             * @since v20.4.0
+             */
+            [Symbol.asyncDispose](): Promise<void>;
+            // #region InternalEventEmitter
+            addListener<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener: (...args: ReadableEventMap[E]) => void,
+            ): this;
+            addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            emit<E extends keyof ReadableEventMap>(eventName: E, ...args: ReadableEventMap[E]): boolean;
+            emit(eventName: string | symbol, ...args: any[]): boolean;
+            listenerCount<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener?: (...args: ReadableEventMap[E]) => void,
+            ): number;
+            listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+            listeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
+            listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            off<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
+            off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            on<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
+            on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            once<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener: (...args: ReadableEventMap[E]) => void,
+            ): this;
+            once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependListener<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener: (...args: ReadableEventMap[E]) => void,
+            ): this;
+            prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependOnceListener<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener: (...args: ReadableEventMap[E]) => void,
+            ): this;
+            prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            rawListeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
+            rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+            removeAllListeners<E extends keyof ReadableEventMap>(eventName?: E): this;
+            removeAllListeners(eventName?: string | symbol): this;
+            removeListener<E extends keyof ReadableEventMap>(
+                eventName: E,
+                listener: (...args: ReadableEventMap[E]) => void,
+            ): this;
+            removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            // #endregion
+        }
+        interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
+            decodeStrings?: boolean | undefined;
+            defaultEncoding?: BufferEncoding | undefined;
+            write?:
+                | ((
+                    this: T,
+                    chunk: any,
+                    encoding: BufferEncoding,
+                    callback: (error?: Error | null) => void,
+                ) => void)
+                | undefined;
+            writev?:
+                | ((
+                    this: T,
+                    chunks: {
+                        chunk: any;
+                        encoding: BufferEncoding;
+                    }[],
+                    callback: (error?: Error | null) => void,
+                ) => void)
+                | undefined;
+            final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
+        }
+        interface WritableEventMap {
+            "close": [];
+            "drain": [];
+            "error": [err: Error];
+            "finish": [];
+            "pipe": [src: Readable];
+            "unpipe": [src: Readable];
+        }
+        /**
+         * @since v0.9.4
+         */
+        class Writable extends Stream implements NodeJS.WritableStream {
+            constructor(options?: WritableOptions);
+            /**
+             * A utility method for creating a `Writable` from a web `WritableStream`.
+             * @since v17.0.0
+             */
+            static fromWeb(
+                writableStream: web.WritableStream,
+                options?: Pick<WritableOptions, "decodeStrings" | "highWaterMark" | "objectMode" | "signal">,
+            ): Writable;
+            /**
+             * A utility method for creating a web `WritableStream` from a `Writable`.
+             * @since v17.0.0
+             */
+            static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream;
+            /**
+             * Is `true` if it is safe to call `writable.write()`, which means
+             * the stream has not been destroyed, errored, or ended.
+             * @since v11.4.0
+             */
+            writable: boolean;
+            /**
+             * Returns whether the stream was destroyed or errored before emitting `'finish'`.
+             * @since v18.0.0, v16.17.0
+             */
+            readonly writableAborted: boolean;
+            /**
+             * Is `true` after `writable.end()` has been called. This property
+             * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
+             * @since v12.9.0
+             */
+            readonly writableEnded: boolean;
+            /**
+             * Is set to `true` immediately before the `'finish'` event is emitted.
+             * @since v12.6.0
+             */
+            readonly writableFinished: boolean;
+            /**
+             * Return the value of `highWaterMark` passed when creating this `Writable`.
+             * @since v9.3.0
+             */
+            readonly writableHighWaterMark: number;
+            /**
+             * This property contains the number of bytes (or objects) in the queue
+             * ready to be written. The value provides introspection data regarding
+             * the status of the `highWaterMark`.
+             * @since v9.4.0
+             */
+            readonly writableLength: number;
+            /**
+             * Getter for the property `objectMode` of a given `Writable` stream.
+             * @since v12.3.0
+             */
+            readonly writableObjectMode: boolean;
+            /**
+             * Number of times `writable.uncork()` needs to be
+             * called in order to fully uncork the stream.
+             * @since v13.2.0, v12.16.0
+             */
+            readonly writableCorked: number;
+            /**
+             * Is `true` after `writable.destroy()` has been called.
+             * @since v8.0.0
+             */
+            destroyed: boolean;
+            /**
+             * Is `true` after `'close'` has been emitted.
+             * @since v18.0.0
+             */
+            readonly closed: boolean;
+            /**
+             * Returns error if the stream has been destroyed with an error.
+             * @since v18.0.0
+             */
+            readonly errored: Error | null;
+            /**
+             * Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
+             * @since v15.2.0, v14.17.0
+             */
+            readonly writableNeedDrain: boolean;
+            _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
+            _writev?(
+                chunks: {
+                    chunk: any;
+                    encoding: BufferEncoding;
+                }[],
+                callback: (error?: Error | null) => void,
+            ): void;
+            _construct?(callback: (error?: Error | null) => void): void;
+            _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
+            _final(callback: (error?: Error | null) => void): void;
+            /**
+             * The `writable.write()` method writes some data to the stream, and calls the
+             * supplied `callback` once the data has been fully handled. If an error
+             * occurs, the `callback` will be called with the error as its
+             * first argument. The `callback` is called asynchronously and before `'error'` is
+             * emitted.
+             *
+             * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`.
+             * If `false` is returned, further attempts to write data to the stream should
+             * stop until the `'drain'` event is emitted.
+             *
+             * While a stream is not draining, calls to `write()` will buffer `chunk`, and
+             * return false. Once all currently buffered chunks are drained (accepted for
+             * delivery by the operating system), the `'drain'` event will be emitted.
+             * Once `write()` returns false, do not write more chunks
+             * until the `'drain'` event is emitted. While calling `write()` on a stream that
+             * is not draining is allowed, Node.js will buffer all written chunks until
+             * maximum memory usage occurs, at which point it will abort unconditionally.
+             * Even before it aborts, high memory usage will cause poor garbage collector
+             * performance and high RSS (which is not typically released back to the system,
+             * even after the memory is no longer required). Since TCP sockets may never
+             * drain if the remote peer does not read the data, writing a socket that is
+             * not draining may lead to a remotely exploitable vulnerability.
+             *
+             * Writing data while the stream is not draining is particularly
+             * problematic for a `Transform`, because the `Transform` streams are paused
+             * by default until they are piped or a `'data'` or `'readable'` event handler
+             * is added.
+             *
+             * If the data to be written can be generated or fetched on demand, it is
+             * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
+             * possible to respect backpressure and avoid memory issues using the `'drain'` event:
+             *
+             * ```js
+             * function write(data, cb) {
+             *   if (!stream.write(data)) {
+             *     stream.once('drain', cb);
+             *   } else {
+             *     process.nextTick(cb);
+             *   }
+             * }
+             *
+             * // Wait for cb to be called before doing any other write.
+             * write('hello', () => {
+             *   console.log('Write completed, do more writes now.');
+             * });
+             * ```
+             *
+             * A `Writable` stream in object mode will always ignore the `encoding` argument.
+             * @since v0.9.4
+             * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
+             * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
+             * @param callback Callback for when this chunk of data is flushed.
+             * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+             */
+            write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
+            /**
+             * Writes data to the stream, with an explicit encoding for string data.
+             * @see {@link Writable.write} for full details.
+             * @since v0.9.4
+             * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
+             * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
+             * @param encoding The encoding, if `chunk` is a string.
+             * @param callback Callback for when this chunk of data is flushed.
+             * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
+             */
+            write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
+            /**
+             * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
+             * @since v0.11.15
+             * @param encoding The new default encoding
+             */
+            setDefaultEncoding(encoding: BufferEncoding): this;
+            /**
+             * Calling the `writable.end()` method signals that no more data will be written
+             * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
+             * final additional chunk of data to be written immediately before closing the
+             * stream.
+             *
+             * Calling the {@link write} method after calling {@link end} will raise an error.
+             *
+             * ```js
+             * // Write 'hello, ' and then end with 'world!'.
+             * import fs from 'node:fs';
+             * const file = fs.createWriteStream('example.txt');
+             * file.write('hello, ');
+             * file.end('world!');
+             * // Writing more now is not allowed!
+             * ```
+             * @since v0.9.4
+             * @param cb Callback for when the stream is finished.
+             */
+            end(cb?: () => void): this;
+            /**
+             * Signals that no more data will be written, with one final chunk of data.
+             * @see {@link Writable.end} for full details.
+             * @since v0.9.4
+             * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
+             * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
+             * @param cb Callback for when the stream is finished.
+             */
+            end(chunk: any, cb?: () => void): this;
+            /**
+             * Signals that no more data will be written, with one final chunk of data.
+             * @see {@link Writable.end} for full details.
+             * @since v0.9.4
+             * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
+             * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
+             * @param encoding The encoding if `chunk` is a string
+             * @param cb Callback for when the stream is finished.
+             */
+            end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
+            /**
+             * The `writable.cork()` method forces all written data to be buffered in memory.
+             * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
+             *
+             * The primary intent of `writable.cork()` is to accommodate a situation in which
+             * several small chunks are written to the stream in rapid succession. Instead of
+             * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them
+             * all to `writable._writev()`, if present. This prevents a head-of-line blocking
+             * situation where data is being buffered while waiting for the first small chunk
+             * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput.
+             *
+             * See also: `writable.uncork()`, `writable._writev()`.
+             * @since v0.11.2
+             */
+            cork(): void;
+            /**
+             * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
+             *
+             * When using `writable.cork()` and `writable.uncork()` to manage the buffering
+             * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event
+             * loop phase.
+             *
+             * ```js
+             * stream.cork();
+             * stream.write('some ');
+             * stream.write('data ');
+             * process.nextTick(() => stream.uncork());
+             * ```
+             *
+             * If the `writable.cork()` method is called multiple times on a stream, the
+             * same number of calls to `writable.uncork()` must be called to flush the buffered
+             * data.
+             *
+             * ```js
+             * stream.cork();
+             * stream.write('some ');
+             * stream.cork();
+             * stream.write('data ');
+             * process.nextTick(() => {
+             *   stream.uncork();
+             *   // The data will not be flushed until uncork() is called a second time.
+             *   stream.uncork();
+             * });
+             * ```
+             *
+             * See also: `writable.cork()`.
+             * @since v0.11.2
+             */
+            uncork(): void;
+            /**
+             * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable
+             * stream has ended and subsequent calls to `write()` or `end()` will result in
+             * an `ERR_STREAM_DESTROYED` error.
+             * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
+             * Use `end()` instead of destroy if data should flush before close, or wait for
+             * the `'drain'` event before destroying the stream.
+             *
+             * Once `destroy()` has been called any further calls will be a no-op and no
+             * further errors except from `_destroy()` may be emitted as `'error'`.
+             *
+             * Implementors should not override this method,
+             * but instead implement `writable._destroy()`.
+             * @since v8.0.0
+             * @param error Optional, an error to emit with `'error'` event.
+             */
+            destroy(error?: Error): this;
+            /**
+             * Calls `writable.destroy()` with an `AbortError` and returns
+             * a promise that fulfills when the stream is finished.
+             * @since v22.4.0, v20.16.0
+             */
+            [Symbol.asyncDispose](): Promise<void>;
+            // #region InternalEventEmitter
+            addListener<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener: (...args: WritableEventMap[E]) => void,
+            ): this;
+            addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            emit<E extends keyof WritableEventMap>(eventName: E, ...args: WritableEventMap[E]): boolean;
+            emit(eventName: string | symbol, ...args: any[]): boolean;
+            listenerCount<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener?: (...args: WritableEventMap[E]) => void,
+            ): number;
+            listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+            listeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
+            listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            off<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
+            off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            on<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
+            on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            once<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener: (...args: WritableEventMap[E]) => void,
+            ): this;
+            once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependListener<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener: (...args: WritableEventMap[E]) => void,
+            ): this;
+            prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependOnceListener<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener: (...args: WritableEventMap[E]) => void,
+            ): this;
+            prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            rawListeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
+            rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+            removeAllListeners<E extends keyof WritableEventMap>(eventName?: E): this;
+            removeAllListeners(eventName?: string | symbol): this;
+            removeListener<E extends keyof WritableEventMap>(
+                eventName: E,
+                listener: (...args: WritableEventMap[E]) => void,
+            ): this;
+            removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            // #endregion
+        }
+        interface DuplexOptions<T extends Duplex = Duplex> extends ReadableOptions<T>, WritableOptions<T> {
+            allowHalfOpen?: boolean | undefined;
+            readableObjectMode?: boolean | undefined;
+            writableObjectMode?: boolean | undefined;
+            readableHighWaterMark?: number | undefined;
+            writableHighWaterMark?: number | undefined;
+            writableCorked?: number | undefined;
+        }
+        interface DuplexToWebOptions {
+            type?: web.ReadableStreamType | undefined;
+        }
+        interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
+        /**
+         * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
+         *
+         * Examples of `Duplex` streams include:
+         *
+         * * `TCP sockets`
+         * * `zlib streams`
+         * * `crypto streams`
+         * @since v0.9.4
+         */
+        class Duplex extends Stream implements NodeJS.ReadWriteStream {
+            constructor(options?: DuplexOptions);
+            /**
+             * A utility method for creating duplex streams.
+             *
+             * - `Stream` converts writable stream into writable `Duplex` and readable stream
+             *   to `Duplex`.
+             * - `Blob` converts into readable `Duplex`.
+             * - `string` converts into readable `Duplex`.
+             * - `ArrayBuffer` converts into readable `Duplex`.
+             * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
+             * - `AsyncGeneratorFunction` converts into a readable/writable transform
+             *   `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
+             *   `null`.
+             * - `AsyncFunction` converts into a writable `Duplex`. Must return
+             *   either `null` or `undefined`
+             * - `Object ({ writable, readable })` converts `readable` and
+             *   `writable` into `Stream` and then combines them into `Duplex` where the
+             *   `Duplex` will write to the `writable` and read from the `readable`.
+             * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
+             *
+             * @since v16.8.0
+             */
+            static from(
+                src:
+                    | NodeJS.ReadableStream
+                    | NodeJS.WritableStream
+                    | Blob
+                    | string
+                    | Iterable<any>
+                    | AsyncIterable<any>
+                    | ((source: AsyncIterable<any>) => AsyncIterable<any>)
+                    | ((source: AsyncIterable<any>) => Promise<void>)
+                    | Promise<any>
+                    | web.ReadableWritablePair
+                    | web.ReadableStream
+                    | web.WritableStream,
+            ): Duplex;
+            /**
+             * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
+             * @since v17.0.0
+             */
+            static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair;
+            /**
+             * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
+             * @since v17.0.0
+             */
+            static fromWeb(
+                duplexStream: web.ReadableWritablePair,
+                options?: Pick<
+                    DuplexOptions,
+                    "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal"
+                >,
+            ): Duplex;
+            /**
+             * If `false` then the stream will automatically end the writable side when the
+             * readable side ends. Set initially by the `allowHalfOpen` constructor option,
+             * which defaults to `true`.
+             *
+             * This can be changed manually to change the half-open behavior of an existing
+             * `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
+             * @since v0.9.4
+             */
+            allowHalfOpen: boolean;
+            // #region InternalEventEmitter
+            addListener<E extends keyof DuplexEventMap>(
+                eventName: E,
+                listener: (...args: DuplexEventMap[E]) => void,
+            ): this;
+            addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            emit<E extends keyof DuplexEventMap>(eventName: E, ...args: DuplexEventMap[E]): boolean;
+            emit(eventName: string | symbol, ...args: any[]): boolean;
+            listenerCount<E extends keyof DuplexEventMap>(
+                eventName: E,
+                listener?: (...args: DuplexEventMap[E]) => void,
+            ): number;
+            listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
+            listeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
+            listeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            off<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
+            off(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            on<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
+            on(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            once<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
+            once(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependListener<E extends keyof DuplexEventMap>(
+                eventName: E,
+                listener: (...args: DuplexEventMap[E]) => void,
+            ): this;
+            prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            prependOnceListener<E extends keyof DuplexEventMap>(
+                eventName: E,
+                listener: (...args: DuplexEventMap[E]) => void,
+            ): this;
+            prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            rawListeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
+            rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
+            // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
+            removeAllListeners<E extends keyof DuplexEventMap>(eventName?: E): this;
+            removeAllListeners(eventName?: string | symbol): this;
+            removeListener<E extends keyof DuplexEventMap>(
+                eventName: E,
+                listener: (...args: DuplexEventMap[E]) => void,
+            ): this;
+            removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
+            // #endregion
+        }
+        interface Duplex extends Readable, Writable {}
+        /**
+         * The utility function `duplexPair` returns an Array with two items,
+         * each being a `Duplex` stream connected to the other side:
+         *
+         * ```js
+         * const [ sideA, sideB ] = duplexPair();
+         * ```
+         *
+         * Whatever is written to one stream is made readable on the other. It provides
+         * behavior analogous to a network connection, where the data written by the client
+         * becomes readable by the server, and vice-versa.
+         *
+         * The Duplex streams are symmetrical; one or the other may be used without any
+         * difference in behavior.
+         * @param options A value to pass to both {@link Duplex} constructors,
+         * to set options such as buffering.
+         * @since v22.6.0
+         */
+        function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
+        type TransformCallback = (error?: Error | null, data?: any) => void;
+        interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
+            transform?:
+                | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void)
+                | undefined;
+            flush?: ((this: T, callback: TransformCallback) => void) | undefined;
+        }
+        /**
+         * Transform streams are `Duplex` streams where the output is in some way
+         * related to the input. Like all `Duplex` streams, `Transform` streams
+         * implement both the `Readable` and `Writable` interfaces.
+         *
+         * Examples of `Transform` streams include:
+         *
+         * * `zlib streams`
+         * * `crypto streams`
+         * @since v0.9.4
+         */
+        class Transform extends Duplex {
+            constructor(options?: TransformOptions);
+            _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
+            _flush(callback: TransformCallback): void;
+        }
+        /**
+         * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
+         * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams.
+         */
+        class PassThrough extends Transform {}
+        /**
+         * A stream to attach a signal to.
+         *
+         * Attaches an AbortSignal to a readable or writeable stream. This lets code
+         * control stream destruction using an `AbortController`.
+         *
+         * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the
+         * stream, and `controller.error(new AbortError())` for webstreams.
+         *
+         * ```js
+         * import fs from 'node:fs';
+         *
+         * const controller = new AbortController();
+         * const read = addAbortSignal(
+         *   controller.signal,
+         *   fs.createReadStream(('object.json')),
+         * );
+         * // Later, abort the operation closing the stream
+         * controller.abort();
+         * ```
+         *
+         * Or using an `AbortSignal` with a readable stream as an async iterable:
+         *
+         * ```js
+         * const controller = new AbortController();
+         * setTimeout(() => controller.abort(), 10_000); // set a timeout
+         * const stream = addAbortSignal(
+         *   controller.signal,
+         *   fs.createReadStream(('object.json')),
+         * );
+         * (async () => {
+         *   try {
+         *     for await (const chunk of stream) {
+         *       await process(chunk);
+         *     }
+         *   } catch (e) {
+         *     if (e.name === 'AbortError') {
+         *       // The operation was cancelled
+         *     } else {
+         *       throw e;
+         *     }
+         *   }
+         * })();
+         * ```
+         *
+         * Or using an `AbortSignal` with a ReadableStream:
+         *
+         * ```js
+         * const controller = new AbortController();
+         * const rs = new ReadableStream({
+         *   start(controller) {
+         *     controller.enqueue('hello');
+         *     controller.enqueue('world');
+         *     controller.close();
+         *   },
+         * });
+         *
+         * addAbortSignal(controller.signal, rs);
+         *
+         * finished(rs, (err) => {
+         *   if (err) {
+         *     if (err.name === 'AbortError') {
+         *       // The operation was cancelled
+         *     }
+         *   }
+         * });
+         *
+         * const reader = rs.getReader();
+         *
+         * reader.read().then(({ value, done }) => {
+         *   console.log(value); // hello
+         *   console.log(done); // false
+         *   controller.abort();
+         * });
+         * ```
+         * @since v15.4.0
+         * @param signal A signal representing possible cancellation
+         * @param stream A stream to attach a signal to.
+         */
+        function addAbortSignal<
+            T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
+        >(signal: AbortSignal, stream: T): T;
+        /**
+         * Returns the default highWaterMark used by streams.
+         * Defaults to `65536` (64 KiB), or `16` for `objectMode`.
+         * @since v19.9.0
+         */
+        function getDefaultHighWaterMark(objectMode: boolean): number;
+        /**
+         * Sets the default highWaterMark used by streams.
+         * @since v19.9.0
+         * @param value highWaterMark value
+         */
+        function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
+        interface FinishedOptions extends Abortable {
+            error?: boolean | undefined;
+            readable?: boolean | undefined;
+            writable?: boolean | undefined;
+        }
+        /**
+         * A readable and/or writable stream/webstream.
+         *
+         * A function to get notified when a stream is no longer readable, writable
+         * or has experienced an error or a premature close event.
+         *
+         * ```js
+         * import { finished } from 'node:stream';
+         * import fs from 'node:fs';
+         *
+         * const rs = fs.createReadStream('archive.tar');
+         *
+         * finished(rs, (err) => {
+         *   if (err) {
+         *     console.error('Stream failed.', err);
+         *   } else {
+         *     console.log('Stream is done reading.');
+         *   }
+         * });
+         *
+         * rs.resume(); // Drain the stream.
+         * ```
+         *
+         * Especially useful in error handling scenarios where a stream is destroyed
+         * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
+         *
+         * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options).
+         *
+         * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
+         * invoked. The reason for this is so that unexpected `'error'` events (due to
+         * incorrect stream implementations) do not cause unexpected crashes.
+         * If this is unwanted behavior then the returned cleanup function needs to be
+         * invoked in the callback:
+         *
+         * ```js
+         * const cleanup = finished(rs, (err) => {
+         *   cleanup();
+         *   // ...
+         * });
+         * ```
+         * @since v10.0.0
+         * @param stream A readable and/or writable stream.
+         * @param callback A callback function that takes an optional error argument.
+         * @returns A cleanup function which removes all registered listeners.
+         */
+        function finished(
+            stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
+            options: FinishedOptions,
+            callback: (err?: NodeJS.ErrnoException | null) => void,
+        ): () => void;
+        function finished(
+            stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
+            callback: (err?: NodeJS.ErrnoException | null) => void,
+        ): () => void;
+        namespace finished {
+            import __promisify__ = promises.finished;
+            export { __promisify__ };
+        }
+        type PipelineSourceFunction<O> = (options?: Abortable) => Iterable<O> | AsyncIterable<O>;
+        type PipelineSource<O> =
+            | NodeJS.ReadableStream
+            | web.ReadableStream<O>
+            | web.TransformStream<any, O>
+            | Iterable<O>
+            | AsyncIterable<O>
+            | PipelineSourceFunction<O>;
+        type PipelineSourceArgument<T> = (T extends (...args: any[]) => infer R ? R : T) extends infer S
+            ? S extends web.TransformStream<any, infer O> ? web.ReadableStream<O> : S
+            : never;
+        type PipelineTransformGenerator<S extends PipelineTransformSource<any>, O> = (
+            source: PipelineSourceArgument<S>,
+            options?: Abortable,
+        ) => AsyncIterable<O>;
+        type PipelineTransformStreams<I, O> =
+            | NodeJS.ReadWriteStream
+            | web.TransformStream<I, O>;
+        type PipelineTransform<S extends PipelineTransformSource<any>, O> = S extends
+            PipelineSource<infer I> | PipelineTransformStreams<any, infer I> | ((...args: any[]) => infer I)
+            ? PipelineTransformStreams<I, O> | PipelineTransformGenerator<S, O>
+            : never;
+        type PipelineTransformSource<O> = PipelineSource<O> | PipelineTransform<any, O>;
+        type PipelineDestinationFunction<S extends PipelineTransformSource<any>, R> = (
+            source: PipelineSourceArgument<S>,
+            options?: Abortable,
+        ) => R;
+        type PipelineDestination<S extends PipelineTransformSource<any>, R> = S extends
+            PipelineSource<infer I> | PipelineTransform<any, infer I> ?
+                | NodeJS.WritableStream
+                | web.WritableStream<I>
+                | web.TransformStream<I, any>
+                | PipelineDestinationFunction<S, R>
+            : never;
+        type PipelineCallback<S extends PipelineDestination<any, any>> = (
+            err: NodeJS.ErrnoException | null,
+            value: S extends (...args: any[]) => PromiseLike<infer R> ? R : undefined,
+        ) => void;
+        type PipelineResult<S extends PipelineDestination<any, any>> = S extends NodeJS.WritableStream ? S : Duplex;
+        /**
+         * A module method to pipe between streams and generators forwarding errors and
+         * properly cleaning up and provide a callback when the pipeline is complete.
+         *
+         * ```js
+         * import { pipeline } from 'node:stream';
+         * import fs from 'node:fs';
+         * import zlib from 'node:zlib';
+         *
+         * // Use the pipeline API to easily pipe a series of streams
+         * // together and get notified when the pipeline is fully done.
+         *
+         * // A pipeline to gzip a potentially huge tar file efficiently:
+         *
+         * pipeline(
+         *   fs.createReadStream('archive.tar'),
+         *   zlib.createGzip(),
+         *   fs.createWriteStream('archive.tar.gz'),
+         *   (err) => {
+         *     if (err) {
+         *       console.error('Pipeline failed.', err);
+         *     } else {
+         *       console.log('Pipeline succeeded.');
+         *     }
+         *   },
+         * );
+         * ```
+         *
+         * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-options).
+         *
+         * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
+         *
+         * * `Readable` streams which have emitted `'end'` or `'close'`.
+         * * `Writable` streams which have emitted `'finish'` or `'close'`.
+         *
+         * `stream.pipeline()` leaves dangling event listeners on the streams
+         * after the `callback` has been invoked. In the case of reuse of streams after
+         * failure, this can cause event listener leaks and swallowed errors. If the last
+         * stream is readable, dangling event listeners will be removed so that the last
+         * stream can be consumed later.
+         *
+         * `stream.pipeline()` closes all the streams when an error is raised.
+         * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
+         * once it would destroy the socket without sending the expected response.
+         * See the example below:
+         *
+         * ```js
+         * import fs from 'node:fs';
+         * import http from 'node:http';
+         * import { pipeline } from 'node:stream';
+         *
+         * const server = http.createServer((req, res) => {
+         *   const fileStream = fs.createReadStream('./fileNotExist.txt');
+         *   pipeline(fileStream, res, (err) => {
+         *     if (err) {
+         *       console.log(err); // No such file
+         *       // this message can't be sent once `pipeline` already destroyed the socket
+         *       return res.end('error!!!');
+         *     }
+         *   });
+         * });
+         * ```
+         * @since v10.0.0
+         * @param callback Called when the pipeline is fully done.
+         */
+        function pipeline<S extends PipelineSource<any>, D extends PipelineDestination<S, any>>(
+            source: S,
+            destination: D,
+            callback: PipelineCallback<D>,
+        ): PipelineResult<D>;
+        function pipeline<
+            S extends PipelineSource<any>,
+            T extends PipelineTransform<S, any>,
+            D extends PipelineDestination<T, any>,
+        >(
+            source: S,
+            transform: T,
+            destination: D,
+            callback: PipelineCallback<D>,
+        ): PipelineResult<D>;
+        function pipeline<
+            S extends PipelineSource<any>,
+            T1 extends PipelineTransform<S, any>,
+            T2 extends PipelineTransform<T1, any>,
+            D extends PipelineDestination<T2, any>,
+        >(
+            source: S,
+            transform1: T1,
+            transform2: T2,
+            destination: D,
+            callback: PipelineCallback<D>,
+        ): PipelineResult<D>;
+        function pipeline<
+            S extends PipelineSource<any>,
+            T1 extends PipelineTransform<S, any>,
+            T2 extends PipelineTransform<T1, any>,
+            T3 extends PipelineTransform<T2, any>,
+            D extends PipelineDestination<T3, any>,
+        >(
+            source: S,
+            transform1: T1,
+            transform2: T2,
+            transform3: T3,
+            destination: D,
+            callback: PipelineCallback<D>,
+        ): PipelineResult<D>;
+        function pipeline<
+            S extends PipelineSource<any>,
+            T1 extends PipelineTransform<S, any>,
+            T2 extends PipelineTransform<T1, any>,
+            T3 extends PipelineTransform<T2, any>,
+            T4 extends PipelineTransform<T3, any>,
+            D extends PipelineDestination<T4, any>,
+        >(
+            source: S,
+            transform1: T1,
+            transform2: T2,
+            transform3: T3,
+            transform4: T4,
+            destination: D,
+            callback: PipelineCallback<D>,
+        ): PipelineResult<D>;
+        function pipeline(
+            streams: ReadonlyArray<PipelineSource<any> | PipelineTransform<any, any> | PipelineDestination<any, any>>,
+            callback: (err: NodeJS.ErrnoException | null) => void,
+        ): NodeJS.WritableStream;
+        function pipeline(
+            ...streams: [
+                ...[PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>],
+                callback: ((err: NodeJS.ErrnoException | null) => void),
+            ]
+        ): NodeJS.WritableStream;
+        namespace pipeline {
+            import __promisify__ = promises.pipeline;
+            export { __promisify__ };
+        }
+        type ComposeSource<O> =
+            | NodeJS.ReadableStream
+            | web.ReadableStream<O>
+            | Iterable<O>
+            | AsyncIterable<O>
+            | (() => AsyncIterable<O>);
+        type ComposeTransformStreams<I, O> = NodeJS.ReadWriteStream | web.TransformStream<I, O>;
+        type ComposeTransformGenerator<I, O> = (source: AsyncIterable<I>) => AsyncIterable<O>;
+        type ComposeTransform<S extends ComposeTransformSource<any>, O> = S extends
+            ComposeSource<infer I> | ComposeTransformStreams<any, infer I> | ComposeTransformGenerator<any, infer I>
+            ? ComposeTransformStreams<I, O> | ComposeTransformGenerator<I, O>
+            : never;
+        type ComposeTransformSource<O> = ComposeSource<O> | ComposeTransform<any, O>;
+        type ComposeDestination<S extends ComposeTransformSource<any>> = S extends ComposeTransformSource<infer I> ?
+                | NodeJS.WritableStream
+                | web.WritableStream<I>
+                | web.TransformStream<I, any>
+                | ((source: AsyncIterable<I>) => void)
+            : never;
+        /**
+         * Combines two or more streams into a `Duplex` stream that writes to the
+         * first stream and reads from the last. Each provided stream is piped into
+         * the next, using `stream.pipeline`. If any of the streams error then all
+         * are destroyed, including the outer `Duplex` stream.
+         *
+         * Because `stream.compose` returns a new stream that in turn can (and
+         * should) be piped into other streams, it enables composition. In contrast,
+         * when passing streams to `stream.pipeline`, typically the first stream is
+         * a readable stream and the last a writable stream, forming a closed
+         * circuit.
+         *
+         * If passed a `Function` it must be a factory method taking a `source`
+         * `Iterable`.
+         *
+         * ```js
+         * import { compose, Transform } from 'node:stream';
+         *
+         * const removeSpaces = new Transform({
+         *   transform(chunk, encoding, callback) {
+         *     callback(null, String(chunk).replace(' ', ''));
+         *   },
+         * });
+         *
+         * async function* toUpper(source) {
+         *   for await (const chunk of source) {
+         *     yield String(chunk).toUpperCase();
+         *   }
+         * }
+         *
+         * let res = '';
+         * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) {
+         *   res += buf;
+         * }
+         *
+         * console.log(res); // prints 'HELLOWORLD'
+         * ```
+         *
+         * `stream.compose` can be used to convert async iterables, generators and
+         * functions into streams.
+         *
+         * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield
+         *   `null`.
+         * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`.
+         *   Must take a source `AsyncIterable` as first parameter. Cannot yield
+         *   `null`.
+         * * `AsyncFunction` converts into a writable `Duplex`. Must return
+         *   either `null` or `undefined`.
+         *
+         * ```js
+         * import { compose } from 'node:stream';
+         * import { finished } from 'node:stream/promises';
+         *
+         * // Convert AsyncIterable into readable Duplex.
+         * const s1 = compose(async function*() {
+         *   yield 'Hello';
+         *   yield 'World';
+         * }());
+         *
+         * // Convert AsyncGenerator into transform Duplex.
+         * const s2 = compose(async function*(source) {
+         *   for await (const chunk of source) {
+         *     yield String(chunk).toUpperCase();
+         *   }
+         * });
+         *
+         * let res = '';
+         *
+         * // Convert AsyncFunction into writable Duplex.
+         * const s3 = compose(async function(source) {
+         *   for await (const chunk of source) {
+         *     res += chunk;
+         *   }
+         * });
+         *
+         * await finished(compose(s1, s2, s3));
+         *
+         * console.log(res); // prints 'HELLOWORLD'
+         * ```
+         *
+         * For convenience, the `readable.compose(stream)` method is available on
+         * `Readable` and `Duplex` streams as a wrapper for this function.
+         * @since v16.9.0
+         * @experimental
+         */
+        /* eslint-disable @definitelytyped/no-unnecessary-generics */
+        function compose(stream: ComposeSource<any> | ComposeDestination<any>): Duplex;
+        function compose<
+            S extends ComposeSource<any> | ComposeTransform<any, any>,
+            D extends ComposeTransform<S, any> | ComposeDestination<S>,
+        >(
+            source: S,
+            destination: D,
+        ): Duplex;
+        function compose<
+            S extends ComposeSource<any> | ComposeTransform<any, any>,
+            T extends ComposeTransform<S, any>,
+            D extends ComposeTransform<T, any> | ComposeDestination<T>,
+        >(source: S, transform: T, destination: D): Duplex;
+        function compose<
+            S extends ComposeSource<any> | ComposeTransform<any, any>,
+            T1 extends ComposeTransform<S, any>,
+            T2 extends ComposeTransform<T1, any>,
+            D extends ComposeTransform<T2, any> | ComposeDestination<T2>,
+        >(source: S, transform1: T1, transform2: T2, destination: D): Duplex;
+        function compose<
+            S extends ComposeSource<any> | ComposeTransform<any, any>,
+            T1 extends ComposeTransform<S, any>,
+            T2 extends ComposeTransform<T1, any>,
+            T3 extends ComposeTransform<T2, any>,
+            D extends ComposeTransform<T3, any> | ComposeDestination<T3>,
+        >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex;
+        function compose<
+            S extends ComposeSource<any> | ComposeTransform<any, any>,
+            T1 extends ComposeTransform<S, any>,
+            T2 extends ComposeTransform<T1, any>,
+            T3 extends ComposeTransform<T2, any>,
+            T4 extends ComposeTransform<T3, any>,
+            D extends ComposeTransform<T4, any> | ComposeDestination<T4>,
+        >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex;
+        function compose(
+            ...streams: [
+                ComposeSource<any>,
+                ...ComposeTransform<any, any>[],
+                ComposeDestination<any>,
+            ]
+        ): Duplex;
+        /* eslint-enable @definitelytyped/no-unnecessary-generics */
+        /**
+         * Returns whether the stream has encountered an error.
+         * @since v17.3.0, v16.14.0
+         */
+        function isErrored(
+            stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
+        ): boolean;
+        /**
+         * Returns whether the stream is readable.
+         * @since v17.4.0, v16.14.0
+         * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
+         */
+        function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null;
+        /**
+         * Returns whether the stream is writable.
+         * @since v20.0.0
+         * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
+         */
+        function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null;
+    }
+    global {
+        namespace NodeJS {
+            // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces
+            // from early versions of Node.js, but they are still used widely across the ecosystem.
+            // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that
+            // eg. streams returned from older libraries will still be considered valid input to
+            // functions which accept stream arguments.
+            // It's not possible to change or remove these without astronomical levels of breakage.
+            interface ReadableStream extends EventEmitter {
+                readable: boolean;
+                read(size?: number): string | Buffer;
+                setEncoding(encoding: BufferEncoding): this;
+                pause(): this;
+                resume(): this;
+                isPaused(): boolean;
+                pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
+                unpipe(destination?: WritableStream): this;
+                unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
+                wrap(oldStream: ReadableStream): this;
+                [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
+            }
+            interface WritableStream extends EventEmitter {
+                writable: boolean;
+                write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
+                write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
+                end(cb?: () => void): this;
+                end(data: string | Uint8Array, cb?: () => void): this;
+                end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
+            }
+            interface ReadWriteStream extends ReadableStream, WritableStream {}
+        }
+    }
+    export = Stream;
+}
+declare module "stream" {
+    import stream = require("node:stream");
+    export = stream;
+}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff