diff --git a/.env b/.env
deleted file mode 100644
index 9ad3de2..0000000
--- a/.env
+++ /dev/null
@@ -1,7 +0,0 @@
-DB_HOST=db
-DB_PORT=3306
-DB_USER=todo_user
-DB_PASSWORD=SilneHeslo123.
-DB_NAME=zkt_zadanie
-SESSION_SECRET=EsteSilnejsieHeslo123.
-PORT=3000
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 94a56e6..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
-.env
-/.idea/
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 5cb71ef..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 188022c..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 5eb7043..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/z1.iml b/.idea/z1.iml
deleted file mode 100644
index d6ebd48..0000000
--- a/.idea/z1.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/backend/Dockerfile b/backend/Dockerfile
deleted file mode 100644
index f665667..0000000
--- a/backend/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-FROM node:20-alpine
-
-WORKDIR /app
-
-COPY package*.json ./
-RUN npm install
-
-COPY backend ./backend
-
-EXPOSE 3000
-
-CMD ["node", "backend/app.js"]
\ No newline at end of file
diff --git a/backend/app.js b/backend/app.js
deleted file mode 100644
index 6dc0818..0000000
--- a/backend/app.js
+++ /dev/null
@@ -1,226 +0,0 @@
-const express = require('express');
-const mysql = require('mysql2/promise');
-const bcrypt = require('bcryptjs');
-const session = require('express-session');
-const path = require('path');
-require('dotenv').config({ path: path.join(__dirname, '../.env') });
-
-const app = express();
-
-const FRONTEND_DIR = path.join(__dirname, '../frontend');
-
-const pool = mysql.createPool({
- host: process.env.DB_HOST,
- port: Number(process.env.DB_PORT),
- user: process.env.DB_USER,
- password: process.env.DB_PASSWORD,
- database: process.env.DB_NAME,
- waitForConnections: true,
- connectionLimit: 10,
- queueLimit: 0
-});
-
-app.use(express.urlencoded({ extended: true }));
-app.use(express.json());
-
-app.use(session({
- secret: process.env.SESSION_SECRET,
- resave: false,
- saveUninitialized: false
-}));
-
-app.get('/', (req, res) => {
- if (req.session.user) {
- return res.redirect('/index.html');
- }
- res.sendFile(path.join(FRONTEND_DIR, 'login.html'));
-});
-
-app.get('/register', (req, res) => {
- res.sendFile(path.join(FRONTEND_DIR, 'register.html'));
-});
-
-app.get('/index.html', (req, res) => {
- if (!req.session.user) {
- return res.redirect('/');
- }
- res.sendFile(path.join(FRONTEND_DIR, 'index.html'));
-});
-
-app.post('/register', async (req, res) => {
- const { username, password, password2 } = req.body;
-
- if (!username || !password || !password2) {
- return res.redirect('/register.html?error=' + encodeURIComponent('Vyplň všetky polia'));
- }
-
- if (password !== password2) {
- return res.redirect('/register.html?error=' + encodeURIComponent('Heslá sa nezhodujú'));
- }
-
- try {
- const hashedPassword = await bcrypt.hash(password, 10);
-
- await pool.execute(
- 'INSERT INTO users (username, password) VALUES (?, ?)',
- [username, hashedPassword]
- );
-
- return res.redirect('/');
- } catch (err) {
- console.error(err);
- return res.redirect('/register.html?error=' + encodeURIComponent('Používateľ už existuje'));
- }
-});
-
-app.post('/login', async (req, res) => {
- const { username, password } = req.body;
-
- if (!username || !password) {
- return res.redirect('/?error=Vyplň%20všetky%20polia');
- }
-
- try {
- const [rows] = await pool.execute(
- 'SELECT * FROM users WHERE username = ?',
- [username]
- );
-
- const row = rows[0];
-
- if (!row) {
- return res.redirect('/?error=Zlé%20meno%20alebo%20heslo');
- }
-
- const result = await bcrypt.compare(password, row.password);
-
- if (!result) {
- return res.redirect('/?error=Zlé%20meno%20alebo%20heslo');
- }
-
- req.session.user = {
- id: row.id,
- username: row.username
- };
-
- return res.redirect('/index.html');
- } catch (err) {
- console.error(err);
- return res.redirect('/?error=Chyba%20databázy');
- }
-});
-
-app.post('/logout', (req, res) => {
- req.session.destroy(() => {
- res.redirect('/');
- });
-});
-
-app.get('/api/me', (req, res) => {
- if (!req.session.user) {
- return res.status(401).json({ error: 'Neprihlásený používateľ' });
- }
-
- res.json(req.session.user);
-});
-
-app.get('/api/tasks', async (req, res) => {
- if (!req.session.user) {
- return res.status(401).json({ error: 'Neprihlásený používateľ' });
- }
-
- try {
- const [rows] = await pool.execute(
- 'SELECT * FROM tasks WHERE user_id = ? ORDER BY deadline ASC',
- [req.session.user.id]
- );
-
- res.json(rows);
- } catch (err) {
- console.error(err);
- return res.status(500).json({ error: 'Chyba pri načítaní úloh' });
- }
-});
-
-app.post('/api/tasks', async (req, res) => {
- if (!req.session.user) {
- return res.status(401).json({ error: 'Neprihlásený používateľ' });
- }
-
- const { title, description, deadline } = req.body;
-
- if (!title || !description || !deadline) {
- return res.status(400).json({ error: 'Vyplň všetky polia' });
- }
-
- try {
- const [result] = await pool.execute(
- 'INSERT INTO tasks (user_id, title, description, deadline) VALUES (?, ?, ?, ?)',
- [req.session.user.id, title, description, deadline]
- );
-
- const [rows] = await pool.execute(
- 'SELECT * FROM tasks WHERE id = ?',
- [result.insertId]
- );
-
- res.json(rows[0]);
- } catch (err) {
- console.error(err);
- return res.status(500).json({ error: 'Chyba pri ukladaní úlohy' });
- }
-});
-
-app.delete('/api/tasks/:id', async (req, res) => {
- if (!req.session.user) {
- return res.status(401).json({ error: 'Neprihlásený používateľ' });
- }
-
- try {
- await pool.execute(
- 'DELETE FROM tasks WHERE id = ? AND user_id = ?',
- [req.params.id, req.session.user.id]
- );
-
- res.json({ success: true });
- } catch (err) {
- console.error(err);
- return res.status(500).json({ error: 'Chyba pri mazaní úlohy' });
- }
-});
-
-app.patch('/api/tasks/:id/toggle', async (req, res) => {
- if (!req.session.user) {
- return res.status(401).json({ error: 'Neprihlásený používateľ' });
- }
-
- const { status } = req.body;
-
- try {
- await pool.execute(
- 'UPDATE tasks SET status = ? WHERE id = ? AND user_id = ?',
- [status ? 1 : 0, req.params.id, req.session.user.id]
- );
-
- res.json({ success: true });
- } catch (err) {
- console.error(err);
- return res.status(500).json({ error: 'Chyba pri zmene stavu úlohy' });
- }
-});
-
-app.use(express.static(FRONTEND_DIR));
-
-const PORT = process.env.PORT || 3000;
-
-app.listen(PORT, async () => {
- try {
- const connection = await pool.getConnection();
- console.log('Pripojenie na MySQL úspešné.');
- connection.release();
- } catch (err) {
- console.error('Nepodarilo sa pripojiť na MySQL:', err.message);
- }
-
- console.log(`Server beží na http://localhost:${PORT}`);
-});
\ No newline at end of file
diff --git a/db/init.sql b/db/init.sql
deleted file mode 100644
index 36f2831..0000000
--- a/db/init.sql
+++ /dev/null
@@ -1,15 +0,0 @@
-CREATE TABLE IF NOT EXISTS users (
- id INT AUTO_INCREMENT PRIMARY KEY,
- username VARCHAR(100) NOT NULL UNIQUE,
- password VARCHAR(255) NOT NULL
-);
-
-CREATE TABLE IF NOT EXISTS tasks (
- id INT AUTO_INCREMENT PRIMARY KEY,
- user_id INT NOT NULL,
- title VARCHAR(255) NOT NULL,
- description TEXT NOT NULL,
- deadline DATE NOT NULL,
- status TINYINT(1) NOT NULL DEFAULT 0,
- FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
-);
\ No newline at end of file
diff --git a/frontend/Dockerfile b/frontend/Dockerfile
deleted file mode 100644
index dce60f2..0000000
--- a/frontend/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM nginx:alpine
-
-COPY frontend/index.html /usr/share/nginx/html/index.html
-COPY frontend/login.html /usr/share/nginx/html/login.html
-COPY frontend/register.html /usr/share/nginx/html/register.html
-COPY frontend/generovanie_karticiek.js /usr/share/nginx/html/generovanie_karticiek.js
-COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
-
-EXPOSE 80
\ No newline at end of file
diff --git a/frontend/generovanie_karticiek.js b/frontend/generovanie_karticiek.js
deleted file mode 100644
index 4a5c61c..0000000
--- a/frontend/generovanie_karticiek.js
+++ /dev/null
@@ -1,209 +0,0 @@
-const emptyMessage = document.getElementById("emptyMessage");
-const cardContainer = document.getElementById("cardContainer");
-const addCardBtn = document.getElementById("addCardBtn");
-const taskModal = document.getElementById("taskModal");
-const saveTaskBtn = document.getElementById("saveTaskBtn");
-const cancelTaskBtn = document.getElementById("cancelTaskBtn");
-const filterDate = document.getElementById("filterDate");
-const loggedUser = document.getElementById("loggedUser");
-
-let tasks = [];
-
-function formatDate(isoDate) {
- if (!isoDate) return "bez termínu";
- return new Date(isoDate).toLocaleDateString("sk-SK", {
- day: "2-digit",
- month: "2-digit",
- year: "numeric"
- });
-}
-
-function updateEmptyVisibility() {
- if (tasks.length === 0) {
- emptyMessage.classList.remove("hidden");
- } else {
- emptyMessage.classList.add("hidden");
- }
-}
-
-function createCard(task) {
- const card = document.createElement("div");
- card.className = "p-6 rounded-xl shadow-md border hover:shadow-lg transition-all duration-200";
- card.dataset.deadline = task.deadline || "";
- card.dataset.id = task.id;
-
- if (task.status) {
- card.classList.add("bg-green-100", "border-green-200");
- } else {
- card.classList.add("bg-yellow-100", "border-yellow-200");
- }
-
- card.innerHTML = `
-
${task.title}
- ${task.description}
- Termín: ${formatDate(task.deadline)}
-
-
-
-
-
-
-
-
-
- `;
-
- const checkbox = card.querySelector(".task-checkbox");
- checkbox.addEventListener("change", async () => {
- const newValue = checkbox.checked ? 1 : 0;
-
- try {
- const response = await fetch(`/api/tasks/${task.id}/toggle`, {
- method: "PATCH",
- headers: {
- "Content-Type": "application/json"
- },
- body: JSON.stringify({ status: newValue })
- });
-
- if (!response.ok) {
- console.error("PATCH neprešiel:", response.status);
- checkbox.checked = !checkbox.checked;
- return;
- }
-
- task.status = newValue;
-
- card.classList.remove(
- "bg-yellow-100",
- "border-yellow-200",
- "bg-green-100",
- "border-green-200"
- );
-
- if (newValue) {
- card.classList.add("bg-green-100", "border-green-200");
- } else {
- card.classList.add("bg-yellow-100", "border-yellow-200");
- }
- } catch (error) {
- console.error("Chyba fetchu:", error);
- checkbox.checked = !checkbox.checked;
- }
- });
-
- const deleteBtn = card.querySelector(".delete-btn");
- deleteBtn.addEventListener("click", async () => {
- try {
- const response = await fetch(`/api/tasks/${task.id}`, {
- method: "DELETE"
- });
-
- if (response.ok) {
- tasks = tasks.filter(t => t.id !== task.id);
- renderTasks();
- }
- } catch (error) {
- console.error("Chyba pri mazaní úlohy:", error);
- }
- });
-
- cardContainer.appendChild(card);
-}
-
-function renderTasks() {
- const order = filterDate.value;
-
- const sortedTasks = [...tasks].sort((a, b) => {
- const da = a.deadline ? new Date(a.deadline) : new Date("9999-12-31");
- const db = b.deadline ? new Date(b.deadline) : new Date("9999-12-31");
- return order === "asc" ? da - db : db - da;
- });
-
- cardContainer.innerHTML = "";
- sortedTasks.forEach(createCard);
- updateEmptyVisibility();
-}
-
-function showModal() {
- taskModal.classList.remove("hidden");
- document.getElementById("taskTitle").value = "";
- document.getElementById("taskDescription").value = "";
- document.getElementById("taskDeadline").value = "";
-}
-
-function hideModal() {
- taskModal.classList.add("hidden");
-}
-
-async function loadUser() {
- try {
- const response = await fetch("/api/me");
-
- if (!response.ok) {
- window.location.href = "/login.html";
- return;
- }
-
- const user = await response.json();
- loggedUser.textContent = `Prihlásený ako: ${user.username}`;
- } catch (error) {
- console.error("Chyba pri načítaní používateľa:", error);
- window.location.href = "/login.html";
- }
-}
-
-async function loadTasks() {
- try {
- const response = await fetch("/api/tasks");
-
- if (!response.ok) {
- window.location.href = "/login.html";
- return;
- }
-
- tasks = await response.json();
- renderTasks();
- } catch (error) {
- console.error("Chyba pri načítaní úloh:", error);
- }
-}
-
-addCardBtn.addEventListener("click", showModal);
-cancelTaskBtn.addEventListener("click", hideModal);
-
-saveTaskBtn.addEventListener("click", async () => {
- const title = document.getElementById("taskTitle").value.trim();
- const description = document.getElementById("taskDescription").value.trim();
- const deadline = document.getElementById("taskDeadline").value;
-
- if (!title || !description || !deadline) {
- return;
- }
-
- try {
- const response = await fetch("/api/tasks", {
- method: "POST",
- headers: {
- "Content-Type": "application/json"
- },
- body: JSON.stringify({ title, description, deadline })
- });
-
- if (response.ok) {
- const newTask = await response.json();
- tasks.push(newTask);
- renderTasks();
- hideModal();
- }
- } catch (error) {
- console.error("Chyba pri pridávaní úlohy:", error);
- }
-});
-
-filterDate.addEventListener("change", renderTasks);
-
-loadUser();
-loadTasks();
\ No newline at end of file
diff --git a/frontend/index.html b/frontend/index.html
deleted file mode 100644
index e178b13..0000000
--- a/frontend/index.html
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
- To-Do aplikácia
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Nová úloha
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/login.html b/frontend/login.html
deleted file mode 100644
index 924b54b..0000000
--- a/frontend/login.html
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
- Prihlásenie
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/frontend/nginx.conf b/frontend/nginx.conf
deleted file mode 100644
index e47745a..0000000
--- a/frontend/nginx.conf
+++ /dev/null
@@ -1,42 +0,0 @@
-server {
- listen 80;
- server_name localhost;
-
- root /usr/share/nginx/html;
- index login.html;
-
- location = / {
- try_files /login.html =404;
- }
-
- location /api/ {
- proxy_pass http://backend:3000;
- proxy_http_version 1.1;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
-
- location = /login {
- proxy_pass http://backend:3000/login;
- proxy_http_version 1.1;
- proxy_set_header Host $host;
- }
-
- location = /register {
- proxy_pass http://backend:3000/register;
- proxy_http_version 1.1;
- proxy_set_header Host $host;
- }
-
- location = /logout {
- proxy_pass http://backend:3000/logout;
- proxy_http_version 1.1;
- proxy_set_header Host $host;
- }
-
- location / {
- try_files $uri $uri/ =404;
- }
-}
\ No newline at end of file
diff --git a/frontend/register.html b/frontend/register.html
deleted file mode 100644
index a1b01f5..0000000
--- a/frontend/register.html
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
- Registrácia
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/node_modules/.bin/bcrypt b/node_modules/.bin/bcrypt
deleted file mode 100644
index 88dd8ed..0000000
--- a/node_modules/.bin/bcrypt
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../bcryptjs/bin/bcrypt" "$@"
-else
- exec node "$basedir/../bcryptjs/bin/bcrypt" "$@"
-fi
diff --git a/node_modules/.bin/bcrypt.cmd b/node_modules/.bin/bcrypt.cmd
deleted file mode 100644
index 762efef..0000000
--- a/node_modules/.bin/bcrypt.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\bcryptjs\bin\bcrypt" %*
diff --git a/node_modules/.bin/bcrypt.ps1 b/node_modules/.bin/bcrypt.ps1
deleted file mode 100644
index fbe0a31..0000000
--- a/node_modules/.bin/bcrypt.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../bcryptjs/bin/bcrypt" $args
- } else {
- & "$basedir/node$exe" "$basedir/../bcryptjs/bin/bcrypt" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../bcryptjs/bin/bcrypt" $args
- } else {
- & "node$exe" "$basedir/../bcryptjs/bin/bcrypt" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/node-gyp b/node_modules/.bin/node-gyp
deleted file mode 100644
index dff6cdb..0000000
--- a/node_modules/.bin/node-gyp
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@"
-else
- exec node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
-fi
diff --git a/node_modules/.bin/node-gyp.cmd b/node_modules/.bin/node-gyp.cmd
deleted file mode 100644
index 9a6a721..0000000
--- a/node_modules/.bin/node-gyp.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\node-gyp\bin\node-gyp.js" %*
diff --git a/node_modules/.bin/node-gyp.ps1 b/node_modules/.bin/node-gyp.ps1
deleted file mode 100644
index dd514e2..0000000
--- a/node_modules/.bin/node-gyp.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
- } else {
- & "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which
deleted file mode 100644
index 5b5c841..0000000
--- a/node_modules/.bin/node-which
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../which/bin/which.js" "$@"
-else
- exec node "$basedir/../which/bin/which.js" "$@"
-fi
diff --git a/node_modules/.bin/node-which.cmd b/node_modules/.bin/node-which.cmd
deleted file mode 100644
index 98cb910..0000000
--- a/node_modules/.bin/node-which.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\which.js" %*
diff --git a/node_modules/.bin/node-which.ps1 b/node_modules/.bin/node-which.ps1
deleted file mode 100644
index 7afd515..0000000
--- a/node_modules/.bin/node-which.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../which/bin/which.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../which/bin/which.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../which/bin/which.js" $args
- } else {
- & "node$exe" "$basedir/../which/bin/which.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt
deleted file mode 100644
index 0808130..0000000
--- a/node_modules/.bin/nopt
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
-else
- exec node "$basedir/../nopt/bin/nopt.js" "$@"
-fi
diff --git a/node_modules/.bin/nopt.cmd b/node_modules/.bin/nopt.cmd
deleted file mode 100644
index a7f38b3..0000000
--- a/node_modules/.bin/nopt.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*
diff --git a/node_modules/.bin/nopt.ps1 b/node_modules/.bin/nopt.ps1
deleted file mode 100644
index 9d6ba56..0000000
--- a/node_modules/.bin/nopt.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
- } else {
- & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/prebuild-install b/node_modules/.bin/prebuild-install
deleted file mode 100644
index 154b529..0000000
--- a/node_modules/.bin/prebuild-install
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../prebuild-install/bin.js" "$@"
-else
- exec node "$basedir/../prebuild-install/bin.js" "$@"
-fi
diff --git a/node_modules/.bin/prebuild-install.cmd b/node_modules/.bin/prebuild-install.cmd
deleted file mode 100644
index 21ff904..0000000
--- a/node_modules/.bin/prebuild-install.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\prebuild-install\bin.js" %*
diff --git a/node_modules/.bin/prebuild-install.ps1 b/node_modules/.bin/prebuild-install.ps1
deleted file mode 100644
index 6e657a3..0000000
--- a/node_modules/.bin/prebuild-install.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../prebuild-install/bin.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../prebuild-install/bin.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../prebuild-install/bin.js" $args
- } else {
- & "node$exe" "$basedir/../prebuild-install/bin.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc
deleted file mode 100644
index c9d9af6..0000000
--- a/node_modules/.bin/rc
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../rc/cli.js" "$@"
-else
- exec node "$basedir/../rc/cli.js" "$@"
-fi
diff --git a/node_modules/.bin/rc.cmd b/node_modules/.bin/rc.cmd
deleted file mode 100644
index be16b73..0000000
--- a/node_modules/.bin/rc.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rc\cli.js" %*
diff --git a/node_modules/.bin/rc.ps1 b/node_modules/.bin/rc.ps1
deleted file mode 100644
index 9a9b6e3..0000000
--- a/node_modules/.bin/rc.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../rc/cli.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../rc/cli.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../rc/cli.js" $args
- } else {
- & "node$exe" "$basedir/../rc/cli.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver
deleted file mode 100644
index 97c5327..0000000
--- a/node_modules/.bin/semver
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*)
- if command -v cygpath > /dev/null 2>&1; then
- basedir=`cygpath -w "$basedir"`
- fi
- ;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
-else
- exec node "$basedir/../semver/bin/semver.js" "$@"
-fi
diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd
deleted file mode 100644
index 9913fa9..0000000
--- a/node_modules/.bin/semver.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1
deleted file mode 100644
index 314717a..0000000
--- a/node_modules/.bin/semver.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
- } else {
- & "node$exe" "$basedir/../semver/bin/semver.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
deleted file mode 100644
index 7d21e72..0000000
--- a/node_modules/.package-lock.json
+++ /dev/null
@@ -1,2137 +0,0 @@
-{
- "name": "TODO",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "node_modules/@gar/promise-retry": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@gar/promise-retry/-/promise-retry-1.0.3.tgz",
- "integrity": "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/@isaacs/fs-minipass": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
- "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
- "license": "ISC",
- "dependencies": {
- "minipass": "^7.0.4"
- },
- "engines": {
- "node": ">=18.0.0"
- }
- },
- "node_modules/@npmcli/agent": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-4.0.0.tgz",
- "integrity": "sha512-kAQTcEN9E8ERLVg5AsGwLNoFb+oEG6engbqAU2P43gD4JEIkNGMHdVQ096FsOAAYpZPB0RSt0zgInKIAS1l5QA==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "agent-base": "^7.1.0",
- "http-proxy-agent": "^7.0.0",
- "https-proxy-agent": "^7.0.1",
- "lru-cache": "^11.2.1",
- "socks-proxy-agent": "^8.0.3"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/@npmcli/fs": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-5.0.0.tgz",
- "integrity": "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/@npmcli/redact": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@npmcli/redact/-/redact-4.0.0.tgz",
- "integrity": "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q==",
- "license": "ISC",
- "optional": true,
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/@types/node": {
- "version": "25.5.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
- "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
- "license": "MIT",
- "peer": true,
- "dependencies": {
- "undici-types": "~7.18.0"
- }
- },
- "node_modules/abbrev": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-4.0.0.tgz",
- "integrity": "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==",
- "license": "ISC",
- "optional": true,
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/accepts": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
- "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
- "license": "MIT",
- "dependencies": {
- "mime-types": "^3.0.0",
- "negotiator": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/agent-base": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
- "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/aws-ssl-profiles": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz",
- "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==",
- "license": "MIT",
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/balanced-match": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
- "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": "18 || 20 || >=22"
- }
- },
- "node_modules/base64-js": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/bcryptjs": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.3.tgz",
- "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==",
- "license": "BSD-3-Clause",
- "bin": {
- "bcrypt": "bin/bcrypt"
- }
- },
- "node_modules/bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "license": "MIT",
- "dependencies": {
- "file-uri-to-path": "1.0.0"
- }
- },
- "node_modules/bl": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
- "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
- "license": "MIT",
- "dependencies": {
- "buffer": "^5.5.0",
- "inherits": "^2.0.4",
- "readable-stream": "^3.4.0"
- }
- },
- "node_modules/body-parser": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
- "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
- "license": "MIT",
- "dependencies": {
- "bytes": "^3.1.2",
- "content-type": "^1.0.5",
- "debug": "^4.4.3",
- "http-errors": "^2.0.0",
- "iconv-lite": "^0.7.0",
- "on-finished": "^2.4.1",
- "qs": "^6.14.1",
- "raw-body": "^3.0.1",
- "type-is": "^2.0.1"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/brace-expansion": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz",
- "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "balanced-match": "^4.0.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- }
- },
- "node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
- }
- },
- "node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/cacache": {
- "version": "20.0.4",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-20.0.4.tgz",
- "integrity": "sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "@npmcli/fs": "^5.0.0",
- "fs-minipass": "^3.0.0",
- "glob": "^13.0.0",
- "lru-cache": "^11.1.0",
- "minipass": "^7.0.3",
- "minipass-collect": "^2.0.1",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "p-map": "^7.0.2",
- "ssri": "^13.0.0"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/call-bind-apply-helpers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
- "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/call-bound": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
- "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
- "license": "MIT",
- "dependencies": {
- "call-bind-apply-helpers": "^1.0.2",
- "get-intrinsic": "^1.3.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/chownr": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
- "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
- "license": "BlueOak-1.0.0",
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/content-disposition": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
- "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/content-type": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
- "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
- "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
- "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
- "license": "MIT",
- "engines": {
- "node": ">=6.6.0"
- }
- },
- "node_modules/debug": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.3"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "license": "MIT",
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
- "license": "MIT",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/denque": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
- "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
- "license": "Apache-2.0",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/dotenv": {
- "version": "17.3.1",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz",
- "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==",
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://dotenvx.com"
- }
- },
- "node_modules/dunder-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
- "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
- "license": "MIT",
- "dependencies": {
- "call-bind-apply-helpers": "^1.0.1",
- "es-errors": "^1.3.0",
- "gopd": "^1.2.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
- "license": "MIT"
- },
- "node_modules/encodeurl": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
- "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/end-of-stream": {
- "version": "1.4.5",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
- "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
- "license": "MIT",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
- "node_modules/env-paths": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/es-define-property": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
- "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-object-atoms": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
- "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
- "license": "MIT"
- },
- "node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/expand-template": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
- "license": "(MIT OR WTFPL)",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/exponential-backoff": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz",
- "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==",
- "license": "Apache-2.0",
- "optional": true
- },
- "node_modules/express": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
- "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
- "license": "MIT",
- "dependencies": {
- "accepts": "^2.0.0",
- "body-parser": "^2.2.1",
- "content-disposition": "^1.0.0",
- "content-type": "^1.0.5",
- "cookie": "^0.7.1",
- "cookie-signature": "^1.2.1",
- "debug": "^4.4.0",
- "depd": "^2.0.0",
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "etag": "^1.8.1",
- "finalhandler": "^2.1.0",
- "fresh": "^2.0.0",
- "http-errors": "^2.0.0",
- "merge-descriptors": "^2.0.0",
- "mime-types": "^3.0.0",
- "on-finished": "^2.4.1",
- "once": "^1.4.0",
- "parseurl": "^1.3.3",
- "proxy-addr": "^2.0.7",
- "qs": "^6.14.0",
- "range-parser": "^1.2.1",
- "router": "^2.2.0",
- "send": "^1.1.0",
- "serve-static": "^2.2.0",
- "statuses": "^2.0.1",
- "type-is": "^2.0.1",
- "vary": "^1.1.2"
- },
- "engines": {
- "node": ">= 18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/express-session": {
- "version": "1.19.0",
- "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.19.0.tgz",
- "integrity": "sha512-0csaMkGq+vaiZTmSMMGkfdCOabYv192VbytFypcvI0MANrp+4i/7yEkJ0sbAEhycQjntaKGzYfjfXQyVb7BHMA==",
- "license": "MIT",
- "dependencies": {
- "cookie": "~0.7.2",
- "cookie-signature": "~1.0.7",
- "debug": "~2.6.9",
- "depd": "~2.0.0",
- "on-headers": "~1.1.0",
- "parseurl": "~1.3.3",
- "safe-buffer": "~5.2.1",
- "uid-safe": "~2.1.5"
- },
- "engines": {
- "node": ">= 0.8.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/express-session/node_modules/cookie-signature": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
- "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
- "license": "MIT"
- },
- "node_modules/express-session/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "license": "MIT",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/express-session/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
- "license": "MIT"
- },
- "node_modules/fdir": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
- "license": "MIT"
- },
- "node_modules/finalhandler": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
- "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
- "license": "MIT",
- "dependencies": {
- "debug": "^4.4.0",
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "on-finished": "^2.4.1",
- "parseurl": "^1.3.3",
- "statuses": "^2.0.1"
- },
- "engines": {
- "node": ">= 18.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fresh": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/fs-constants": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
- "license": "MIT"
- },
- "node_modules/fs-minipass": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz",
- "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^7.0.3"
- },
- "engines": {
- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
- }
- },
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/generate-function": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
- "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
- "license": "MIT",
- "dependencies": {
- "is-property": "^1.0.2"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
- "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
- "license": "MIT",
- "dependencies": {
- "call-bind-apply-helpers": "^1.0.2",
- "es-define-property": "^1.0.1",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.1.1",
- "function-bind": "^1.1.2",
- "get-proto": "^1.0.1",
- "gopd": "^1.2.0",
- "has-symbols": "^1.1.0",
- "hasown": "^2.0.2",
- "math-intrinsics": "^1.1.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
- "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
- "license": "MIT",
- "dependencies": {
- "dunder-proto": "^1.0.1",
- "es-object-atoms": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/github-from-package": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
- "license": "MIT"
- },
- "node_modules/glob": {
- "version": "13.0.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
- "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
- "license": "BlueOak-1.0.0",
- "optional": true,
- "dependencies": {
- "minimatch": "^10.2.2",
- "minipass": "^7.1.3",
- "path-scurry": "^2.0.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/gopd": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
- "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "license": "ISC",
- "optional": true
- },
- "node_modules/has-symbols": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
- "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/hasown": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
- "license": "MIT",
- "dependencies": {
- "function-bind": "^1.1.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/http-cache-semantics": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
- "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",
- "license": "BSD-2-Clause",
- "optional": true
- },
- "node_modules/http-errors": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
- "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
- "license": "MIT",
- "dependencies": {
- "depd": "~2.0.0",
- "inherits": "~2.0.4",
- "setprototypeof": "~1.2.0",
- "statuses": "~2.0.2",
- "toidentifier": "~1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/http-proxy-agent": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
- "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "agent-base": "^7.1.0",
- "debug": "^4.3.4"
- },
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/https-proxy-agent": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
- "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "agent-base": "^7.1.2",
- "debug": "4"
- },
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/iconv-lite": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
- "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
- "license": "MIT",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/ieee754": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "BSD-3-Clause"
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "license": "ISC"
- },
- "node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "license": "ISC"
- },
- "node_modules/ip-address": {
- "version": "10.1.0",
- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
- "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/is-promise": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
- "license": "MIT"
- },
- "node_modules/is-property": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
- "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
- "license": "MIT"
- },
- "node_modules/isexe": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz",
- "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==",
- "license": "BlueOak-1.0.0",
- "optional": true,
- "engines": {
- "node": ">=20"
- }
- },
- "node_modules/long": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
- "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
- "license": "Apache-2.0"
- },
- "node_modules/lru-cache": {
- "version": "11.2.7",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz",
- "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==",
- "license": "BlueOak-1.0.0",
- "optional": true,
- "engines": {
- "node": "20 || >=22"
- }
- },
- "node_modules/lru.min": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.4.tgz",
- "integrity": "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==",
- "license": "MIT",
- "engines": {
- "bun": ">=1.0.0",
- "deno": ">=1.30.0",
- "node": ">=8.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wellwelwel"
- }
- },
- "node_modules/make-fetch-happen": {
- "version": "15.0.5",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-15.0.5.tgz",
- "integrity": "sha512-uCbIa8jWWmQZt4dSnEStkVC6gdakiinAm4PiGsywIkguF0eWMdcjDz0ECYhUolFU3pFLOev9VNPCEygydXnddg==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "@gar/promise-retry": "^1.0.0",
- "@npmcli/agent": "^4.0.0",
- "@npmcli/redact": "^4.0.0",
- "cacache": "^20.0.1",
- "http-cache-semantics": "^4.1.1",
- "minipass": "^7.0.2",
- "minipass-fetch": "^5.0.0",
- "minipass-flush": "^1.0.5",
- "minipass-pipeline": "^1.2.4",
- "negotiator": "^1.0.0",
- "proc-log": "^6.0.0",
- "ssri": "^13.0.0"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/math-intrinsics": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
- "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/media-typer": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/merge-descriptors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
- "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/mime-db": {
- "version": "1.54.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
- "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
- "license": "MIT",
- "dependencies": {
- "mime-db": "^1.54.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/minimatch": {
- "version": "10.2.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz",
- "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==",
- "license": "BlueOak-1.0.0",
- "optional": true,
- "dependencies": {
- "brace-expansion": "^5.0.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "license": "MIT",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/minipass": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
- "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
- "license": "BlueOak-1.0.0",
- "engines": {
- "node": ">=16 || 14 >=14.17"
- }
- },
- "node_modules/minipass-collect": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz",
- "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^7.0.3"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- }
- },
- "node_modules/minipass-fetch": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-5.0.2.tgz",
- "integrity": "sha512-2d0q2a8eCi2IRg/IGubCNRJoYbA1+YPXAzQVRFmB45gdGZafyivnZ5YSEfo3JikbjGxOdntGFvBQGqaSMXlAFQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "minipass": "^7.0.3",
- "minipass-sized": "^2.0.0",
- "minizlib": "^3.0.1"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- },
- "optionalDependencies": {
- "iconv-lite": "^0.7.2"
- }
- },
- "node_modules/minipass-flush": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
- "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minipass-flush/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-flush/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "license": "ISC",
- "optional": true
- },
- "node_modules/minipass-pipeline": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
- "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-pipeline/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass-pipeline/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "license": "ISC",
- "optional": true
- },
- "node_modules/minipass-sized": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-2.0.0.tgz",
- "integrity": "sha512-zSsHhto5BcUVM2m1LurnXY6M//cGhVaegT71OfOXoprxT6o780GZd792ea6FfrQkuU4usHZIUczAQMRUE2plzA==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^7.1.2"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minizlib": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",
- "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",
- "license": "MIT",
- "dependencies": {
- "minipass": "^7.1.2"
- },
- "engines": {
- "node": ">= 18"
- }
- },
- "node_modules/mkdirp-classic": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
- "license": "MIT"
- },
- "node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "license": "MIT"
- },
- "node_modules/mysql2": {
- "version": "3.20.0",
- "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.20.0.tgz",
- "integrity": "sha512-eCLUs7BNbgA6nf/MZXsaBO1SfGs0LtLVrJD3WeWq+jPLDWkSufTD+aGMwykfUVPdZnblaUK1a8G/P63cl9FkKg==",
- "license": "MIT",
- "dependencies": {
- "aws-ssl-profiles": "^1.1.2",
- "denque": "^2.1.0",
- "generate-function": "^2.3.1",
- "iconv-lite": "^0.7.2",
- "long": "^5.3.2",
- "lru.min": "^1.1.4",
- "named-placeholders": "^1.1.6",
- "sql-escaper": "^1.3.3"
- },
- "engines": {
- "node": ">= 8.0"
- },
- "peerDependencies": {
- "@types/node": ">= 8"
- }
- },
- "node_modules/named-placeholders": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz",
- "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==",
- "license": "MIT",
- "dependencies": {
- "lru.min": "^1.1.0"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/napi-build-utils": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
- "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
- "license": "MIT"
- },
- "node_modules/negotiator": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
- "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/node-abi": {
- "version": "3.89.0",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.89.0.tgz",
- "integrity": "sha512-6u9UwL0HlAl21+agMN3YAMXcKByMqwGx+pq+P76vii5f7hTPtKDp08/H9py6DY+cfDw7kQNTGEj/rly3IgbNQA==",
- "license": "MIT",
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/node-addon-api": {
- "version": "8.6.0",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.6.0.tgz",
- "integrity": "sha512-gBVjCaqDlRUk0EwoPNKzIr9KkS9041G/q31IBShPs1Xz6UTA+EXdZADbzqAJQrpDRq71CIMnOP5VMut3SL0z5Q==",
- "license": "MIT",
- "engines": {
- "node": "^18 || ^20 || >= 21"
- }
- },
- "node_modules/node-gyp": {
- "version": "12.2.0",
- "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.2.0.tgz",
- "integrity": "sha512-q23WdzrQv48KozXlr0U1v9dwO/k59NHeSzn6loGcasyf0UnSrtzs8kRxM+mfwJSf0DkX0s43hcqgnSO4/VNthQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "env-paths": "^2.2.0",
- "exponential-backoff": "^3.1.1",
- "graceful-fs": "^4.2.6",
- "make-fetch-happen": "^15.0.0",
- "nopt": "^9.0.0",
- "proc-log": "^6.0.0",
- "semver": "^7.3.5",
- "tar": "^7.5.4",
- "tinyglobby": "^0.2.12",
- "which": "^6.0.0"
- },
- "bin": {
- "node-gyp": "bin/node-gyp.js"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/nopt": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-9.0.0.tgz",
- "integrity": "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "abbrev": "^4.0.0"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/object-inspect": {
- "version": "1.13.4",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
- "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "license": "MIT",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/on-headers": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
- "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "license": "ISC",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/p-map": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.4.tgz",
- "integrity": "sha512-tkAQEw8ysMzmkhgw8k+1U/iPhWNhykKnSk4Rd5zLoPJCuJaGRPo6YposrZgaxHKzDHdDWWZvE/Sk7hsL2X/CpQ==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/path-scurry": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
- "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
- "license": "BlueOak-1.0.0",
- "optional": true,
- "dependencies": {
- "lru-cache": "^11.0.0",
- "minipass": "^7.1.2"
- },
- "engines": {
- "node": "18 || 20 || >=22"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
- "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/picomatch": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/prebuild-install": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
- "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
- "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.",
- "license": "MIT",
- "dependencies": {
- "detect-libc": "^2.0.0",
- "expand-template": "^2.0.3",
- "github-from-package": "0.0.0",
- "minimist": "^1.2.3",
- "mkdirp-classic": "^0.5.3",
- "napi-build-utils": "^2.0.0",
- "node-abi": "^3.3.0",
- "pump": "^3.0.0",
- "rc": "^1.2.7",
- "simple-get": "^4.0.0",
- "tar-fs": "^2.0.0",
- "tunnel-agent": "^0.6.0"
- },
- "bin": {
- "prebuild-install": "bin.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/proc-log": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz",
- "integrity": "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==",
- "license": "ISC",
- "optional": true,
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
- "license": "MIT",
- "dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/pump": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",
- "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",
- "license": "MIT",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "node_modules/qs": {
- "version": "6.15.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",
- "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
- "license": "BSD-3-Clause",
- "dependencies": {
- "side-channel": "^1.1.0"
- },
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/random-bytes": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
- "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
- "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
- "license": "MIT",
- "dependencies": {
- "bytes": "~3.1.2",
- "http-errors": "~2.0.1",
- "iconv-lite": "~0.7.0",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
- "dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
- }
- },
- "node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "license": "MIT",
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/router": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
- "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
- "license": "MIT",
- "dependencies": {
- "debug": "^4.4.0",
- "depd": "^2.0.0",
- "is-promise": "^4.0.0",
- "parseurl": "^1.3.3",
- "path-to-regexp": "^8.0.0"
- },
- "engines": {
- "node": ">= 18"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "license": "MIT"
- },
- "node_modules/semver": {
- "version": "7.7.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
- "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
- "license": "ISC",
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/send": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
- "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
- "license": "MIT",
- "dependencies": {
- "debug": "^4.4.3",
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "etag": "^1.8.1",
- "fresh": "^2.0.0",
- "http-errors": "^2.0.1",
- "mime-types": "^3.0.2",
- "ms": "^2.1.3",
- "on-finished": "^2.4.1",
- "range-parser": "^1.2.1",
- "statuses": "^2.0.2"
- },
- "engines": {
- "node": ">= 18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/serve-static": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
- "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
- "license": "MIT",
- "dependencies": {
- "encodeurl": "^2.0.0",
- "escape-html": "^1.0.3",
- "parseurl": "^1.3.3",
- "send": "^1.2.0"
- },
- "engines": {
- "node": ">= 18"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/express"
- }
- },
- "node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
- "license": "ISC"
- },
- "node_modules/side-channel": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
- "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "object-inspect": "^1.13.3",
- "side-channel-list": "^1.0.0",
- "side-channel-map": "^1.0.1",
- "side-channel-weakmap": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-list": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
- "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "object-inspect": "^1.13.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-map": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
- "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.5",
- "object-inspect": "^1.13.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/side-channel-weakmap": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
- "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
- "license": "MIT",
- "dependencies": {
- "call-bound": "^1.0.2",
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.5",
- "object-inspect": "^1.13.3",
- "side-channel-map": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/simple-concat": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/simple-get": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
- "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "decompress-response": "^6.0.0",
- "once": "^1.3.1",
- "simple-concat": "^1.0.0"
- }
- },
- "node_modules/smart-buffer": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
- "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
- "license": "MIT",
- "optional": true,
- "engines": {
- "node": ">= 6.0.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/socks": {
- "version": "2.8.7",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz",
- "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "ip-address": "^10.0.1",
- "smart-buffer": "^4.2.0"
- },
- "engines": {
- "node": ">= 10.0.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/socks-proxy-agent": {
- "version": "8.0.5",
- "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
- "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "agent-base": "^7.1.2",
- "debug": "^4.3.4",
- "socks": "^2.8.3"
- },
- "engines": {
- "node": ">= 14"
- }
- },
- "node_modules/sql-escaper": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.3.tgz",
- "integrity": "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw==",
- "license": "MIT",
- "engines": {
- "bun": ">=1.0.0",
- "deno": ">=2.0.0",
- "node": ">=12.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/mysqljs/sql-escaper?sponsor=1"
- }
- },
- "node_modules/sqlite3": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-6.0.1.tgz",
- "integrity": "sha512-X0czUUMG2tmSqJpEQa3tCuZSHKIx8PwM53vLZzKp/o6Rpy25fiVfjdbnZ988M8+O3ZWR1ih0K255VumCb3MAnQ==",
- "hasInstallScript": true,
- "license": "BSD-3-Clause",
- "dependencies": {
- "bindings": "^1.5.0",
- "node-addon-api": "^8.0.0",
- "prebuild-install": "^7.1.3",
- "tar": "^7.5.10"
- },
- "engines": {
- "node": ">=20.17.0"
- },
- "optionalDependencies": {
- "node-gyp": "12.x"
- },
- "peerDependencies": {
- "node-gyp": "12.x"
- },
- "peerDependenciesMeta": {
- "node-gyp": {
- "optional": true
- }
- }
- },
- "node_modules/ssri": {
- "version": "13.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-13.0.1.tgz",
- "integrity": "sha512-QUiRf1+u9wPTL/76GTYlKttDEBWV1ga9ZXW8BG6kfdeyyM8LGPix9gROyg9V2+P0xNyF3X2Go526xKFdMZrHSQ==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "minipass": "^7.0.3"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/statuses": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
- "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "license": "MIT",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/tar": {
- "version": "7.5.12",
- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.12.tgz",
- "integrity": "sha512-9TsuLcdhOn4XztcQqhNyq1KOwOOED/3k58JAvtULiYqbO8B/0IBAAIE1hj0Svmm58k27TmcigyDI0deMlgG3uw==",
- "license": "BlueOak-1.0.0",
- "dependencies": {
- "@isaacs/fs-minipass": "^4.0.0",
- "chownr": "^3.0.0",
- "minipass": "^7.1.2",
- "minizlib": "^3.1.0",
- "yallist": "^5.0.0"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/tar-fs": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
- "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
- "license": "MIT",
- "dependencies": {
- "chownr": "^1.1.1",
- "mkdirp-classic": "^0.5.2",
- "pump": "^3.0.0",
- "tar-stream": "^2.1.4"
- }
- },
- "node_modules/tar-fs/node_modules/chownr": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
- "license": "ISC"
- },
- "node_modules/tar-stream": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
- "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
- "license": "MIT",
- "dependencies": {
- "bl": "^4.0.3",
- "end-of-stream": "^1.4.1",
- "fs-constants": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^3.1.1"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/tinyglobby": {
- "version": "0.2.15",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
- "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "fdir": "^6.5.0",
- "picomatch": "^4.0.3"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/SuperchupuDev"
- }
- },
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
- "license": "MIT",
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
- "license": "Apache-2.0",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/type-is": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
- "license": "MIT",
- "dependencies": {
- "content-type": "^1.0.5",
- "media-typer": "^1.1.0",
- "mime-types": "^3.0.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/uid-safe": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
- "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
- "license": "MIT",
- "dependencies": {
- "random-bytes": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/undici-types": {
- "version": "7.18.2",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
- "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
- "license": "MIT",
- "peer": true
- },
- "node_modules/unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
- "license": "MIT"
- },
- "node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
- "license": "MIT",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/which": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz",
- "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==",
- "license": "ISC",
- "optional": true,
- "dependencies": {
- "isexe": "^4.0.0"
- },
- "bin": {
- "node-which": "bin/which.js"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
- "license": "ISC"
- },
- "node_modules/yallist": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
- "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
- "license": "BlueOak-1.0.0",
- "engines": {
- "node": ">=18"
- }
- }
- }
-}
diff --git a/node_modules/@gar/promise-retry/LICENSE b/node_modules/@gar/promise-retry/LICENSE
deleted file mode 100644
index 581fd12..0000000
--- a/node_modules/@gar/promise-retry/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2011 Tim Koschützki (tim@debuggable.com), Felix Geisendörfer (felix@debuggable.com)
-Copyright (c) 2014 IndigoUnited
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/@gar/promise-retry/README.md b/node_modules/@gar/promise-retry/README.md
deleted file mode 100644
index 30d8a60..0000000
--- a/node_modules/@gar/promise-retry/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# @gar/promise-retry
-
-This is a fork of [promise-retry](https://npm.im/promise-retry). See the [CHANGELOG.md](./CHANGELOG.md) for more info.
-It also inlines and updates the original [retry](https://github.com/tim-kos/node-retry) package that was being promisified.
-
-Retries a function that returns a promise, leveraging the power of the [retry](https://github.com/tim-kos/node-retry) module to the promises world.
-
-There's already some modules that are able to retry functions that return promises but they were rather difficult to use or do not offer an easy way to do conditional retries.
-
-
-## Installation
-
-`$ npm install promise-retry`
-
-
-## Usage
-
-### retry(fn(retry, number, operation), [options])
-
-Calls `fn` until the returned promise ends up fulfilled or rejected with an error different than a `retry` error.
-The `options` argument is an object which maps to the original [retry](https://github.com/tim-kos/node-retry) module options:
-
-- `retries`: The maximum amount of times to retry the operation. Default is `10`.
-- `factor`: The exponential factor to use. Default is `2`.
-- `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.
-- `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.
-- `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`.
-- `forever`: Whether to retry forver, default is false.
-- `unref`: Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the underlying `setTimeout`s.
-- `maxRetryTime`: Maximum number of milliseconds that the retried operation is allowed to run.
-
-`options` can also be a Number, which is effectively the same as pasing `{ retries: Number }`
-
-
-The `fn` function will be called with the following parameters:
- - A `retry` function as its first argument that should be called with an error whenever you want to retry `fn`. The `retry` function will always throw an error.
- - The current retry number being attempted
- - The retry operation object itself from which will allow you to call things like `operation.reset()`
-
-If there are retries left, it will throw a special `retry` error that will be handled internally to call `fn` again.
-If there are no retries left, it will throw the actual error passed to it.
-
-## Example
-```js
-const { retry } = require('@gar/promise-retry');
-
-// Simple example
-retry(function (retry, number) {
- console.log('attempt number', number);
-
- return doSomething()
- .catch(retry);
-})
-.then(function (value) {
- // ..
-}, function (err) {
- // ..
-});
-
-// Conditional example
-retry(function (retry, number) {
- console.log('attempt number', number);
-
- return doSomething()
- .catch(function (err) {
- if (err.code === 'ETIMEDOUT') {
- retry(err);
- }
-
- throw err;
- });
-})
-.then(function (value) {
- // ..
-}, function (err) {
- // ..
-});
-```
-
-## Tests
-
-`$ npm test`
-
-## License
-
-Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/node_modules/@gar/promise-retry/lib/index.d.ts b/node_modules/@gar/promise-retry/lib/index.d.ts
deleted file mode 100644
index 2601985..0000000
--- a/node_modules/@gar/promise-retry/lib/index.d.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-type OperationOptions = {
- /**
- * The exponential factor to use.
- * @default 2
- */
- factor?: number | undefined;
- /**
- * The number of milliseconds before starting the first retry.
- * @default 1000
- */
- minTimeout?: number | undefined;
- /**
- * The maximum number of milliseconds between two retries.
- * @default Infinity
- */
- maxTimeout?: number | undefined;
- /**
- * Randomizes the timeouts by multiplying a factor between 1-2.
- * @default false
- */
- randomize?: boolean | undefined;
- /**
- * The maximum amount of times to retry the operation.
- * @default 10
- */
- retries?: number | undefined;
- /**
- * Whether to retry forever.
- * @default false
- */
- forever?: boolean | undefined;
- /**
- * Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's.
- * @default false
- */
- unref?: boolean | undefined;
- /**
- * The maximum time (in milliseconds) that the retried operation is allowed to run.
- * @default Infinity
- */
- maxRetryTime?: number | undefined;
-} | number[];
-
-type RetryOperation = {
- /**
- * Returns an array of all errors that have been passed to `retryOperation.retry()` so far.
- * The returning array has the errors ordered chronologically based on when they were passed to
- * `retryOperation.retry()`, which means the first passed error is at index zero and the last is at the last index.
- */
- errors(): Error[];
-
- /**
- * A reference to the error object that occured most frequently.
- * Errors are compared using the `error.message` property.
- * If multiple error messages occured the same amount of time, the last error object with that message is returned.
- *
- * @return If no errors occured so far the value will be `null`.
- */
- mainError(): Error | null;
-
- /**
- * Defines the function that is to be retried and executes it for the first time right away.
- *
- * @param fn The function that is to be retried. `currentAttempt` represents the number of attempts callback has been executed so far.
- */
- attempt(fn: (currentAttempt: number) => void): void;
-
- /**
- * Returns `false` when no `error` value is given, or the maximum amount of retries has been reached.
- * Otherwise it returns `true`, and retries the operation after the timeout for the current attempt number.
- */
- retry(err?: Error): boolean;
-
- /**
- * Stops the operation being retried. Useful for aborting the operation on a fatal error etc.
- */
- stop(): void;
-
- /**
- * Resets the internal state of the operation object, so that you can call `attempt()` again as if
- * this was a new operation object.
- */
- reset(): void;
-
- /**
- * Returns an int representing the number of attempts it took to call `fn` before it was successful.
- */
- attempts(): number;
-}
-
-/**
- * A function that is retryable, by having implicitly-bound params for both an error handler and an attempt number.
- *
- * @param retry The retry callback upon any rejection. Essentially throws the error on in the form of a { retried: err }
- * wrapper, and tags it with a 'code' field of value "EPROMISERETRY" so that it is recognised as needing retrying. Call
- * this from the catch() block when you want to retry a rejected attempt.
- * @param attempt The number of the attempt.
- * @param operation The operation object from the underlying retry module.
- * @returns A Promise for anything (eg. a HTTP response).
- */
-type RetryableFn = (retry: (error: any) => never, attempt: number, operation: RetryOperation) => Promise;
-/**
- * Wrap all functions of the object with retry. The params can be entered in either order, just like in the original library.
- *
- * @param retryableFn The function to retry.
- * @param options The options for how long/often to retry the function for.
- * @returns The Promise resolved by the input retryableFn, or rejected (if not retried) from its catch block.
- */
-declare function promiseRetry(
- retryableFn: RetryableFn,
- options?: OperationOptions,
-): Promise;
-
-export { promiseRetry };
diff --git a/node_modules/@gar/promise-retry/lib/index.js b/node_modules/@gar/promise-retry/lib/index.js
deleted file mode 100644
index be45984..0000000
--- a/node_modules/@gar/promise-retry/lib/index.js
+++ /dev/null
@@ -1,62 +0,0 @@
-const { RetryOperation } = require('./retry')
-
-const createTimeout = (attempt, opts) => Math.min(Math.round((1 + (opts.randomize ? Math.random() : 0)) * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)), opts.maxTimeout)
-const isRetryError = err => err?.code === 'EPROMISERETRY' && Object.hasOwn(err, 'retried')
-
-const promiseRetry = async (fn, options = {}) => {
- let timeouts = []
- if (options instanceof Array) {
- timeouts = [...options]
- } else {
- if (options.retries === Infinity) {
- options.forever = true
- delete options.retries
- }
- const opts = {
- retries: 10,
- factor: 2,
- minTimeout: 1 * 1000,
- maxTimeout: Infinity,
- randomize: false,
- ...options
- }
- if (opts.minTimeout > opts.maxTimeout) {
- throw new Error('minTimeout is greater than maxTimeout')
- }
- if (opts.retries) {
- for (let i = 0; i < opts.retries; i++) {
- timeouts.push(createTimeout(i, opts))
- }
- // sort the array numerically ascending (since the timeouts may be out of order at factor < 1)
- timeouts.sort((a, b) => a - b)
- } else if (options.forever) {
- timeouts.push(createTimeout(0, opts))
- }
- }
-
- const operation = new RetryOperation(timeouts, {
- forever: options.forever,
- unref: options.unref,
- maxRetryTime: options.maxRetryTime
- })
-
- return new Promise(function (resolve, reject) {
- operation.attempt(async number => {
- try {
- const result = await fn(err => {
- throw Object.assign(new Error('Retrying'), { code: 'EPROMISERETRY', retried: err })
- }, number, operation)
- return resolve(result)
- } catch (err) {
- if (!isRetryError(err)) {
- return reject(err)
- }
- if (!operation.retry(err.retried || new Error())) {
- return reject(err.retried)
- }
- }
- })
- })
-}
-
-module.exports = { promiseRetry }
diff --git a/node_modules/@gar/promise-retry/lib/retry.js b/node_modules/@gar/promise-retry/lib/retry.js
deleted file mode 100644
index e2d13df..0000000
--- a/node_modules/@gar/promise-retry/lib/retry.js
+++ /dev/null
@@ -1,109 +0,0 @@
-class RetryOperation {
- #attempts = 1
- #cachedTimeouts = null
- #errors = []
- #fn = null
- #maxRetryTime
- #operationStart = null
- #originalTimeouts
- #timeouts
- #timer = null
- #unref
-
- constructor (timeouts, options = {}) {
- this.#originalTimeouts = [...timeouts]
- this.#timeouts = [...timeouts]
- this.#unref = options.unref
- this.#maxRetryTime = options.maxRetryTime || Infinity
- if (options.forever) {
- this.#cachedTimeouts = [...this.#timeouts]
- }
- }
-
- get timeouts () {
- return [...this.#timeouts]
- }
-
- get errors () {
- return [...this.#errors]
- }
-
- get attempts () {
- return this.#attempts
- }
-
- get mainError () {
- let mainError = null
- if (this.#errors.length) {
- let mainErrorCount = 0
- const counts = {}
- for (let i = 0; i < this.#errors.length; i++) {
- const error = this.#errors[i]
- const { message } = error
- if (!counts[message]) {
- counts[message] = 0
- }
- counts[message]++
-
- if (counts[message] >= mainErrorCount) {
- mainError = error
- mainErrorCount = counts[message]
- }
- }
- }
- return mainError
- }
-
- reset () {
- this.#attempts = 1
- this.#timeouts = [...this.#originalTimeouts]
- }
-
- stop () {
- if (this.#timer) {
- clearTimeout(this.#timer)
- }
-
- this.#timeouts = []
- this.#cachedTimeouts = null
- }
-
- retry (err) {
- this.#errors.push(err)
- if (new Date().getTime() - this.#operationStart >= this.#maxRetryTime) {
- // XXX This puts the timeout error first, meaning it will never show as mainError, there may be no way to ever see this
- this.#errors.unshift(new Error('RetryOperation timeout occurred'))
- return false
- }
-
- let timeout = this.#timeouts.shift()
- if (timeout === undefined) {
- // We're out of timeouts, clear the last error and repeat the final timeout
- if (this.#cachedTimeouts) {
- this.#errors.pop()
- timeout = this.#cachedTimeouts.at(-1)
- } else {
- return false
- }
- }
-
- // TODO what if there already is a timer?
- this.#timer = setTimeout(() => {
- this.#attempts++
- this.#fn(this.#attempts)
- }, timeout)
-
- if (this.#unref) {
- this.#timer.unref()
- }
-
- return true
- }
-
- attempt (fn) {
- this.#fn = fn
- this.#operationStart = new Date().getTime()
- this.#fn(this.#attempts)
- }
-}
-module.exports = { RetryOperation }
diff --git a/node_modules/@gar/promise-retry/package.json b/node_modules/@gar/promise-retry/package.json
deleted file mode 100644
index ab73b70..0000000
--- a/node_modules/@gar/promise-retry/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "@gar/promise-retry",
- "version": "1.0.3",
- "description": "Retries a function that returns a promise, leveraging the power of the retry module.",
- "main": "./lib/index.js",
- "files": [
- "lib"
- ],
- "type": "commonjs",
- "exports": {
- ".": [
- {
- "default": "./lib/index.js",
- "types": "./lib/index.d.ts"
- },
- "./lib/index.js"
- ]
- },
- "scripts": {
- "lint": "npx standard",
- "lint:fix": "npx standard --fix",
- "test": "node --test --experimental-test-coverage --test-coverage-lines=100 --test-coverage-functions=100 --test-coverage-branches=100",
- "typelint": "npx -p typescript tsc ./lib/index.d.ts",
- "posttest": "npm run lint",
- "postlint": "npm run typelint"
- },
- "bugs": {
- "url": "https://github.com/wraithgar/node-promise-retry/issues/"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/wraithgar/node-promise-retry.git"
- },
- "keywords": [
- "retry",
- "promise",
- "backoff",
- "repeat",
- "replay"
- ],
- "license": "MIT",
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
-}
diff --git a/node_modules/@isaacs/fs-minipass/LICENSE b/node_modules/@isaacs/fs-minipass/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/@isaacs/fs-minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@isaacs/fs-minipass/README.md b/node_modules/@isaacs/fs-minipass/README.md
deleted file mode 100644
index dac96e7..0000000
--- a/node_modules/@isaacs/fs-minipass/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# fs-minipass
-
-Filesystem streams based on [minipass](http://npm.im/minipass).
-
-4 classes are exported:
-
-- ReadStream
-- ReadStreamSync
-- WriteStream
-- WriteStreamSync
-
-When using `ReadStreamSync`, all of the data is made available
-immediately upon consuming the stream. Nothing is buffered in memory
-when the stream is constructed. If the stream is piped to a writer,
-then it will synchronously `read()` and emit data into the writer as
-fast as the writer can consume it. (That is, it will respect
-backpressure.) If you call `stream.read()` then it will read the
-entire file and return the contents.
-
-When using `WriteStreamSync`, every write is flushed to the file
-synchronously. If your writes all come in a single tick, then it'll
-write it all out in a single tick. It's as synchronous as you are.
-
-The async versions work much like their node builtin counterparts,
-with the exception of introducing significantly less Stream machinery
-overhead.
-
-## USAGE
-
-It's just streams, you pipe them or read() them or write() to them.
-
-```js
-import { ReadStream, WriteStream } from 'fs-minipass'
-// or: const { ReadStream, WriteStream } = require('fs-minipass')
-const readStream = new ReadStream('file.txt')
-const writeStream = new WriteStream('output.txt')
-writeStream.write('some file header or whatever\n')
-readStream.pipe(writeStream)
-```
-
-## ReadStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `readSize` The size of reads to do, defaults to 16MB
-- `size` The size of the file, if known. Prevents zero-byte read()
- call at the end.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the file is done being read.
-
-## WriteStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `mode` The mode to create the file with. Defaults to `0o666`.
-- `start` The position in the file to start reading. If not
- specified, then the file will start writing at position zero, and be
- truncated by default.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the stream is ended.
-- `flags` Flags to use when opening the file. Irrelevant if `fd` is
- passed in, since file won't be opened in that case. Defaults to
- `'a'` if a `pos` is specified, or `'w'` otherwise.
diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts
deleted file mode 100644
index 38e8ccd..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-///
-///
-///
-import EE from 'events';
-import { Minipass } from 'minipass';
-declare const _autoClose: unique symbol;
-declare const _close: unique symbol;
-declare const _ended: unique symbol;
-declare const _fd: unique symbol;
-declare const _finished: unique symbol;
-declare const _flags: unique symbol;
-declare const _flush: unique symbol;
-declare const _handleChunk: unique symbol;
-declare const _makeBuf: unique symbol;
-declare const _mode: unique symbol;
-declare const _needDrain: unique symbol;
-declare const _onerror: unique symbol;
-declare const _onopen: unique symbol;
-declare const _onread: unique symbol;
-declare const _onwrite: unique symbol;
-declare const _open: unique symbol;
-declare const _path: unique symbol;
-declare const _pos: unique symbol;
-declare const _queue: unique symbol;
-declare const _read: unique symbol;
-declare const _readSize: unique symbol;
-declare const _reading: unique symbol;
-declare const _remain: unique symbol;
-declare const _size: unique symbol;
-declare const _write: unique symbol;
-declare const _writing: unique symbol;
-declare const _defaultFlag: unique symbol;
-declare const _errored: unique symbol;
-export type ReadStreamOptions = Minipass.Options & {
- fd?: number;
- readSize?: number;
- size?: number;
- autoClose?: boolean;
-};
-export type ReadStreamEvents = Minipass.Events & {
- open: [fd: number];
-};
-export declare class ReadStream extends Minipass {
- [_errored]: boolean;
- [_fd]?: number;
- [_path]: string;
- [_readSize]: number;
- [_reading]: boolean;
- [_size]: number;
- [_remain]: number;
- [_autoClose]: boolean;
- constructor(path: string, opt: ReadStreamOptions);
- get fd(): number | undefined;
- get path(): string;
- write(): void;
- end(): void;
- [_open](): void;
- [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void;
- [_makeBuf](): Buffer;
- [_read](): void;
- [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void;
- [_close](): void;
- [_onerror](er: NodeJS.ErrnoException): void;
- [_handleChunk](br: number, buf: Buffer): boolean;
- emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean;
-}
-export declare class ReadStreamSync extends ReadStream {
- [_open](): void;
- [_read](): void;
- [_close](): void;
-}
-export type WriteStreamOptions = {
- fd?: number;
- autoClose?: boolean;
- mode?: number;
- captureRejections?: boolean;
- start?: number;
- flags?: string;
-};
-export declare class WriteStream extends EE {
- readable: false;
- writable: boolean;
- [_errored]: boolean;
- [_writing]: boolean;
- [_ended]: boolean;
- [_queue]: Buffer[];
- [_needDrain]: boolean;
- [_path]: string;
- [_mode]: number;
- [_autoClose]: boolean;
- [_fd]?: number;
- [_defaultFlag]: boolean;
- [_flags]: string;
- [_finished]: boolean;
- [_pos]?: number;
- constructor(path: string, opt: WriteStreamOptions);
- emit(ev: string, ...args: any[]): boolean;
- get fd(): number | undefined;
- get path(): string;
- [_onerror](er: NodeJS.ErrnoException): void;
- [_open](): void;
- [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void;
- end(buf: string, enc?: BufferEncoding): this;
- end(buf?: Buffer, enc?: undefined): this;
- write(buf: string, enc?: BufferEncoding): boolean;
- write(buf: Buffer, enc?: undefined): boolean;
- [_write](buf: Buffer): void;
- [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void;
- [_flush](): void;
- [_close](): void;
-}
-export declare class WriteStreamSync extends WriteStream {
- [_open](): void;
- [_close](): void;
- [_write](buf: Buffer): void;
-}
-export {};
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map
deleted file mode 100644
index 3e2c703..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,GAAG,eAAgB,CAAA;AACzB,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,YAAY,eAAyB,CAAA;AAC3C,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,OAAO,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,GAAG,IAAI;IAoBxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO;IACjD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO;IAsB5C,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;IAWpB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAwBzD,CAAC,MAAM,CAAC;IAgBR,CAAC,MAAM,CAAC;CAST;AAED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,CAAC,KAAK,CAAC,IAAI,IAAI;IAsBf,CAAC,MAAM,CAAC;IASR,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"}
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js
deleted file mode 100644
index 2b3178c..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js
+++ /dev/null
@@ -1,430 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.WriteStreamSync = exports.WriteStream = exports.ReadStreamSync = exports.ReadStream = void 0;
-const events_1 = __importDefault(require("events"));
-const fs_1 = __importDefault(require("fs"));
-const minipass_1 = require("minipass");
-const writev = fs_1.default.writev;
-const _autoClose = Symbol('_autoClose');
-const _close = Symbol('_close');
-const _ended = Symbol('_ended');
-const _fd = Symbol('_fd');
-const _finished = Symbol('_finished');
-const _flags = Symbol('_flags');
-const _flush = Symbol('_flush');
-const _handleChunk = Symbol('_handleChunk');
-const _makeBuf = Symbol('_makeBuf');
-const _mode = Symbol('_mode');
-const _needDrain = Symbol('_needDrain');
-const _onerror = Symbol('_onerror');
-const _onopen = Symbol('_onopen');
-const _onread = Symbol('_onread');
-const _onwrite = Symbol('_onwrite');
-const _open = Symbol('_open');
-const _path = Symbol('_path');
-const _pos = Symbol('_pos');
-const _queue = Symbol('_queue');
-const _read = Symbol('_read');
-const _readSize = Symbol('_readSize');
-const _reading = Symbol('_reading');
-const _remain = Symbol('_remain');
-const _size = Symbol('_size');
-const _write = Symbol('_write');
-const _writing = Symbol('_writing');
-const _defaultFlag = Symbol('_defaultFlag');
-const _errored = Symbol('_errored');
-class ReadStream extends minipass_1.Minipass {
- [_errored] = false;
- [_fd];
- [_path];
- [_readSize];
- [_reading] = false;
- [_size];
- [_remain];
- [_autoClose];
- constructor(path, opt) {
- opt = opt || {};
- super(opt);
- this.readable = true;
- this.writable = false;
- if (typeof path !== 'string') {
- throw new TypeError('path must be a string');
- }
- this[_errored] = false;
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined;
- this[_path] = path;
- this[_readSize] = opt.readSize || 16 * 1024 * 1024;
- this[_reading] = false;
- this[_size] = typeof opt.size === 'number' ? opt.size : Infinity;
- this[_remain] = this[_size];
- this[_autoClose] =
- typeof opt.autoClose === 'boolean' ? opt.autoClose : true;
- if (typeof this[_fd] === 'number') {
- this[_read]();
- }
- else {
- this[_open]();
- }
- }
- get fd() {
- return this[_fd];
- }
- get path() {
- return this[_path];
- }
- //@ts-ignore
- write() {
- throw new TypeError('this is a readable stream');
- }
- //@ts-ignore
- end() {
- throw new TypeError('this is a readable stream');
- }
- [_open]() {
- fs_1.default.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd));
- }
- [_onopen](er, fd) {
- if (er) {
- this[_onerror](er);
- }
- else {
- this[_fd] = fd;
- this.emit('open', fd);
- this[_read]();
- }
- }
- [_makeBuf]() {
- return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]));
- }
- [_read]() {
- if (!this[_reading]) {
- this[_reading] = true;
- const buf = this[_makeBuf]();
- /* c8 ignore start */
- if (buf.length === 0) {
- return process.nextTick(() => this[_onread](null, 0, buf));
- }
- /* c8 ignore stop */
- fs_1.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b));
- }
- }
- [_onread](er, br, buf) {
- this[_reading] = false;
- if (er) {
- this[_onerror](er);
- }
- else if (this[_handleChunk](br, buf)) {
- this[_read]();
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close'));
- }
- }
- [_onerror](er) {
- this[_reading] = true;
- this[_close]();
- this.emit('error', er);
- }
- [_handleChunk](br, buf) {
- let ret = false;
- // no effect if infinite
- this[_remain] -= br;
- if (br > 0) {
- ret = super.write(br < buf.length ? buf.subarray(0, br) : buf);
- }
- if (br === 0 || this[_remain] <= 0) {
- ret = false;
- this[_close]();
- super.end();
- }
- return ret;
- }
- emit(ev, ...args) {
- switch (ev) {
- case 'prefinish':
- case 'finish':
- return false;
- case 'drain':
- if (typeof this[_fd] === 'number') {
- this[_read]();
- }
- return false;
- case 'error':
- if (this[_errored]) {
- return false;
- }
- this[_errored] = true;
- return super.emit(ev, ...args);
- default:
- return super.emit(ev, ...args);
- }
- }
-}
-exports.ReadStream = ReadStream;
-class ReadStreamSync extends ReadStream {
- [_open]() {
- let threw = true;
- try {
- this[_onopen](null, fs_1.default.openSync(this[_path], 'r'));
- threw = false;
- }
- finally {
- if (threw) {
- this[_close]();
- }
- }
- }
- [_read]() {
- let threw = true;
- try {
- if (!this[_reading]) {
- this[_reading] = true;
- do {
- const buf = this[_makeBuf]();
- /* c8 ignore start */
- const br = buf.length === 0
- ? 0
- : fs_1.default.readSync(this[_fd], buf, 0, buf.length, null);
- /* c8 ignore stop */
- if (!this[_handleChunk](br, buf)) {
- break;
- }
- } while (true);
- this[_reading] = false;
- }
- threw = false;
- }
- finally {
- if (threw) {
- this[_close]();
- }
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs_1.default.closeSync(fd);
- this.emit('close');
- }
- }
-}
-exports.ReadStreamSync = ReadStreamSync;
-class WriteStream extends events_1.default {
- readable = false;
- writable = true;
- [_errored] = false;
- [_writing] = false;
- [_ended] = false;
- [_queue] = [];
- [_needDrain] = false;
- [_path];
- [_mode];
- [_autoClose];
- [_fd];
- [_defaultFlag];
- [_flags];
- [_finished] = false;
- [_pos];
- constructor(path, opt) {
- opt = opt || {};
- super(opt);
- this[_path] = path;
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined;
- this[_mode] = opt.mode === undefined ? 0o666 : opt.mode;
- this[_pos] = typeof opt.start === 'number' ? opt.start : undefined;
- this[_autoClose] =
- typeof opt.autoClose === 'boolean' ? opt.autoClose : true;
- // truncating makes no sense when writing into the middle
- const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w';
- this[_defaultFlag] = opt.flags === undefined;
- this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags;
- if (this[_fd] === undefined) {
- this[_open]();
- }
- }
- emit(ev, ...args) {
- if (ev === 'error') {
- if (this[_errored]) {
- return false;
- }
- this[_errored] = true;
- }
- return super.emit(ev, ...args);
- }
- get fd() {
- return this[_fd];
- }
- get path() {
- return this[_path];
- }
- [_onerror](er) {
- this[_close]();
- this[_writing] = true;
- this.emit('error', er);
- }
- [_open]() {
- fs_1.default.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd));
- }
- [_onopen](er, fd) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er &&
- er.code === 'ENOENT') {
- this[_flags] = 'w';
- this[_open]();
- }
- else if (er) {
- this[_onerror](er);
- }
- else {
- this[_fd] = fd;
- this.emit('open', fd);
- if (!this[_writing]) {
- this[_flush]();
- }
- }
- }
- end(buf, enc) {
- if (buf) {
- //@ts-ignore
- this.write(buf, enc);
- }
- this[_ended] = true;
- // synthetic after-write logic, where drain/finish live
- if (!this[_writing] &&
- !this[_queue].length &&
- typeof this[_fd] === 'number') {
- this[_onwrite](null, 0);
- }
- return this;
- }
- write(buf, enc) {
- if (typeof buf === 'string') {
- buf = Buffer.from(buf, enc);
- }
- if (this[_ended]) {
- this.emit('error', new Error('write() after end()'));
- return false;
- }
- if (this[_fd] === undefined || this[_writing] || this[_queue].length) {
- this[_queue].push(buf);
- this[_needDrain] = true;
- return false;
- }
- this[_writing] = true;
- this[_write](buf);
- return true;
- }
- [_write](buf) {
- fs_1.default.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw));
- }
- [_onwrite](er, bw) {
- if (er) {
- this[_onerror](er);
- }
- else {
- if (this[_pos] !== undefined && typeof bw === 'number') {
- this[_pos] += bw;
- }
- if (this[_queue].length) {
- this[_flush]();
- }
- else {
- this[_writing] = false;
- if (this[_ended] && !this[_finished]) {
- this[_finished] = true;
- this[_close]();
- this.emit('finish');
- }
- else if (this[_needDrain]) {
- this[_needDrain] = false;
- this.emit('drain');
- }
- }
- }
- }
- [_flush]() {
- if (this[_queue].length === 0) {
- if (this[_ended]) {
- this[_onwrite](null, 0);
- }
- }
- else if (this[_queue].length === 1) {
- this[_write](this[_queue].pop());
- }
- else {
- const iovec = this[_queue];
- this[_queue] = [];
- writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw));
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close'));
- }
- }
-}
-exports.WriteStream = WriteStream;
-class WriteStreamSync extends WriteStream {
- [_open]() {
- let fd;
- // only wrap in a try{} block if we know we'll retry, to avoid
- // the rethrow obscuring the error's source frame in most cases.
- if (this[_defaultFlag] && this[_flags] === 'r+') {
- try {
- fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]);
- }
- catch (er) {
- if (er?.code === 'ENOENT') {
- this[_flags] = 'w';
- return this[_open]();
- }
- else {
- throw er;
- }
- }
- }
- else {
- fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]);
- }
- this[_onopen](null, fd);
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs_1.default.closeSync(fd);
- this.emit('close');
- }
- }
- [_write](buf) {
- // throw the original, but try to close if it fails
- let threw = true;
- try {
- this[_onwrite](null, fs_1.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos]));
- threw = false;
- }
- finally {
- if (threw) {
- try {
- this[_close]();
- }
- catch {
- // ok error
- }
- }
- }
- }
-}
-exports.WriteStreamSync = WriteStreamSync;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map
deleted file mode 100644
index caee495..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,4CAAmB;AACnB,uCAAmC;AAEnC,MAAM,MAAM,GAAG,YAAE,CAAC,MAAM,CAAA;AAExB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACzB,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;A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C,IAAI,EAAE,EAAE,CAAC,CAAA;IACzB,CAAC;IAED,CAAC,MAAM,CAAC;QACN,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YACtD,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;YACpB,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;YACrB,YAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IAED,CAAC,MAAM,CAAC,CAAC,GAAW;QAClB,mDAAmD;QACnD,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,CACZ,IAAI,EACJ,YAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAClE,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAnDD,0CAmDC","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json b/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json
deleted file mode 100644
index 5bbefff..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "commonjs"
-}
diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts
deleted file mode 100644
index 54aebe1..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-///
-///
-///
-import EE from 'events';
-import { Minipass } from 'minipass';
-declare const _autoClose: unique symbol;
-declare const _close: unique symbol;
-declare const _ended: unique symbol;
-declare const _fd: unique symbol;
-declare const _finished: unique symbol;
-declare const _flags: unique symbol;
-declare const _flush: unique symbol;
-declare const _handleChunk: unique symbol;
-declare const _makeBuf: unique symbol;
-declare const _mode: unique symbol;
-declare const _needDrain: unique symbol;
-declare const _onerror: unique symbol;
-declare const _onopen: unique symbol;
-declare const _onread: unique symbol;
-declare const _onwrite: unique symbol;
-declare const _open: unique symbol;
-declare const _path: unique symbol;
-declare const _pos: unique symbol;
-declare const _queue: unique symbol;
-declare const _read: unique symbol;
-declare const _readSize: unique symbol;
-declare const _reading: unique symbol;
-declare const _remain: unique symbol;
-declare const _size: unique symbol;
-declare const _write: unique symbol;
-declare const _writing: unique symbol;
-declare const _defaultFlag: unique symbol;
-declare const _errored: unique symbol;
-export type ReadStreamOptions = Minipass.Options & {
- fd?: number;
- readSize?: number;
- size?: number;
- autoClose?: boolean;
-};
-export type ReadStreamEvents = Minipass.Events & {
- open: [fd: number];
-};
-export declare class ReadStream extends Minipass {
- [_errored]: boolean;
- [_fd]?: number;
- [_path]: string;
- [_readSize]: number;
- [_reading]: boolean;
- [_size]: number;
- [_remain]: number;
- [_autoClose]: boolean;
- constructor(path: string, opt: ReadStreamOptions);
- get fd(): number | undefined;
- get path(): string;
- write(): void;
- end(): void;
- [_open](): void;
- [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void;
- [_makeBuf](): Buffer;
- [_read](): void;
- [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void;
- [_close](): void;
- [_onerror](er: NodeJS.ErrnoException): void;
- [_handleChunk](br: number, buf: Buffer): boolean;
- emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean;
-}
-export declare class ReadStreamSync extends ReadStream {
- [_open](): void;
- [_read](): void;
- [_close](): void;
-}
-export type WriteStreamOptions = {
- fd?: number;
- autoClose?: boolean;
- mode?: number;
- captureRejections?: boolean;
- start?: number;
- flags?: string;
-};
-export declare class WriteStream extends EE {
- readable: false;
- writable: boolean;
- [_errored]: boolean;
- [_writing]: boolean;
- [_ended]: boolean;
- [_queue]: Buffer[];
- [_needDrain]: boolean;
- [_path]: string;
- [_mode]: number;
- [_autoClose]: boolean;
- [_fd]?: number;
- [_defaultFlag]: boolean;
- [_flags]: string;
- [_finished]: boolean;
- [_pos]?: number;
- constructor(path: string, opt: WriteStreamOptions);
- emit(ev: string, ...args: any[]): boolean;
- get fd(): number | undefined;
- get path(): string;
- [_onerror](er: NodeJS.ErrnoException): void;
- [_open](): void;
- [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void;
- end(buf: string, enc?: BufferEncoding): this;
- end(buf?: Buffer, enc?: undefined): this;
- write(buf: string, enc?: BufferEncoding): boolean;
- write(buf: Buffer, enc?: undefined): boolean;
- [_write](buf: Buffer): void;
- [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void;
- [_flush](): void;
- [_close](): void;
-}
-export declare class WriteStreamSync extends WriteStream {
- [_open](): void;
- [_close](): void;
- [_write](buf: Buffer): void;
-}
-export {};
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map
deleted file mode 100644
index 3e2c703..0000000
--- a/node_mod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AAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"}
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js b/node_modules/@isaacs/fs-minipass/dist/esm/index.js
deleted file mode 100644
index 287a0f6..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/esm/index.js
+++ /dev/null
@@ -1,420 +0,0 @@
-import EE from 'events';
-import fs from 'fs';
-import { Minipass } from 'minipass';
-const writev = fs.writev;
-const _autoClose = Symbol('_autoClose');
-const _close = Symbol('_close');
-const _ended = Symbol('_ended');
-const _fd = Symbol('_fd');
-const _finished = Symbol('_finished');
-const _flags = Symbol('_flags');
-const _flush = Symbol('_flush');
-const _handleChunk = Symbol('_handleChunk');
-const _makeBuf = Symbol('_makeBuf');
-const _mode = Symbol('_mode');
-const _needDrain = Symbol('_needDrain');
-const _onerror = Symbol('_onerror');
-const _onopen = Symbol('_onopen');
-const _onread = Symbol('_onread');
-const _onwrite = Symbol('_onwrite');
-const _open = Symbol('_open');
-const _path = Symbol('_path');
-const _pos = Symbol('_pos');
-const _queue = Symbol('_queue');
-const _read = Symbol('_read');
-const _readSize = Symbol('_readSize');
-const _reading = Symbol('_reading');
-const _remain = Symbol('_remain');
-const _size = Symbol('_size');
-const _write = Symbol('_write');
-const _writing = Symbol('_writing');
-const _defaultFlag = Symbol('_defaultFlag');
-const _errored = Symbol('_errored');
-export class ReadStream extends Minipass {
- [_errored] = false;
- [_fd];
- [_path];
- [_readSize];
- [_reading] = false;
- [_size];
- [_remain];
- [_autoClose];
- constructor(path, opt) {
- opt = opt || {};
- super(opt);
- this.readable = true;
- this.writable = false;
- if (typeof path !== 'string') {
- throw new TypeError('path must be a string');
- }
- this[_errored] = false;
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined;
- this[_path] = path;
- this[_readSize] = opt.readSize || 16 * 1024 * 1024;
- this[_reading] = false;
- this[_size] = typeof opt.size === 'number' ? opt.size : Infinity;
- this[_remain] = this[_size];
- this[_autoClose] =
- typeof opt.autoClose === 'boolean' ? opt.autoClose : true;
- if (typeof this[_fd] === 'number') {
- this[_read]();
- }
- else {
- this[_open]();
- }
- }
- get fd() {
- return this[_fd];
- }
- get path() {
- return this[_path];
- }
- //@ts-ignore
- write() {
- throw new TypeError('this is a readable stream');
- }
- //@ts-ignore
- end() {
- throw new TypeError('this is a readable stream');
- }
- [_open]() {
- fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd));
- }
- [_onopen](er, fd) {
- if (er) {
- this[_onerror](er);
- }
- else {
- this[_fd] = fd;
- this.emit('open', fd);
- this[_read]();
- }
- }
- [_makeBuf]() {
- return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]));
- }
- [_read]() {
- if (!this[_reading]) {
- this[_reading] = true;
- const buf = this[_makeBuf]();
- /* c8 ignore start */
- if (buf.length === 0) {
- return process.nextTick(() => this[_onread](null, 0, buf));
- }
- /* c8 ignore stop */
- fs.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b));
- }
- }
- [_onread](er, br, buf) {
- this[_reading] = false;
- if (er) {
- this[_onerror](er);
- }
- else if (this[_handleChunk](br, buf)) {
- this[_read]();
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs.close(fd, er => er ? this.emit('error', er) : this.emit('close'));
- }
- }
- [_onerror](er) {
- this[_reading] = true;
- this[_close]();
- this.emit('error', er);
- }
- [_handleChunk](br, buf) {
- let ret = false;
- // no effect if infinite
- this[_remain] -= br;
- if (br > 0) {
- ret = super.write(br < buf.length ? buf.subarray(0, br) : buf);
- }
- if (br === 0 || this[_remain] <= 0) {
- ret = false;
- this[_close]();
- super.end();
- }
- return ret;
- }
- emit(ev, ...args) {
- switch (ev) {
- case 'prefinish':
- case 'finish':
- return false;
- case 'drain':
- if (typeof this[_fd] === 'number') {
- this[_read]();
- }
- return false;
- case 'error':
- if (this[_errored]) {
- return false;
- }
- this[_errored] = true;
- return super.emit(ev, ...args);
- default:
- return super.emit(ev, ...args);
- }
- }
-}
-export class ReadStreamSync extends ReadStream {
- [_open]() {
- let threw = true;
- try {
- this[_onopen](null, fs.openSync(this[_path], 'r'));
- threw = false;
- }
- finally {
- if (threw) {
- this[_close]();
- }
- }
- }
- [_read]() {
- let threw = true;
- try {
- if (!this[_reading]) {
- this[_reading] = true;
- do {
- const buf = this[_makeBuf]();
- /* c8 ignore start */
- const br = buf.length === 0
- ? 0
- : fs.readSync(this[_fd], buf, 0, buf.length, null);
- /* c8 ignore stop */
- if (!this[_handleChunk](br, buf)) {
- break;
- }
- } while (true);
- this[_reading] = false;
- }
- threw = false;
- }
- finally {
- if (threw) {
- this[_close]();
- }
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs.closeSync(fd);
- this.emit('close');
- }
- }
-}
-export class WriteStream extends EE {
- readable = false;
- writable = true;
- [_errored] = false;
- [_writing] = false;
- [_ended] = false;
- [_queue] = [];
- [_needDrain] = false;
- [_path];
- [_mode];
- [_autoClose];
- [_fd];
- [_defaultFlag];
- [_flags];
- [_finished] = false;
- [_pos];
- constructor(path, opt) {
- opt = opt || {};
- super(opt);
- this[_path] = path;
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined;
- this[_mode] = opt.mode === undefined ? 0o666 : opt.mode;
- this[_pos] = typeof opt.start === 'number' ? opt.start : undefined;
- this[_autoClose] =
- typeof opt.autoClose === 'boolean' ? opt.autoClose : true;
- // truncating makes no sense when writing into the middle
- const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w';
- this[_defaultFlag] = opt.flags === undefined;
- this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags;
- if (this[_fd] === undefined) {
- this[_open]();
- }
- }
- emit(ev, ...args) {
- if (ev === 'error') {
- if (this[_errored]) {
- return false;
- }
- this[_errored] = true;
- }
- return super.emit(ev, ...args);
- }
- get fd() {
- return this[_fd];
- }
- get path() {
- return this[_path];
- }
- [_onerror](er) {
- this[_close]();
- this[_writing] = true;
- this.emit('error', er);
- }
- [_open]() {
- fs.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd));
- }
- [_onopen](er, fd) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er &&
- er.code === 'ENOENT') {
- this[_flags] = 'w';
- this[_open]();
- }
- else if (er) {
- this[_onerror](er);
- }
- else {
- this[_fd] = fd;
- this.emit('open', fd);
- if (!this[_writing]) {
- this[_flush]();
- }
- }
- }
- end(buf, enc) {
- if (buf) {
- //@ts-ignore
- this.write(buf, enc);
- }
- this[_ended] = true;
- // synthetic after-write logic, where drain/finish live
- if (!this[_writing] &&
- !this[_queue].length &&
- typeof this[_fd] === 'number') {
- this[_onwrite](null, 0);
- }
- return this;
- }
- write(buf, enc) {
- if (typeof buf === 'string') {
- buf = Buffer.from(buf, enc);
- }
- if (this[_ended]) {
- this.emit('error', new Error('write() after end()'));
- return false;
- }
- if (this[_fd] === undefined || this[_writing] || this[_queue].length) {
- this[_queue].push(buf);
- this[_needDrain] = true;
- return false;
- }
- this[_writing] = true;
- this[_write](buf);
- return true;
- }
- [_write](buf) {
- fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw));
- }
- [_onwrite](er, bw) {
- if (er) {
- this[_onerror](er);
- }
- else {
- if (this[_pos] !== undefined && typeof bw === 'number') {
- this[_pos] += bw;
- }
- if (this[_queue].length) {
- this[_flush]();
- }
- else {
- this[_writing] = false;
- if (this[_ended] && !this[_finished]) {
- this[_finished] = true;
- this[_close]();
- this.emit('finish');
- }
- else if (this[_needDrain]) {
- this[_needDrain] = false;
- this.emit('drain');
- }
- }
- }
- }
- [_flush]() {
- if (this[_queue].length === 0) {
- if (this[_ended]) {
- this[_onwrite](null, 0);
- }
- }
- else if (this[_queue].length === 1) {
- this[_write](this[_queue].pop());
- }
- else {
- const iovec = this[_queue];
- this[_queue] = [];
- writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw));
- }
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs.close(fd, er => er ? this.emit('error', er) : this.emit('close'));
- }
- }
-}
-export class WriteStreamSync extends WriteStream {
- [_open]() {
- let fd;
- // only wrap in a try{} block if we know we'll retry, to avoid
- // the rethrow obscuring the error's source frame in most cases.
- if (this[_defaultFlag] && this[_flags] === 'r+') {
- try {
- fd = fs.openSync(this[_path], this[_flags], this[_mode]);
- }
- catch (er) {
- if (er?.code === 'ENOENT') {
- this[_flags] = 'w';
- return this[_open]();
- }
- else {
- throw er;
- }
- }
- }
- else {
- fd = fs.openSync(this[_path], this[_flags], this[_mode]);
- }
- this[_onopen](null, fd);
- }
- [_close]() {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- const fd = this[_fd];
- this[_fd] = undefined;
- fs.closeSync(fd);
- this.emit('close');
- }
- }
- [_write](buf) {
- // throw the original, but try to close if it fails
- let threw = true;
- try {
- this[_onwrite](null, fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos]));
- threw = false;
- }
- finally {
- if (threw) {
- try {
- this[_close]();
- }
- catch {
- // ok error
- }
- }
- }
- }
-}
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map
deleted file mode 100644
index 2ef8b14..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAA;AA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,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/package.json b/node_modules/@isaacs/fs-minipass/dist/esm/package.json
deleted file mode 100644
index 3dbc1ca..0000000
--- a/node_modules/@isaacs/fs-minipass/dist/esm/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "module"
-}
diff --git a/node_modules/@isaacs/fs-minipass/package.json b/node_modules/@isaacs/fs-minipass/package.json
deleted file mode 100644
index cc4576c..0000000
--- a/node_modules/@isaacs/fs-minipass/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "name": "@isaacs/fs-minipass",
- "version": "4.0.1",
- "main": "./dist/commonjs/index.js",
- "scripts": {
- "prepare": "tshy",
- "pretest": "npm run prepare",
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags",
- "format": "prettier --write . --loglevel warn",
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
- },
- "keywords": [],
- "author": "Isaac Z. Schlueter",
- "license": "ISC",
- "repository": {
- "type": "git",
- "url": "https://github.com/npm/fs-minipass.git"
- },
- "description": "fs read and write streams based on minipass",
- "dependencies": {
- "minipass": "^7.0.4"
- },
- "devDependencies": {
- "@types/node": "^20.11.30",
- "mutate-fs": "^2.1.1",
- "prettier": "^3.2.5",
- "tap": "^18.7.1",
- "tshy": "^1.12.0",
- "typedoc": "^0.25.12"
- },
- "files": [
- "dist"
- ],
- "engines": {
- "node": ">=18.0.0"
- },
- "tshy": {
- "exports": {
- "./package.json": "./package.json",
- ".": "./src/index.ts"
- }
- },
- "exports": {
- "./package.json": "./package.json",
- ".": {
- "import": {
- "types": "./dist/esm/index.d.ts",
- "default": "./dist/esm/index.js"
- },
- "require": {
- "types": "./dist/commonjs/index.d.ts",
- "default": "./dist/commonjs/index.js"
- }
- }
- },
- "types": "./dist/commonjs/index.d.ts",
- "type": "module",
- "prettier": {
- "semi": false,
- "printWidth": 75,
- "tabWidth": 2,
- "useTabs": false,
- "singleQuote": true,
- "jsxSingleQuote": false,
- "bracketSameLine": true,
- "arrowParens": "avoid",
- "endOfLine": "lf"
- }
-}
diff --git a/node_modules/@npmcli/agent/README.md b/node_modules/@npmcli/agent/README.md
deleted file mode 100644
index a3a9105..0000000
--- a/node_modules/@npmcli/agent/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## @npmcli/agent
-
-A pair of Agent implementations for nodejs that provide consistent keep-alives, granular timeouts, dns caching, and proxy support.
-
-### Usage
-
-```js
-const { getAgent, HttpAgent } = require('@npmcli/agent')
-const fetch = require('minipass-fetch')
-
-const main = async () => {
- // if you know what agent you need, you can create one directly
- const agent = new HttpAgent(agentOptions)
- // or you can use the getAgent helper, it will determine and create an Agent
- // instance for you as well as reuse that agent for new requests as appropriate
- const agent = getAgent('https://registry.npmjs.org/npm', agentOptions)
- // minipass-fetch is just an example, this will work for any http client that
- // supports node's Agents
- const res = await fetch('https://registry.npmjs.org/npm', { agent })
-}
-
-main()
-```
-
-### Options
-
-All options supported by the node Agent implementations are supported here, see [the docs](https://nodejs.org/api/http.html#new-agentoptions) for those.
-
-Options that have been added by this module include:
-
-- `family`: what tcp family to use, can be `4` for IPv4, `6` for IPv6 or `0` for both.
-- `proxy`: a URL to a supported proxy, currently supports `HTTP CONNECT` based http/https proxies as well as socks4 and 5.
-- `dns`: configuration for the built-in dns cache
- - `ttl`: how long (in milliseconds) to keep cached dns entries, defaults to `5 * 60 * 100 (5 minutes)`
- - `lookup`: optional function to override how dns lookups are performed, defaults to `require('dns').lookup`
-- `timeouts`: a set of granular timeouts, all default to `0`
- - `connection`: time between initiating connection and actually connecting
- - `idle`: time between data packets (if a top level `timeout` is provided, it will be copied here)
- - `response`: time between sending a request and receiving a response
- - `transfer`: time between starting to receive a request and consuming the response fully
diff --git a/node_modules/@npmcli/agent/lib/agents.js b/node_modules/@npmcli/agent/lib/agents.js
deleted file mode 100644
index c541b93..0000000
--- a/node_modules/@npmcli/agent/lib/agents.js
+++ /dev/null
@@ -1,206 +0,0 @@
-'use strict'
-
-const net = require('net')
-const tls = require('tls')
-const { once } = require('events')
-const timers = require('timers/promises')
-const { normalizeOptions, cacheOptions } = require('./options')
-const { getProxy, getProxyAgent, proxyCache } = require('./proxy.js')
-const Errors = require('./errors.js')
-const { Agent: AgentBase } = require('agent-base')
-
-module.exports = class Agent extends AgentBase {
- #options
- #timeouts
- #proxy
- #noProxy
- #ProxyAgent
-
- constructor (options = {}) {
- const { timeouts, proxy, noProxy, ...normalizedOptions } = normalizeOptions(options)
-
- super(normalizedOptions)
-
- this.#options = normalizedOptions
- this.#timeouts = timeouts
-
- if (proxy) {
- this.#proxy = new URL(proxy)
- this.#noProxy = noProxy
- this.#ProxyAgent = getProxyAgent(proxy)
- }
- }
-
- get proxy () {
- return this.#proxy ? { url: this.#proxy } : {}
- }
-
- #getProxy (options) {
- if (!this.#proxy) {
- return
- }
-
- const proxy = getProxy(`${options.protocol}//${options.host}:${options.port}`, {
- proxy: this.#proxy,
- noProxy: this.#noProxy,
- })
-
- if (!proxy) {
- return
- }
-
- const cacheKey = cacheOptions({
- ...options,
- ...this.#options,
- timeouts: this.#timeouts,
- proxy,
- })
-
- if (proxyCache.has(cacheKey)) {
- return proxyCache.get(cacheKey)
- }
-
- let ProxyAgent = this.#ProxyAgent
- if (Array.isArray(ProxyAgent)) {
- ProxyAgent = this.isSecureEndpoint(options) ? ProxyAgent[1] : ProxyAgent[0]
- }
-
- const proxyAgent = new ProxyAgent(proxy, {
- ...this.#options,
- socketOptions: { family: this.#options.family },
- })
- proxyCache.set(cacheKey, proxyAgent)
-
- return proxyAgent
- }
-
- // takes an array of promises and races them against the connection timeout
- // which will throw the necessary error if it is hit. This will return the
- // result of the promise race.
- async #timeoutConnection ({ promises, options, timeout }, ac = new AbortController()) {
- if (timeout) {
- const connectionTimeout = timers.setTimeout(timeout, null, { signal: ac.signal })
- .then(() => {
- throw new Errors.ConnectionTimeoutError(`${options.host}:${options.port}`)
- }).catch((err) => {
- if (err.name === 'AbortError') {
- return
- }
- throw err
- })
- promises.push(connectionTimeout)
- }
-
- let result
- try {
- result = await Promise.race(promises)
- ac.abort()
- } catch (err) {
- ac.abort()
- throw err
- }
- return result
- }
-
- async connect (request, options) {
- // if the connection does not have its own lookup function
- // set, then use the one from our options
- options.lookup ??= this.#options.lookup
-
- let socket
- let timeout = this.#timeouts.connection
- const isSecureEndpoint = this.isSecureEndpoint(options)
-
- const proxy = this.#getProxy(options)
- if (proxy) {
- // some of the proxies will wait for the socket to fully connect before
- // returning so we have to await this while also racing it against the
- // connection timeout.
- const start = Date.now()
- socket = await this.#timeoutConnection({
- options,
- timeout,
- promises: [proxy.connect(request, options)],
- })
- // see how much time proxy.connect took and subtract it from
- // the timeout
- if (timeout) {
- timeout = timeout - (Date.now() - start)
- }
- } else {
- socket = (isSecureEndpoint ? tls : net).connect(options)
- }
-
- socket.setKeepAlive(this.keepAlive, this.keepAliveMsecs)
- socket.setNoDelay(this.keepAlive)
-
- const abortController = new AbortController()
- const { signal } = abortController
-
- const connectPromise = socket[isSecureEndpoint ? 'secureConnecting' : 'connecting']
- ? once(socket, isSecureEndpoint ? 'secureConnect' : 'connect', { signal })
- : Promise.resolve()
-
- await this.#timeoutConnection({
- options,
- timeout,
- promises: [
- connectPromise,
- once(socket, 'error', { signal }).then((err) => {
- throw err[0]
- }),
- ],
- }, abortController)
-
- if (this.#timeouts.idle) {
- socket.setTimeout(this.#timeouts.idle, () => {
- socket.destroy(new Errors.IdleTimeoutError(`${options.host}:${options.port}`))
- })
- }
-
- return socket
- }
-
- addRequest (request, options) {
- const proxy = this.#getProxy(options)
- // it would be better to call proxy.addRequest here but this causes the
- // http-proxy-agent to call its super.addRequest which causes the request
- // to be added to the agent twice. since we only support 3 agents
- // currently (see the required agents in proxy.js) we have manually
- // checked that the only public methods we need to call are called in the
- // next block. this could change in the future and presumably we would get
- // failing tests until we have properly called the necessary methods on
- // each of our proxy agents
- if (proxy?.setRequestProps) {
- proxy.setRequestProps(request, options)
- }
-
- request.setHeader('connection', this.keepAlive ? 'keep-alive' : 'close')
-
- if (this.#timeouts.response) {
- let responseTimeout
- request.once('finish', () => {
- setTimeout(() => {
- request.destroy(new Errors.ResponseTimeoutError(request, this.#proxy))
- }, this.#timeouts.response)
- })
- request.once('response', () => {
- clearTimeout(responseTimeout)
- })
- }
-
- if (this.#timeouts.transfer) {
- let transferTimeout
- request.once('response', (res) => {
- setTimeout(() => {
- res.destroy(new Errors.TransferTimeoutError(request, this.#proxy))
- }, this.#timeouts.transfer)
- res.once('close', () => {
- clearTimeout(transferTimeout)
- })
- })
- }
-
- return super.addRequest(request, options)
- }
-}
diff --git a/node_modules/@npmcli/agent/lib/dns.js b/node_modules/@npmcli/agent/lib/dns.js
deleted file mode 100644
index 3c6946c..0000000
--- a/node_modules/@npmcli/agent/lib/dns.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict'
-
-const { LRUCache } = require('lru-cache')
-const dns = require('dns')
-
-// this is a factory so that each request can have its own opts (i.e. ttl)
-// while still sharing the cache across all requests
-const cache = new LRUCache({ max: 50 })
-
-const getOptions = ({
- family = 0,
- hints = dns.ADDRCONFIG,
- all = false,
- verbatim = undefined,
- ttl = 5 * 60 * 1000,
- lookup = dns.lookup,
-}) => ({
- // hints and lookup are returned since both are top level properties to (net|tls).connect
- hints,
- lookup: (hostname, ...args) => {
- const callback = args.pop() // callback is always last arg
- const lookupOptions = args[0] ?? {}
-
- const options = {
- family,
- hints,
- all,
- verbatim,
- ...(typeof lookupOptions === 'number' ? { family: lookupOptions } : lookupOptions),
- }
-
- const key = JSON.stringify({ hostname, ...options })
-
- if (cache.has(key)) {
- const cached = cache.get(key)
- return process.nextTick(callback, null, ...cached)
- }
-
- lookup(hostname, options, (err, ...result) => {
- if (err) {
- return callback(err)
- }
-
- cache.set(key, result, { ttl })
- return callback(null, ...result)
- })
- },
-})
-
-module.exports = {
- cache,
- getOptions,
-}
diff --git a/node_modules/@npmcli/agent/lib/errors.js b/node_modules/@npmcli/agent/lib/errors.js
deleted file mode 100644
index 70475ae..0000000
--- a/node_modules/@npmcli/agent/lib/errors.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict'
-
-class InvalidProxyProtocolError extends Error {
- constructor (url) {
- super(`Invalid protocol \`${url.protocol}\` connecting to proxy \`${url.host}\``)
- this.code = 'EINVALIDPROXY'
- this.proxy = url
- }
-}
-
-class ConnectionTimeoutError extends Error {
- constructor (host) {
- super(`Timeout connecting to host \`${host}\``)
- this.code = 'ECONNECTIONTIMEOUT'
- this.host = host
- }
-}
-
-class IdleTimeoutError extends Error {
- constructor (host) {
- super(`Idle timeout reached for host \`${host}\``)
- this.code = 'EIDLETIMEOUT'
- this.host = host
- }
-}
-
-class ResponseTimeoutError extends Error {
- constructor (request, proxy) {
- let msg = 'Response timeout '
- if (proxy) {
- msg += `from proxy \`${proxy.host}\` `
- }
- msg += `connecting to host \`${request.host}\``
- super(msg)
- this.code = 'ERESPONSETIMEOUT'
- this.proxy = proxy
- this.request = request
- }
-}
-
-class TransferTimeoutError extends Error {
- constructor (request, proxy) {
- let msg = 'Transfer timeout '
- if (proxy) {
- msg += `from proxy \`${proxy.host}\` `
- }
- msg += `for \`${request.host}\``
- super(msg)
- this.code = 'ETRANSFERTIMEOUT'
- this.proxy = proxy
- this.request = request
- }
-}
-
-module.exports = {
- InvalidProxyProtocolError,
- ConnectionTimeoutError,
- IdleTimeoutError,
- ResponseTimeoutError,
- TransferTimeoutError,
-}
diff --git a/node_modules/@npmcli/agent/lib/index.js b/node_modules/@npmcli/agent/lib/index.js
deleted file mode 100644
index b33d6ea..0000000
--- a/node_modules/@npmcli/agent/lib/index.js
+++ /dev/null
@@ -1,56 +0,0 @@
-'use strict'
-
-const { LRUCache } = require('lru-cache')
-const { normalizeOptions, cacheOptions } = require('./options')
-const { getProxy, proxyCache } = require('./proxy.js')
-const dns = require('./dns.js')
-const Agent = require('./agents.js')
-
-const agentCache = new LRUCache({ max: 20 })
-
-const getAgent = (url, { agent, proxy, noProxy, ...options } = {}) => {
- // false has meaning so this can't be a simple truthiness check
- if (agent != null) {
- return agent
- }
-
- url = new URL(url)
-
- const proxyForUrl = getProxy(url, { proxy, noProxy })
- const normalizedOptions = {
- ...normalizeOptions(options),
- proxy: proxyForUrl,
- }
-
- const cacheKey = cacheOptions({
- ...normalizedOptions,
- secureEndpoint: url.protocol === 'https:',
- })
-
- if (agentCache.has(cacheKey)) {
- return agentCache.get(cacheKey)
- }
-
- const newAgent = new Agent(normalizedOptions)
- agentCache.set(cacheKey, newAgent)
-
- return newAgent
-}
-
-module.exports = {
- getAgent,
- Agent,
- // these are exported for backwards compatability
- HttpAgent: Agent,
- HttpsAgent: Agent,
- cache: {
- proxy: proxyCache,
- agent: agentCache,
- dns: dns.cache,
- clear: () => {
- proxyCache.clear()
- agentCache.clear()
- dns.cache.clear()
- },
- },
-}
diff --git a/node_modules/@npmcli/agent/lib/options.js b/node_modules/@npmcli/agent/lib/options.js
deleted file mode 100644
index 0bf53f7..0000000
--- a/node_modules/@npmcli/agent/lib/options.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict'
-
-const dns = require('./dns')
-
-const normalizeOptions = (opts) => {
- const family = parseInt(opts.family ?? '0', 10)
- const keepAlive = opts.keepAlive ?? true
-
- const normalized = {
- // nodejs http agent options. these are all the defaults
- // but kept here to increase the likelihood of cache hits
- // https://nodejs.org/api/http.html#new-agentoptions
- keepAliveMsecs: keepAlive ? 1000 : undefined,
- maxSockets: opts.maxSockets ?? 15,
- maxTotalSockets: Infinity,
- maxFreeSockets: keepAlive ? 256 : undefined,
- scheduling: 'fifo',
- // then spread the rest of the options
- ...opts,
- // we already set these to their defaults that we want
- family,
- keepAlive,
- // our custom timeout options
- timeouts: {
- // the standard timeout option is mapped to our idle timeout
- // and then deleted below
- idle: opts.timeout ?? 0,
- connection: 0,
- response: 0,
- transfer: 0,
- ...opts.timeouts,
- },
- // get the dns options that go at the top level of socket connection
- ...dns.getOptions({ family, ...opts.dns }),
- }
-
- // remove timeout since we already used it to set our own idle timeout
- delete normalized.timeout
-
- return normalized
-}
-
-const createKey = (obj) => {
- let key = ''
- const sorted = Object.entries(obj).sort((a, b) => a[0] - b[0])
- for (let [k, v] of sorted) {
- if (v == null) {
- v = 'null'
- } else if (v instanceof URL) {
- v = v.toString()
- } else if (typeof v === 'object') {
- v = createKey(v)
- }
- key += `${k}:${v}:`
- }
- return key
-}
-
-const cacheOptions = ({ secureEndpoint, ...options }) => createKey({
- secureEndpoint: !!secureEndpoint,
- // socket connect options
- family: options.family,
- hints: options.hints,
- localAddress: options.localAddress,
- // tls specific connect options
- strictSsl: secureEndpoint ? !!options.rejectUnauthorized : false,
- ca: secureEndpoint ? options.ca : null,
- cert: secureEndpoint ? options.cert : null,
- key: secureEndpoint ? options.key : null,
- // http agent options
- keepAlive: options.keepAlive,
- keepAliveMsecs: options.keepAliveMsecs,
- maxSockets: options.maxSockets,
- maxTotalSockets: options.maxTotalSockets,
- maxFreeSockets: options.maxFreeSockets,
- scheduling: options.scheduling,
- // timeout options
- timeouts: options.timeouts,
- // proxy
- proxy: options.proxy,
-})
-
-module.exports = {
- normalizeOptions,
- cacheOptions,
-}
diff --git a/node_modules/@npmcli/agent/lib/proxy.js b/node_modules/@npmcli/agent/lib/proxy.js
deleted file mode 100644
index 6272e92..0000000
--- a/node_modules/@npmcli/agent/lib/proxy.js
+++ /dev/null
@@ -1,88 +0,0 @@
-'use strict'
-
-const { HttpProxyAgent } = require('http-proxy-agent')
-const { HttpsProxyAgent } = require('https-proxy-agent')
-const { SocksProxyAgent } = require('socks-proxy-agent')
-const { LRUCache } = require('lru-cache')
-const { InvalidProxyProtocolError } = require('./errors.js')
-
-const PROXY_CACHE = new LRUCache({ max: 20 })
-
-const SOCKS_PROTOCOLS = new Set(SocksProxyAgent.protocols)
-
-const PROXY_ENV_KEYS = new Set(['https_proxy', 'http_proxy', 'proxy', 'no_proxy'])
-
-const PROXY_ENV = Object.entries(process.env).reduce((acc, [key, value]) => {
- key = key.toLowerCase()
- if (PROXY_ENV_KEYS.has(key)) {
- acc[key] = value
- }
- return acc
-}, {})
-
-const getProxyAgent = (url) => {
- url = new URL(url)
-
- const protocol = url.protocol.slice(0, -1)
- if (SOCKS_PROTOCOLS.has(protocol)) {
- return SocksProxyAgent
- }
- if (protocol === 'https' || protocol === 'http') {
- return [HttpProxyAgent, HttpsProxyAgent]
- }
-
- throw new InvalidProxyProtocolError(url)
-}
-
-const isNoProxy = (url, noProxy) => {
- if (typeof noProxy === 'string') {
- noProxy = noProxy.split(',').map((p) => p.trim()).filter(Boolean)
- }
-
- if (!noProxy || !noProxy.length) {
- return false
- }
-
- const hostSegments = url.hostname.split('.').reverse()
-
- return noProxy.some((no) => {
- const noSegments = no.split('.').filter(Boolean).reverse()
- if (!noSegments.length) {
- return false
- }
-
- for (let i = 0; i < noSegments.length; i++) {
- if (hostSegments[i] !== noSegments[i]) {
- return false
- }
- }
-
- return true
- })
-}
-
-const getProxy = (url, { proxy, noProxy }) => {
- url = new URL(url)
-
- if (!proxy) {
- proxy = url.protocol === 'https:'
- ? PROXY_ENV.https_proxy
- : PROXY_ENV.https_proxy || PROXY_ENV.http_proxy || PROXY_ENV.proxy
- }
-
- if (!noProxy) {
- noProxy = PROXY_ENV.no_proxy
- }
-
- if (!proxy || isNoProxy(url, noProxy)) {
- return null
- }
-
- return new URL(proxy)
-}
-
-module.exports = {
- getProxyAgent,
- getProxy,
- proxyCache: PROXY_CACHE,
-}
diff --git a/node_modules/@npmcli/agent/package.json b/node_modules/@npmcli/agent/package.json
deleted file mode 100644
index 67670a0..0000000
--- a/node_modules/@npmcli/agent/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "@npmcli/agent",
- "version": "4.0.0",
- "description": "the http/https agent used by the npm cli",
- "main": "lib/index.js",
- "scripts": {
- "gencerts": "bash scripts/create-cert.sh",
- "test": "tap",
- "lint": "npm run eslint",
- "postlint": "template-oss-check",
- "template-oss-apply": "template-oss-apply --force",
- "lintfix": "npm run eslint -- --fix",
- "snap": "tap",
- "posttest": "npm run lint",
- "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
- },
- "author": "GitHub Inc.",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/npm/agent/issues"
- },
- "homepage": "https://github.com/npm/agent#readme",
- "files": [
- "bin/",
- "lib/"
- ],
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- },
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.25.0",
- "publish": "true"
- },
- "dependencies": {
- "agent-base": "^7.1.0",
- "http-proxy-agent": "^7.0.0",
- "https-proxy-agent": "^7.0.1",
- "lru-cache": "^11.2.1",
- "socks-proxy-agent": "^8.0.3"
- },
- "devDependencies": {
- "@npmcli/eslint-config": "^5.0.0",
- "@npmcli/template-oss": "4.25.0",
- "minipass-fetch": "^4.0.1",
- "nock": "^14.0.3",
- "socksv5": "^0.0.6",
- "tap": "^16.3.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/agent.git"
- },
- "tap": {
- "nyc-arg": [
- "--exclude",
- "tap-snapshots/**"
- ]
- }
-}
diff --git a/node_modules/@npmcli/fs/LICENSE.md b/node_modules/@npmcli/fs/LICENSE.md
deleted file mode 100644
index 5fc208f..0000000
--- a/node_modules/@npmcli/fs/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-ISC License
-
-Copyright npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this
-software for any purpose with or without fee is hereby
-granted, provided that the above copyright notice and this
-permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/@npmcli/fs/README.md b/node_modules/@npmcli/fs/README.md
deleted file mode 100644
index ac42afe..0000000
--- a/node_modules/@npmcli/fs/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-# @npmcli/fs
-
-polyfills, and extensions, of the core `fs` module.
-
-## Features
-
-- `fs.cp` polyfill for node < 16.7.0
-- `fs.withTempDir` added
-- `fs.readdirScoped` added
-- `fs.moveFile` added
-
-## `fs.withTempDir(root, fn, options) -> Promise`
-
-### Parameters
-
-- `root`: the directory in which to create the temporary directory
-- `fn`: a function that will be called with the path to the temporary directory
-- `options`
- - `tmpPrefix`: a prefix to be used in the generated directory name
-
-### Usage
-
-The `withTempDir` function creates a temporary directory, runs the provided
-function (`fn`), then removes the temporary directory and resolves or rejects
-based on the result of `fn`.
-
-```js
-const fs = require('@npmcli/fs')
-const os = require('os')
-
-// this function will be called with the full path to the temporary directory
-// it is called with `await` behind the scenes, so can be async if desired.
-const myFunction = async (tempPath) => {
- return 'done!'
-}
-
-const main = async () => {
- const result = await fs.withTempDir(os.tmpdir(), myFunction)
- // result === 'done!'
-}
-
-main()
-```
-
-## `fs.readdirScoped(root) -> Promise`
-
-### Parameters
-
-- `root`: the directory to read
-
-### Usage
-
-Like `fs.readdir` but handling `@org/module` dirs as if they were
-a single entry.
-
-```javascript
-const { readdirScoped } = require('@npmcli/fs')
-const entries = await readdirScoped('node_modules')
-// entries will be something like: ['a', '@org/foo', '@org/bar']
-```
-
-## `fs.moveFile(source, dest, options) -> Promise`
-
-A fork of [move-file](https://github.com/sindresorhus/move-file) with
-support for Common JS.
-
-### Highlights
-
-- Promise API.
-- Supports moving a file across partitions and devices.
-- Optionally prevent overwriting an existing file.
-- Creates non-existent destination directories for you.
-- Automatically recurses when source is a directory.
-
-### Parameters
-
-- `source`: File, or directory, you want to move.
-- `dest`: Where you want the file or directory moved.
-- `options`
- - `overwrite` (`boolean`, default: `true`): Overwrite existing destination file(s).
-
-### Usage
-
-The built-in
-[`fs.rename()`](https://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback)
-is just a JavaScript wrapper for the C `rename(2)` function, which doesn't
-support moving files across partitions or devices. This module is what you
-would have expected `fs.rename()` to be.
-
-```js
-const { moveFile } = require('@npmcli/fs');
-
-(async () => {
- await moveFile('source/unicorn.png', 'destination/unicorn.png');
- console.log('The file has been moved');
-})();
-```
diff --git a/node_modules/@npmcli/fs/lib/common/get-options.js b/node_modules/@npmcli/fs/lib/common/get-options.js
deleted file mode 100644
index cb5982f..0000000
--- a/node_modules/@npmcli/fs/lib/common/get-options.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// given an input that may or may not be an object, return an object that has
-// a copy of every defined property listed in 'copy'. if the input is not an
-// object, assign it to the property named by 'wrap'
-const getOptions = (input, { copy, wrap }) => {
- const result = {}
-
- if (input && typeof input === 'object') {
- for (const prop of copy) {
- if (input[prop] !== undefined) {
- result[prop] = input[prop]
- }
- }
- } else {
- result[wrap] = input
- }
-
- return result
-}
-
-module.exports = getOptions
diff --git a/node_modules/@npmcli/fs/lib/common/node.js b/node_modules/@npmcli/fs/lib/common/node.js
deleted file mode 100644
index 4d13bc0..0000000
--- a/node_modules/@npmcli/fs/lib/common/node.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const semver = require('semver')
-
-const satisfies = (range) => {
- return semver.satisfies(process.version, range, { includePrerelease: true })
-}
-
-module.exports = {
- satisfies,
-}
diff --git a/node_modules/@npmcli/fs/lib/cp/LICENSE b/node_modules/@npmcli/fs/lib/cp/LICENSE
deleted file mode 100644
index 93546df..0000000
--- a/node_modules/@npmcli/fs/lib/cp/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2011-2017 JP Richardson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
-(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
- merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@npmcli/fs/lib/cp/errors.js b/node_modules/@npmcli/fs/lib/cp/errors.js
deleted file mode 100644
index 1cd1e05..0000000
--- a/node_modules/@npmcli/fs/lib/cp/errors.js
+++ /dev/null
@@ -1,129 +0,0 @@
-'use strict'
-const { inspect } = require('util')
-
-// adapted from node's internal/errors
-// https://github.com/nodejs/node/blob/c8a04049/lib/internal/errors.js
-
-// close copy of node's internal SystemError class.
-class SystemError {
- constructor (code, prefix, context) {
- // XXX context.code is undefined in all constructors used in cp/polyfill
- // that may be a bug copied from node, maybe the constructor should use
- // `code` not `errno`? nodejs/node#41104
- let message = `${prefix}: ${context.syscall} returned ` +
- `${context.code} (${context.message})`
-
- if (context.path !== undefined) {
- message += ` ${context.path}`
- }
- if (context.dest !== undefined) {
- message += ` => ${context.dest}`
- }
-
- this.code = code
- Object.defineProperties(this, {
- name: {
- value: 'SystemError',
- enumerable: false,
- writable: true,
- configurable: true,
- },
- message: {
- value: message,
- enumerable: false,
- writable: true,
- configurable: true,
- },
- info: {
- value: context,
- enumerable: true,
- configurable: true,
- writable: false,
- },
- errno: {
- get () {
- return context.errno
- },
- set (value) {
- context.errno = value
- },
- enumerable: true,
- configurable: true,
- },
- syscall: {
- get () {
- return context.syscall
- },
- set (value) {
- context.syscall = value
- },
- enumerable: true,
- configurable: true,
- },
- })
-
- if (context.path !== undefined) {
- Object.defineProperty(this, 'path', {
- get () {
- return context.path
- },
- set (value) {
- context.path = value
- },
- enumerable: true,
- configurable: true,
- })
- }
-
- if (context.dest !== undefined) {
- Object.defineProperty(this, 'dest', {
- get () {
- return context.dest
- },
- set (value) {
- context.dest = value
- },
- enumerable: true,
- configurable: true,
- })
- }
- }
-
- toString () {
- return `${this.name} [${this.code}]: ${this.message}`
- }
-
- [Symbol.for('nodejs.util.inspect.custom')] (_recurseTimes, ctx) {
- return inspect(this, {
- ...ctx,
- getters: true,
- customInspect: false,
- })
- }
-}
-
-function E (code, message) {
- module.exports[code] = class NodeError extends SystemError {
- constructor (ctx) {
- super(code, message, ctx)
- }
- }
-}
-
-E('ERR_FS_CP_DIR_TO_NON_DIR', 'Cannot overwrite directory with non-directory')
-E('ERR_FS_CP_EEXIST', 'Target already exists')
-E('ERR_FS_CP_EINVAL', 'Invalid src or dest')
-E('ERR_FS_CP_FIFO_PIPE', 'Cannot copy a FIFO pipe')
-E('ERR_FS_CP_NON_DIR_TO_DIR', 'Cannot overwrite non-directory with directory')
-E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file')
-E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self')
-E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type')
-E('ERR_FS_EISDIR', 'Path is a directory')
-
-module.exports.ERR_INVALID_ARG_TYPE = class ERR_INVALID_ARG_TYPE extends Error {
- constructor (name, expected, actual) {
- super()
- this.code = 'ERR_INVALID_ARG_TYPE'
- this.message = `The ${name} argument must be ${expected}. Received ${typeof actual}`
- }
-}
diff --git a/node_modules/@npmcli/fs/lib/cp/index.js b/node_modules/@npmcli/fs/lib/cp/index.js
deleted file mode 100644
index 972ce7a..0000000
--- a/node_modules/@npmcli/fs/lib/cp/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const fs = require('fs/promises')
-const getOptions = require('../common/get-options.js')
-const node = require('../common/node.js')
-const polyfill = require('./polyfill.js')
-
-// node 16.7.0 added fs.cp
-const useNative = node.satisfies('>=16.7.0')
-
-const cp = async (src, dest, opts) => {
- const options = getOptions(opts, {
- copy: ['dereference', 'errorOnExist', 'filter', 'force', 'preserveTimestamps', 'recursive'],
- })
-
- // the polyfill is tested separately from this module, no need to hack
- // process.version to try to trigger it just for coverage
- // istanbul ignore next
- return useNative
- ? fs.cp(src, dest, options)
- : polyfill(src, dest, options)
-}
-
-module.exports = cp
diff --git a/node_modules/@npmcli/fs/lib/cp/polyfill.js b/node_modules/@npmcli/fs/lib/cp/polyfill.js
deleted file mode 100644
index 80eb10d..0000000
--- a/node_modules/@npmcli/fs/lib/cp/polyfill.js
+++ /dev/null
@@ -1,428 +0,0 @@
-// this file is a modified version of the code in node 17.2.0
-// which is, in turn, a modified version of the fs-extra module on npm
-// node core changes:
-// - Use of the assert module has been replaced with core's error system.
-// - All code related to the glob dependency has been removed.
-// - Bring your own custom fs module is not currently supported.
-// - Some basic code cleanup.
-// changes here:
-// - remove all callback related code
-// - drop sync support
-// - change assertions back to non-internal methods (see options.js)
-// - throws ENOTDIR when rmdir gets an ENOENT for a path that exists in Windows
-'use strict'
-
-const {
- ERR_FS_CP_DIR_TO_NON_DIR,
- ERR_FS_CP_EEXIST,
- ERR_FS_CP_EINVAL,
- ERR_FS_CP_FIFO_PIPE,
- ERR_FS_CP_NON_DIR_TO_DIR,
- ERR_FS_CP_SOCKET,
- ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY,
- ERR_FS_CP_UNKNOWN,
- ERR_FS_EISDIR,
- ERR_INVALID_ARG_TYPE,
-} = require('./errors.js')
-const {
- constants: {
- errno: {
- EEXIST,
- EISDIR,
- EINVAL,
- ENOTDIR,
- },
- },
-} = require('os')
-const {
- chmod,
- copyFile,
- lstat,
- mkdir,
- readdir,
- readlink,
- stat,
- symlink,
- unlink,
- utimes,
-} = require('fs/promises')
-const {
- dirname,
- isAbsolute,
- join,
- parse,
- resolve,
- sep,
- toNamespacedPath,
-} = require('path')
-const { fileURLToPath } = require('url')
-
-const defaultOptions = {
- dereference: false,
- errorOnExist: false,
- filter: undefined,
- force: true,
- preserveTimestamps: false,
- recursive: false,
-}
-
-async function cp (src, dest, opts) {
- if (opts != null && typeof opts !== 'object') {
- throw new ERR_INVALID_ARG_TYPE('options', ['Object'], opts)
- }
- return cpFn(
- toNamespacedPath(getValidatedPath(src)),
- toNamespacedPath(getValidatedPath(dest)),
- { ...defaultOptions, ...opts })
-}
-
-function getValidatedPath (fileURLOrPath) {
- const path = fileURLOrPath != null && fileURLOrPath.href
- && fileURLOrPath.origin
- ? fileURLToPath(fileURLOrPath)
- : fileURLOrPath
- return path
-}
-
-async function cpFn (src, dest, opts) {
- // Warn about using preserveTimestamps on 32-bit node
- // istanbul ignore next
- if (opts.preserveTimestamps && process.arch === 'ia32') {
- const warning = 'Using the preserveTimestamps option in 32-bit ' +
- 'node is not recommended'
- process.emitWarning(warning, 'TimestampPrecisionWarning')
- }
- const stats = await checkPaths(src, dest, opts)
- const { srcStat, destStat } = stats
- await checkParentPaths(src, srcStat, dest)
- if (opts.filter) {
- return handleFilter(checkParentDir, destStat, src, dest, opts)
- }
- return checkParentDir(destStat, src, dest, opts)
-}
-
-async function checkPaths (src, dest, opts) {
- const { 0: srcStat, 1: destStat } = await getStats(src, dest, opts)
- if (destStat) {
- if (areIdentical(srcStat, destStat)) {
- throw new ERR_FS_CP_EINVAL({
- message: 'src and dest cannot be the same',
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
- throw new ERR_FS_CP_DIR_TO_NON_DIR({
- message: `cannot overwrite directory ${src} ` +
- `with non-directory ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EISDIR,
- })
- }
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
- throw new ERR_FS_CP_NON_DIR_TO_DIR({
- message: `cannot overwrite non-directory ${src} ` +
- `with directory ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: ENOTDIR,
- })
- }
- }
-
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
- throw new ERR_FS_CP_EINVAL({
- message: `cannot copy ${src} to a subdirectory of self ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- return { srcStat, destStat }
-}
-
-function areIdentical (srcStat, destStat) {
- return destStat.ino && destStat.dev && destStat.ino === srcStat.ino &&
- destStat.dev === srcStat.dev
-}
-
-function getStats (src, dest, opts) {
- const statFunc = opts.dereference ?
- (file) => stat(file, { bigint: true }) :
- (file) => lstat(file, { bigint: true })
- return Promise.all([
- statFunc(src),
- statFunc(dest).catch((err) => {
- // istanbul ignore next: unsure how to cover.
- if (err.code === 'ENOENT') {
- return null
- }
- // istanbul ignore next: unsure how to cover.
- throw err
- }),
- ])
-}
-
-async function checkParentDir (destStat, src, dest, opts) {
- const destParent = dirname(dest)
- const dirExists = await pathExists(destParent)
- if (dirExists) {
- return getStatsForCopy(destStat, src, dest, opts)
- }
- await mkdir(destParent, { recursive: true })
- return getStatsForCopy(destStat, src, dest, opts)
-}
-
-function pathExists (dest) {
- return stat(dest).then(
- () => true,
- // istanbul ignore next: not sure when this would occur
- (err) => (err.code === 'ENOENT' ? false : Promise.reject(err)))
-}
-
-// Recursively check if dest parent is a subdirectory of src.
-// It works for all file types including symlinks since it
-// checks the src and dest inodes. It starts from the deepest
-// parent and stops once it reaches the src parent or the root path.
-async function checkParentPaths (src, srcStat, dest) {
- const srcParent = resolve(dirname(src))
- const destParent = resolve(dirname(dest))
- if (destParent === srcParent || destParent === parse(destParent).root) {
- return
- }
- let destStat
- try {
- destStat = await stat(destParent, { bigint: true })
- } catch (err) {
- // istanbul ignore else: not sure when this would occur
- if (err.code === 'ENOENT') {
- return
- }
- // istanbul ignore next: not sure when this would occur
- throw err
- }
- if (areIdentical(srcStat, destStat)) {
- throw new ERR_FS_CP_EINVAL({
- message: `cannot copy ${src} to a subdirectory of self ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- return checkParentPaths(src, srcStat, destParent)
-}
-
-const normalizePathToArray = (path) =>
- resolve(path).split(sep).filter(Boolean)
-
-// Return true if dest is a subdir of src, otherwise false.
-// It only checks the path strings.
-function isSrcSubdir (src, dest) {
- const srcArr = normalizePathToArray(src)
- const destArr = normalizePathToArray(dest)
- return srcArr.every((cur, i) => destArr[i] === cur)
-}
-
-async function handleFilter (onInclude, destStat, src, dest, opts, cb) {
- const include = await opts.filter(src, dest)
- if (include) {
- return onInclude(destStat, src, dest, opts, cb)
- }
-}
-
-function startCopy (destStat, src, dest, opts) {
- if (opts.filter) {
- return handleFilter(getStatsForCopy, destStat, src, dest, opts)
- }
- return getStatsForCopy(destStat, src, dest, opts)
-}
-
-async function getStatsForCopy (destStat, src, dest, opts) {
- const statFn = opts.dereference ? stat : lstat
- const srcStat = await statFn(src)
- // istanbul ignore else: can't portably test FIFO
- if (srcStat.isDirectory() && opts.recursive) {
- return onDir(srcStat, destStat, src, dest, opts)
- } else if (srcStat.isDirectory()) {
- throw new ERR_FS_EISDIR({
- message: `${src} is a directory (not copied)`,
- path: src,
- syscall: 'cp',
- errno: EINVAL,
- })
- } else if (srcStat.isFile() ||
- srcStat.isCharacterDevice() ||
- srcStat.isBlockDevice()) {
- return onFile(srcStat, destStat, src, dest, opts)
- } else if (srcStat.isSymbolicLink()) {
- return onLink(destStat, src, dest)
- } else if (srcStat.isSocket()) {
- throw new ERR_FS_CP_SOCKET({
- message: `cannot copy a socket file: ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- } else if (srcStat.isFIFO()) {
- throw new ERR_FS_CP_FIFO_PIPE({
- message: `cannot copy a FIFO pipe: ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- // istanbul ignore next: should be unreachable
- throw new ERR_FS_CP_UNKNOWN({
- message: `cannot copy an unknown file type: ${dest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
-}
-
-function onFile (srcStat, destStat, src, dest, opts) {
- if (!destStat) {
- return _copyFile(srcStat, src, dest, opts)
- }
- return mayCopyFile(srcStat, src, dest, opts)
-}
-
-async function mayCopyFile (srcStat, src, dest, opts) {
- if (opts.force) {
- await unlink(dest)
- return _copyFile(srcStat, src, dest, opts)
- } else if (opts.errorOnExist) {
- throw new ERR_FS_CP_EEXIST({
- message: `${dest} already exists`,
- path: dest,
- syscall: 'cp',
- errno: EEXIST,
- })
- }
-}
-
-async function _copyFile (srcStat, src, dest, opts) {
- await copyFile(src, dest)
- if (opts.preserveTimestamps) {
- return handleTimestampsAndMode(srcStat.mode, src, dest)
- }
- return setDestMode(dest, srcStat.mode)
-}
-
-async function handleTimestampsAndMode (srcMode, src, dest) {
- // Make sure the file is writable before setting the timestamp
- // otherwise open fails with EPERM when invoked with 'r+'
- // (through utimes call)
- if (fileIsNotWritable(srcMode)) {
- await makeFileWritable(dest, srcMode)
- return setDestTimestampsAndMode(srcMode, src, dest)
- }
- return setDestTimestampsAndMode(srcMode, src, dest)
-}
-
-function fileIsNotWritable (srcMode) {
- return (srcMode & 0o200) === 0
-}
-
-function makeFileWritable (dest, srcMode) {
- return setDestMode(dest, srcMode | 0o200)
-}
-
-async function setDestTimestampsAndMode (srcMode, src, dest) {
- await setDestTimestamps(src, dest)
- return setDestMode(dest, srcMode)
-}
-
-function setDestMode (dest, srcMode) {
- return chmod(dest, srcMode)
-}
-
-async function setDestTimestamps (src, dest) {
- // The initial srcStat.atime cannot be trusted
- // because it is modified by the read(2) system call
- // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
- const updatedSrcStat = await stat(src)
- return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
-}
-
-function onDir (srcStat, destStat, src, dest, opts) {
- if (!destStat) {
- return mkDirAndCopy(srcStat.mode, src, dest, opts)
- }
- return copyDir(src, dest, opts)
-}
-
-async function mkDirAndCopy (srcMode, src, dest, opts) {
- await mkdir(dest)
- await copyDir(src, dest, opts)
- return setDestMode(dest, srcMode)
-}
-
-async function copyDir (src, dest, opts) {
- const dir = await readdir(src)
- for (let i = 0; i < dir.length; i++) {
- const item = dir[i]
- const srcItem = join(src, item)
- const destItem = join(dest, item)
- const { destStat } = await checkPaths(srcItem, destItem, opts)
- await startCopy(destStat, srcItem, destItem, opts)
- }
-}
-
-async function onLink (destStat, src, dest) {
- let resolvedSrc = await readlink(src)
- if (!isAbsolute(resolvedSrc)) {
- resolvedSrc = resolve(dirname(src), resolvedSrc)
- }
- if (!destStat) {
- return symlink(resolvedSrc, dest)
- }
- let resolvedDest
- try {
- resolvedDest = await readlink(dest)
- } catch (err) {
- // Dest exists and is a regular file or directory,
- // Windows may throw UNKNOWN error. If dest already exists,
- // fs throws error anyway, so no need to guard against it here.
- // istanbul ignore next: can only test on windows
- if (err.code === 'EINVAL' || err.code === 'UNKNOWN') {
- return symlink(resolvedSrc, dest)
- }
- // istanbul ignore next: should not be possible
- throw err
- }
- if (!isAbsolute(resolvedDest)) {
- resolvedDest = resolve(dirname(dest), resolvedDest)
- }
- if (isSrcSubdir(resolvedSrc, resolvedDest)) {
- throw new ERR_FS_CP_EINVAL({
- message: `cannot copy ${resolvedSrc} to a subdirectory of self ` +
- `${resolvedDest}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- // Do not copy if src is a subdir of dest since unlinking
- // dest in this case would result in removing src contents
- // and therefore a broken symlink would be created.
- const srcStat = await stat(src)
- if (srcStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {
- throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({
- message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`,
- path: dest,
- syscall: 'cp',
- errno: EINVAL,
- })
- }
- return copyLink(resolvedSrc, dest)
-}
-
-async function copyLink (resolvedSrc, dest) {
- await unlink(dest)
- return symlink(resolvedSrc, dest)
-}
-
-module.exports = cp
diff --git a/node_modules/@npmcli/fs/lib/index.js b/node_modules/@npmcli/fs/lib/index.js
deleted file mode 100644
index 81c7463..0000000
--- a/node_modules/@npmcli/fs/lib/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-const cp = require('./cp/index.js')
-const withTempDir = require('./with-temp-dir.js')
-const readdirScoped = require('./readdir-scoped.js')
-const moveFile = require('./move-file.js')
-
-module.exports = {
- cp,
- withTempDir,
- readdirScoped,
- moveFile,
-}
diff --git a/node_modules/@npmcli/fs/lib/move-file.js b/node_modules/@npmcli/fs/lib/move-file.js
deleted file mode 100644
index d56e06d..0000000
--- a/node_modules/@npmcli/fs/lib/move-file.js
+++ /dev/null
@@ -1,78 +0,0 @@
-const { dirname, join, resolve, relative, isAbsolute } = require('path')
-const fs = require('fs/promises')
-
-const pathExists = async path => {
- try {
- await fs.access(path)
- return true
- } catch (er) {
- return er.code !== 'ENOENT'
- }
-}
-
-const moveFile = async (source, destination, options = {}, root = true, symlinks = []) => {
- if (!source || !destination) {
- throw new TypeError('`source` and `destination` file required')
- }
-
- options = {
- overwrite: true,
- ...options,
- }
-
- if (!options.overwrite && await pathExists(destination)) {
- throw new Error(`The destination file exists: ${destination}`)
- }
-
- await fs.mkdir(dirname(destination), { recursive: true })
-
- try {
- await fs.rename(source, destination)
- } catch (error) {
- if (error.code === 'EXDEV' || error.code === 'EPERM') {
- const sourceStat = await fs.lstat(source)
- if (sourceStat.isDirectory()) {
- const files = await fs.readdir(source)
- await Promise.all(files.map((file) =>
- moveFile(join(source, file), join(destination, file), options, false, symlinks)
- ))
- } else if (sourceStat.isSymbolicLink()) {
- symlinks.push({ source, destination })
- } else {
- await fs.copyFile(source, destination)
- }
- } else {
- throw error
- }
- }
-
- if (root) {
- await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
- let target = await fs.readlink(symSource)
- // junction symlinks in windows will be absolute paths, so we need to
- // make sure they point to the symlink destination
- if (isAbsolute(target)) {
- target = resolve(symDestination, relative(symSource, target))
- }
- // try to determine what the actual file is so we can create the correct
- // type of symlink in windows
- let targetStat = 'file'
- try {
- targetStat = await fs.stat(resolve(dirname(symSource), target))
- if (targetStat.isDirectory()) {
- targetStat = 'junction'
- }
- } catch {
- // targetStat remains 'file'
- }
- await fs.symlink(
- target,
- symDestination,
- targetStat
- )
- }))
- await fs.rm(source, { recursive: true, force: true })
- }
-}
-
-module.exports = moveFile
diff --git a/node_modules/@npmcli/fs/lib/readdir-scoped.js b/node_modules/@npmcli/fs/lib/readdir-scoped.js
deleted file mode 100644
index cd601df..0000000
--- a/node_modules/@npmcli/fs/lib/readdir-scoped.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const { readdir } = require('fs/promises')
-const { join } = require('path')
-
-const readdirScoped = async (dir) => {
- const results = []
-
- for (const item of await readdir(dir)) {
- if (item.startsWith('@')) {
- for (const scopedItem of await readdir(join(dir, item))) {
- results.push(join(item, scopedItem))
- }
- } else {
- results.push(item)
- }
- }
-
- return results
-}
-
-module.exports = readdirScoped
diff --git a/node_modules/@npmcli/fs/lib/with-temp-dir.js b/node_modules/@npmcli/fs/lib/with-temp-dir.js
deleted file mode 100644
index 0738ac4..0000000
--- a/node_modules/@npmcli/fs/lib/with-temp-dir.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const { join, sep } = require('path')
-
-const getOptions = require('./common/get-options.js')
-const { mkdir, mkdtemp, rm } = require('fs/promises')
-
-// create a temp directory, ensure its permissions match its parent, then call
-// the supplied function passing it the path to the directory. clean up after
-// the function finishes, whether it throws or not
-const withTempDir = async (root, fn, opts) => {
- const options = getOptions(opts, {
- copy: ['tmpPrefix'],
- })
- // create the directory
- await mkdir(root, { recursive: true })
-
- const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || ''))
- let err
- let result
-
- try {
- result = await fn(target)
- } catch (_err) {
- err = _err
- }
-
- try {
- await rm(target, { force: true, recursive: true })
- } catch {
- // ignore errors
- }
-
- if (err) {
- throw err
- }
-
- return result
-}
-
-module.exports = withTempDir
diff --git a/node_modules/@npmcli/fs/package.json b/node_modules/@npmcli/fs/package.json
deleted file mode 100644
index 0b64301..0000000
--- a/node_modules/@npmcli/fs/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "name": "@npmcli/fs",
- "version": "5.0.0",
- "description": "filesystem utilities for the npm cli",
- "main": "lib/index.js",
- "files": [
- "bin/",
- "lib/"
- ],
- "scripts": {
- "snap": "tap",
- "test": "tap",
- "npmclilint": "npmcli-lint",
- "lint": "npm run eslint",
- "lintfix": "npm run eslint -- --fix",
- "posttest": "npm run lint",
- "postsnap": "npm run lintfix --",
- "postlint": "template-oss-check",
- "template-oss-apply": "template-oss-apply --force",
- "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/fs.git"
- },
- "keywords": [
- "npm",
- "oss"
- ],
- "author": "GitHub Inc.",
- "license": "ISC",
- "devDependencies": {
- "@npmcli/eslint-config": "^5.0.0",
- "@npmcli/template-oss": "4.27.1",
- "tap": "^16.0.1"
- },
- "dependencies": {
- "semver": "^7.3.5"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- },
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.27.1",
- "publish": true
- },
- "tap": {
- "nyc-arg": [
- "--exclude",
- "tap-snapshots/**"
- ]
- }
-}
diff --git a/node_modules/@npmcli/redact/LICENSE b/node_modules/@npmcli/redact/LICENSE
deleted file mode 100644
index c216441..0000000
--- a/node_modules/@npmcli/redact/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2024 npm
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/@npmcli/redact/README.md b/node_modules/@npmcli/redact/README.md
deleted file mode 100644
index 31d896e..0000000
--- a/node_modules/@npmcli/redact/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# @npmcli/redact
-
-Redact sensitive npm information from output.
-
-## API
-
-This will redact `npm_` prefixed tokens and UUIDs from values.
-
-It will also replace passwords in stringified URLs.
-
-### `redact(string)`
-
-Redact values from a single value
-
-```js
-const { redact } = require('@npmcli/redact')
-
-redact('https://user:pass@registry.npmjs.org/')
-// https://user:***@registry.npmjs.org/
-
-redact(`https://registry.npmjs.org/path/npm_${'a'.repeat('36')}`)
-// https://registry.npmjs.org/path/npm_***
-```
-
-### `redactLog(string | string[])`
-
-Redact values from a string or array of strings.
-
-This method will also split all strings on `\s` and `=` and iterate over them.
-
-```js
-const { redactLog } = require('@npmcli/redact')
-
-redactLog([
- 'Something --x=https://user:pass@registry.npmjs.org/ foo bar',
- '--url=http://foo:bar@registry.npmjs.org',
-])
-// [
-// 'Something --x=https://user:***@registry.npmjs.org/ foo bar',
-// '--url=http://foo:***@registry.npmjs.org/',
-// ]
-```
diff --git a/node_modules/@npmcli/redact/lib/deep-map.js b/node_modules/@npmcli/redact/lib/deep-map.js
deleted file mode 100644
index c14857c..0000000
--- a/node_modules/@npmcli/redact/lib/deep-map.js
+++ /dev/null
@@ -1,71 +0,0 @@
-const { serializeError } = require('./error')
-
-const deepMap = (input, handler = v => v, path = ['$'], seen = new Set([input])) => {
- // this is in an effort to maintain bole's error logging behavior
- if (path.join('.') === '$' && input instanceof Error) {
- return deepMap({ err: serializeError(input) }, handler, path, seen)
- }
- if (input instanceof Error) {
- return deepMap(serializeError(input), handler, path, seen)
- }
- // allows for non-node js environments, sush as workers
- if (typeof Buffer !== 'undefined' && input instanceof Buffer) {
- return `[unable to log instanceof buffer]`
- }
- if (input instanceof Uint8Array) {
- return `[unable to log instanceof Uint8Array]`
- }
-
- if (Array.isArray(input)) {
- const result = []
- for (let i = 0; i < input.length; i++) {
- const element = input[i]
- const elementPath = [...path, i]
- if (element instanceof Object) {
- if (!seen.has(element)) { // avoid getting stuck in circular reference
- seen.add(element)
- result.push(deepMap(handler(element, elementPath), handler, elementPath, seen))
- }
- } else {
- result.push(handler(element, elementPath))
- }
- }
- return result
- }
-
- if (input === null) {
- return null
- } else if (typeof input === 'object' || typeof input === 'function') {
- const result = {}
-
- for (const propertyName of Object.getOwnPropertyNames(input)) {
- // skip logging internal properties
- if (propertyName.startsWith('_')) {
- continue
- }
-
- try {
- const property = input[propertyName]
- const propertyPath = [...path, propertyName]
- if (property instanceof Object) {
- if (!seen.has(property)) { // avoid getting stuck in circular reference
- seen.add(property)
- result[propertyName] = deepMap(
- handler(property, propertyPath), handler, propertyPath, seen
- )
- }
- } else {
- result[propertyName] = handler(property, propertyPath)
- }
- } catch (err) {
- // a getter may throw an error
- result[propertyName] = `[error getting value: ${err.message}]`
- }
- }
- return result
- }
-
- return handler(input, path)
-}
-
-module.exports = { deepMap }
diff --git a/node_modules/@npmcli/redact/lib/error.js b/node_modules/@npmcli/redact/lib/error.js
deleted file mode 100644
index e374b39..0000000
--- a/node_modules/@npmcli/redact/lib/error.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/** takes an error object and serializes it to a plan object */
-function serializeError (input) {
- if (!(input instanceof Error)) {
- if (typeof input === 'string') {
- const error = new Error(`attempted to serialize a non-error, string String, "${input}"`)
- return serializeError(error)
- }
- const error = new Error(`attempted to serialize a non-error, ${typeof input} ${input?.constructor?.name}`)
- return serializeError(error)
- }
- // different error objects store status code differently
- // AxiosError uses `status`, other services use `statusCode`
- const statusCode = input.statusCode ?? input.status
- // CAUTION: what we serialize here gets add to the size of logs
- return {
- errorType: input.errorType ?? input.constructor.name,
- ...(input.message ? { message: input.message } : {}),
- ...(input.stack ? { stack: input.stack } : {}),
- // think of this as error code
- ...(input.code ? { code: input.code } : {}),
- // think of this as http status code
- ...(statusCode ? { statusCode } : {}),
- }
-}
-
-module.exports = {
- serializeError,
-}
diff --git a/node_modules/@npmcli/redact/lib/index.js b/node_modules/@npmcli/redact/lib/index.js
deleted file mode 100644
index 9b10c7f..0000000
--- a/node_modules/@npmcli/redact/lib/index.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const matchers = require('./matchers')
-const { redactUrlPassword } = require('./utils')
-
-const REPLACE = '***'
-
-const redact = (value) => {
- if (typeof value !== 'string' || !value) {
- return value
- }
- return redactUrlPassword(value, REPLACE)
- .replace(matchers.NPM_SECRET.pattern, `npm_${REPLACE}`)
- .replace(matchers.UUID.pattern, REPLACE)
-}
-
-// split on \s|= similar to how nopt parses options
-const splitAndRedact = (str) => {
- // stateful regex, don't move out of this scope
- const splitChars = /[\s=]/g
-
- let match = null
- let result = ''
- let index = 0
- while (match = splitChars.exec(str)) {
- result += redact(str.slice(index, match.index)) + match[0]
- index = splitChars.lastIndex
- }
-
- return result + redact(str.slice(index))
-}
-
-// replaces auth info in an array of arguments or in a strings
-const redactLog = (arg) => {
- if (typeof arg === 'string') {
- return splitAndRedact(arg)
- } else if (Array.isArray(arg)) {
- return arg.map((a) => typeof a === 'string' ? splitAndRedact(a) : a)
- }
- return arg
-}
-
-module.exports = {
- redact,
- redactLog,
-}
diff --git a/node_modules/@npmcli/redact/lib/matchers.js b/node_modules/@npmcli/redact/lib/matchers.js
deleted file mode 100644
index 854ba8e..0000000
--- a/node_modules/@npmcli/redact/lib/matchers.js
+++ /dev/null
@@ -1,88 +0,0 @@
-const TYPE_REGEX = 'regex'
-const TYPE_URL = 'url'
-const TYPE_PATH = 'path'
-
-const NPM_SECRET = {
- type: TYPE_REGEX,
- pattern: /\b(npms?_)[a-zA-Z0-9]{36,48}\b/gi,
- replacement: `[REDACTED_NPM_SECRET]`,
-}
-
-const AUTH_HEADER = {
- type: TYPE_REGEX,
- pattern: /\b(Basic\s+|Bearer\s+)[\w+=\-.]+\b/gi,
- replacement: `[REDACTED_AUTH_HEADER]`,
-}
-
-const JSON_WEB_TOKEN = {
- type: TYPE_REGEX,
- pattern: /\b[A-Za-z0-9-_]{10,}(?!\.\d+\.)\.[A-Za-z0-9-_]{3,}\.[A-Za-z0-9-_]{20,}\b/gi,
- replacement: `[REDACTED_JSON_WEB_TOKEN]`,
-}
-
-const UUID = {
- type: TYPE_REGEX,
- pattern: /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,
- replacement: `[REDACTED_UUID]`,
-}
-
-const URL_MATCHER = {
- type: TYPE_REGEX,
- pattern: /(?:https?|ftp):\/\/[^\s/"$.?#].[^\s"]*/gi,
- replacement: '[REDACTED_URL]',
-}
-
-const DEEP_HEADER_AUTHORIZATION = {
- type: TYPE_PATH,
- predicate: ({ path }) => path.endsWith('.headers.authorization'),
- replacement: '[REDACTED_HEADER_AUTHORIZATION]',
-}
-
-const DEEP_HEADER_SET_COOKIE = {
- type: TYPE_PATH,
- predicate: ({ path }) => path.endsWith('.headers.set-cookie'),
- replacement: '[REDACTED_HEADER_SET_COOKIE]',
-}
-
-const DEEP_HEADER_COOKIE = {
- type: TYPE_PATH,
- predicate: ({ path }) => path.endsWith('.headers.cookie'),
- replacement: '[REDACTED_HEADER_COOKIE]',
-}
-
-const REWRITE_REQUEST = {
- type: TYPE_PATH,
- predicate: ({ path }) => path.endsWith('.request'),
- replacement: (input) => ({
- method: input?.method,
- path: input?.path,
- headers: input?.headers,
- url: input?.url,
- }),
-}
-
-const REWRITE_RESPONSE = {
- type: TYPE_PATH,
- predicate: ({ path }) => path.endsWith('.response'),
- replacement: (input) => ({
- data: input?.data,
- status: input?.status,
- headers: input?.headers,
- }),
-}
-
-module.exports = {
- TYPE_REGEX,
- TYPE_URL,
- TYPE_PATH,
- NPM_SECRET,
- AUTH_HEADER,
- JSON_WEB_TOKEN,
- UUID,
- URL_MATCHER,
- DEEP_HEADER_AUTHORIZATION,
- DEEP_HEADER_SET_COOKIE,
- DEEP_HEADER_COOKIE,
- REWRITE_REQUEST,
- REWRITE_RESPONSE,
-}
diff --git a/node_modules/@npmcli/redact/lib/server.js b/node_modules/@npmcli/redact/lib/server.js
deleted file mode 100644
index 555e37d..0000000
--- a/node_modules/@npmcli/redact/lib/server.js
+++ /dev/null
@@ -1,59 +0,0 @@
-const {
- AUTH_HEADER,
- JSON_WEB_TOKEN,
- NPM_SECRET,
- DEEP_HEADER_AUTHORIZATION,
- DEEP_HEADER_SET_COOKIE,
- REWRITE_REQUEST,
- REWRITE_RESPONSE,
- DEEP_HEADER_COOKIE,
-} = require('./matchers')
-
-const {
- redactUrlMatcher,
- redactUrlPasswordMatcher,
- redactMatchers,
-} = require('./utils')
-
-const { serializeError } = require('./error')
-
-const { deepMap } = require('./deep-map')
-
-const _redact = redactMatchers(
- NPM_SECRET,
- AUTH_HEADER,
- JSON_WEB_TOKEN,
- DEEP_HEADER_AUTHORIZATION,
- DEEP_HEADER_SET_COOKIE,
- DEEP_HEADER_COOKIE,
- REWRITE_REQUEST,
- REWRITE_RESPONSE,
- redactUrlMatcher(
- redactUrlPasswordMatcher()
- )
-)
-
-const redact = (input) => deepMap(input, (value, path) => _redact(value, { path }))
-
-/** takes an error returns new error keeping some custom properties */
-function redactError (input) {
- const { message, ...data } = serializeError(input)
- const output = new Error(redact(message))
- return Object.assign(output, redact(data))
-}
-
-/** runs a function within try / catch and throws error wrapped in redactError */
-function redactThrow (func) {
- if (typeof func !== 'function') {
- throw new Error('redactThrow expects a function')
- }
- return async (...args) => {
- try {
- return await func(...args)
- } catch (error) {
- throw redactError(error)
- }
- }
-}
-
-module.exports = { redact, redactError, redactThrow }
diff --git a/node_modules/@npmcli/redact/lib/utils.js b/node_modules/@npmcli/redact/lib/utils.js
deleted file mode 100644
index 8395ab2..0000000
--- a/node_modules/@npmcli/redact/lib/utils.js
+++ /dev/null
@@ -1,202 +0,0 @@
-const {
- URL_MATCHER,
- TYPE_URL,
- TYPE_REGEX,
- TYPE_PATH,
-} = require('./matchers')
-
-/**
- * creates a string of asterisks,
- * this forces a minimum asterisk for security purposes
- */
-const asterisk = (length = 0) => {
- length = typeof length === 'string' ? length.length : length
- if (length < 8) {
- return '*'.repeat(8)
- }
- return '*'.repeat(length)
-}
-
-/**
- * escapes all special regex chars
- * @see https://stackoverflow.com/a/9310752
- * @see https://github.com/tc39/proposal-regex-escaping
- */
-const escapeRegExp = (text) => {
- return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, `\\$&`)
-}
-
-/**
- * provieds a regex "or" of the url versions of a string
- */
-const urlEncodeRegexGroup = (value) => {
- const decoded = decodeURIComponent(value)
- const encoded = encodeURIComponent(value)
- const union = [...new Set([encoded, decoded, value])].map(escapeRegExp).join('|')
- return union
-}
-
-/**
- * a tagged template literal that returns a regex ensures all variables are excaped
- */
-const urlEncodeRegexTag = (strings, ...values) => {
- let pattern = ''
- for (let i = 0; i < values.length; i++) {
- pattern += strings[i] + `(${urlEncodeRegexGroup(values[i])})`
- }
- pattern += strings[strings.length - 1]
- return new RegExp(pattern)
-}
-
-/**
- * creates a matcher for redacting url hostname
- */
-const redactUrlHostnameMatcher = ({ hostname, replacement } = {}) => ({
- type: TYPE_URL,
- predicate: ({ url }) => url.hostname === hostname,
- pattern: ({ url }) => {
- return urlEncodeRegexTag`(^${url.protocol}//${url.username}:.+@)?${url.hostname}`
- },
- replacement: `$1${replacement || asterisk()}`,
-})
-
-/**
- * creates a matcher for redacting url search / query parameter values
- */
-const redactUrlSearchParamsMatcher = ({ param, replacement } = {}) => ({
- type: TYPE_URL,
- predicate: ({ url }) => url.searchParams.has(param),
- pattern: ({ url }) => urlEncodeRegexTag`(${param}=)${url.searchParams.get(param)}`,
- replacement: `$1${replacement || asterisk()}`,
-})
-
-/** creates a matcher for redacting the url password */
-const redactUrlPasswordMatcher = ({ replacement } = {}) => ({
- type: TYPE_URL,
- predicate: ({ url }) => url.password,
- pattern: ({ url }) => urlEncodeRegexTag`(^${url.protocol}//${url.username}:)${url.password}`,
- replacement: `$1${replacement || asterisk()}`,
-})
-
-const redactUrlReplacement = (...matchers) => (subValue) => {
- try {
- const url = new URL(subValue)
- return redactMatchers(...matchers)(subValue, { url })
- } catch (err) {
- return subValue
- }
-}
-
-/**
- * creates a matcher / submatcher for urls, this function allows you to first
- * collect all urls within a larger string and then pass those urls to a
- * submatcher
- *
- * @example
- * console.log("this will first match all urls, then pass those urls to the password patcher")
- * redactMatchers(redactUrlMatcher(redactUrlPasswordMatcher()))
- *
- * @example
- * console.log(
- * "this will assume you are passing in a string that is a url, and will redact the password"
- * )
- * redactMatchers(redactUrlPasswordMatcher())
- *
- */
-const redactUrlMatcher = (...matchers) => {
- return {
- ...URL_MATCHER,
- replacement: redactUrlReplacement(...matchers),
- }
-}
-
-const matcherFunctions = {
- [TYPE_REGEX]: (matcher) => (value) => {
- if (typeof value === 'string') {
- value = value.replace(matcher.pattern, matcher.replacement)
- }
- return value
- },
- [TYPE_URL]: (matcher) => (value, ctx) => {
- if (typeof value === 'string') {
- try {
- const url = ctx?.url || new URL(value)
- const { predicate, pattern } = matcher
- const predicateValue = predicate({ url })
- if (predicateValue) {
- value = value.replace(pattern({ url }), matcher.replacement)
- }
- } catch (_e) {
- return value
- }
- }
- return value
- },
- [TYPE_PATH]: (matcher) => (value, ctx) => {
- const rawPath = ctx?.path
- const path = rawPath.join('.').toLowerCase()
- const { predicate, replacement } = matcher
- const replace = typeof replacement === 'function' ? replacement : () => replacement
- const shouldRun = predicate({ rawPath, path })
- if (shouldRun) {
- value = replace(value, { rawPath, path })
- }
- return value
- },
-}
-
-/** converts a matcher to a function */
-const redactMatcher = (matcher) => {
- return matcherFunctions[matcher.type](matcher)
-}
-
-/** converts a series of matchers to a function */
-const redactMatchers = (...matchers) => (value, ctx) => {
- const flatMatchers = matchers.flat()
- return flatMatchers.reduce((result, matcher) => {
- const fn = (typeof matcher === 'function') ? matcher : redactMatcher(matcher)
- return fn(result, ctx)
- }, value)
-}
-
-/**
- * replacement handler, keeping $1 (if it exists) and replacing the
- * rest of the string with asterisks, maintaining string length
- */
-const redactDynamicReplacement = () => (value, start) => {
- if (typeof start === 'number') {
- return asterisk(value)
- }
- return start + asterisk(value.substring(start.length).length)
-}
-
-/**
- * replacement handler, keeping $1 (if it exists) and replacing the
- * rest of the string with a fixed number of asterisks
- */
-const redactFixedReplacement = (length) => (_value, start) => {
- if (typeof start === 'number') {
- return asterisk(length)
- }
- return start + asterisk(length)
-}
-
-const redactUrlPassword = (value, replacement) => {
- return redactMatchers(redactUrlPasswordMatcher({ replacement }))(value)
-}
-
-module.exports = {
- asterisk,
- escapeRegExp,
- urlEncodeRegexGroup,
- urlEncodeRegexTag,
- redactUrlHostnameMatcher,
- redactUrlSearchParamsMatcher,
- redactUrlPasswordMatcher,
- redactUrlMatcher,
- redactUrlReplacement,
- redactDynamicReplacement,
- redactFixedReplacement,
- redactMatchers,
- redactUrlPassword,
-}
diff --git a/node_modules/@npmcli/redact/package.json b/node_modules/@npmcli/redact/package.json
deleted file mode 100644
index 53d0edf..0000000
--- a/node_modules/@npmcli/redact/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "@npmcli/redact",
- "version": "4.0.0",
- "description": "Redact sensitive npm information from output",
- "main": "lib/index.js",
- "exports": {
- ".": "./lib/index.js",
- "./server": "./lib/server.js",
- "./package.json": "./package.json"
- },
- "scripts": {
- "test": "tap",
- "lint": "npm run eslint",
- "postlint": "template-oss-check",
- "template-oss-apply": "template-oss-apply --force",
- "lintfix": "npm run eslint -- --fix",
- "snap": "tap",
- "posttest": "npm run lint",
- "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
- },
- "keywords": [],
- "author": "GitHub Inc.",
- "license": "ISC",
- "files": [
- "bin/",
- "lib/"
- ],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/redact.git"
- },
- "templateOSS": {
- "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
- "version": "4.27.1",
- "publish": true
- },
- "tap": {
- "nyc-arg": [
- "--exclude",
- "tap-snapshots/**"
- ],
- "timeout": 120
- },
- "devDependencies": {
- "@npmcli/eslint-config": "^5.0.0",
- "@npmcli/template-oss": "4.27.1",
- "tap": "^16.3.10"
- },
- "engines": {
- "node": "^20.17.0 || >=22.9.0"
- }
-}
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/node_modules/@types/node/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
deleted file mode 100644
index 6fd6ea8..0000000
--- a/node_modules/@types/node/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Installation
-> `npm install --save @types/node`
-
-# Summary
-This package contains type definitions for node (https://nodejs.org/).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
-
-### Additional Details
- * Last updated: Thu, 12 Mar 2026 15:47: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).
diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts
deleted file mode 100644
index 9b7144e..0000000
--- a/node_modules/@types/node/assert.d.ts
+++ /dev/null
@@ -1,955 +0,0 @@
-/**
- * The `node:assert` module provides a set of assertion functions for verifying
- * invariants.
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js)
- */
-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 {
- readonly [kOptions]: AssertOptions & { strict: false };
- }
- interface AssertStrict extends Pick {
- 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(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
- /**
- * Tests strict inequality between the `actual` and `expected` parameters as
- * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.notStrictEqual(1, 2);
- * // OK
- *
- * assert.notStrictEqual(1, 1);
- * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
- * //
- * // 1
- *
- * assert.notStrictEqual(1, '1');
- * // OK
- * ```
- *
- * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
- * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v0.1.21
- */
- function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * Tests for deep equality between the `actual` and `expected` parameters.
- * "Deep" equality means that the enumerable "own" properties of child objects
- * are recursively evaluated also by the following rules.
- * @since v1.2.0
- */
- function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
- /**
- * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
- * // OK
- * ```
- *
- * If the values are deeply and strictly equal, an `AssertionError` is thrown
- * with a `message` property set equal to the value of the `message` parameter. If
- * the `message` parameter is undefined, a default error message is assigned. If
- * the `message` parameter is an instance of an `Error` then it will be thrown
- * instead of the `AssertionError`.
- * @since v1.2.0
- */
- function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
- /**
- * Expects the function `fn` to throw an error.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
- * a validation object where each property will be tested for strict deep equality,
- * or an instance of error where each property will be tested for strict deep
- * equality including the non-enumerable `message` and `name` properties. When
- * using an object, it is also possible to use a regular expression, when
- * validating against a string property. See below for examples.
- *
- * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
- * fails.
- *
- * Custom validation object/error instance:
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * const err = new TypeError('Wrong value');
- * err.code = 404;
- * err.foo = 'bar';
- * err.info = {
- * nested: true,
- * baz: 'text',
- * };
- * err.reg = /abc/i;
- *
- * assert.throws(
- * () => {
- * throw err;
- * },
- * {
- * name: 'TypeError',
- * message: 'Wrong value',
- * info: {
- * nested: true,
- * baz: 'text',
- * },
- * // Only properties on the validation object will be tested for.
- * // Using nested objects requires all properties to be present. Otherwise
- * // the validation is going to fail.
- * },
- * );
- *
- * // Using regular expressions to validate error properties:
- * assert.throws(
- * () => {
- * throw err;
- * },
- * {
- * // The `name` and `message` properties are strings and using regular
- * // expressions on those will match against the string. If they fail, an
- * // error is thrown.
- * name: /^TypeError$/,
- * message: /Wrong/,
- * foo: 'bar',
- * info: {
- * nested: true,
- * // It is not possible to use regular expressions for nested properties!
- * baz: 'text',
- * },
- * // The `reg` property contains a regular expression and only if the
- * // validation object contains an identical regular expression, it is going
- * // to pass.
- * reg: /abc/i,
- * },
- * );
- *
- * // Fails due to the different `message` and `name` properties:
- * assert.throws(
- * () => {
- * const otherErr = new Error('Not found');
- * // Copy all enumerable properties from `err` to `otherErr`.
- * for (const [key, value] of Object.entries(err)) {
- * otherErr[key] = value;
- * }
- * throw otherErr;
- * },
- * // The error's `message` and `name` properties will also be checked when using
- * // an error as validation object.
- * err,
- * );
- * ```
- *
- * Validate instanceof using constructor:
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * Error,
- * );
- * ```
- *
- * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
- *
- * Using a regular expression runs `.toString` on the error object, and will
- * therefore also include the error name.
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * /^Error: Wrong value$/,
- * );
- * ```
- *
- * Custom error validation:
- *
- * The function must return `true` to indicate all internal validations passed.
- * It will otherwise fail with an `AssertionError`.
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.throws(
- * () => {
- * throw new Error('Wrong value');
- * },
- * (err) => {
- * assert(err instanceof Error);
- * assert(/value/.test(err));
- * // Avoid returning anything from validation functions besides `true`.
- * // Otherwise, it's not clear what part of the validation failed. Instead,
- * // throw an error about the specific validation that failed (as done in this
- * // example) and add as much helpful debugging information to that error as
- * // possible.
- * return true;
- * },
- * 'unexpected error',
- * );
- * ```
- *
- * `error` cannot be a string. If a string is provided as the second
- * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
- * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
- * a string as the second argument gets considered:
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * function throwingFirst() {
- * throw new Error('First');
- * }
- *
- * function throwingSecond() {
- * throw new Error('Second');
- * }
- *
- * function notThrowing() {}
- *
- * // The second argument is a string and the input function threw an Error.
- * // The first case will not throw as it does not match for the error message
- * // thrown by the input function!
- * assert.throws(throwingFirst, 'Second');
- * // In the next example the message has no benefit over the message from the
- * // error and since it is not clear if the user intended to actually match
- * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
- * assert.throws(throwingSecond, 'Second');
- * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
- *
- * // The string is only used (as message) in case the function does not throw:
- * assert.throws(notThrowing, 'Second');
- * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
- *
- * // If it was intended to match for the error message do this instead:
- * // It does not throw because the error messages match.
- * assert.throws(throwingSecond, /Second$/);
- *
- * // If the error message does not match, an AssertionError is thrown.
- * assert.throws(throwingFirst, /Second$/);
- * // AssertionError [ERR_ASSERTION]
- * ```
- *
- * Due to the confusing error-prone notation, avoid a string as the second
- * argument.
- * @since v0.1.21
- */
- function throws(block: () => unknown, message?: string | Error): void;
- function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
- /**
- * Asserts that the function `fn` does not throw an error.
- *
- * Using `assert.doesNotThrow()` is actually not useful because there
- * is no benefit in catching an error and then rethrowing it. Instead, consider
- * adding a comment next to the specific code path that should not throw and keep
- * error messages as expressive as possible.
- *
- * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
- *
- * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
- * different type, or if the `error` parameter is undefined, the error is
- * propagated back to the caller.
- *
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
- * function. See {@link throws} for more details.
- *
- * The following, for instance, will throw the `TypeError` because there is no
- * matching error type in the assertion:
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * SyntaxError,
- * );
- * ```
- *
- * However, the following will result in an `AssertionError` with the message
- * 'Got unwanted exception...':
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * TypeError,
- * );
- * ```
- *
- * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.doesNotThrow(
- * () => {
- * throw new TypeError('Wrong value');
- * },
- * /Wrong value/,
- * 'Whoops',
- * );
- * // Throws: AssertionError: Got unwanted exception: Whoops
- * ```
- * @since v0.1.21
- */
- function doesNotThrow(block: () => unknown, message?: string | Error): void;
- function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
- /**
- * Throws `value` if `value` is not `undefined` or `null`. This is useful when
- * testing the `error` argument in callbacks. The stack trace contains all frames
- * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.ifError(null);
- * // OK
- * assert.ifError(0);
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
- * assert.ifError('error');
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
- * assert.ifError(new Error());
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
- *
- * // Create some random error frames.
- * let err;
- * (function errorFrame() {
- * err = new Error('test error');
- * })();
- *
- * (function ifErrorFrame() {
- * assert.ifError(err);
- * })();
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
- * // at ifErrorFrame
- * // at errorFrame
- * ```
- * @since v0.1.97
- */
- function ifError(value: unknown): asserts value is null | undefined;
- /**
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
- * calls the function and awaits the returned promise to complete. It will then
- * check that the promise is rejected.
- *
- * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
- * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-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) | Promise, message?: string | Error): Promise;
- function rejects(
- block: (() => Promise) | Promise,
- error: AssertPredicate,
- message?: string | Error,
- ): Promise;
- /**
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
- * calls the function and awaits the returned promise to complete. It will then
- * check that the promise is not rejected.
- *
- * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
- * the function does not return a promise, `assert.doesNotReject()` will return a
- * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-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) | Promise,
- message?: string | Error,
- ): Promise;
- function doesNotReject(
- block: (() => Promise) | Promise,
- error: AssertPredicate,
- message?: string | Error,
- ): Promise;
- /**
- * Expects the `string` input to match the regular expression.
- *
- * ```js
- * import assert from 'node:assert/strict';
- *
- * assert.match('I will fail', /pass/);
- * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
- *
- * assert.match(123, /pass/);
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
- *
- * assert.match('I will pass', /pass/);
- * // OK
- * ```
- *
- * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
- * to the value of the `message` parameter. If the `message` parameter is
- * undefined, a default error message is assigned. If the `message` parameter is an
- * instance of an [Error](https://nodejs.org/docs/latest-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;
-}
diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts
deleted file mode 100644
index 51bb352..0000000
--- a/node_modules/@types/node/assert/strict.d.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * In strict assertion mode, non-strict methods behave like their corresponding
- * strict methods. For example, `assert.deepEqual()` will behave like
- * `assert.deepStrictEqual()`.
- *
- * In strict assertion mode, error messages for objects display a diff. In legacy
- * assertion mode, error messages for objects display the objects, often truncated.
- *
- * To use strict assertion mode:
- *
- * ```js
- * import { strict as assert } from 'node:assert';
- * ```
- *
- * ```js
- * import assert from 'node:assert/strict';
- * ```
- *
- * Example error diff:
- *
- * ```js
- * import { strict as assert } from 'node:assert';
- *
- * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
- * // AssertionError: Expected inputs to be strictly deep-equal:
- * // + actual - expected ... Lines skipped
- * //
- * // [
- * // [
- * // ...
- * // 2,
- * // + 3
- * // - '3'
- * // ],
- * // ...
- * // 5
- * // ]
- * ```
- *
- * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
- * environment variables. This will also deactivate the colors in the REPL. For
- * more on color support in terminal environments, read the tty
- * [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation.
- * @since v15.0.0
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js)
- */
-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;
-}
diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts
deleted file mode 100644
index aa692c1..0000000
--- a/node_modules/@types/node/async_hooks.d.ts
+++ /dev/null
@@ -1,623 +0,0 @@
-/**
- * We strongly discourage the use of the `async_hooks` API.
- * Other APIs that can cover most of its use cases include:
- *
- * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context
- * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
- *
- * The `node:async_hooks` module provides an API to track asynchronous resources.
- * It can be accessed using:
- *
- * ```js
- * import async_hooks from 'node:async_hooks';
- * ```
- * @experimental
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js)
- */
-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 {
- /**
- * Called when a class is constructed that has the possibility to emit an asynchronous event.
- * @param asyncId A unique ID for the async resource
- * @param type The type of the async resource
- * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created
- * @param resource Reference to the resource representing the async operation, needs to be released during destroy
- */
- init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
- /**
- * When an asynchronous operation is initiated or completes a callback is called to notify the user.
- * The before callback is called just before said callback is executed.
- * @param asyncId the unique identifier assigned to the resource about to execute the callback.
- */
- before?(asyncId: number): void;
- /**
- * Called immediately after the callback specified in `before` is completed.
- *
- * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs.
- * @param asyncId the unique identifier assigned to the resource which has executed the callback.
- */
- after?(asyncId: number): void;
- /**
- * Called when a promise has resolve() called. This may not be in the same execution id
- * as the promise itself.
- * @param asyncId the unique id for the promise that was resolve()d.
- */
- promiseResolve?(asyncId: number): void;
- /**
- * Called after the resource corresponding to asyncId is destroyed
- * @param asyncId a unique ID for the async resource
- */
- destroy?(asyncId: number): void;
- }
- interface AsyncHook {
- /**
- * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
- */
- enable(): this;
- /**
- * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
- */
- disable(): this;
- }
- /**
- * Registers functions to be called for different lifetime events of each async
- * operation.
- *
- * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
- * respective asynchronous event during a resource's lifetime.
- *
- * All callbacks are optional. For example, if only resource cleanup needs to
- * be tracked, then only the `destroy` callback needs to be passed. The
- * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
- *
- * ```js
- * import { createHook } from 'node:async_hooks';
- *
- * const asyncHook = createHook({
- * init(asyncId, type, triggerAsyncId, resource) { },
- * destroy(asyncId) { },
- * });
- * ```
- *
- * The callbacks will be inherited via the prototype chain:
- *
- * ```js
- * class MyAsyncCallbacks {
- * init(asyncId, type, triggerAsyncId, resource) { }
- * destroy(asyncId) {}
- * }
- *
- * class MyAddedCallbacks extends MyAsyncCallbacks {
- * before(asyncId) { }
- * after(asyncId) { }
- * }
- *
- * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
- * ```
- *
- * Because promises are asynchronous resources whose lifecycle is tracked
- * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
- * @since v8.1.0
- * @param callbacks The `Hook Callbacks` to register
- * @return Instance used for disabling and enabling hooks
- */
- function createHook(callbacks: HookCallbacks): AsyncHook;
- interface AsyncResourceOptions {
- /**
- * The ID of the execution context that created this async event.
- * @default executionAsyncId()
- */
- triggerAsyncId?: number | undefined;
- /**
- * Disables automatic `emitDestroy` when the object is garbage collected.
- * This usually does not need to be set (even if `emitDestroy` is called
- * manually), unless the resource's `asyncId` is retrieved and the
- * sensitive API's `emitDestroy` is called with it.
- * @default false
- */
- requireManualDestroy?: boolean | undefined;
- }
- /**
- * The class `AsyncResource` is designed to be extended by the embedder's async
- * resources. Using this, users can easily trigger the lifetime events of their
- * own resources.
- *
- * The `init` hook will trigger when an `AsyncResource` is instantiated.
- *
- * The following is an overview of the `AsyncResource` API.
- *
- * ```js
- * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
- *
- * // AsyncResource() is meant to be extended. Instantiating a
- * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
- * // async_hook.executionAsyncId() is used.
- * const asyncResource = new AsyncResource(
- * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
- * );
- *
- * // Run a function in the execution context of the resource. This will
- * // * establish the context of the resource
- * // * trigger the AsyncHooks before callbacks
- * // * call the provided function `fn` with the supplied arguments
- * // * trigger the AsyncHooks after callbacks
- * // * restore the original execution context
- * asyncResource.runInAsyncScope(fn, thisArg, ...args);
- *
- * // Call AsyncHooks destroy callbacks.
- * asyncResource.emitDestroy();
- *
- * // Return the unique ID assigned to the AsyncResource instance.
- * asyncResource.asyncId();
- *
- * // Return the trigger ID for the AsyncResource instance.
- * asyncResource.triggerAsyncId();
- * ```
- */
- class AsyncResource {
- /**
- * AsyncResource() is meant to be extended. Instantiating a
- * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
- * async_hook.executionAsyncId() is used.
- * @param type The type of async event.
- * @param triggerAsyncId The ID of the execution context that created
- * this async event (default: `executionAsyncId()`), or an
- * AsyncResourceOptions object (since v9.3.0)
- */
- constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
- /**
- * Binds the given function to the current execution context.
- * @since v14.8.0, v12.19.0
- * @param fn The function to bind to the current execution context.
- * @param type An optional name to associate with the underlying `AsyncResource`.
- */
- static bind any, ThisArg>(
- fn: Func,
- type?: string,
- thisArg?: ThisArg,
- ): Func;
- /**
- * Binds the given function to execute to this `AsyncResource`'s scope.
- * @since v14.8.0, v12.19.0
- * @param fn The function to bind to the current `AsyncResource`.
- */
- bind any>(fn: Func): Func;
- /**
- * Call the provided function with the provided arguments in the execution context
- * of the async resource. This will establish the context, trigger the AsyncHooks
- * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
- * then restore the original execution context.
- * @since v9.6.0
- * @param fn The function to call in the execution context of this async resource.
- * @param thisArg The receiver to be used for the function call.
- * @param args Optional arguments to pass to the function.
- */
- runInAsyncScope(
- fn: (this: This, ...args: any[]) => Result,
- thisArg?: This,
- ...args: any[]
- ): Result;
- /**
- * Call all `destroy` hooks. This should only ever be called once. An error will
- * be thrown if it is called more than once. This **must** be manually called. If
- * the resource is left to be collected by the GC then the `destroy` hooks will
- * never be called.
- * @return A reference to `asyncResource`.
- */
- emitDestroy(): this;
- /**
- * @return The unique `asyncId` assigned to the resource.
- */
- asyncId(): number;
- /**
- * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
- */
- triggerAsyncId(): number;
- }
- 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 {
- /**
- * 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 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(): (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(store: T, callback: () => R): R;
- run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
- /**
- * Runs a function synchronously outside of a context and returns its
- * return value. The store is not accessible within the callback function or
- * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
- *
- * The optional `args` are passed to the callback function.
- *
- * If the callback function throws an error, the error is thrown by `exit()` too.
- * The stacktrace is not impacted by this call and the context is re-entered.
- *
- * Example:
- *
- * ```js
- * // Within a call to run
- * try {
- * asyncLocalStorage.getStore(); // Returns the store object or value
- * asyncLocalStorage.exit(() => {
- * asyncLocalStorage.getStore(); // Returns undefined
- * throw new Error();
- * });
- * } catch (e) {
- * asyncLocalStorage.getStore(); // Returns the same object or value
- * // The error will be caught here
- * }
- * ```
- * @since v13.10.0, v12.17.0
- * @experimental
- */
- exit(callback: (...args: TArgs) => R, ...args: TArgs): R;
- /**
- * Transitions into the context for the remainder of the current
- * synchronous execution and then persists the store through any following
- * asynchronous calls.
- *
- * Example:
- *
- * ```js
- * const store = { id: 1 };
- * // Replaces previous store with the given store object
- * asyncLocalStorage.enterWith(store);
- * asyncLocalStorage.getStore(); // Returns the store object
- * someAsyncOperation(() => {
- * asyncLocalStorage.getStore(); // Returns the same object
- * });
- * ```
- *
- * This transition will continue for the _entire_ synchronous execution.
- * This means that if, for example, the context is entered within an event
- * handler subsequent event handlers will also run within that context unless
- * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
- * to use the latter method.
- *
- * ```js
- * const store = { id: 1 };
- *
- * emitter.on('my-event', () => {
- * asyncLocalStorage.enterWith(store);
- * });
- * emitter.on('my-event', () => {
- * asyncLocalStorage.getStore(); // Returns the same object
- * });
- *
- * asyncLocalStorage.getStore(); // Returns undefined
- * emitter.emit('my-event');
- * asyncLocalStorage.getStore(); // Returns the same object
- * ```
- * @since v13.11.0, v12.17.0
- * @experimental
- */
- enterWith(store: T): void;
- }
- /**
- * @since v17.2.0, v16.14.0
- * @return A map of provider types to the corresponding numeric id.
- * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
- */
- namespace asyncWrapProviders {
- const NONE: number;
- const DIRHANDLE: number;
- const DNSCHANNEL: number;
- const ELDHISTOGRAM: number;
- const FILEHANDLE: number;
- const FILEHANDLECLOSEREQ: number;
- const FIXEDSIZEBLOBCOPY: number;
- const FSEVENTWRAP: number;
- const FSREQCALLBACK: number;
- const FSREQPROMISE: number;
- const GETADDRINFOREQWRAP: number;
- const GETNAMEINFOREQWRAP: number;
- const HEAPSNAPSHOT: number;
- const HTTP2SESSION: number;
- const HTTP2STREAM: number;
- const HTTP2PING: number;
- const HTTP2SETTINGS: number;
- const HTTPINCOMINGMESSAGE: number;
- const HTTPCLIENTREQUEST: number;
- const JSSTREAM: number;
- const JSUDPWRAP: number;
- const MESSAGEPORT: number;
- const PIPECONNECTWRAP: number;
- const PIPESERVERWRAP: number;
- const PIPEWRAP: number;
- const PROCESSWRAP: number;
- const PROMISE: number;
- const QUERYWRAP: number;
- const SHUTDOWNWRAP: number;
- const SIGNALWRAP: number;
- const STATWATCHER: number;
- const STREAMPIPE: number;
- const TCPCONNECTWRAP: number;
- const TCPSERVERWRAP: number;
- const TCPWRAP: number;
- const TTYWRAP: number;
- const UDPSENDWRAP: number;
- const UDPWRAP: number;
- const SIGINTWATCHDOG: number;
- const WORKER: number;
- const WORKERHEAPSNAPSHOT: number;
- const WRITEWRAP: number;
- const ZLIB: number;
- const CHECKPRIMEREQUEST: number;
- const PBKDF2REQUEST: number;
- const KEYPAIRGENREQUEST: number;
- const KEYGENREQUEST: number;
- const KEYEXPORTREQUEST: number;
- const CIPHERREQUEST: number;
- const DERIVEBITSREQUEST: number;
- const HASHREQUEST: number;
- const RANDOMBYTESREQUEST: number;
- const RANDOMPRIMEREQUEST: number;
- const SCRYPTREQUEST: number;
- const SIGNREQUEST: number;
- const TLSWRAP: number;
- const VERIFYREQUEST: number;
- }
-}
-declare module "async_hooks" {
- export * from "node:async_hooks";
-}
diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts
deleted file mode 100644
index a3c2304..0000000
--- a/node_modules/@types/node/buffer.buffer.d.ts
+++ /dev/null
@@ -1,466 +0,0 @@
-declare module "node:buffer" {
- type ImplicitArrayBuffer> = T extends
- { valueOf(): infer V extends ArrayBufferLike } ? V : T;
- global {
- interface BufferConstructor {
- // see buffer.d.ts for implementation shared with all TypeScript versions
-
- /**
- * Allocates a new buffer containing the given {str}.
- *
- * @param str String to store in buffer.
- * @param encoding encoding to use, optional. Default is 'utf8'
- * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
- */
- new(str: string, encoding?: BufferEncoding): Buffer;
- /**
- * Allocates a new buffer of {size} octets.
- *
- * @param size count of octets to allocate.
- * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
- */
- new(size: number): Buffer;
- /**
- * Allocates a new buffer containing the given {array} of octets.
- *
- * @param array The octets to store.
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
- */
- new(array: ArrayLike): Buffer;
- /**
- * Produces a Buffer backed by the same allocated memory as
- * the given {ArrayBuffer}/{SharedArrayBuffer}.
- *
- * @param arrayBuffer The ArrayBuffer with which to share memory.
- * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
- */
- new(arrayBuffer: TArrayBuffer): Buffer;
- /**
- * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
- * Array entries outside that range will be truncated to fit into it.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
- * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
- * ```
- *
- * If `array` is an `Array`-like object (that is, one with a `length` property of
- * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
- * a `Uint8Array`. This means all other `TypedArray` variants get treated as an
- * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
- * `Buffer.copyBytesFrom()`.
- *
- * A `TypeError` will be thrown if `array` is not an `Array` or another type
- * appropriate for `Buffer.from()` variants.
- *
- * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
- * `Buffer` pool like `Buffer.allocUnsafe()` does.
- * @since v5.10.0
- */
- from(array: WithImplicitCoercion>): Buffer;
- /**
- * This creates a view of the `ArrayBuffer` without copying the underlying
- * memory. For example, when passed a reference to the `.buffer` property of a
- * `TypedArray` instance, the newly created `Buffer` will share the same
- * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const arr = new Uint16Array(2);
- *
- * arr[0] = 5000;
- * arr[1] = 4000;
- *
- * // Shares memory with `arr`.
- * const buf = Buffer.from(arr.buffer);
- *
- * console.log(buf);
- * // Prints:
- *
- * // Changing the original Uint16Array changes the Buffer also.
- * arr[1] = 6000;
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * The optional `byteOffset` and `length` arguments specify a memory range within
- * the `arrayBuffer` that will be shared by the `Buffer`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const ab = new ArrayBuffer(10);
- * const buf = Buffer.from(ab, 0, 2);
- *
- * console.log(buf.length);
- * // Prints: 2
- * ```
- *
- * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
- * `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
- * variants.
- *
- * It is important to remember that a backing `ArrayBuffer` can cover a range
- * of memory that extends beyond the bounds of a `TypedArray` view. A new
- * `Buffer` created using the `buffer` property of a `TypedArray` may extend
- * beyond the range of the `TypedArray`:
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
- * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
- * console.log(arrA.buffer === arrB.buffer); // true
- *
- * const buf = Buffer.from(arrB.buffer);
- * console.log(buf);
- * // Prints:
- * ```
- * @since v5.10.0
- * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
- * `.buffer` property of a `TypedArray`.
- * @param byteOffset Index of first byte to expose. **Default:** `0`.
- * @param length Number of bytes to expose. **Default:**
- * `arrayBuffer.byteLength - byteOffset`.
- */
- from>(
- arrayBuffer: TArrayBuffer,
- byteOffset?: number,
- length?: number,
- ): Buffer>;
- /**
- * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
- * the character encoding to be used when converting `string` into bytes.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from('this is a tést');
- * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
- *
- * console.log(buf1.toString());
- * // Prints: this is a tést
- * console.log(buf2.toString());
- * // Prints: this is a tést
- * console.log(buf1.toString('latin1'));
- * // Prints: this is a tést
- * ```
- *
- * A `TypeError` will be thrown if `string` is not a string or another type
- * appropriate for `Buffer.from()` variants.
- *
- * `Buffer.from(string)` may also use the internal `Buffer` pool like
- * `Buffer.allocUnsafe()` does.
- * @since v5.10.0
- * @param string A string to encode.
- * @param encoding The encoding of `string`. **Default:** `'utf8'`.
- */
- from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer;
- from(arrayOrString: WithImplicitCoercion | string>): Buffer;
- /**
- * Creates a new Buffer using the passed {data}
- * @param values to create a new Buffer
- */
- of(...items: number[]): Buffer;
- /**
- * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
- *
- * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
- *
- * If `totalLength` is not provided, it is calculated from the `Buffer` instances
- * in `list` by adding their lengths.
- *
- * If `totalLength` is provided, it is coerced to an unsigned integer. If the
- * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
- * truncated to `totalLength`. 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:
- * console.log(bufA.length);
- * // Prints: 42
- * ```
- *
- * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
- * @since v0.7.11
- * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
- * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
- */
- concat(list: readonly Uint8Array[], totalLength?: number): Buffer;
- /**
- * Copies the underlying memory of `view` into a new `Buffer`.
- *
- * ```js
- * const u16 = new Uint16Array([0, 0xffff]);
- * const buf = Buffer.copyBytesFrom(u16, 1, 1);
- * u16[1] = 0;
- * console.log(buf.length); // 2
- * console.log(buf[0]); // 255
- * console.log(buf[1]); // 255
- * ```
- * @since v19.8.0
- * @param view The {TypedArray} to copy.
- * @param [offset=0] The starting offset within `view`.
- * @param [length=view.length - offset] The number of elements from `view` to copy.
- */
- copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.alloc(5);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
- *
- * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.alloc(5, 'a');
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
- * initialized by calling `buf.fill(fill, encoding)`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
- * contents will never contain sensitive data from previous allocations, including
- * data that might not have been allocated for `Buffer`s.
- *
- * A `TypeError` will be thrown if `size` is not a number.
- * @since v5.10.0
- * @param size The desired length of the new `Buffer`.
- * @param [fill=0] A value to pre-fill the new `Buffer` with.
- * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
- */
- alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
- *
- * The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(10);
- *
- * console.log(buf);
- * // Prints (contents may vary):
- *
- * buf.fill(0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * A `TypeError` will be thrown if `size` is not a number.
- *
- * The `Buffer` module pre-allocates an internal `Buffer` instance of
- * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
- * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
- *
- * Use of this pre-allocated internal memory pool is a key difference between
- * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
- * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
- * than or equal to half `Buffer.poolSize`. The
- * difference is subtle but can be important when an application requires the
- * additional performance that `Buffer.allocUnsafe()` provides.
- * @since v5.10.0
- * @param size The desired length of the new `Buffer`.
- */
- allocUnsafe(size: number): Buffer;
- /**
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
- * `size` is 0.
- *
- * The underlying memory for `Buffer` instances created in this way is _not_
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
- * such `Buffer` instances with zeroes.
- *
- * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
- * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
- * allows applications to avoid the garbage collection overhead of creating many
- * individually allocated `Buffer` instances. This approach improves both
- * performance and memory usage by eliminating the need to track and clean up as
- * many individual `ArrayBuffer` objects.
- *
- * However, in the case where a developer may need to retain a small chunk of
- * memory from a pool for an indeterminate amount of time, it may be appropriate
- * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
- * then copying out the relevant bits.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Need to keep around a few small chunks of memory.
- * const store = [];
- *
- * socket.on('readable', () => {
- * let data;
- * while (null !== (data = readable.read())) {
- * // Allocate for retained data.
- * const sb = Buffer.allocUnsafeSlow(10);
- *
- * // Copy the data into the new allocation.
- * data.copy(sb, 0, 0, 10);
- *
- * store.push(sb);
- * }
- * });
- * ```
- *
- * A `TypeError` will be thrown if `size` is not a number.
- * @since v5.12.0
- * @param size The desired length of the new `Buffer`.
- */
- allocUnsafeSlow(size: number): Buffer;
- }
- interface Buffer extends Uint8Array {
- // see buffer.d.ts for implementation shared with all TypeScript versions
-
- /**
- * Returns a new `Buffer` that references the same memory as the original, but
- * offset and cropped by the `start` and `end` indices.
- *
- * This method is not compatible with the `Uint8Array.prototype.slice()`,
- * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * const copiedBuf = Uint8Array.prototype.slice.call(buf);
- * copiedBuf[0]++;
- * console.log(copiedBuf.toString());
- * // Prints: cuffer
- *
- * console.log(buf.toString());
- * // Prints: buffer
- *
- * // With buf.slice(), the original buffer is modified.
- * const notReallyCopiedBuf = buf.slice();
- * notReallyCopiedBuf[0]++;
- * console.log(notReallyCopiedBuf.toString());
- * // Prints: cuffer
- * console.log(buf.toString());
- * // Also prints: cuffer (!)
- * ```
- * @since v0.3.0
- * @deprecated Use `subarray` instead.
- * @param [start=0] Where the new `Buffer` will start.
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
- */
- slice(start?: number, end?: number): Buffer;
- /**
- * Returns a new `Buffer` that references the same memory as the original, but
- * offset and cropped by the `start` and `end` indices.
- *
- * Specifying `end` greater than `buf.length` will return the same result as
- * that of `end` equal to `buf.length`.
- *
- * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
- *
- * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
- * // from the original `Buffer`.
- *
- * const buf1 = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * const buf2 = buf1.subarray(0, 3);
- *
- * console.log(buf2.toString('ascii', 0, buf2.length));
- * // Prints: abc
- *
- * buf1[0] = 33;
- *
- * console.log(buf2.toString('ascii', 0, buf2.length));
- * // Prints: !bc
- * ```
- *
- * Specifying negative indexes causes the slice to be generated relative to the
- * end of `buf` rather than the beginning.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('buffer');
- *
- * console.log(buf.subarray(-6, -1).toString());
- * // Prints: buffe
- * // (Equivalent to buf.subarray(0, 5).)
- *
- * console.log(buf.subarray(-6, -2).toString());
- * // Prints: buff
- * // (Equivalent to buf.subarray(0, 4).)
- *
- * console.log(buf.subarray(-5, -2).toString());
- * // Prints: uff
- * // (Equivalent to buf.subarray(1, 4).)
- * ```
- * @since v3.0.0
- * @param [start=0] Where the new `Buffer` will start.
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
- */
- subarray(start?: number, end?: number): Buffer;
- }
- // TODO: remove globals in future version
- /**
- * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
- * TypeScript versions earlier than 5.7.
- */
- type NonSharedBuffer = Buffer;
- /**
- * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
- * TypeScript versions earlier than 5.7.
- */
- type AllowSharedBuffer = Buffer;
- }
-}
diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts
deleted file mode 100644
index bb0f004..0000000
--- a/node_modules/@types/node/buffer.d.ts
+++ /dev/null
@@ -1,1810 +0,0 @@
-/**
- * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
- * Node.js APIs support `Buffer`s.
- *
- * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
- * extends it with methods that cover additional use cases. Node.js APIs accept
- * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
- *
- * While the `Buffer` class is available within the global scope, it is still
- * recommended to explicitly reference it via an import or require statement.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Creates a zero-filled Buffer of length 10.
- * const buf1 = Buffer.alloc(10);
- *
- * // Creates a Buffer of length 10,
- * // filled with bytes which all have the value `1`.
- * const buf2 = Buffer.alloc(10, 1);
- *
- * // Creates an uninitialized buffer of length 10.
- * // This is faster than calling Buffer.alloc() but the returned
- * // Buffer instance might contain old data that needs to be
- * // overwritten using fill(), write(), or other functions that fill the Buffer's
- * // contents.
- * const buf3 = Buffer.allocUnsafe(10);
- *
- * // Creates a Buffer containing the bytes [1, 2, 3].
- * const buf4 = Buffer.from([1, 2, 3]);
- *
- * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries
- * // are all truncated using `(value & 255)` to fit into the range 0–255.
- * const buf5 = Buffer.from([257, 257.5, -255, '1']);
- *
- * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést':
- * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation)
- * // [116, 195, 169, 115, 116] (in decimal notation)
- * const buf6 = Buffer.from('tést');
- *
- * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
- * const buf7 = Buffer.from('tést', 'latin1');
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js)
- */
-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
- | { valueOf(): T }
- | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never);
- global {
- namespace NodeJS {
- export { BufferEncoding };
- }
- // Buffer class
- type BufferEncoding =
- | "ascii"
- | "utf8"
- | "utf-8"
- | "utf16le"
- | "utf-16le"
- | "ucs2"
- | "ucs-2"
- | "base64"
- | "base64url"
- | "latin1"
- | "binary"
- | "hex";
- /**
- * Raw data is stored in instances of the Buffer class.
- * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
- * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
- */
- interface BufferConstructor {
- // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
- // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
-
- /**
- * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * Buffer.isBuffer(Buffer.alloc(10)); // true
- * Buffer.isBuffer(Buffer.from('foo')); // true
- * Buffer.isBuffer('a string'); // false
- * Buffer.isBuffer([]); // false
- * Buffer.isBuffer(new Uint8Array(1024)); // false
- * ```
- * @since v0.1.101
- */
- isBuffer(obj: any): obj is Buffer;
- /**
- * Returns `true` if `encoding` is the name of a supported character encoding,
- * or `false` otherwise.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * console.log(Buffer.isEncoding('utf8'));
- * // Prints: true
- *
- * console.log(Buffer.isEncoding('hex'));
- * // Prints: true
- *
- * console.log(Buffer.isEncoding('utf/8'));
- * // Prints: false
- *
- * console.log(Buffer.isEncoding(''));
- * // Prints: false
- * ```
- * @since v0.9.1
- * @param encoding A character encoding name to check.
- */
- isEncoding(encoding: string): encoding is BufferEncoding;
- /**
- * Returns the byte length of a string when encoded using `encoding`.
- * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account
- * for the encoding that is used to convert the string into bytes.
- *
- * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input.
- * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the
- * return value might be greater than the length of a `Buffer` created from the
- * string.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const str = '\u00bd + \u00bc = \u00be';
- *
- * console.log(`${str}: ${str.length} characters, ` +
- * `${Buffer.byteLength(str, 'utf8')} bytes`);
- * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes
- * ```
- *
- * When `string` is a
- * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/-
- * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop-
- * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned.
- * @since v0.1.90
- * @param string A value to calculate the length of.
- * @param [encoding='utf8'] If `string` is a string, this is its encoding.
- * @return The number of bytes contained within `string`.
- */
- byteLength(
- string: string | NodeJS.ArrayBufferView | ArrayBufferLike,
- encoding?: BufferEncoding,
- ): number;
- /**
- * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from('1234');
- * const buf2 = Buffer.from('0123');
- * const arr = [buf1, buf2];
- *
- * console.log(arr.sort(Buffer.compare));
- * // Prints: [ , ]
- * // (This result is equal to: [buf2, buf1].)
- * ```
- * @since v0.11.13
- * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
- */
- compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
- /**
- * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
- * for pooling. This value may be modified.
- * @since v0.11.3
- */
- poolSize: number;
- }
- interface Buffer {
- // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
- // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
-
- /**
- * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
- * not contain enough space to fit the entire string, only part of `string` will be
- * written. However, partially encoded characters will not be written.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.alloc(256);
- *
- * const len = buf.write('\u00bd + \u00bc = \u00be', 0);
- *
- * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`);
- * // Prints: 12 bytes: ½ + ¼ = ¾
- *
- * const buffer = Buffer.alloc(10);
- *
- * const length = buffer.write('abcd', 8);
- *
- * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`);
- * // Prints: 2 bytes : ab
- * ```
- * @since v0.1.90
- * @param string String to write to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write `string`.
- * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
- * @param [encoding='utf8'] The character encoding of `string`.
- * @return Number of bytes written.
- */
- write(string: string, encoding?: BufferEncoding): number;
- write(string: string, offset: number, encoding?: BufferEncoding): number;
- write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
- /**
- * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`.
- *
- * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8,
- * then each invalid byte is replaced with the replacement character `U+FFFD`.
- *
- * The maximum length of a string instance (in UTF-16 code units) is available
- * as {@link constants.MAX_STRING_LENGTH}.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * console.log(buf1.toString('utf8'));
- * // Prints: abcdefghijklmnopqrstuvwxyz
- * console.log(buf1.toString('utf8', 0, 5));
- * // Prints: abcde
- *
- * const buf2 = Buffer.from('tést');
- *
- * console.log(buf2.toString('hex'));
- * // Prints: 74c3a97374
- * console.log(buf2.toString('utf8', 0, 3));
- * // Prints: té
- * console.log(buf2.toString(undefined, 0, 3));
- * // Prints: té
- * ```
- * @since v0.1.90
- * @param [encoding='utf8'] The character encoding to use.
- * @param [start=0] The byte offset to start decoding at.
- * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
- */
- toString(encoding?: BufferEncoding, start?: number, end?: number): string;
- /**
- * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls
- * this function when stringifying a `Buffer` instance.
- *
- * `Buffer.from()` accepts objects in the format returned from this method.
- * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]);
- * const json = JSON.stringify(buf);
- *
- * console.log(json);
- * // Prints: {"type":"Buffer","data":[1,2,3,4,5]}
- *
- * const copy = JSON.parse(json, (key, value) => {
- * return value && value.type === 'Buffer' ?
- * Buffer.from(value) :
- * value;
- * });
- *
- * console.log(copy);
- * // Prints:
- * ```
- * @since v0.9.2
- */
- toJSON(): {
- type: "Buffer";
- data: number[];
- };
- /**
- * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from('ABC');
- * const buf2 = Buffer.from('414243', 'hex');
- * const buf3 = Buffer.from('ABCD');
- *
- * console.log(buf1.equals(buf2));
- * // Prints: true
- * console.log(buf1.equals(buf3));
- * // Prints: false
- * ```
- * @since v0.11.13
- * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`.
- */
- equals(otherBuffer: Uint8Array): boolean;
- /**
- * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order.
- * Comparison is based on the actual sequence of bytes in each `Buffer`.
- *
- * * `0` is returned if `target` is the same as `buf`
- * * `1` is returned if `target` should come _before_`buf` when sorted.
- * * `-1` is returned if `target` should come _after_`buf` when sorted.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from('ABC');
- * const buf2 = Buffer.from('BCD');
- * const buf3 = Buffer.from('ABCD');
- *
- * console.log(buf1.compare(buf1));
- * // Prints: 0
- * console.log(buf1.compare(buf2));
- * // Prints: -1
- * console.log(buf1.compare(buf3));
- * // Prints: -1
- * console.log(buf2.compare(buf1));
- * // Prints: 1
- * console.log(buf2.compare(buf3));
- * // Prints: 1
- * console.log([buf1, buf2, buf3].sort(Buffer.compare));
- * // Prints: [ , , ]
- * // (This result is equal to: [buf1, buf3, buf2].)
- * ```
- *
- * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]);
- * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]);
- *
- * console.log(buf1.compare(buf2, 5, 9, 0, 4));
- * // Prints: 0
- * console.log(buf1.compare(buf2, 0, 6, 4));
- * // Prints: -1
- * console.log(buf1.compare(buf2, 5, 6, 5));
- * // Prints: 1
- * ```
- *
- * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
- * @since v0.11.13
- * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
- * @param [targetStart=0] The offset within `target` at which to begin comparison.
- * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
- * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
- * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
- */
- compare(
- target: Uint8Array,
- targetStart?: number,
- targetEnd?: number,
- sourceStart?: number,
- sourceEnd?: number,
- ): -1 | 0 | 1;
- /**
- * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
- *
- * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available
- * for all TypedArrays, including Node.js `Buffer`s, although it takes
- * different function arguments.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Create two `Buffer` instances.
- * const buf1 = Buffer.allocUnsafe(26);
- * const buf2 = Buffer.allocUnsafe(26).fill('!');
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf1[i] = i + 97;
- * }
- *
- * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`.
- * buf1.copy(buf2, 8, 16, 20);
- * // This is equivalent to:
- * // buf2.set(buf1.subarray(16, 20), 8);
- *
- * console.log(buf2.toString('ascii', 0, 25));
- * // Prints: !!!!!!!!qrst!!!!!!!!!!!!!
- * ```
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Create a `Buffer` and copy data from one region to an overlapping region
- * // within the same `Buffer`.
- *
- * const buf = Buffer.allocUnsafe(26);
- *
- * for (let i = 0; i < 26; i++) {
- * // 97 is the decimal ASCII value for 'a'.
- * buf[i] = i + 97;
- * }
- *
- * buf.copy(buf, 0, 4, 10);
- *
- * console.log(buf.toString());
- * // Prints: efghijghijklmnopqrstuvwxyz
- * ```
- * @since v0.1.90
- * @param target A `Buffer` or {@link Uint8Array} to copy into.
- * @param [targetStart=0] The offset within `target` at which to begin writing.
- * @param [sourceStart=0] The offset within `buf` from which to begin copying.
- * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
- * @return The number of bytes copied.
- */
- copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigInt64BE(0x0102030405060708n, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigInt64BE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigInt64LE(0x0102030405060708n, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigInt64LE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian.
- *
- * This function is also available under the `writeBigUint64BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigUInt64BE(0xdecafafecacefaden, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigUInt64BE(value: bigint, offset?: number): number;
- /**
- * @alias Buffer.writeBigUInt64BE
- * @since v14.10.0, v12.19.0
- */
- writeBigUint64BE(value: bigint, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeBigUInt64LE(0xdecafafecacefaden, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- *
- * This function is also available under the `writeBigUint64LE` alias.
- * @since v12.0.0, v10.20.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeBigUInt64LE(value: bigint, offset?: number): number;
- /**
- * @alias Buffer.writeBigUInt64LE
- * @since v14.10.0, v12.19.0
- */
- writeBigUint64LE(value: bigint, offset?: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than an unsigned integer.
- *
- * This function is also available under the `writeUintLE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeUIntLE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeUIntLE(value: number, offset: number, byteLength: number): number;
- /**
- * @alias Buffer.writeUIntLE
- * @since v14.9.0, v12.19.0
- */
- writeUintLE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than an unsigned integer.
- *
- * This function is also available under the `writeUintBE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeUIntBE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeUIntBE(value: number, offset: number, byteLength: number): number;
- /**
- * @alias Buffer.writeUIntBE
- * @since v14.9.0, v12.19.0
- */
- writeUintBE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined
- * when `value` is anything other than a signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeIntLE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeIntLE(value: number, offset: number, byteLength: number): number;
- /**
- * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a
- * signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(6);
- *
- * buf.writeIntBE(0x1234567890ab, 0, 6);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`.
- * @return `offset` plus the number of bytes written.
- */
- writeIntBE(value: number, offset: number, byteLength: number): number;
- /**
- * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readBigUint64BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
- *
- * console.log(buf.readBigUInt64BE(0));
- * // Prints: 4294967295n
- * ```
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigUInt64BE(offset?: number): bigint;
- /**
- * @alias Buffer.readBigUInt64BE
- * @since v14.10.0, v12.19.0
- */
- readBigUint64BE(offset?: number): bigint;
- /**
- * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readBigUint64LE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]);
- *
- * console.log(buf.readBigUInt64LE(0));
- * // Prints: 18446744069414584320n
- * ```
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigUInt64LE(offset?: number): bigint;
- /**
- * @alias Buffer.readBigUInt64LE
- * @since v14.10.0, v12.19.0
- */
- readBigUint64LE(offset?: number): bigint;
- /**
- * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed
- * values.
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigInt64BE(offset?: number): bigint;
- /**
- * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed
- * values.
- * @since v12.0.0, v10.20.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
- */
- readBigInt64LE(offset?: number): bigint;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting
- * up to 48 bits of accuracy.
- *
- * This function is also available under the `readUintLE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readUIntLE(0, 6).toString(16));
- * // Prints: ab9078563412
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readUIntLE(offset: number, byteLength: number): number;
- /**
- * @alias Buffer.readUIntLE
- * @since v14.9.0, v12.19.0
- */
- readUintLE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting
- * up to 48 bits of accuracy.
- *
- * This function is also available under the `readUintBE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readUIntBE(0, 6).toString(16));
- * // Prints: 1234567890ab
- * console.log(buf.readUIntBE(1, 6).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readUIntBE(offset: number, byteLength: number): number;
- /**
- * @alias Buffer.readUIntBE
- * @since v14.9.0, v12.19.0
- */
- readUintBE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value
- * supporting up to 48 bits of accuracy.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readIntLE(0, 6).toString(16));
- * // Prints: -546f87a9cbee
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readIntLE(offset: number, byteLength: number): number;
- /**
- * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value
- * supporting up to 48 bits of accuracy.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]);
- *
- * console.log(buf.readIntBE(0, 6).toString(16));
- * // Prints: 1234567890ab
- * console.log(buf.readIntBE(1, 6).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * console.log(buf.readIntBE(1, 0).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.
- * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`.
- */
- readIntBE(offset: number, byteLength: number): number;
- /**
- * Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
- *
- * This function is also available under the `readUint8` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([1, -2]);
- *
- * console.log(buf.readUInt8(0));
- * // Prints: 1
- * console.log(buf.readUInt8(1));
- * // Prints: 254
- * console.log(buf.readUInt8(2));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
- */
- readUInt8(offset?: number): number;
- /**
- * @alias Buffer.readUInt8
- * @since v14.9.0, v12.19.0
- */
- readUint8(offset?: number): number;
- /**
- * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
- *
- * This function is also available under the `readUint16LE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56]);
- *
- * console.log(buf.readUInt16LE(0).toString(16));
- * // Prints: 3412
- * console.log(buf.readUInt16LE(1).toString(16));
- * // Prints: 5634
- * console.log(buf.readUInt16LE(2).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readUInt16LE(offset?: number): number;
- /**
- * @alias Buffer.readUInt16LE
- * @since v14.9.0, v12.19.0
- */
- readUint16LE(offset?: number): number;
- /**
- * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint16BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56]);
- *
- * console.log(buf.readUInt16BE(0).toString(16));
- * // Prints: 1234
- * console.log(buf.readUInt16BE(1).toString(16));
- * // Prints: 3456
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readUInt16BE(offset?: number): number;
- /**
- * @alias Buffer.readUInt16BE
- * @since v14.9.0, v12.19.0
- */
- readUint16BE(offset?: number): number;
- /**
- * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint32LE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
- *
- * console.log(buf.readUInt32LE(0).toString(16));
- * // Prints: 78563412
- * console.log(buf.readUInt32LE(1).toString(16));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readUInt32LE(offset?: number): number;
- /**
- * @alias Buffer.readUInt32LE
- * @since v14.9.0, v12.19.0
- */
- readUint32LE(offset?: number): number;
- /**
- * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * This function is also available under the `readUint32BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]);
- *
- * console.log(buf.readUInt32BE(0).toString(16));
- * // Prints: 12345678
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readUInt32BE(offset?: number): number;
- /**
- * @alias Buffer.readUInt32BE
- * @since v14.9.0, v12.19.0
- */
- readUint32BE(offset?: number): number;
- /**
- * Reads a signed 8-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([-1, 5]);
- *
- * console.log(buf.readInt8(0));
- * // Prints: -1
- * console.log(buf.readInt8(1));
- * // Prints: 5
- * console.log(buf.readInt8(2));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.0
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
- */
- readInt8(offset?: number): number;
- /**
- * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0, 5]);
- *
- * console.log(buf.readInt16LE(0));
- * // Prints: 1280
- * console.log(buf.readInt16LE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readInt16LE(offset?: number): number;
- /**
- * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0, 5]);
- *
- * console.log(buf.readInt16BE(0));
- * // Prints: 5
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
- */
- readInt16BE(offset?: number): number;
- /**
- * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0, 0, 0, 5]);
- *
- * console.log(buf.readInt32LE(0));
- * // Prints: 83886080
- * console.log(buf.readInt32LE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readInt32LE(offset?: number): number;
- /**
- * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`.
- *
- * Integers read from a `Buffer` are interpreted as two's complement signed values.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([0, 0, 0, 5]);
- *
- * console.log(buf.readInt32BE(0));
- * // Prints: 5
- * ```
- * @since v0.5.5
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readInt32BE(offset?: number): number;
- /**
- * Reads a 32-bit, little-endian float from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4]);
- *
- * console.log(buf.readFloatLE(0));
- * // Prints: 1.539989614439558e-36
- * console.log(buf.readFloatLE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readFloatLE(offset?: number): number;
- /**
- * Reads a 32-bit, big-endian float from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4]);
- *
- * console.log(buf.readFloatBE(0));
- * // Prints: 2.387939260590663e-38
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
- */
- readFloatBE(offset?: number): number;
- /**
- * Reads a 64-bit, little-endian double from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
- *
- * console.log(buf.readDoubleLE(0));
- * // Prints: 5.447603722011605e-270
- * console.log(buf.readDoubleLE(1));
- * // Throws ERR_OUT_OF_RANGE.
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
- */
- readDoubleLE(offset?: number): number;
- /**
- * Reads a 64-bit, big-endian double from `buf` at the specified `offset`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
- *
- * console.log(buf.readDoubleBE(0));
- * // Prints: 8.20788039913184e-304
- * ```
- * @since v0.11.15
- * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
- */
- readDoubleBE(offset?: number): number;
- reverse(): this;
- /**
- * Interprets `buf` as an array of unsigned 16-bit integers and swaps the
- * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap16();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap16();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- *
- * One convenient use of `buf.swap16()` is to perform a fast in-place conversion
- * between UTF-16 little-endian and UTF-16 big-endian:
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le');
- * buf.swap16(); // Convert to big-endian UTF-16 text.
- * ```
- * @since v5.10.0
- * @return A reference to `buf`.
- */
- swap16(): this;
- /**
- * Interprets `buf` as an array of unsigned 32-bit integers and swaps the
- * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap32();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap32();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- * @since v5.10.0
- * @return A reference to `buf`.
- */
- swap32(): this;
- /**
- * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
- * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]);
- *
- * console.log(buf1);
- * // Prints:
- *
- * buf1.swap64();
- *
- * console.log(buf1);
- * // Prints:
- *
- * const buf2 = Buffer.from([0x1, 0x2, 0x3]);
- *
- * buf2.swap64();
- * // Throws ERR_INVALID_BUFFER_SIZE.
- * ```
- * @since v6.3.0
- * @return A reference to `buf`.
- */
- swap64(): this;
- /**
- * Writes `value` to `buf` at the specified `offset`. `value` must be a
- * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
- * other than an unsigned 8-bit integer.
- *
- * This function is also available under the `writeUint8` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt8(0x3, 0);
- * buf.writeUInt8(0x4, 1);
- * buf.writeUInt8(0x23, 2);
- * buf.writeUInt8(0x42, 3);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt8(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt8
- * @since v14.9.0, v12.19.0
- */
- writeUint8(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
- * anything other than an unsigned 16-bit integer.
- *
- * This function is also available under the `writeUint16LE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt16LE(0xdead, 0);
- * buf.writeUInt16LE(0xbeef, 2);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt16LE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt16LE
- * @since v14.9.0, v12.19.0
- */
- writeUint16LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
- * unsigned 16-bit integer.
- *
- * This function is also available under the `writeUint16BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt16BE(0xdead, 0);
- * buf.writeUInt16BE(0xbeef, 2);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt16BE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt16BE
- * @since v14.9.0, v12.19.0
- */
- writeUint16BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
- * anything other than an unsigned 32-bit integer.
- *
- * This function is also available under the `writeUint32LE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt32LE(0xfeedface, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt32LE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt32LE
- * @since v14.9.0, v12.19.0
- */
- writeUint32LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
- * unsigned 32-bit integer.
- *
- * This function is also available under the `writeUint32BE` alias.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeUInt32BE(0xfeedface, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeUInt32BE(value: number, offset?: number): number;
- /**
- * @alias Buffer.writeUInt32BE
- * @since v14.9.0, v12.19.0
- */
- writeUint32BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset`. `value` must be a valid
- * signed 8-bit integer. Behavior is undefined when `value` is anything other than
- * a signed 8-bit integer.
- *
- * `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt8(2, 0);
- * buf.writeInt8(-2, 1);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.0
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt8(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 16-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt16LE(0x0304, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt16LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 16-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(2);
- *
- * buf.writeInt16BE(0x0102, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt16BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 32-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeInt32LE(0x05060708, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt32LE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
- * anything other than a signed 32-bit integer.
- *
- * The `value` is interpreted and written as a two's complement signed integer.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeInt32BE(0x01020304, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.5.5
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeInt32BE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is
- * undefined when `value` is anything other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeFloatLE(0xcafebabe, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeFloatLE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is
- * undefined when `value` is anything other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(4);
- *
- * buf.writeFloatBE(0xcafebabe, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
- * @return `offset` plus the number of bytes written.
- */
- writeFloatBE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
- * other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeDoubleLE(123.456, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeDoubleLE(value: number, offset?: number): number;
- /**
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
- * other than a JavaScript number.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(8);
- *
- * buf.writeDoubleBE(123.456, 0);
- *
- * console.log(buf);
- * // Prints:
- * ```
- * @since v0.11.15
- * @param value Number to be written to `buf`.
- * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
- * @return `offset` plus the number of bytes written.
- */
- writeDoubleBE(value: number, offset?: number): number;
- /**
- * Fills `buf` with the specified `value`. If the `offset` and `end` are not given,
- * the entire `buf` will be filled:
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Fill a `Buffer` with the ASCII character 'h'.
- *
- * const b = Buffer.allocUnsafe(50).fill('h');
- *
- * console.log(b.toString());
- * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
- *
- * // Fill a buffer with empty string
- * const c = Buffer.allocUnsafe(5).fill('');
- *
- * console.log(c.fill(''));
- * // Prints:
- * ```
- *
- * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or
- * integer. If the resulting integer is greater than `255` (decimal), `buf` will be
- * filled with `value & 255`.
- *
- * If the final write of a `fill()` operation falls on a multi-byte character,
- * then only the bytes of that character that fit into `buf` are written:
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * // Fill a `Buffer` with character that takes up two bytes in UTF-8.
- *
- * console.log(Buffer.allocUnsafe(5).fill('\u0222'));
- * // Prints:
- * ```
- *
- * If `value` contains invalid characters, it is truncated; if no valid
- * fill data remains, an exception is thrown:
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.allocUnsafe(5);
- *
- * console.log(buf.fill('a'));
- * // Prints:
- * console.log(buf.fill('aazz', 'hex'));
- * // Prints:
- * console.log(buf.fill('zz', 'hex'));
- * // Throws an exception.
- * ```
- * @since v0.5.0
- * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`.
- * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
- * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
- * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
- * @return A reference to `buf`.
- */
- fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
- fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this;
- fill(value: string | Uint8Array | number, encoding: BufferEncoding): this;
- /**
- * If `value` is:
- *
- * * a string, `value` is interpreted according to the character encoding in `encoding`.
- * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
- * To compare a partial `Buffer`, use `buf.subarray`.
- * * a number, `value` will be interpreted as an unsigned 8-bit integer
- * value between `0` and `255`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('this is a buffer');
- *
- * console.log(buf.indexOf('this'));
- * // Prints: 0
- * console.log(buf.indexOf('is'));
- * // Prints: 2
- * console.log(buf.indexOf(Buffer.from('a buffer')));
- * // Prints: 8
- * console.log(buf.indexOf(97));
- * // Prints: 8 (97 is the decimal ASCII value for 'a')
- * console.log(buf.indexOf(Buffer.from('a buffer example')));
- * // Prints: -1
- * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8)));
- * // Prints: 8
- *
- * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
- *
- * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le'));
- * // Prints: 4
- * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le'));
- * // Prints: 6
- * ```
- *
- * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
- * an integer between 0 and 255.
- *
- * If `byteOffset` is not a number, it will be coerced to a number. If the result
- * of coercion is `NaN` or `0`, then the entire buffer will be searched. This
- * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf).
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const b = Buffer.from('abcdef');
- *
- * // Passing a value that's a number, but not a valid byte.
- * // Prints: 2, equivalent to searching for 99 or 'c'.
- * console.log(b.indexOf(99.9));
- * console.log(b.indexOf(256 + 99));
- *
- * // Passing a byteOffset that coerces to NaN or 0.
- * // Prints: 1, searching the whole buffer.
- * console.log(b.indexOf('b', undefined));
- * console.log(b.indexOf('b', {}));
- * console.log(b.indexOf('b', null));
- * console.log(b.indexOf('b', []));
- * ```
- *
- * If `value` is an empty string or empty `Buffer` and `byteOffset` is less
- * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
- * @since v1.5.0
- * @param value What to search for.
- * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
- * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
- */
- indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
- indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
- /**
- * Identical to `buf.indexOf()`, except the last occurrence of `value` is found
- * rather than the first occurrence.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('this buffer is a buffer');
- *
- * console.log(buf.lastIndexOf('this'));
- * // Prints: 0
- * console.log(buf.lastIndexOf('buffer'));
- * // Prints: 17
- * console.log(buf.lastIndexOf(Buffer.from('buffer')));
- * // Prints: 17
- * console.log(buf.lastIndexOf(97));
- * // Prints: 15 (97 is the decimal ASCII value for 'a')
- * console.log(buf.lastIndexOf(Buffer.from('yolo')));
- * // Prints: -1
- * console.log(buf.lastIndexOf('buffer', 5));
- * // Prints: 5
- * console.log(buf.lastIndexOf('buffer', 4));
- * // Prints: -1
- *
- * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le');
- *
- * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le'));
- * // Prints: 6
- * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le'));
- * // Prints: 4
- * ```
- *
- * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
- * an integer between 0 and 255.
- *
- * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
- * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer.
- * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf).
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const b = Buffer.from('abcdef');
- *
- * // Passing a value that's a number, but not a valid byte.
- * // Prints: 2, equivalent to searching for 99 or 'c'.
- * console.log(b.lastIndexOf(99.9));
- * console.log(b.lastIndexOf(256 + 99));
- *
- * // Passing a byteOffset that coerces to NaN.
- * // Prints: 1, searching the whole buffer.
- * console.log(b.lastIndexOf('b', undefined));
- * console.log(b.lastIndexOf('b', {}));
- *
- * // Passing a byteOffset that coerces to 0.
- * // Prints: -1, equivalent to passing 0.
- * console.log(b.lastIndexOf('b', null));
- * console.log(b.lastIndexOf('b', []));
- * ```
- *
- * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
- * @since v6.0.0
- * @param value What to search for.
- * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
- * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
- */
- lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
- lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number;
- /**
- * Equivalent to `buf.indexOf() !== -1`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- *
- * const buf = Buffer.from('this is a buffer');
- *
- * console.log(buf.includes('this'));
- * // Prints: true
- * console.log(buf.includes('is'));
- * // Prints: true
- * console.log(buf.includes(Buffer.from('a buffer')));
- * // Prints: true
- * console.log(buf.includes(97));
- * // Prints: true (97 is the decimal ASCII value for 'a')
- * console.log(buf.includes(Buffer.from('a buffer example')));
- * // Prints: false
- * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8)));
- * // Prints: true
- * console.log(buf.includes('this', 4));
- * // Prints: false
- * ```
- * @since v5.3.0
- * @param value What to search for.
- * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
- * @param [encoding='utf8'] If `value` is a string, this is its encoding.
- * @return `true` if `value` was found in `buf`, `false` otherwise.
- */
- includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
- includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
- }
- var Buffer: BufferConstructor;
- }
- // #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;
- bytes(): Promise;
- slice(start?: number, end?: number, contentType?: string): Blob;
- stream(): ReadableStream;
- text(): Promise;
- }
- 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";
-}
diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts
deleted file mode 100644
index d71fed1..0000000
--- a/node_modules/@types/node/child_process.d.ts
+++ /dev/null
@@ -1,1433 +0,0 @@
-/**
- * The `node:child_process` module provides the ability to spawn subprocesses in
- * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
- * is primarily provided by the {@link spawn} function:
- *
- * ```js
- * import { spawn } from 'node:child_process';
- * 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}`);
- * ```
- *
- * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
- * the parent Node.js process and the spawned subprocess. These pipes have
- * limited (and platform-specific) capacity. If the subprocess writes to
- * stdout in excess of that limit without the output being captured, the
- * subprocess blocks, waiting for the pipe buffer to accept more data. This is
- * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
- *
- * The command lookup is performed using the `options.env.PATH` environment
- * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
- * used. If `options.env` is set without `PATH`, lookup on Unix is performed
- * on a default search path search of `/usr/bin:/bin` (see your operating system's
- * manual for execvpe/execvp), on Windows the current processes environment
- * variable `PATH` is used.
- *
- * On Windows, environment variables are case-insensitive. Node.js
- * lexicographically sorts the `env` keys and uses the first one that
- * case-insensitively matches. Only first (in lexicographic order) entry will be
- * passed to the subprocess. This might lead to issues on Windows when passing
- * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`.
- *
- * The {@link spawn} method spawns the child process asynchronously,
- * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
- * the event loop until the spawned process either exits or is terminated.
- *
- * For convenience, the `node:child_process` module provides a handful of
- * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
- * top of {@link spawn} or {@link spawnSync}.
- *
- * * {@link exec}: spawns a shell and runs a command within that
- * shell, passing the `stdout` and `stderr` to a callback function when
- * complete.
- * * {@link execFile}: similar to {@link exec} except
- * that it spawns the command directly without first spawning a shell by
- * default.
- * * {@link fork}: spawns a new Node.js process and invokes a
- * specified module with an IPC communication channel established that allows
- * sending messages between parent and child.
- * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
- * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
- *
- * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
- * the synchronous methods can have significant impact on performance due to
- * stalling the event loop while spawned processes complete.
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/child_process.js)
- */
-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 {}
- // return this object when stdio option is undefined or not specified
- interface ChildProcessWithoutNullStreams extends ChildProcess {
- stdin: Writable;
- stdout: Readable;
- stderr: Readable;
- readonly stdio: [
- Writable,
- Readable,
- Readable,
- // stderr
- Readable | Writable | null | undefined,
- // extra, no modification
- Readable | Writable | null | undefined, // extra, no modification
- ];
- }
- // return this object when stdio option is a tuple of 3
- interface ChildProcessByStdio
- extends ChildProcess
- {
- stdin: I;
- stdout: O;
- stderr: E;
- readonly stdio: [
- I,
- O,
- E,
- Readable | Writable | null | undefined,
- // extra, no modification
- Readable | Writable | null | undefined, // extra, no modification
- ];
- }
- interface Control extends EventEmitter {
- ref(): void;
- unref(): void;
- }
- interface MessageOptions {
- keepOpen?: boolean | undefined;
- }
- type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
- type StdioOptions = IOType | Array;
- type SerializationType = "json" | "advanced";
- interface MessagingOptions extends Abortable {
- /**
- * Specify the kind of serialization used for sending messages between processes.
- * @default 'json'
- */
- serialization?: SerializationType | undefined;
- /**
- * The signal value to be used when the spawned process will be killed by the abort signal.
- * @default 'SIGTERM'
- */
- killSignal?: NodeJS.Signals | number | undefined;
- /**
- * In milliseconds the maximum amount of time the process is allowed to run.
- */
- timeout?: number | undefined;
- }
- interface ProcessEnvOptions {
- uid?: number | undefined;
- gid?: number | undefined;
- cwd?: string | URL | undefined;
- env?: NodeJS.ProcessEnv | undefined;
- }
- interface CommonOptions extends ProcessEnvOptions {
- /**
- * @default false
- */
- windowsHide?: boolean | undefined;
- /**
- * @default 0
- */
- timeout?: number | undefined;
- }
- interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
- argv0?: string | undefined;
- /**
- * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
- * If passed as an array, the first element is used for `stdin`, the second for
- * `stdout`, and the third for `stderr`. A fourth element can be used to
- * specify the `stdio` behavior beyond the standard streams. See
- * {@link ChildProcess.stdio} for more information.
- *
- * @default 'pipe'
- */
- stdio?: StdioOptions | undefined;
- shell?: boolean | string | undefined;
- windowsVerbatimArguments?: boolean | undefined;
- }
- interface SpawnOptions extends CommonSpawnOptions {
- detached?: boolean | undefined;
- }
- interface SpawnOptionsWithoutStdio extends SpawnOptions {
- stdio?: StdioPipeNamed | StdioPipe[] | undefined;
- }
- type StdioNull = "inherit" | "ignore" | Stream;
- type StdioPipeNamed = "pipe" | "overlapped";
- type StdioPipe = undefined | null | StdioPipeNamed;
- interface SpawnOptionsWithStdioTuple<
- Stdin extends StdioNull | StdioPipe,
- Stdout extends StdioNull | StdioPipe,
- Stderr extends StdioNull | StdioPipe,
- > extends SpawnOptions {
- stdio: [Stdin, Stdout, Stderr];
- }
- /**
- * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults
- * to an empty array.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- *
- * A third argument may be used to specify additional options, with these defaults:
- *
- * ```js
- * const defaults = {
- * cwd: undefined,
- * env: process.env,
- * };
- * ```
- *
- * Use `cwd` to specify the working directory from which the process is spawned.
- * If not given, the default is to inherit the current working directory. If given,
- * but the path does not exist, the child process emits an `ENOENT` error
- * and exits immediately. `ENOENT` is also emitted when the command
- * does not exist.
- *
- * Use `env` to specify environment variables that will be visible to the new
- * process, the default is `process.env`.
- *
- * `undefined` values in `env` will be ignored.
- *
- * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
- * exit code:
- *
- * ```js
- * import { spawn } from 'node:child_process';
- * 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,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(command: string, options: SpawnOptions): ChildProcess;
- // overloads of spawn with 'args'
- function spawn(
- command: string,
- args?: readonly string[],
- options?: SpawnOptionsWithoutStdio,
- ): ChildProcessWithoutNullStreams;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(
- command: string,
- args: readonly string[],
- options: SpawnOptionsWithStdioTuple,
- ): ChildProcessByStdio;
- function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess;
- interface ExecOptions extends CommonOptions {
- shell?: string | undefined;
- signal?: AbortSignal | undefined;
- maxBuffer?: number | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- encoding?: string | null | undefined;
- }
- interface ExecOptionsWithStringEncoding extends ExecOptions {
- encoding?: BufferEncoding | undefined;
- }
- interface ExecOptionsWithBufferEncoding extends ExecOptions {
- encoding: "buffer" | null; // specify `null`.
- }
- // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
- interface ExecException extends Error {
- cmd?: string;
- killed?: boolean;
- code?: number;
- signal?: NodeJS.Signals;
- stdout?: string;
- stderr?: string;
- }
- /**
- * Spawns a shell then executes the `command` within that shell, buffering any
- * generated output. The `command` string passed to the exec function is processed
- * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
- * need to be dealt with accordingly:
- *
- * ```js
- * import { exec } from 'node:child_process';
- *
- * exec('"/path/to/test file/test.sh" arg1 arg2');
- * // Double quotes are used so that the space in the path is not interpreted as
- * // a delimiter of multiple arguments.
- *
- * exec('echo "The \\$HOME variable is $HOME"');
- * // The $HOME variable is escaped in the first instance, but not in the second.
- * ```
- *
- * **Never pass unsanitized user input to this function. Any input containing shell**
- * **metacharacters may be used to trigger arbitrary command execution.**
- *
- * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The
- * `error.code` property will be
- * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the
- * process.
- *
- * The `stdout` and `stderr` arguments passed to the callback will contain the
- * stdout and stderr output of the child process. By default, Node.js will decode
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
- * can be used to specify the character encoding used to decode the stdout and
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
- * encoding, `Buffer` objects will be passed to the callback instead.
- *
- * ```js
- * import { exec } from 'node:child_process';
- * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
- * if (error) {
- * console.error(`exec error: ${error}`);
- * return;
- * }
- * console.log(`stdout: ${stdout}`);
- * console.error(`stderr: ${stderr}`);
- * });
- * ```
- *
- * If `timeout` is greater than `0`, the parent will send the signal
- * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
- * child runs longer than `timeout` milliseconds.
- *
- * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
- * the existing process and uses a shell to execute the command.
- *
- * If this method is invoked as its `util.promisify()` ed version, it returns
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
- * case of an error (including any error resulting in an exit code other than 0), a
- * rejected promise is returned, with the same `error` object given in the
- * callback, but with two additional properties `stdout` and `stderr`.
- *
- * ```js
- * import util from 'node:util';
- * import child_process from 'node:child_process';
- * const exec = util.promisify(child_process.exec);
- *
- * async function lsExample() {
- * const { stdout, stderr } = await exec('ls');
- * console.log('stdout:', stdout);
- * console.error('stderr:', stderr);
- * }
- * lsExample();
- * ```
- *
- * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
- * the error passed to the callback will be an `AbortError`:
- *
- * ```js
- * import { exec } from 'node:child_process';
- * const controller = new AbortController();
- * const { signal } = controller;
- * const child = exec('grep ssh', { signal }, (error) => {
- * console.error(error); // an AbortError
- * });
- * controller.abort();
- * ```
- * @since v0.1.90
- * @param command The command to run, with space-separated arguments.
- * @param callback called with the output when process terminates.
- */
- function exec(
- command: string,
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
- ): ChildProcess;
- // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
- function exec(
- command: string,
- options: ExecOptionsWithBufferEncoding,
- callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
- ): ChildProcess;
- // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
- function exec(
- command: string,
- options: ExecOptionsWithStringEncoding,
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
- ): ChildProcess;
- // fallback if nothing else matches. Worst case is always `string | Buffer`.
- function exec(
- command: string,
- options: ExecOptions | undefined | null,
- callback?: (
- error: ExecException | null,
- stdout: string | NonSharedBuffer,
- stderr: string | NonSharedBuffer,
- ) => void,
- ): ChildProcess;
- interface PromiseWithChild extends Promise {
- child: ChildProcess;
- }
- namespace exec {
- function __promisify__(command: string): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- command: string,
- options: ExecOptionsWithBufferEncoding,
- ): PromiseWithChild<{
- stdout: NonSharedBuffer;
- stderr: NonSharedBuffer;
- }>;
- function __promisify__(
- command: string,
- options: ExecOptionsWithStringEncoding,
- ): PromiseWithChild<{
- stdout: string;
- stderr: string;
- }>;
- function __promisify__(
- command: string,
- options: ExecOptions | undefined | null,
- ): PromiseWithChild<{
- stdout: string | NonSharedBuffer;
- stderr: string | NonSharedBuffer;
- }>;
- }
- interface ExecFileOptions extends CommonOptions, Abortable {
- maxBuffer?: number | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- windowsVerbatimArguments?: boolean | undefined;
- shell?: boolean | string | undefined;
- signal?: AbortSignal | undefined;
- encoding?: string | null | undefined;
- }
- interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
- encoding?: BufferEncoding | undefined;
- }
- interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
- encoding: "buffer" | null;
- }
- /** @deprecated Use `ExecFileOptions` instead. */
- interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
- // TODO: execFile exceptions can take many forms... this accurately describes none of them
- type ExecFileException =
- & Omit
- & Omit
- & { code?: string | number | null };
- /**
- * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
- * executable `file` is spawned directly as a new process making it slightly more
- * efficient than {@link exec}.
- *
- * The same options as {@link exec} are supported. Since a shell is
- * not spawned, behaviors such as I/O redirection and file globbing are not
- * supported.
- *
- * ```js
- * import { execFile } from 'node:child_process';
- * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
- * if (error) {
- * throw error;
- * }
- * console.log(stdout);
- * });
- * ```
- *
- * The `stdout` and `stderr` arguments passed to the callback will contain the
- * stdout and stderr output of the child process. By default, Node.js will decode
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
- * can be used to specify the character encoding used to decode the stdout and
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
- * encoding, `Buffer` objects will be passed to the callback instead.
- *
- * If this method is invoked as its `util.promisify()` ed version, it returns
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
- * case of an error (including any error resulting in an exit code other than 0), a
- * rejected promise is returned, with the same `error` object given in the
- * callback, but with two additional properties `stdout` and `stderr`.
- *
- * ```js
- * import util from 'node:util';
- * 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 {
- pid: number;
- output: Array;
- stdout: T;
- stderr: T;
- status: number | null;
- signal: NodeJS.Signals | null;
- error?: Error;
- }
- /**
- * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
- * until the child process has fully closed. When a timeout has been encountered
- * and `killSignal` is sent, the method won't return until the process has
- * completely exited. If the process intercepts and handles the `SIGTERM` signal
- * and doesn't exit, the parent process will wait until the child process has
- * exited.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- * @since v0.11.12
- * @param command The command to run.
- * @param args List of string arguments.
- */
- function spawnSync(command: string): SpawnSyncReturns;
- function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns;
- function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns;
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns;
- function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns;
- function spawnSync(
- command: string,
- args: readonly string[],
- options: SpawnSyncOptionsWithStringEncoding,
- ): SpawnSyncReturns;
- function spawnSync(
- command: string,
- args: readonly string[],
- options: SpawnSyncOptionsWithBufferEncoding,
- ): SpawnSyncReturns;
- function spawnSync(
- command: string,
- args?: readonly string[],
- options?: SpawnSyncOptions,
- ): SpawnSyncReturns;
- interface CommonExecOptions extends CommonOptions {
- input?: string | NodeJS.ArrayBufferView | undefined;
- /**
- * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
- * If passed as an array, the first element is used for `stdin`, the second for
- * `stdout`, and the third for `stderr`. A fourth element can be used to
- * specify the `stdio` behavior beyond the standard streams. See
- * {@link ChildProcess.stdio} for more information.
- *
- * @default 'pipe'
- */
- stdio?: StdioOptions | undefined;
- killSignal?: NodeJS.Signals | number | undefined;
- maxBuffer?: number | undefined;
- encoding?: BufferEncoding | "buffer" | null | undefined;
- }
- interface ExecSyncOptions extends CommonExecOptions {
- shell?: string | undefined;
- }
- interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
- encoding: BufferEncoding;
- }
- interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
- encoding?: "buffer" | null | undefined;
- }
- /**
- * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
- * until the child process has fully closed. When a timeout has been encountered
- * and `killSignal` is sent, the method won't return until the process has
- * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process
- * has exited.
- *
- * If the process times out or has a non-zero exit code, this method will throw.
- * The `Error` object will contain the entire result from {@link spawnSync}.
- *
- * **Never pass unsanitized user input to this function. Any input containing shell**
- * **metacharacters may be used to trigger arbitrary command execution.**
- * @since v0.11.12
- * @param command The command to run.
- * @return The stdout from the command.
- */
- function execSync(command: string): NonSharedBuffer;
- function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
- function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
- function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
- interface ExecFileSyncOptions extends CommonExecOptions {
- shell?: boolean | string | undefined;
- }
- interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
- encoding: BufferEncoding;
- }
- interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
- encoding?: "buffer" | null | undefined; // specify `null`.
- }
- /**
- * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
- * return until the child process has fully closed. When a timeout has been
- * encountered and `killSignal` is sent, the method won't return until the process
- * has completely exited.
- *
- * If the child process intercepts and handles the `SIGTERM` signal and
- * does not exit, the parent process will still wait until the child process has
- * exited.
- *
- * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
- *
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
- * **function. Any input containing shell metacharacters may be used to trigger**
- * **arbitrary command execution.**
- * @since v0.11.12
- * @param file The name or path of the executable file to run.
- * @param args List of string arguments.
- * @return The stdout from the command.
- */
- function execFileSync(file: string): NonSharedBuffer;
- function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
- function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
- function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
- function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
- function execFileSync(
- file: string,
- args: readonly string[],
- options: ExecFileSyncOptionsWithStringEncoding,
- ): string;
- function execFileSync(
- file: string,
- args: readonly string[],
- options: ExecFileSyncOptionsWithBufferEncoding,
- ): NonSharedBuffer;
- function execFileSync(
- file: string,
- args?: readonly string[],
- options?: ExecFileSyncOptions,
- ): string | NonSharedBuffer;
-}
-declare module "child_process" {
- export * from "node:child_process";
-}
diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts
deleted file mode 100644
index 4e5efbf..0000000
--- a/node_modules/@types/node/cluster.d.ts
+++ /dev/null
@@ -1,486 +0,0 @@
-/**
- * Clusters of Node.js processes can be used to run multiple instances of Node.js
- * that can distribute workloads among their application threads. When process isolation
- * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html)
- * module instead, which allows running multiple application threads within a single Node.js instance.
- *
- * The cluster module allows easy creation of child processes that all share
- * server ports.
- *
- * ```js
- * import cluster from 'node:cluster';
- * import http from 'node:http';
- * import { availableParallelism } from 'node:os';
- * import process from 'node:process';
- *
- * const numCPUs = availableParallelism();
- *
- * if (cluster.isPrimary) {
- * console.log(`Primary ${process.pid} is running`);
- *
- * // Fork workers.
- * for (let i = 0; i < numCPUs; i++) {
- * cluster.fork();
- * }
- *
- * cluster.on('exit', (worker, code, signal) => {
- * console.log(`worker ${worker.process.pid} died`);
- * });
- * } else {
- * // Workers can share any TCP connection
- * // In this case it is an HTTP server
- * http.createServer((req, res) => {
- * res.writeHead(200);
- * res.end('hello world\n');
- * }).listen(8000);
- *
- * console.log(`Worker ${process.pid} started`);
- * }
- * ```
- *
- * Running Node.js will now share port 8000 between the workers:
- *
- * ```console
- * $ node server.js
- * Primary 3596 is running
- * Worker 4324 started
- * Worker 4520 started
- * Worker 6056 started
- * Worker 5644 started
- * ```
- *
- * On Windows, it is not yet possible to set up a named pipe server in a worker.
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js)
- */
-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 {}
- 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 {
- /**
- * 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;
- readonly SCHED_NONE: number;
- readonly SCHED_RR: number;
- }
- }
- var cluster: cluster.Cluster;
- export = cluster;
-}
-declare module "cluster" {
- import cluster = require("node:cluster");
- export = cluster;
-}
diff --git a/node_modules/@types/node/compatibility/iterators.d.ts b/node_modules/@types/node/compatibility/iterators.d.ts
deleted file mode 100644
index 156e785..0000000
--- a/node_modules/@types/node/compatibility/iterators.d.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
-// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
-// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
-// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
-// if lib.esnext.iterator is loaded.
-// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
-
-// Placeholders for TS <5.6
-interface IteratorObject {}
-interface AsyncIteratorObject {}
-
-declare namespace NodeJS {
- // Populate iterator methods for TS <5.6
- interface Iterator extends globalThis.Iterator {}
- interface AsyncIterator extends globalThis.AsyncIterator {}
-
- // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
- type BuiltinIteratorReturn = ReturnType extends
- globalThis.Iterator ? TReturn
- : any;
-}
diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts
deleted file mode 100644
index 3943442..0000000
--- a/node_modules/@types/node/console.d.ts
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * The `node:console` module provides a simple debugging console that is similar to
- * the JavaScript console mechanism provided by web browsers.
- *
- * The module exports two specific components:
- *
- * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
- * [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
- *
- * _**Warning**_: The global console object's methods are neither consistently
- * synchronous like the browser APIs they resemble, nor are they consistently
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
- * more information.
- *
- * Example using the global `console`:
- *
- * ```js
- * console.log('hello world');
- * // Prints: hello world, to stdout
- * console.log('hello %s', 'world');
- * // Prints: hello world, to stdout
- * console.error(new Error('Whoops, something bad happened'));
- * // Prints error message and stack trace to stderr:
- * // Error: Whoops, something bad happened
- * // at [eval]:5:15
- * // at Script.runInThisContext (node:vm:132:18)
- * // at Object.runInThisContext (node:vm:309:38)
- * // at node:internal/process/execution:77:19
- * // at [eval]-wrapper:6:22
- * // at evalScript (node:internal/process/execution:76:60)
- * // at node:internal/main/eval_string:23:3
- *
- * const name = 'Will Robinson';
- * console.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to stderr
- * ```
- *
- * Example using the `Console` class:
- *
- * ```js
- * const out = getStreamSomehow();
- * const err = getStreamSomehow();
- * const myConsole = new console.Console(out, err);
- *
- * myConsole.log('hello world');
- * // Prints: hello world, to out
- * myConsole.log('hello %s', 'world');
- * // Prints: hello world, to out
- * myConsole.error(new Error('Whoops, something bad happened'));
- * // Prints: [Error: Whoops, something bad happened], to err
- *
- * const name = 'Will Robinson';
- * myConsole.warn(`Danger ${name}! Danger!`);
- * // Prints: Danger Will Robinson! Danger!, to err
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
- */
-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 | 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;
-}
diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts
deleted file mode 100644
index c24ad98..0000000
--- a/node_modules/@types/node/constants.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * @deprecated The `node:constants` module is deprecated. When requiring access to constants
- * relevant to specific Node.js builtin modules, developers should instead refer
- * to the `constants` property exposed by the relevant module. For instance,
- * `require('node:fs').constants` and `require('node:os').constants`.
- */
-declare module "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;
-}
diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts
deleted file mode 100644
index 15b46ce..0000000
--- a/node_modules/@types/node/crypto.d.ts
+++ /dev/null
@@ -1,4065 +0,0 @@
-/**
- * The `node:crypto` module provides cryptographic functionality that includes a
- * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
- * functions.
- *
- * ```js
- * const { createHmac } = await import('node:crypto');
- *
- * const secret = 'abcdefg';
- * const hash = createHmac('sha256', secret)
- * .update('I love cupcakes')
- * .digest('hex');
- * console.log(hash);
- * // Prints:
- * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
- * ```
- * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/crypto.js)
- */
-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.
- *
- * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects
- * should not use this element anymore.
- *
- * The `node:crypto` module provides the `Certificate` class for working with SPKAC
- * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC
- * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally.
- * @since v0.11.8
- */
- class Certificate {
- /**
- * ```js
- * const { Certificate } = await import('node:crypto');
- * const spkac = getSpkacSomehow();
- * const challenge = Certificate.exportChallenge(spkac);
- * console.log(challenge.toString('utf8'));
- * // Prints: the challenge as a UTF8 string
- * ```
- * @since v9.0.0
- * @param encoding The `encoding` of the `spkac` string.
- * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
- */
- static exportChallenge(spkac: BinaryLike): NonSharedBuffer;
- /**
- * ```js
- * const { Certificate } = await import('node:crypto');
- * const spkac = getSpkacSomehow();
- * const publicKey = Certificate.exportPublicKey(spkac);
- * console.log(publicKey);
- * // Prints: the public key as
- * ```
- * @since v9.0.0
- * @param encoding The `encoding` of the `spkac` string.
- * @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
- */
- static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
- /**
- * ```js
- * import { Buffer } from 'node:buffer';
- * const { Certificate } = await import('node:crypto');
- *
- * const spkac = getSpkacSomehow();
- * console.log(Certificate.verifySpkac(Buffer.from(spkac)));
- * // Prints: true or false
- * ```
- * @since v9.0.0
- * @param encoding The `encoding` of the `spkac` string.
- * @return `true` if the given `spkac` data structure is valid, `false` otherwise.
- */
- static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
- /**
- * @deprecated
- * @param spkac
- * @returns The challenge component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportChallenge(spkac: BinaryLike): NonSharedBuffer;
- /**
- * @deprecated
- * @param spkac
- * @param encoding The encoding of the spkac string.
- * @returns The public key component of the `spkac` data structure,
- * which includes a public key and a challenge.
- */
- exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
- /**
- * @deprecated
- * @param spkac
- * @returns `true` if the given `spkac` data structure is valid,
- * `false` otherwise.
- */
- verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
- }
- namespace constants {
- // https://nodejs.org/dist/latest-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 {
- type: T;
- format: Exclude;
- }
- interface PrivateKeyExportOptions {
- type: T;
- format: Exclude;
- cipher?: string | undefined;
- passphrase?: string | Buffer | undefined;
- }
- interface JwkKeyExportOptions {
- format: "jwk";
- }
- interface KeyPairExportOptions<
- TPublic extends PublicKeyExportType = PublicKeyExportType,
- TPrivate extends PrivateKeyExportType = PrivateKeyExportType,
- > {
- publicKeyEncoding?: PublicKeyExportOptions | JwkKeyExportOptions | undefined;
- privateKeyEncoding?: PrivateKeyExportOptions | JwkKeyExportOptions | undefined;
- }
- type KeyExportResult = T extends { format: infer F extends KeyFormat }
- ? { der: NonSharedBuffer; jwk: webcrypto.JsonWebKey; pem: string }[F]
- : Default;
- interface KeyPairExportResult {
- publicKey: KeyExportResult;
- privateKey: KeyExportResult;
- }
- type KeyPairExportCallback = (
- err: Error | null,
- publicKey: KeyExportResult,
- privateKey: KeyExportResult,
- ) => 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(options?: T): KeyExportResult;
- /**
- * 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;
- /**
- * Creates a predefined `DiffieHellmanGroup` key exchange object. The
- * supported groups are listed in the documentation for `DiffieHellmanGroup`.
- *
- * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
- * the keys (with `diffieHellman.setPublicKey()`, for example). The
- * advantage of using this method is that the parties do not have to
- * generate nor exchange a group modulus beforehand, saving both processor
- * and communication time.
- *
- * Example (obtaining a shared secret):
- *
- * ```js
- * const {
- * getDiffieHellman,
- * } = await import('node:crypto');
- * const alice = getDiffieHellman('modp14');
- * const bob = getDiffieHellman('modp14');
- *
- * alice.generateKeys();
- * bob.generateKeys();
- *
- * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex');
- * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex');
- *
- * // aliceSecret and bobSecret should be the same
- * console.log(aliceSecret === bobSecret);
- * ```
- * @since v0.7.5
- */
- function getDiffieHellman(groupName: string): DiffieHellmanGroup;
- /**
- * An alias for {@link getDiffieHellman}
- * @since v0.9.3
- */
- function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
- /**
- * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
- * implementation. A selected HMAC digest algorithm specified by `digest` is
- * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
- *
- * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set;
- * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be
- * thrown if any of the input arguments specify invalid values or types.
- *
- * The `iterations` argument must be a number set as high as possible. The
- * higher the number of iterations, the more secure the derived key will be,
- * but will take a longer amount of time to complete.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * ```js
- * const {
- * pbkdf2,
- * } = await import('node:crypto');
- *
- * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
- * });
- * ```
- *
- * An array of supported digest functions can be retrieved using {@link getHashes}.
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- * @since v0.5.5
- */
- function pbkdf2(
- password: BinaryLike,
- salt: BinaryLike,
- iterations: number,
- keylen: number,
- digest: string,
- callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
- ): void;
- /**
- * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
- * implementation. A selected HMAC digest algorithm specified by `digest` is
- * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
- *
- * If an error occurs an `Error` will be thrown, otherwise the derived key will be
- * returned as a `Buffer`.
- *
- * The `iterations` argument must be a number set as high as possible. The
- * higher the number of iterations, the more secure the derived key will be,
- * but will take a longer amount of time to complete.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * ```js
- * const {
- * pbkdf2Sync,
- * } = await import('node:crypto');
- *
- * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512');
- * console.log(key.toString('hex')); // '3745e48...08d59ae'
- * ```
- *
- * An array of supported digest functions can be retrieved using {@link getHashes}.
- * @since v0.9.3
- */
- function pbkdf2Sync(
- password: BinaryLike,
- salt: BinaryLike,
- iterations: number,
- keylen: number,
- digest: string,
- ): NonSharedBuffer;
- /**
- * Generates cryptographically strong pseudorandom data. The `size` argument
- * is a number indicating the number of bytes to generate.
- *
- * If a `callback` function is provided, the bytes are generated asynchronously
- * and the `callback` function is invoked with two arguments: `err` and `buf`.
- * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes.
- *
- * ```js
- * // Asynchronous
- * const {
- * randomBytes,
- * } = await import('node:crypto');
- *
- * randomBytes(256, (err, buf) => {
- * if (err) throw err;
- * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
- * });
- * ```
- *
- * If the `callback` function is not provided, the random bytes are generated
- * synchronously and returned as a `Buffer`. An error will be thrown if
- * there is a problem generating the bytes.
- *
- * ```js
- * // Synchronous
- * const {
- * randomBytes,
- * } = await import('node:crypto');
- *
- * const buf = randomBytes(256);
- * console.log(
- * `${buf.length} bytes of random data: ${buf.toString('hex')}`);
- * ```
- *
- * The `crypto.randomBytes()` method will not complete until there is
- * sufficient entropy available.
- * This should normally never take longer than a few milliseconds. The only time
- * when generating the random bytes may conceivably block for a longer period of
- * time is right after boot, when the whole system is still low on entropy.
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- *
- * The asynchronous version of `crypto.randomBytes()` is carried out in a single
- * threadpool request. To minimize threadpool task length variation, partition
- * large `randomBytes` requests when doing so as part of fulfilling a client
- * request.
- * @since v0.5.8
- * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
- * @return if the `callback` function is not provided.
- */
- function randomBytes(size: number): NonSharedBuffer;
- function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
- function pseudoRandomBytes(size: number): NonSharedBuffer;
- function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
- /**
- * Return a random integer `n` such that `min <= n < max`. This
- * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
- *
- * The range (`max - min`) must be less than 2**48. `min` and `max` must
- * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger).
- *
- * If the `callback` function is not provided, the random integer is
- * generated synchronously.
- *
- * ```js
- * // Asynchronous
- * const {
- * randomInt,
- * } = await import('node:crypto');
- *
- * randomInt(3, (err, n) => {
- * if (err) throw err;
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
- * });
- * ```
- *
- * ```js
- * // Synchronous
- * const {
- * randomInt,
- * } = await import('node:crypto');
- *
- * const n = randomInt(3);
- * console.log(`Random number chosen from (0, 1, 2): ${n}`);
- * ```
- *
- * ```js
- * // With `min` argument
- * const {
- * randomInt,
- * } = await import('node:crypto');
- *
- * const n = randomInt(1, 7);
- * console.log(`The dice rolled: ${n}`);
- * ```
- * @since v14.10.0, v12.19.0
- * @param [min=0] Start of random range (inclusive).
- * @param max End of random range (exclusive).
- * @param callback `function(err, n) {}`.
- */
- function randomInt(max: number): number;
- function randomInt(min: number, max: number): number;
- function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
- function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
- /**
- * Synchronous version of {@link randomFill}.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- * const { randomFillSync } = await import('node:crypto');
- *
- * const buf = Buffer.alloc(10);
- * console.log(randomFillSync(buf).toString('hex'));
- *
- * randomFillSync(buf, 5);
- * console.log(buf.toString('hex'));
- *
- * // The above is equivalent to the following:
- * randomFillSync(buf, 5, 5);
- * console.log(buf.toString('hex'));
- * ```
- *
- * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- * const { randomFillSync } = await import('node:crypto');
- *
- * const a = new Uint32Array(10);
- * console.log(Buffer.from(randomFillSync(a).buffer,
- * a.byteOffset, a.byteLength).toString('hex'));
- *
- * const b = new DataView(new ArrayBuffer(10));
- * console.log(Buffer.from(randomFillSync(b).buffer,
- * b.byteOffset, b.byteLength).toString('hex'));
- *
- * const c = new ArrayBuffer(10);
- * console.log(Buffer.from(randomFillSync(c)).toString('hex'));
- * ```
- * @since v7.10.0, v6.13.0
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
- * @param [offset=0]
- * @param [size=buffer.length - offset]
- * @return The object passed as `buffer` argument.
- */
- function randomFillSync(buffer: T, offset?: number, size?: number): T;
- /**
- * This function is similar to {@link randomBytes} but requires the first
- * argument to be a `Buffer` that will be filled. It also
- * requires that a callback is passed in.
- *
- * If the `callback` function is not provided, an error will be thrown.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- * const { randomFill } = await import('node:crypto');
- *
- * const buf = Buffer.alloc(10);
- * randomFill(buf, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- *
- * randomFill(buf, 5, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- *
- * // The above is equivalent to the following:
- * randomFill(buf, 5, 5, (err, buf) => {
- * if (err) throw err;
- * console.log(buf.toString('hex'));
- * });
- * ```
- *
- * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`.
- *
- * While this includes instances of `Float32Array` and `Float64Array`, this
- * function should not be used to generate random floating-point numbers. The
- * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array
- * contains finite numbers only, they are not drawn from a uniform random
- * distribution and have no meaningful lower or upper bounds.
- *
- * ```js
- * import { Buffer } from 'node:buffer';
- * const { randomFill } = await import('node:crypto');
- *
- * const a = new Uint32Array(10);
- * randomFill(a, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
- * .toString('hex'));
- * });
- *
- * const b = new DataView(new ArrayBuffer(10));
- * randomFill(b, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)
- * .toString('hex'));
- * });
- *
- * const c = new ArrayBuffer(10);
- * randomFill(c, (err, buf) => {
- * if (err) throw err;
- * console.log(Buffer.from(buf).toString('hex'));
- * });
- * ```
- *
- * This API uses libuv's threadpool, which can have surprising and
- * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information.
- *
- * The asynchronous version of `crypto.randomFill()` is carried out in a single
- * threadpool request. To minimize threadpool task length variation, partition
- * large `randomFill` requests when doing so as part of fulfilling a client
- * request.
- * @since v7.10.0, v6.13.0
- * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
- * @param [offset=0]
- * @param [size=buffer.length - offset]
- * @param callback `function(err, buf) {}`.
- */
- function randomFill(
- buffer: T,
- callback: (err: Error | null, buf: T) => void,
- ): void;
- function randomFill(
- buffer: T,
- offset: number,
- callback: (err: Error | null, buf: T) => void,
- ): void;
- function randomFill(
- buffer: T,
- offset: number,
- size: number,
- callback: (err: Error | null, buf: T) => void,
- ): void;
- interface ScryptOptions {
- cost?: number | undefined;
- blockSize?: number | undefined;
- parallelization?: number | undefined;
- N?: number | undefined;
- r?: number | undefined;
- p?: number | undefined;
- maxmem?: number | undefined;
- }
- /**
- * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
- * key derivation function that is designed to be expensive computationally and
- * memory-wise in order to make brute-force attacks unrewarding.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the
- * callback as a `Buffer`.
- *
- * An exception is thrown when any of the input arguments specify invalid values
- * or types.
- *
- * ```js
- * const {
- * scrypt,
- * } = await import('node:crypto');
- *
- * // Using the factory defaults.
- * scrypt('password', 'salt', 64, (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae'
- * });
- * // Using a custom N parameter. Must be a power of two.
- * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => {
- * if (err) throw err;
- * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34'
- * });
- * ```
- * @since v10.5.0
- */
- function scrypt(
- password: BinaryLike,
- salt: BinaryLike,
- keylen: number,
- callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
- ): void;
- function scrypt(
- password: BinaryLike,
- salt: BinaryLike,
- keylen: number,
- options: ScryptOptions,
- callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
- ): void;
- /**
- * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
- * key derivation function that is designed to be expensive computationally and
- * memory-wise in order to make brute-force attacks unrewarding.
- *
- * The `salt` should be as unique as possible. It is recommended that a salt is
- * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details.
- *
- * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
- *
- * An exception is thrown when key derivation fails, otherwise the derived key is
- * returned as a `Buffer`.
- *
- * An exception is thrown when any of the input arguments specify invalid values
- * or types.
- *
- * ```js
- * const {
- * scryptSync,
- * } = await import('node:crypto');
- * // Using the factory defaults.
- *
- * const key1 = scryptSync('password', 'salt', 64);
- * console.log(key1.toString('hex')); // '3745e48...08d59ae'
- * // Using a custom N parameter. Must be a power of two.
- * const key2 = scryptSync('password', 'salt', 64, { N: 1024 });
- * console.log(key2.toString('hex')); // '3745e48...aa39b34'
- * ```
- * @since v10.5.0
- */
- function scryptSync(
- password: BinaryLike,
- salt: BinaryLike,
- keylen: number,
- options?: ScryptOptions,
- ): NonSharedBuffer;
- interface RsaPublicKey {
- key: KeyLike;
- padding?: number | undefined;
- }
- interface RsaPrivateKey {
- key: KeyLike;
- passphrase?: string | undefined;
- /**
- * @default 'sha1'
- */
- oaepHash?: string | undefined;
- oaepLabel?: NodeJS.TypedArray | undefined;
- padding?: number | undefined;
- }
- /**
- * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
- * the corresponding private key, for example using {@link privateDecrypt}.
- *
- * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
- * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
- *
- * Because RSA public keys can be derived from private keys, a private key may
- * be passed instead of a public key.
- * @since v0.11.14
- */
- function publicEncrypt(
- key: RsaPublicKey | RsaPrivateKey | KeyLike,
- buffer: NodeJS.ArrayBufferView | 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(
- type: "dh",
- options: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "dsa",
- options: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "ec",
- options: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "ed25519",
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "ed448",
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: MLDSAKeyType,
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: MLKEMKeyType,
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "rsa-pss",
- options: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "rsa",
- options: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: SLHDSAKeyType,
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "x25519",
- options?: T,
- ): KeyPairExportResult;
- function generateKeyPairSync(
- type: "x448",
- options?: T,
- ): KeyPairExportResult;
- /**
- * 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(
- type: "dh",
- options: T,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "dsa",
- options: T,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "ec",
- options: T,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "ed25519",
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "ed448",
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: MLDSAKeyType,
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: MLKEMKeyType,
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "rsa-pss",
- options: T,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "rsa",
- options: T,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: SLHDSAKeyType,
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair(
- type: "x25519",
- options: T | undefined,
- callback: KeyPairExportCallback,
- ): void;
- function generateKeyPair